Advertisement
jbrocky

Untitled

Oct 3rd, 2019
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.18 KB | None | 0 0
  1.  
  2. custom_require.call(%w[common common-arcana common-travel drinfomon events])
  3.  
  4. class CheckFavors
  5. include DRC
  6. include DRCA
  7. include DRCT
  8.  
  9. def initialize
  10. @settings = get_settings
  11. @neutralGods = ['Kertigan', 'Hodierna', 'Meraud', 'Damaris', 'Everild', 'Truffenyi', "Hav'roth", 'Eluned', 'Glythtide', 'Tamsine', 'Faenella', 'Chadatru', "Urrem'tier", 'kertigan', 'hodierna', 'meraud', 'damaris', 'everild', 'truffenyi', "hav'roth", 'euned', 'glythtide', 'tamsine', 'faenella', 'chadatru', "urrem'tier"]
  12. check_favors
  13. end
  14.  
  15. def check_favors
  16. return unless @settings.favor_goal
  17. /(\d+)/ =~ bput('favor', 'You currently have \d+', 'You are not currently')
  18. favor_count = Regexp.last_match(1).to_i
  19. return if favor_count >= @settings.favor_goal
  20.  
  21. if /could not/ =~ bput("tap #{@settings.favor_god} orb", 'The orb is delicate', 'I could not find')
  22. if @neutralGods.include?(@settings.favor_god)
  23. wait_for_script_to_complete('favor')
  24. else
  25. wait_for_script_to_complete('favor', [@settings.favor_god])
  26. end
  27. fput('stow my orb')
  28. elsif rub_orb?
  29. walk_to(5865)
  30. fput("get my #{@settings.favor_god} orb")
  31. fput('put my orb on altar')
  32. if favor_count + 1 < @settings.favor_goal
  33. if @neutralGods.include?(@settings.favor_god)
  34. wait_for_script_to_complete('favor')
  35. else
  36. wait_for_script_to_complete('favor', [@settings.favor_god])
  37. end
  38. fput('stow my orb')
  39. end
  40. end
  41. end
  42.  
  43. def rub_orb?
  44. case bput("rub my #{@settings.favor_god} orb", 'not yet fully prepared', 'lacking in the type of sacrifice the orb requires', 'your sacrifice is properly prepared','is not deemed worthy to hold your required sacrifice')
  45. when 'not yet fully prepared'
  46. false
  47. when 'lacking in the type of sacrifice the orb requires'
  48. false
  49. when 'your sacrifice is properly prepared'
  50. true
  51. when 'is not deemed worthy to hold your required sacrifice'
  52. bput("get #{@settings.favor_god} orb",'You get')
  53. fput("drop #{@settings.favor_god} orb")
  54. end
  55. end
  56. end
  57.  
  58. # Call this last to avoid the need for forward declarations
  59. CheckFavors.new
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement