changeset 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
files clojure/com/aurellem/run/bootstrap_1.clj
diffstat 1 files changed, 60 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/run/bootstrap_1.clj	Mon Apr 09 12:34:29 2012 -0500
     1.2 +++ b/clojure/com/aurellem/run/bootstrap_1.clj	Mon Apr 09 13:21:34 2012 -0500
     1.3 @@ -130,7 +130,7 @@
     1.4         0xE9 ;; jump to (HL)
     1.5         ]])))
     1.6  
     1.7 -(defn view-desired-item-layout []
     1.8 +(defn print-desired-item-layout []
     1.9    (clojure.pprint/pprint
    1.10     (raw-inventory->inventory (pc-item-writer-program))))
    1.11  
    1.12 @@ -749,20 +749,73 @@
    1.13            (deposit-held-item 13 191)
    1.14            (deposit-held-item-named :TM02 98)
    1.15            (deposit-held-item-named :TM09 1)
    1.16 +          close-menu
    1.17            close-menu)))
    1.18  
    1.19  (defn-memo hacking-11
    1.20    ([] (hacking-11 (hacking-10)))
    1.21    ([script]
    1.22       (->> script
    1.23 -          to-held-items
    1.24 -          (toss-held-item 17 1)
    1.25 -          (toss-held-item 17 1)
    1.26 -          (toss-held-item 17 1)
    1.27 -          (toss-held-item 17 1)
    1.28 -          (toss-held-item 17 1)
    1.29 +          begin-withdraw
    1.30 +          (widthdraw-pc-item 3 0xFE)
    1.31 +          (widthdraw-pc-item 4 0xFE)
    1.32 +          (widthdraw-pc-item 5 1)
    1.33 +          (widthdraw-pc-item 5 1)
    1.34 +          (widthdraw-pc-item 5 1)
    1.35 +          (widthdraw-pc-item 5 0xFB)
    1.36 +          (multiple-times
    1.37 +           3
    1.38 +           (partial combine-items 2))
    1.39 +          close-menu)))
    1.40 +
    1.41 +(defn-memo hacking-12
    1.42 +  ([] (hacking-12 (hacking-11)))
    1.43 +  ([script]
    1.44 +     (->> script
    1.45 +          begin-deposit
    1.46 +          (deposit-held-item 18 203)
    1.47 +          (deposit-held-item-named :guard-spec 87)
    1.48 +          (deposit-held-item-named :guard-spec 24)
    1.49 +          (deposit-held-item-named :TM05 1)
    1.50 +          (multiple-times
    1.51 +           8
    1.52 +           (partial deposit-held-item 14 2))
    1.53 +          (deposit-held-item 14 55)
    1.54 +          (deposit-held-item-named :x-accuracy 58)
    1.55 +          (deposit-held-item 14 38)
    1.56 +          (deposit-held-item-named :TM13 1)
    1.57 +          (deposit-held-item 13 1)
    1.58 +          (deposit-held-item 13 233)
    1.59            close-menu
    1.60            close-menu)))
    1.61 +
    1.62 +
    1.63 +(defn toss-pc-item [n quantity  [moves state :as script]]
    1.64 +  (let [total-quantity (second (nth-pc-item state n))]
    1.65 +    (->> script
    1.66 +         (set-cursor n)
    1.67 +         (select-menu-entry 1)
    1.68 +         (wait-for-quantity)
    1.69 +         (set-quantity total-quantity quantity)
    1.70 +         (delayed-difference [] [:a] 100 #(search-string % "Is"))
    1.71 +         (scroll-text)
    1.72 +         select-menu-entry
    1.73 +         (scroll-text))))
    1.74 +       
    1.75 +(defn hacking-13
    1.76 +  ([] (hacking-13 (hacking-12)))
    1.77 +  ([script]
    1.78 +     (->> script
    1.79 +          (set-cursor-relative 1)
    1.80 +          (select-menu-entry)
    1.81 +          (toss-pc-item 1 1)
    1.82 +          (toss-pc-item 0 156)
    1.83 +          (toss-pc-item 0 11)
    1.84 +          close-menu)))
    1.85 +
    1.86 +          
    1.87 +          
    1.88 +          
    1.89       
    1.90  
    1.91