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

Interactive Subprompts
https://mail.black-squirrel.com/viewtopic.php?f=15&t=21166
Page 1 of 1

Author:  Scrat [ Sun Nov 09, 2008 11:39 am ]
Post subject:  Interactive Subprompts

Is there an easy way to test to see if interactive subprompts are active from within a script? I'm working on a Planet Drop script and want to provide a Prelock option if interactive subprompts are active.

Author:  Big D [ Sun Nov 09, 2008 1:58 pm ]
Post subject:  Re: Interactive Subprompts

No way to tell with the script itself that I know of. You can always use the lock decaying message to trigger the jump although it's a bit slower, sometimes with the delay it actually allows the trader to hit the fig and return before the jump is actually made. Of course it could give them time to call-save-me and have their planet there also.

Author:  Scrat [ Mon Nov 10, 2008 1:05 am ]
Post subject:  Re: Interactive Subprompts

OK I figured this one out on my own but I'll post it here in case anyone else needs to test whether or not interactive subprompts are on.
If you activate the Ship Catalog - FedComm, Subspace, and Hailing Frequecies are available only if interactive subprompts are on. So you can test for interactive subprompts by sending `, ', or = and waiting for the corresponding message.

Author:  Singularity [ Mon Nov 10, 2008 1:58 am ]
Post subject:  Re: Interactive Subprompts

Very nicely done... quick block of code based on that concept...

Code:
# Get to the catalog
send " qqqqza99999*cc"
waitFor "<Examine Ship Stats>"
waitFor "Which ship are you interested in "

# Set the triggers for the check
setVar $ISP FALSE
killtrigger qqprompt
killtrigger ssprompt
setTextLineTrigger ssprompt :ssprompt "Sub-space radio ("
setTextLineTrigger qqprompt :qqprompt "<Quit>"

# Send the check
send "'**qqqqqq*"
pause

# Got the SS prompt!
:ssprompt
setVar $ISP TRUE
pause

# Done...
:qqprompt
killtrigger qqprompt
killtrigger ssprompt
if ($ISP = TRUE)
    echo "*Interactive Sub-prompts are ON!**"
else
    echo "*Interactive Sub-prompts are OFF!**"
end
halt

Author:  LoneStar [ Mon Nov 10, 2008 9:25 am ]
Post subject:  Re: Interactive Subprompts

Or you can make the lock, then send ' Or ` Or = if nothing happens then you'll know.

Code:
setVar $TARGET 1
setTextLineTrigger  NOPWARP  :NOPWARP  "This Citadel does not have a Planetary TransWarp Drive system"
setTextLineTrigger  NOLOCK  :NOLOCK  "You cannot " & #34 & "Blind Jump" & #34 & " a planet."
setTextLineTrigger  LOCK  :LOCK  "Locating beam pinpointed, TransWarp Locked."
send "p"&$TARGET&"*"
pause
:NOPWARP
killalltriggers
halt
:NOLOCK
killalltriggers
halt
:LOCK
killAllTriggers
setTextLineTrigger  SPrompt  :SPrompt "Sub-space radio"
setDelayTrigger  NPrompt  :NPrompt 500
send "'"
pause
:NPrompt
killAllTriggers
send "n"
waiton "Citadel"
halt
:SPrompt
killAllTriggers
send "Locked On!*"
waiton "Message sent on sub-space channel"

Author:  Vid Kid [ Tue Nov 11, 2008 2:56 am ]
Post subject:  Re: Interactive Subprompts

Anther way , I port and try to send a sub-space message.
So if you cont or cant .. then sub prompts are off.

But thanks to those other ideas on detection .. I didn't know about the ship catalog
was another area (saving a turn too) .

Knowledge is power !

Author:  Scrat [ Tue Nov 11, 2008 10:12 am ]
Post subject:  Re: Interactive Subprompts

One more tip on this is that if you send a backspace after `, ', or = it saves you from having to send an extra enter as results in a cleaner display.

Author:  Vid Kid [ Tue Nov 11, 2008 10:49 am ]
Post subject:  Re: Interactive Subprompts

Thank you for the script challenge .. and all the ideas ...

This will help everyone who ever wanted to check.

Code:
Send "' Starting InActive SubPrompt Check*"
WaitOn "Message sent on sub-space channel"
:LOCK
KillAllTriggers
SetTextLineTrigger  SPrompt  :SPrompt "ub-space"
SetDelayTrigger  NPrompt  :NPrompt 1000
Send "='"
Pause
:NPrompt
KillAllTriggers
Send #8 #8
Send "' Check completed & Inactive SubPrompts are OFF*"
WaitOn "ub-space"
Halt

:SPrompt
KillAllTriggers
Send ""
Send "' Check completed & Inactive SubPrompts are On*"
WaitOn "ub-space"
WaitOn "ommand"

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