Skip to content

Commit

Permalink
[escortgo2.lic] v1.0.1 EN ferry logic removal & eherbs usage
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhoribu authored Feb 2, 2025
1 parent 4ea42b8 commit f2ca7f6
Showing 1 changed file with 9 additions and 74 deletions.
83 changes: 9 additions & 74 deletions scripts/escortgo2.lic
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@
author: elanthia-online
game: Gemstone
tags: bounty
version: 1.0.0
version: 1.0.1
changelog:
1.0.0 (2020-10-10):
1.0.1 (2025-02-02):
* remove EN ferry logic, no longer needed
* update to use eherbs instead of useherbs
1.0.0 (2025-01-05):
* initial fork of ego2
* remove Zul rope bridge pathing as no longer needed
* rubocop cleanup
Expand Down Expand Up @@ -376,14 +379,10 @@ check_room = proc {

use_herbs = proc {
if useherbs
if XMLData.name == 'Tillmen' and XMLData.game == 'GSIV'
if ([Wounds.head, Wounds.neck, Wounds.torso, Wounds.limbs, Wounds.nerves, Scars.head, Scars.neck, Scars.torso, Scars.nerves].max > 0) or (Scars.limbs > 1) or ((checkhealth + 50) < maxhealth)
start_script 'useherbs', ['--buy-missing=off']
wait_while { running?('useherbs') }
if ([Wounds.head, Wounds.neck, Wounds.torso, Wounds.limbs, Wounds.nerves, Scars.head, Scars.neck, Scars.torso, Scars.nerves].max > 0) or (Scars.limbs > 1) or ((checkhealth + 50) < maxhealth)
useherbs = false
end
end
if !Script.exists?("eherbs")
echo("You've enabled the useherbs option, but you do not have eherbs.lic downloaded.")
echo("Please install eherbs and try again.")
echo("To do this, download via ;repository download eherbs ")
else
if ([Wounds.head, Wounds.neck, Wounds.torso, Wounds.limbs, Wounds.nerves, Scars.head, Scars.neck, Scars.torso, Scars.limbs, Scars.nerves].max > 0) or ((checkhealth + 50) < maxhealth)
start_script 'useherbs', ['--buy-missing=off']
Expand Down Expand Up @@ -779,70 +778,6 @@ better_miniscript = {
move 'out'
hide_me.call
},
'1190,1191' => proc {
result = nil
if checknpcs.include?('ferryman')
fput 'unhide' if invisible? or hidden?
result = dothistimeout 'give ferryman 10', 5, /What is it you're trying to give|Thank you, friend\. Go ahead and board\.|Sorry, friend, break time for me\. Not taking tolls\./
end
until result =~ /Thank you, friend\. Go ahead and board\./
echo 'Waiting for the ferryman...'
loop {
break if clear.any? { |line| line =~ /nimbly walks up the gangplank|He sets the gangplank down between the dock and the ferry and takes his place next to it\.|The ferryboat bumps up against the dock. Immediately the ferryman ropes the boat securely to the dock, then picks up the gangplank and lays it down between the ferry and the dock, providing a safe, firm exit\./ }
sleep 0.1
check_room.call
}
fput 'unhide' if invisible? or hidden?
result = dothistimeout 'give ferryman 10', 5, /What is it you're trying to give|Thank you, friend\. Go ahead and board\.|Sorry, friend, break time for me\. Not taking tolls\./
end
move 'go gang'
},
'1192,1191' => proc {
result = nil
if checknpcs.include?('ferryman')
fput 'unhide' if invisible? or hidden?
result = dothistimeout 'give ferryman 10', 5, /What is it you're trying to give|Thank you, friend\. Go ahead and board\.|Sorry, friend, break time for me\. Not taking tolls\./
end
until result =~ /Thank you, friend\. Go ahead and board\./
echo 'Waiting for the ferryman...'
loop {
break if clear.any? { |line| line =~ /nimbly walks up the gangplank|He sets the gangplank down between the dock and the ferry and takes his place next to it\.|The ferryboat bumps up against the dock. Immediately the ferryman ropes the boat securely to the dock, then picks up the gangplank and lays it down between the ferry and the dock, providing a safe, firm exit\./ }
sleep 0.1
check_room.call
}
fput 'unhide' if invisible? or hidden?
result = dothistimeout 'give ferryman 10', 5, /What is it you're trying to give|Thank you, friend\. Go ahead and board\.|Sorry, friend, break time for me\. Not taking tolls\./
end
move 'go gang'
},
'1191,1190' => proc {
loop {
break if clear.any? { |line| line =~ /^The ferryman.*Everybody out/i }
check_room.call
sleep 0.1
}
protect_me.call
move 'go gang'
10.times {
check_room.call
sleep 0.2
break if check_escort.call
}
},
'1191,1192' => proc {
loop {
break if clear.any? { |line| line =~ /^The ferryman.*Everybody out/i }
check_room.call
sleep 0.1
}
protect_me.call
move 'go gang'
10.times {
check_room.call
sleep 0.2
break if check_escort.call
}
},
'2547,2546' => proc {
room_count = XMLData.room_count
while room_count == XMLData.room_count
Expand Down

0 comments on commit f2ca7f6

Please sign in to comment.