| www.ClassicTW.com https://mail.black-squirrel.com/ |
|
| Timer in TWX https://mail.black-squirrel.com/viewtopic.php?f=15&t=20301 |
Page 1 of 1 |
| Author: | Thrawn [ Sat Feb 02, 2008 6:20 pm ] |
| Post subject: | 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. |
|
| Author: | Promethius [ Sat Feb 02, 2008 6:49 pm ] |
| Post subject: | 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 |
|
| Author: | Thrawn [ Sat Feb 02, 2008 7:13 pm ] |
| Post subject: | Re: Timer in TWX |
Thank you Promethius. It worked perfectly. |
|
| Author: | Big D [ Sat Feb 02, 2008 7:39 pm ] |
| Post subject: | 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? |
|
| Author: | Promethius [ Sat Feb 02, 2008 9:11 pm ] |
| Post subject: | 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. |
|
| Author: | Thrawn [ Sat Feb 02, 2008 10:54 pm ] |
| Post subject: | Re: Timer in TWX |
I never thought of that either. Thank you both for the input. That seems to work better for my needs. |
|
| Author: | ElderProphet [ Mon Feb 04, 2008 7:55 pm ] |
| Post subject: | 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+ |
|
| Author: | Thrawn [ Tue Feb 05, 2008 11:37 am ] |
| Post subject: | 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. |
|
| Author: | Runaway Proton [ Tue Feb 12, 2008 10:43 am ] |
| Post subject: | 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. |
|
| Author: | Promethius [ Tue Feb 12, 2008 4:06 pm ] |
| Post subject: | 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. |
|
| Page 1 of 1 | All times are UTC - 5 hours |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|