Advertisement
Pahzon

Untitled

Nov 20th, 2018
539
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.78 KB | None | 0 0
  1. custom_require.call(%w[drinfomon events common common-items common-travel dependency])
  2.  
  3.  
  4. class Foragetask
  5. include DRC
  6. include DRCI
  7. include DRCT
  8.  
  9.  
  10. def initialize
  11. settings = get_settings
  12. @mech_safe_room = settings.mech_safe_room || "992"
  13. @forage_container = settings.forage_container || "backpack"
  14. @forage_container_two = settings.forage_container_two || "haversack"
  15. getmode
  16. end
  17.  
  18. def getmode
  19. if script.vars[1] =~ /help/i
  20. showhelp
  21. elsif script.vars[1] =~ /task/i
  22. walk_to('954')
  23. gettask
  24. end
  25. end
  26.  
  27. def showhelp
  28. 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.')
  29. 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')
  30. 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.')
  31. 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.')
  32. echo('When you are all set up and ready to start task mode, type ;magzon task to kick off task mode.')
  33. exit
  34. end
  35.  
  36. def gettask
  37. 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")
  38. when /I need (\d+) bits of (\w+)/
  39. number = Regexp.last_match(1).to_i
  40. item = Regexp.last_match(2)
  41. echo "Number is #{number} and item is #{item}."
  42. set_target(item, number)
  43. when /I need (\d+) pieces of wild (\w+)/
  44. number = Regexp.last_match(1).to_i
  45. item = Regexp.last_match(2)
  46. echo "Number is #{number} and item is #{item}."
  47. set_target(item, number)
  48. when /I need (\d+) (\w+)/
  49. number = Regexp.last_match(1).to_i
  50. item = Regexp.last_match(2)
  51. echo "Number is #{number} and item is #{item}."
  52. set_target(item, number)
  53. when "I am sorry, you must wait"
  54. echo "Next task not ready... waiting for another task"
  55. do_wait
  56. when "You are already on a task"
  57. echo "Already on a task... canceling it"
  58. cancel_task
  59. end
  60. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement