Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- custom_require.call(%w[drinfomon events common common-items common-travel dependency])
- class Foragetask
- include DRC
- include DRCI
- include DRCT
- def initialize
- settings = get_settings
- @mech_safe_room = settings.mech_safe_room || "992"
- @forage_container = settings.forage_container || "backpack"
- @forage_container_two = settings.forage_container_two || "haversack"
- getmode
- end
- def getmode
- if script.vars[1] =~ /help/i
- showhelp
- elsif script.vars[1] =~ /task/i
- walk_to('954')
- gettask
- end
- end
- def showhelp
- 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.')
- 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')
- 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.')
- 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.')
- echo('When you are all set up and ready to start task mode, type ;magzon task to kick off task mode.')
- exit
- end
- def gettask
- 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")
- when /I need (\d+) bits of (\w+)/
- number = Regexp.last_match(1).to_i
- item = Regexp.last_match(2)
- echo "Number is #{number} and item is #{item}."
- set_target(item, number)
- when /I need (\d+) pieces of wild (\w+)/
- number = Regexp.last_match(1).to_i
- item = Regexp.last_match(2)
- echo "Number is #{number} and item is #{item}."
- set_target(item, number)
- when /I need (\d+) (\w+)/
- number = Regexp.last_match(1).to_i
- item = Regexp.last_match(2)
- echo "Number is #{number} and item is #{item}."
- set_target(item, number)
- when "I am sorry, you must wait"
- echo "Next task not ready... waiting for another task"
- do_wait
- when "You are already on a task"
- echo "Already on a task... canceling it"
- cancel_task
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement