Mercurial > vba-clojure
comparison clojure/com/aurellem/run/bootstrap_1.clj @ 367:845b2d88bef9
script: item-program completely deposited. Will test tomorrow :)
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Mon, 09 Apr 2012 13:21:34 -0500 |
parents | 985e91060567 |
children | 08f8284e2f1b |
comparison
equal
deleted
inserted
replaced
366:985e91060567 | 367:845b2d88bef9 |
---|---|
128 | 128 |
129 0x00 | 129 0x00 |
130 0xE9 ;; jump to (HL) | 130 0xE9 ;; jump to (HL) |
131 ]]))) | 131 ]]))) |
132 | 132 |
133 (defn view-desired-item-layout [] | 133 (defn print-desired-item-layout [] |
134 (clojure.pprint/pprint | 134 (clojure.pprint/pprint |
135 (raw-inventory->inventory (pc-item-writer-program)))) | 135 (raw-inventory->inventory (pc-item-writer-program)))) |
136 | 136 |
137 (defn pc-item-writer-state [] | 137 (defn pc-item-writer-state [] |
138 (-> (read-state "bootstrap-init") | 138 (-> (read-state "bootstrap-init") |
747 (deposit-held-item-named :TM18 1) | 747 (deposit-held-item-named :TM18 1) |
748 (deposit-held-item 13 1) | 748 (deposit-held-item 13 1) |
749 (deposit-held-item 13 191) | 749 (deposit-held-item 13 191) |
750 (deposit-held-item-named :TM02 98) | 750 (deposit-held-item-named :TM02 98) |
751 (deposit-held-item-named :TM09 1) | 751 (deposit-held-item-named :TM09 1) |
752 close-menu | |
752 close-menu))) | 753 close-menu))) |
753 | 754 |
754 (defn-memo hacking-11 | 755 (defn-memo hacking-11 |
755 ([] (hacking-11 (hacking-10))) | 756 ([] (hacking-11 (hacking-10))) |
756 ([script] | 757 ([script] |
757 (->> script | 758 (->> script |
758 to-held-items | 759 begin-withdraw |
759 (toss-held-item 17 1) | 760 (widthdraw-pc-item 3 0xFE) |
760 (toss-held-item 17 1) | 761 (widthdraw-pc-item 4 0xFE) |
761 (toss-held-item 17 1) | 762 (widthdraw-pc-item 5 1) |
762 (toss-held-item 17 1) | 763 (widthdraw-pc-item 5 1) |
763 (toss-held-item 17 1) | 764 (widthdraw-pc-item 5 1) |
764 close-menu | 765 (widthdraw-pc-item 5 0xFB) |
765 close-menu))) | 766 (multiple-times |
766 | 767 3 |
767 | 768 (partial combine-items 2)) |
769 close-menu))) | |
770 | |
771 (defn-memo hacking-12 | |
772 ([] (hacking-12 (hacking-11))) | |
773 ([script] | |
774 (->> script | |
775 begin-deposit | |
776 (deposit-held-item 18 203) | |
777 (deposit-held-item-named :guard-spec 87) | |
778 (deposit-held-item-named :guard-spec 24) | |
779 (deposit-held-item-named :TM05 1) | |
780 (multiple-times | |
781 8 | |
782 (partial deposit-held-item 14 2)) | |
783 (deposit-held-item 14 55) | |
784 (deposit-held-item-named :x-accuracy 58) | |
785 (deposit-held-item 14 38) | |
786 (deposit-held-item-named :TM13 1) | |
787 (deposit-held-item 13 1) | |
788 (deposit-held-item 13 233) | |
789 close-menu | |
790 close-menu))) | |
791 | |
792 | |
793 (defn toss-pc-item [n quantity [moves state :as script]] | |
794 (let [total-quantity (second (nth-pc-item state n))] | |
795 (->> script | |
796 (set-cursor n) | |
797 (select-menu-entry 1) | |
798 (wait-for-quantity) | |
799 (set-quantity total-quantity quantity) | |
800 (delayed-difference [] [:a] 100 #(search-string % "Is")) | |
801 (scroll-text) | |
802 select-menu-entry | |
803 (scroll-text)))) | |
804 | |
805 (defn hacking-13 | |
806 ([] (hacking-13 (hacking-12))) | |
807 ([script] | |
808 (->> script | |
809 (set-cursor-relative 1) | |
810 (select-menu-entry) | |
811 (toss-pc-item 1 1) | |
812 (toss-pc-item 0 156) | |
813 (toss-pc-item 0 11) | |
814 close-menu))) | |
768 | 815 |
769 | 816 |
770 | 817 |
818 | |
819 | |
820 | |
821 | |
822 | |
823 |