Skip to content

Commit

Permalink
Prevent idling out of the game while healing
Browse files Browse the repository at this point in the history
Output 'tdp' every 60 seconds

Fixes #196
  • Loading branch information
rpherbig committed Feb 13, 2016
1 parent 640fee2 commit d979368
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
3 changes: 1 addition & 2 deletions crossing-training.lic
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ class CrossingTraining

def train_performance
unless play_song?
@settings.crossing_training.delete("Performance")
@settings.crossing_training.delete('Performance')
return
end
Flags.reset('ct-song')
Expand Down Expand Up @@ -751,7 +751,6 @@ class CrossingTraining

# https://elanthipedia.play.net/mediawiki/index.php/Blacksmithing_Products
def train_forging

if @settings.train_workorders([]).include?('Blacksmithing')
wait_for_script_to_complete('workorders', ['Blacksmithing'])
return
Expand Down
11 changes: 10 additions & 1 deletion safe-room.lic
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,16 @@ class SafeRoom
elsif DRStats.guild != 'Necromancer'
walk_to 6218
fput('lie')
waitfor('Dokt waves a large hand at you', 'Dokt gives you a quick glance')
Flags.add('healthy', 'Dokt waves a large hand at you', 'Dokt gives you a quick glance')
timer = 0
until Flags['healthy']
pause 1
timer += 1
if timer % 60 == 0
# Output a harmless command to prevent being logged out
fput 'tdp'
end
end
fput('stand')
end

Expand Down
4 changes: 2 additions & 2 deletions workorders.lic
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ class WorkOrders
pause 60
end
end

def found_room?
%w(oak maple birch).each do |wood|
fput("open #{wood} door")
Expand All @@ -196,7 +196,7 @@ class WorkOrders
return true if DRRoom.pcs.empty?
fput('go door')
end

false
end
end
Expand Down

0 comments on commit d979368

Please sign in to comment.