add utility functions
This commit is contained in:
42
main.lisp
42
main.lisp
@@ -46,18 +46,36 @@
|
||||
:save-runtime-options :accept-runtime-options))
|
||||
|
||||
(comment
|
||||
(defvar foo nil
|
||||
(setf foo (serapeum/bundle:random-elt *chronostory-mobs*)
|
||||
*chronostory-drops*
|
||||
(maybe-pass #'make-spawn-data-source (get-arg "--output" '("/root/lispostory/lispostory" "refresh" "spawns" "--output" "/root/api/chronostory/spawns.json")))
|
||||
(defvar foo nil)
|
||||
(setf foo (serapeum/bundle:random-elt *chronostory-mobs*)
|
||||
*chronostory-drops*)
|
||||
|
||||
(reload-item-data
|
||||
(filter-map
|
||||
(lambda (m)
|
||||
(when (= (parse-integer (gethash "DROPPERID" m))
|
||||
(parse-integer (href foo "mob" "mob_id")))
|
||||
(gethash "ITEMNAME" m))
|
||||
(coerce *chronostory-drops* 'list)
|
||||
(let ((spawns (coerce (gethash "LUDIBRIUM" (data (make-spawn-data-source))) 'list)))
|
||||
(find-if (lambda (hm) (string-equal (gethash "MobName" hm) "Master Death Teddy")) spawns))
|
||||
|
||||
(let* ((mobs (coerce (data(make-mob-data-source)) 'list)))
|
||||
(filter-map (lambda (hm)
|
||||
(let ((item-name (string-downcase (gethash "ItemName" hm))))
|
||||
(when (or
|
||||
(string-contains-p "orange goldrunners" item-name)
|
||||
(string-contains-p "blue goldrunners" item-name))
|
||||
(@ (find-if (lambda (mhm)
|
||||
(= (parse-integer (@ mhm "mob" "mob_id"))
|
||||
(gethash "DropperID" hm)))
|
||||
mobs) "mob" "mob_name"))))
|
||||
(coerce (data (make-drop-data-source)) 'list)))
|
||||
|
||||
|
||||
(hash-table-keys (aref (@ *chronostory-spawns* :el-nath) 0))
|
||||
(hash-table-keys (aref *chronostory-drops* 0))))))))
|
||||
|
||||
(reload-item-data
|
||||
(filter-map
|
||||
(lambda (m)
|
||||
(when (= (parse-integer (gethash "DROPPERID" m))
|
||||
(parse-integer (href foo "mob" "mob_id")))
|
||||
(gethash "ITEMNAME" m))
|
||||
(coerce *chronostory-drops* 'list)
|
||||
|
||||
|
||||
(hash-table-keys (aref (@ *chronostory-spawns* :el-nath) 0))
|
||||
(hash-table-keys (aref *chronostory-drops* 0))))))
|
||||
|
||||
Reference in New Issue
Block a user