View unanswered posts | View active topics It is currently Sun Apr 19, 2026 7:07 am



Reply to topic  [ 3 posts ] 
 1st script 
Author Message
Staff Sergeant

Joined: Fri May 21, 2004 2:00 am
Posts: 16
Location: USA
Unread post 
I just read through Xide's help for TWProxy scripts, and am attempting to write my 1st script. I'm trying to make a script to warp me to a sector when a certain type of ship enters said sector with one of my fighters. I'm going after the Ferret and Star Destroyer types. It kida worked, though it hiccuped and missed a hit. What am I doing wrong, if anything?

_________________________

:start
setTextLineTrigger waiting :getsector "Incoming transmission from Deployed Fighters"
Pause

:getsector
setTextLineTrigger getCurrentSector :getwarpto "Report Sector "
setTextLineTrigger identify1 :identified "Star Destroyer"
setTextLineTrigger identify2 :identified "Ferret"
pause
:getwarpto
getWord CURRENTLINE $sector 3
pause

:identified
killTrigger identify1
killTrigger identify2
send $sector "*y"
WAITON "beam pinpointed"
send "y"
WAITON "Command [TL="
send "sd"
WAITON "Command [TL="
echo ANSI_12 "You have arrived, hunt 'em down!"
halt


Thu Oct 14, 2004 10:09 pm
Profile
Commander

Joined: Tue Mar 26, 2002 3:00 am
Posts: 1416
Location: Canada
Unread post 
your :getwarpto trigger needs to link back to the other two triggers or its not gonna work... plus you should put those killtriggers above the triggers themselves, its more efficient.
like this:

:getsector
killTrigger getCurrentSector
killTrigger identify1
killTrigger identify2
setTextLineTrigger getCurrentSector :getwarpto "Report Sector "
setTextLineTrigger identify1 :identified "Star Destroyer"
setTextLineTrigger identify2 :identified "Ferret"
pause

:getwarpto
getWord CURRENTLINE $sector 3
goto :getsector


Fri Oct 15, 2004 11:43 am
Profile ICQ
Commander
User avatar

Joined: Tue Oct 07, 2003 2:00 am
Posts: 1134
Location: Augusta, GA
Unread post 
You're close. The problem I see will occur when the ship isn't one of the 2 you are awaiting. If the ship that enters isn't a Start Destroyer or Ferret, then this script will hang at the :getWarpTo pause, since neither of the identify triggers will hit.

To fix this:
:getSector should only have the getCurrentSector trigger and a pause.
Move the 2 identify triggers (and make them setTextTrigger) to :getWarpTo, after the getWord line. You should stripText the ":" from $sector also. Then add another set text trigger for "Command", that takes the script back to :start. Make sure you kill this new trigger in :identified.

You also need to kill the 2 identify triggers in :start. The sequence would be this: Scout enters, :getWarpTo grabs the Sector, but neither ship type is seen before "Command", so it goes back to :start, and kills the identify triggers.

I've left it somewhat ambiguous on purpose, because you need to figure it out. But don't hesitate if you can't get it, and I'll gladly post the corrections.

+EP+

_________________
Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.


Fri Oct 15, 2004 12:02 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 23 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 wSTSoftware.