Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.19 KB | None | 0 0
  1. skill = variable[1]
  2.  
  3. def researchPart(skill,duration)
  4.   case DRC.bput("research #{skill} #{duration}","You are already busy at research!","You cannot begin a new project until your current one is either completed or cancelled", "You tentatively reach out and begin manipulating the mana streams, testing their give and the amount of energy coursing through them.","You confidently begin to bend the mana streams",/only requires (\d+) more seconds of research/)
  5.   when "You are already busy at research!", "You cannot begin a new project until your current one is either completed or cancelled"
  6.     echo "Already researching something!  Finish it manually, then restart"
  7.     exit
  8.   when "You tentatively reach out and begin manipulating the mana streams, testing their give and the amount of energy coursing through them.","You confidently begin to bend the mana streams"
  9.     pause duration + 5
  10.     researchPart(skill,duration)
  11.   when /only requires (\d+) more seconds of research/
  12.     echo Regexp.last_match(1).to_i
  13.     pause Regexp.last_match(1).to_i
  14.     exit
  15.   end
  16.  
  17. end
  18.  
  19. def research(skill)
  20.   DRC.wait_for_script_to_complete('buff',['research'])
  21.   researchPart(skill,300)
  22.  
  23. end
  24.  
  25.  
  26. research(skill)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement