Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- custom_require.call(%w(common common-arcana common-items common-travel drinfomon events spellmonitor equipmanager))
- class Athletics
- include DRC
- include DRCA
- include DRCI
- #include DRCS
- include DRCT
- def initialize
- @settings = get_settings()
- @athletics_options = get_data('athletics').athletics_options
- @climbing_target = get_data('athletics').practice_options[@settings.climbing_target]
- @swimming_target = get_data('athletics').swimming_options[@settings.swimming_target]
- return unless DRSkill.getxp('Athletics') < 20
- DRC.wait_for_script_to_complete('buff', ['eotb']) if DRStats.necromancer?
- if DRSkill.getrank('Athletics') >= 525
- hlc_athletics
- elsif @climbing_target
- climb_practice(@climbing_target['target'], @climbing_target['hide'])
- elsif @swimming_target
- swim_loop(@swimming_target['rooms'])
- elsif @settings.hometown == 'Crossing'
- crossing_athletics
- elsif @settings.hometown == 'Riverhaven'
- riverhaven_athletics
- elsif @settings.hometown == 'Shard'
- shard_athletics
- elsif @settings.hometown == 'Hibarnhvidar'
- hib_athletics
- elsif @settings.hometown == 'Ratha'
- ratha_athletics
- end
- DRC.wait_for_script_to_complete('buff', ['eotb']) if DRStats.necromancer?
- end
- def swim_loop(rooms)
- return unless rooms
- while DRSkill.getxp('Athletics') < 29
- rooms.each { |x| walk_to(x) }
- end
- end
- def hlc_athletics
- start_script('skill-recorder') unless Script.running?('skill-recorder')
- walk_to(2245)
- if DRSkill.getxp('Athletics') < 29
- walk_to(2245)
- walk_to(9607)
- walk_to(19_464)
- while DRSkill.getxp('Athletics') < 29
- walk_to(2245)
- walk_to(9607)
- walk_to(11_126)
- walk_to(19_464)
- break if DRSkill.getxp('Athletics') >= 29
- end
- end
- end
- def riverhaven_athletics
- while DRSkill.getxp('Athletics') < 29
- walk_to(473)
- walk_to(1375)
- break if DRSkill.getxp('Athletics') >= 29
- end
- end
- def crossing_athletics
- if DRSkill.getrank('Athletics') >= 400
- climb_branch
- else
- while DRSkill.getxp('Athletics') <= 30
- DRC.wait_for_script_to_complete('buff', ['eotb']) if DRStats.necromancer?
- @athletics_options
- .reject { |data| @settings.avoid_athletics_in_justice && data['justice'] }
- .each do |data|
- break unless climb?(data['room'], data['targets'])
- end
- end
- end
- end
- def shard_athletics
- while DRSkill.getxp('Athletics') <= 30
- walk_to(11481)
- walk_to(11482)
- walk_to(11483)
- end
- end
- def hib_athletics
- walk_to(4155)
- move('nw')
- while DRSkill.getxp('Athletics') <= 30
- fput('climb bank')
- 3.times do
- fput('south')
- waitrt?
- end
- #walk_to(4155)
- fput('climb bank')
- walk_to(4155)
- move('nw')
- end
- fput('climb bank')
- waitrt?
- walk_to(@settings.safe_room)
- end
- def ratha_athletics
- while DRSkill.getxp('Athletics') <= 30
- walk_to(11549)
- walk_to(11550)
- walk_to(11551)
- walk_to(11552)
- end
- end
- def climb_practice(target, to_hide = false)
- return unless target
- walk_to(@climbing_target['id'])
- while DRSkill.getxp('Athletics') < 29
- if DRStats.necromancer?
- DRC.wait_for_script_to_complete('buff', ['eotb'])
- end
- retreat
- if to_hide
- attempts_to_hide = 5
- while attempts_to_hide > 0
- break if hide?
- attempts_to_hide -= 1
- end
- return if attempts_to_hide == 0
- end
- Flags.add('ct-climbing-finished', 'You finish practicing')
- Flags.add('ct-climbing-combat', 'You are engaged in combat')
- bput("climb practice #{target}", 'You begin to practice ')
- loop do
- pause 1
- break if Flags['ct-climbing-finished']
- return if Flags['ct-climbing-combat']
- if DRSkill.getxp('Athletics') > 28
- fput('stop climb')
- break
- end
- end
- end
- bput('unhide', 'You come out of hiding', 'You slip out of hiding', 'But you are not')
- end
- def climb?(room, targets)
- targets.each do |target|
- walk_to(room)
- return true if DRRoom.npcs.length >= 3
- fput "climb #{target}"
- pause
- waitrt?
- return false if DRSkill.getxp('Athletics') >= 30
- end
- true
- end
- def climb_branch
- walk_to(2245)
- if DRSkill.getxp('Athletics') < 29
- walk_to(2245)
- if UserVars.athletics < 550
- climb_practice('branch', true)
- end
- end
- end
- end
- Athletics.new
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement