View unanswered posts | View active topics It is currently Sun Sep 27, 2020 8:14 pm



Reply to topic  [ 1 post ] 
 Refurbish Script 
Author Message
Staff Sergeant

Joined: Sat Apr 14, 2001 2:00 am
Posts: 12
Location: USA
Unread post 
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


Fri Jun 01, 2001 11:06 pm
Profile ICQ
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.