Advertisement
Whiteaxe

boxdropper

Jan 1st, 2016
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. def box_dropper
  2. def box_drop
  3. $contents.each { |box|
  4. fput "get #{box} from #{$container}"
  5. fput "drop #{box}"
  6. }
  7. end
  8. def scan_box
  9. result = dothistimeout "look in my #{Vars.lootsack}", 5, /In the .*? you see|There is nothing in there/
  10. if result !~ /There is nothing in there/
  11. $contents = result.scan(/\b(?:#{$boxitems.join('|')})(?= and an? |,|\.)/)
  12. if $contents.empty? == false
  13. echo "Lootsack: #{$contents}"
  14. $container = "my #{Vars.lootsack}"
  15. box_drop
  16. end
  17. end
  18. end
  19.  
  20.  
  21. scan_box
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement