# HG changeset patch # User Robert McIntyre # Date 1333978065 18000 # Node ID 8c474d1d695672141aba3aaf85cca451c5c076a0 # Parent 016c2bcca08f19ca9f001fe103b47717f3fe2def script: got leomnades and TM13, shopping is complete. diff -r 016c2bcca08f -r 8c474d1d6956 clojure/com/aurellem/run/bootstrap_1.clj --- a/clojure/com/aurellem/run/bootstrap_1.clj Mon Apr 09 07:30:44 2012 -0500 +++ b/clojure/com/aurellem/run/bootstrap_1.clj Mon Apr 09 08:27:45 2012 -0500 @@ -493,8 +493,7 @@ ↑ ↑ ↑ → → → → → ↑ ;; leave floor four ↓ ← ← ← ← ← ← ← ← - ↓ ↓ ↓ ← ← ← ;; go to five's clerk - ]) + ↓ ↓ ↓ ← ← ← ]);; go to five's clerk (turn ↑)))) (defn-memo floor-five-items @@ -509,13 +508,58 @@ close-menu end-shop-conversation))) -(defn go-to-roof - []) +(defn-memo go-to-roof + ([] (go-to-roof (floor-five-items))) + ([script] + (->> script + (walk [→ → → → ↑ ↑ ↑ → → → ↑ ;; leave floor five + ↓ ← ← ←]) ;; walk to vending machine + (turn ↑)))) -(defn roof-drinks - []) +(defn dp + [str script] + (println str) script) +(defn buy-drink + "Assumes you're in front of the vending machine. Buys the indicated + drink." + [n script] + (->> script + (dp "talk") + talk + (dp "scroll-text") + (scroll-text) + (wait-for-cursor) + (set-cursor n) + select-menu-entry + close-menu)) + +(defn-memo roof-drinks + ([] (roof-drinks (go-to-roof))) + ([script] + (->> script + (buy-drink 0) ;; fresh water (for TM13) + + ;; buy 16 lemonades + ;; LEMONADE is the best item <3 :) + (multiple-times 5 (partial buy-drink 2)) + (do-nothing 1) ;; unknown hiccup here :( + (multiple-times 11 (partial buy-drink 2))))) + (defn get-TM13 - []) + ([] (get-TM13 (roof-drinks))) + ([script] + (->> script + (walk [↓ ↓ ↓ + ← ← ← ← ← ← + ]) + (do-nothing 1) ;; wtf is wrong with talk? + talk + (scroll-text 2) + select-menu-entry + select-menu-entry + + (scroll-text 6) + close-menu))) + - \ No newline at end of file