| Author |
Message |
|
Thrawn
Commander
Joined: Fri Aug 20, 2004 2:00 am Posts: 1801 Location: Outer Rims
|
 Timer in TWX
I am in need of some direction on creating a timer for a twx script. What I am attempting to achieve is having a main script activate a second script within 1-60 minute intervals. It does not matter if it is random or at a set interval. Here is what i mean:
1. Main script A loads and the timer counts down at the set value. When value is reached, proceeds to step 2. 2. Second script is loaded, runs, terminates. If I wish I can add a third script load, etc. Once this step is completed, goes to step 3. 3. Returns to start countdown. When countdown is reached, goes to step 2.
I appreciate the input and help.
_________________ -Thrawn
But risk has always been an inescapable part of warfare.
--
Knight to Queen's Bishop 3
|
| Sat Feb 02, 2008 6:20 pm |
|
 |
|
Promethius
Ambassador
Joined: Mon Feb 09, 2004 3:00 am Posts: 3141 Location: Kansas
|
 Re: Timer in TWX
Thrawn wrote: I am in need of some direction on creating a timer for a twx script. What I am attempting to achieve is having a main script activate a second script within 1-60 minute intervals. It does not matter if it is random or at a set interval. Here is what i mean:
1. Main script A loads and the timer counts down at the set value. When value is reached, proceeds to step 2. 2. Second script is loaded, runs, terminates. If I wish I can add a third script load, etc. Once this step is completed, goes to step 3. 3. Returns to start countdown. When countdown is reached, goes to step 2.
I appreciate the input and help. A delay trigger would work w/o any problem: Code: :begin # 60 second delay - 1 second = 1000 ms setDelayTrigger step1 :step1 60000 pause :step1 # 1 hour trigger (60 * 60000) setDelayTrigger step2 :step2 3600000 pause :step2 load "whatever.ts" goto :begin
_________________
/ Promethius / Enigma / Wolfen /
"A man who has no skills can be taught, a man who has no honor has nothing."
|
| Sat Feb 02, 2008 6:49 pm |
|
 |
|
Thrawn
Commander
Joined: Fri Aug 20, 2004 2:00 am Posts: 1801 Location: Outer Rims
|
 Re: Timer in TWX
Thank you Promethius. It worked perfectly. 
_________________ -Thrawn
But risk has always been an inescapable part of warfare.
--
Knight to Queen's Bishop 3
|
| Sat Feb 02, 2008 7:13 pm |
|
 |
|
Big D
Veteran Op
Joined: Tue Nov 28, 2006 4:04 pm Posts: 5025
|
 Re: Timer in TWX
Thrawn wrote: I am in need of some direction on creating a timer for a twx script. What I am attempting to achieve is having a main script activate a second script within 1-60 minute intervals. It does not matter if it is random or at a set interval. Here is what i mean:
1. Main script A loads and the timer counts down at the set value. When value is reached, proceeds to step 2. 2. Second script is loaded, runs, terminates. If I wish I can add a third script load, etc. Once this step is completed, goes to step 3. 3. Returns to start countdown. When countdown is reached, goes to step 2.
I appreciate the input and help. Can't you just have the 1st script read the system clock and at certain times have it load the follow up scripts?
|
| Sat Feb 02, 2008 7:39 pm |
|
 |
|
Promethius
Ambassador
Joined: Mon Feb 09, 2004 3:00 am Posts: 3141 Location: Kansas
|
 Re: Timer in TWX
D, yes and that is how my script opens games that I've banged at a certain time. It reads the time at 10 second intervals so the latest the games open is within that interval. Nothing worse than a corp ready to run and an Op forgets the time due to RL.
_________________
/ Promethius / Enigma / Wolfen /
"A man who has no skills can be taught, a man who has no honor has nothing."
|
| Sat Feb 02, 2008 9:11 pm |
|
 |
|
Thrawn
Commander
Joined: Fri Aug 20, 2004 2:00 am Posts: 1801 Location: Outer Rims
|
 Re: Timer in TWX
I never thought of that either. Thank you both for the input. That seems to work better for my needs.
_________________ -Thrawn
But risk has always been an inescapable part of warfare.
--
Knight to Queen's Bishop 3
|
| Sat Feb 02, 2008 10:54 pm |
|
 |
|
ElderProphet
Commander
Joined: Tue Oct 07, 2003 2:00 am Posts: 1134 Location: Augusta, GA
|
 Re: Timer in TWX
Alternately, you can use setEventTrigger, specifying "TIME HIT" as the event. This behaves like any other trigger, and you don't have to babysit it like you do with the other techniques.
See Traitor's _auto_extern_login.ts script on Grimy for an example, or shout back here if you need help.
+EP+
_________________ Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.
|
| Mon Feb 04, 2008 7:55 pm |
|
 |
|
Thrawn
Commander
Joined: Fri Aug 20, 2004 2:00 am Posts: 1801 Location: Outer Rims
|
 Re: Timer in TWX
ElderProphet wrote: Alternately, you can use setEventTrigger, specifying "TIME HIT" as the event. This behaves like any other trigger, and you don't have to babysit it like you do with the other techniques.
See Traitor's _auto_extern_login.ts script on Grimy for an example, or shout back here if you need help.
+EP+ I was wondering about the "TIME HIT" event. I rook a look at the script you mentioned and made notes on it. Now I get a beter picture on setting timers. Thank you EP, and the rest of you, for the help and direction.
_________________ -Thrawn
But risk has always been an inescapable part of warfare.
--
Knight to Queen's Bishop 3
|
| Tue Feb 05, 2008 11:37 am |
|
 |
|
Runaway Proton
Gameop
Joined: Thu Aug 24, 2006 2:00 am Posts: 1737 Location: USA
|
 Re: Timer in TWX
Promethius wrote: D, yes and that is how my script opens games that I've banged at a certain time. It reads the time at 10 second intervals so the latest the games open is within that interval. Nothing worse than a corp ready to run and an Op forgets the time due to RL. Hmm, I seemed to have missed this script Prom. Is it a public script. I need a script that can open multiple games on Revs server at appointed times. I tried the one Xentropy wrote me for my site, but he's hardcoded something in there that makes it not run on ther sites I guess. I wasn't able to get it to work.
_________________ American soldiers don't fight because they hate what's in front of them...they fight because they love what's behind them. http://www.runawayproton.com <-- Expired telnet://runawayproton.dyndns.org:223 V2.20b Games <-- Expired http://www.twsubspace.com <-- Expired Teamspeak 3 50.23.212.53:4196 <-- Expired Just a has been now.
|
| Tue Feb 12, 2008 10:43 am |
|
 |
|
Promethius
Ambassador
Joined: Mon Feb 09, 2004 3:00 am Posts: 3141 Location: Kansas
|
 Re: Timer in TWX
Runaway Proton wrote: Promethius wrote: D, yes and that is how my script opens games that I've banged at a certain time. It reads the time at 10 second intervals so the latest the games open is within that interval. Nothing worse than a corp ready to run and an Op forgets the time due to RL. Hmm, I seemed to have missed this script Prom. Is it a public script. I need a script that can open multiple games on Revs server at appointed times. I tried the one Xentropy wrote me for my site, but he's hardcoded something in there that makes it not run on ther sites I guess. I wasn't able to get it to work. I will send you a copy of the script.
_________________
/ Promethius / Enigma / Wolfen /
"A man who has no skills can be taught, a man who has no honor has nothing."
|
| Tue Feb 12, 2008 4:06 pm |
|
 |
|