Skip to content

Commit

Permalink
uservars were the problem
Browse files Browse the repository at this point in the history
  • Loading branch information
MahtraDR committed Oct 9, 2023
1 parent 99f57e4 commit 58785f3
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions athletics.lic
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Athletics

get_athletics_items

start_exp = DRSkill.getxp('Athletics').to_i
start_exp = DRSkill.getxp('Athletics')
@end_exp = [start_exp + 15, 29].min

arg_definitions = [
Expand Down Expand Up @@ -53,7 +53,7 @@ class Athletics
elsif athletics_location == 'Crossing'
crossing_athletics
elsif athletics_location == 'Riverhaven'
crossing_athletics if DRSkill.getrank('Athletics').to_i > 140
crossing_athletics if DRSkill.getrank('Athletics') > 140
elsif athletics_location == 'Shard'
shard_athletics
elsif athletics_location == 'Hibarnhvidar'
Expand Down Expand Up @@ -99,7 +99,7 @@ class Athletics
end

def done_training?
DRSkill.getxp('Athletics').to_i >= @end_exp
DRSkill.getxp('Athletics') >= @end_exp
end

def offset_climbing_song(direction)
Expand Down Expand Up @@ -195,7 +195,7 @@ class Athletics

def pick_climbing_song
# start at a high difficulty guess and work downwards
case DRSkill.getrank('Athletics').to_i
case DRSkill.getrank('Athletics')
when 0..100
'lament'
when 100..250
Expand All @@ -210,9 +210,9 @@ class Athletics
end

def crossing_athletics
if UserVars.athletics <= 50
if UserVars.athletics.to_i <= 50
swim_loop(get_data('athletics').swimming_options['arthe_dale']['rooms'])
elsif UserVars.athletics < 290
elsif UserVars.athletics.to_i < 290
waitrt?
pause @performance_pause # to give performance time to complete before_dying if stopped from the previous script
start_script('performance') unless Script.running?('performance')
Expand All @@ -223,28 +223,28 @@ class Athletics
break unless climb?(data['room'], data['targets'])
end
end
elsif UserVars.athletics < 450
elsif UserVars.athletics.to_i < 450
override_location_and_practice('segoltha_bank')
else
DRC.message("The xalas argument will train faster at 650+ athletics. Be aware that it's potentially dangerous.") if UserVars.athletics > 650
DRC.message("The xalas argument will train faster at 650+ athletics. Be aware that it's potentially dangerous.") if UserVars.athletics.to_i > 650
override_location_and_practice('arthelun_rocks')
DRC.message("The xalas argument will train faster at 650+ athletics. Be aware that it's potentially dangerous.") if UserVars.athletics > 650
DRC.message("The xalas argument will train faster at 650+ athletics. Be aware that it's potentially dangerous.") if UserVars.athletics.to_i > 650
end
end

def shard_athletics
until done_training?
if UserVars.athletics < 240
if UserVars.athletics.to_i < 240
until done_training?
@athletics_options['shard']
.reject { |data| @settings.avoid_athletics_in_justice && data['justice'] }
.each do |data|
break unless climb?(data['room'], data['targets'])
end
end
elsif UserVars.athletics < 540
elsif UserVars.athletics.to_i < 540
climb_cliffs
elsif UserVars.athletics < 850
elsif UserVars.athletics.to_i < 850
climb_branch
elsif UserVars.athletics
climb_wyvern
Expand All @@ -258,9 +258,9 @@ class Athletics

def ratha_athletics
until done_training?
if DRSkill.getrank('Athletics').to_i <= 185
if DRSkill.getrank('Athletics') <= 185
override_location_and_practice('ratha_rock_gorge')
elsif DRSkill.getrank('Stealth').to_i >= 130
elsif DRSkill.getrank('Stealth') >= 130
override_location_and_practice('ratha_deep_crack')
else
# stops in infinte loop when > 185 ranks in athletics and < 130 ranks in stealth
Expand Down Expand Up @@ -342,10 +342,10 @@ class Athletics
end

def climb_branch
if UserVars.athletics < 540
if UserVars.athletics.to_i < 540
override_location_and_practice('undergondola_branch')
else
DRC.message("Warning: Using the undergondola arg with more than 850 athletics is not best use and you may consider the wyvern option instead.") if UserVars.athletics > 850
DRC.message("Warning: Using the undergondola arg with more than 850 athletics is not best use and you may consider the wyvern option instead.") if UserVars.athletics.to_i > 850
DRCT.walk_to(9607)
DRCT.walk_to(9515)
until done_training?
Expand Down Expand Up @@ -375,7 +375,7 @@ class Athletics
def climb_wyvern
DRCT.walk_to(19_464)
until done_training?
DRCT.walk_to(2245) if UserVars.athletics > 540
DRCT.walk_to(2245) if UserVars.athletics.to_i > 540
DRCT.walk_to(9607)
DRCT.walk_to(11_126)
DRCT.walk_to(19_464)
Expand Down

0 comments on commit 58785f3

Please sign in to comment.