Advertisement
Pahzon

Untitled

Nov 20th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.72 KB | None | 0 0
  1. class Foragetask
  2. include DRC
  3. include DRCI
  4. include DRCT
  5.  
  6. def initialize
  7. settings = get_settings
  8. @mech_safe_room = settings.mech_safe_room || "992"
  9. @forage_container = settings.forage_container || "backpack"
  10. @forage_container_two = settings.forage_container_two || "haversack"
  11. #decide mode
  12. runmode
  13. end
  14.  
  15. def runmode
  16. if script.vars[1] = task
  17. walk_to('954')
  18. gettask
  19. if script.vars[1] = help
  20. showhelp
  21. else
  22. showhelp
  23. end
  24. end
  25.  
  26. def showhelp
  27. echo "VERSION 2.1 NOW with 50% more slick thanks to Quillith. You can still yell at me (Pahzon) on lnet if anything seems broke...hasnt had a lot of testing yet."
  28. echo "If you have not yet you will need to do a intial setup for dependency and such. GUIDE: https://github.com/rpherbig/dr-scripts/wiki/First-Time-Setup"
  29. echo "Youll also want to sell Mags all the branches you can, before you run this. Once thats done and you have a proper YAML. This script will run forage tasks from Mags to train Trading, it will also keep Outdoorsmanship, Perception, Appraisal, Mech, Scholarship, Athletics, Performance, Arcana, Attunement, and any magics setup in your crafting_training_spells https://pastebin.com/GuQY2xF2 pretty much locked up to at least 120ish so far."
  30. echo "Youll need zills for (performance), compendium/textbook for ;first-aid, and a sanowret crystal for ;sanowret-crystal (arcana). You may want to ;e autostart('sanowret-crystal') so it launches on start up for you, but you will defintly want it running with this script if you have one."
  31. echo "When you are all set up and ready to start task mode, type ;magzon task to kick off task mode."
  32. exit
  33. end
  34.  
  35. def gettask
  36. case bput('ask mags for task', /I need (\d+) bits of (\w+)/, /I need (\d+) pieces of wild (\w+)/, /I need (\d+) (\w+)/, "You are already on a task", "I am sorry, you must wait")
  37. when /I need (\d+) bits of (\w+)/
  38. number = Regexp.last_match(1).to_i
  39. item = Regexp.last_match(2)
  40. echo "Number is #{number} and item is #{item}."
  41. set_target(item, number)
  42. when /I need (\d+) pieces of wild (\w+)/
  43. number = Regexp.last_match(1).to_i
  44. item = Regexp.last_match(2)
  45. echo "Number is #{number} and item is #{item}."
  46. set_target(item, number)
  47. when /I need (\d+) (\w+)/
  48. number = Regexp.last_match(1).to_i
  49. item = Regexp.last_match(2)
  50. echo "Number is #{number} and item is #{item}."
  51. set_target(item, number)
  52. when "I am sorry, you must wait"
  53. echo "Next task not ready... waiting for another task"
  54. do_wait
  55. when "You are already on a task"
  56. echo "Already on a task... canceling it"
  57. cancel_task
  58. end
  59. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement