www.ClassicTW.com
https://mail.black-squirrel.com/

Refurbish Script
https://mail.black-squirrel.com/viewtopic.php?f=15&t=12834
Page 1 of 1

Author:  Draklixa [ Fri Jun 01, 2001 11:06 pm ]
Post subject: 

Hrm.. here: (don't forget to the read the note and the comment in :buy_Class9

# Hold Refurbish 2.0
# by Draklixa
# Contact: josephtodaro@home.com
# NOTE: If 2.1 is ever released, Class 9 docking will be upgraded and moving revamped.

cutText CURRENTLINE $location 1 7

if ($location <> "Command")
clientMessage "This script must be run from the game command menu."
halt
end

logging off

# gather input

getInput $refurbSector "Which sector contains the refurbish port?" 0
getInput $refurbHolds "How many holds do you wish to refurbish?" 0
getInput $endSector "Which sector do you wish to complete the script at? (0 to stay)" 0

# do stuff

getSector $refurbSector $refurbLoc

if ($refurbLoc.port.exists = 0)
clientMessage "No port exists in specified refurbish sector."
halt
end

if ($refurbLoc.port.exists = 1) and ($refurbLoc.port.class = 0)
goto :buy_Class0
elseif ($refurbLoc.port.exists = 1) and ($refurbLoc.port.class = 9)
goto :buy_Class9
elseif ($refurbLoc.port.exists = 1) and ($refurbLoc.port.class <> 0) or ($refurbLoc.port.class <> 9)
clientMessage "Port must be either Class 0 or Class 9!"
halt
end

:buy_Class0
send "m" $refurbSector "*e"
waitFor "Arriving sector :"
send "pt"
waitFor "Which item do you wish to buy"
send "a" $refurbHolds "*"
waitFor "Are you still interested in buying them"
send "yq"
goto :move_endSector
end

:buy_Class9
send "m" $refurbSector "*e"
waitFor "Sector :"
send "ps*sp" # remove * if animations are turned off
waitFor "Which item do you wish to buy"
send "a" $refurbHolds "*"
waitFor "Are you still interested in buying them"
send "yqqq"
goto :move_endSector
end

:move_endSector
if ($endSector = 0)
halt
elseif (0 <= $endSector)
send "m" $endSector "*e"
waitFor "Sector :"
halt
end

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/