View unanswered posts | View active topics It is currently Wed Apr 22, 2026 10:10 pm



Reply to topic  [ 4 posts ] 
 having a problem with setEventTrigger 
Author Message
Ensign

Joined: Wed Nov 06, 2002 3:00 am
Posts: 270
Unread post having a problem with setEventTrigger
I am having a problem with setEventTrigger command. I have it set to go to the next part of the script after the include script I am using terminates. Unfortunately, I am not getting a message from TWX Proxy in SWATH when it terminates. Kind of odd. They are a couple of simple scripts I wrote, just for trying to see if you could use this command to pause a script while an include script was running and then restart it once it stopped. I'll include the code for both scripts


Code:
#test to see if I can get includes to work for me

:begin
setEventTrigger done :next "SCRIPT STOPPED" "C:\Program Files\Programs 1\TWX Proxy 2_04\Scripts\include\test_include.ts"
include \include\test_include.ts
pause

:next
clientmessage "made it to next"
killAllTriggers
setDelayTrigger delay :end 10000
pause

:end
halt



This one is the include script

Code:
clientmessage "test for include working"



Why isn't TWX Proxy sending a terminated message when the include script terminates? I tried the include script with a HALT command in it, but that just stopped the main script instead. Thanks for any help you can give.

P.S. The main script is in the script directory and the include script is in the include directory if this might have any effect on things, I wouldn't think it should though


Sat Aug 01, 2009 6:50 pm
Profile
Ambassador
User avatar

Joined: Mon Feb 09, 2004 3:00 am
Posts: 3141
Location: Kansas
Unread post Re: having a problem with setEventTrigger
As a guess because you are including the second script into the first and not running it as a seperate script that will terminate. In effect your script is just one script that has the second code inserted into the first.

If you use a load command on the second script then you should have it terminate.

_________________
               / Promethius / Enigma / Wolfen /

"A man who has no skills can be taught, a man who has no honor has nothing."


Sat Aug 01, 2009 8:52 pm
Profile ICQ
Commander

Joined: Sun Feb 25, 2001 3:00 am
Posts: 1838
Location: Guam USA
Unread post Re: having a problem with setEventTrigger
Quote:
:begin
setEventTrigger done :next "SCRIPT STOPPED" "C:\Program Files\Programs 1\TWX Proxy 2_04\Scripts\include\test_include.ts"
include \include\test_include.ts
pause

:next
clientmessage "made it to next"
killAllTriggers
setDelayTrigger delay :end 10000
pause

:end
halt


:begin
GoSub :test_include~message


:next
clientmessage "made it to next"
killAllTriggers
setDelayTrigger delay :end 10000
pause

:end
halt

#-=-=-=-=-includes-=-=-=-=-
Include "include\test_include.ts"

The include

Quote:
clientmessage "test for include working"


the include\test_include.ts

:message
clientmessage "test for include working"
Return

This should do what you are looking for ...

_________________
TWGS V2 Vids World on Guam Port 2002
Telnet://vkworld.ddns.net:2002
Discord @ DiverDave#8374
Vid's World Discord

Founding Member -=[Team Kraaken]=- Ka Pla

Image
Winners of Gridwars 2010
MBN Fall Tournament 2011 winners Team Kraaken
Undisputed Champions of 2019 HHT Just for showing up!

The Oldist , Longist Running , Orginal Registered Owner of a TWGS server :
Vids World On Guam


Sat Aug 01, 2009 9:07 pm
Profile WWW
Ensign

Joined: Wed Nov 06, 2002 3:00 am
Posts: 270
Unread post Re: having a problem with setEventTrigger
Thanks Promethius and Vid Kid, appreciate the help. Vid Kid your method worked like a charm for me. Thanks for the code example in your post. Promethius your method also worked like a charm, after I figured out that the parameter for the setEventTrigger is case sensitive. I was writing all of it in lowercase, and for some reason the script terminated message is like this "scripts\INCLUDE\TEST_INCLUDE.TS" so once I tried writing it out in the script exactly as the message appears in SWATH when the include terminates, worked great. Just thought I would throw that in so if another newbie scripter reads this message looking for information, they won't have to experiment until they figure that out. Probably best to cut and paste the message right out of your helper or telnet client. Really appreciate the help guys :D


Sun Aug 02, 2009 10:16 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

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