Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- custom_require.call(%w[common common-arcana common-travel drinfomon events])
- class CheckFavors
- include DRC
- include DRCA
- include DRCT
- def initialize
- @settings = get_settings
- @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"]
- check_favors
- end
- def check_favors
- return unless @settings.favor_goal
- /(\d+)/ =~ bput('favor', 'You currently have \d+', 'You are not currently')
- favor_count = Regexp.last_match(1).to_i
- return if favor_count >= @settings.favor_goal
- if /could not/ =~ bput("tap #{@settings.favor_god} orb", 'The orb is delicate', 'I could not find')
- if @neutralGods.include?(@settings.favor_god)
- wait_for_script_to_complete('favor')
- else
- wait_for_script_to_complete('favor', [@settings.favor_god])
- end
- fput('stow my orb')
- elsif rub_orb?
- walk_to(5865)
- fput("get my #{@settings.favor_god} orb")
- fput('put my orb on altar')
- if favor_count + 1 < @settings.favor_goal
- if @neutralGods.include?(@settings.favor_god)
- wait_for_script_to_complete('favor')
- else
- wait_for_script_to_complete('favor', [@settings.favor_god])
- end
- fput('stow my orb')
- end
- end
- end
- def rub_orb?
- 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')
- when 'not yet fully prepared'
- false
- when 'lacking in the type of sacrifice the orb requires'
- false
- when 'your sacrifice is properly prepared'
- true
- when 'is not deemed worthy to hold your required sacrifice'
- bput("get #{@settings.favor_god} orb",'You get')
- fput("drop #{@settings.favor_god} orb")
- end
- end
- end
- # Call this last to avoid the need for forward declarations
- CheckFavors.new
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement