|
|
Register •
FAQ
• Search • Login
|
|
Page 1 of 1
|
[ 3 posts ] |
|
| Author |
Message |
|
Grivan Moranar
Staff Sergeant
Joined: Fri May 21, 2004 2:00 am Posts: 16 Location: USA
|
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 |
|
 |
|
Silence
Commander
Joined: Tue Mar 26, 2002 3:00 am Posts: 1416 Location: Canada
|
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 |
|
 |
|
ElderProphet
Commander
Joined: Tue Oct 07, 2003 2:00 am Posts: 1134 Location: Augusta, GA
|
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 |
|
 |
|
|
Page 1 of 1
|
[ 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
|
|