View unanswered posts | View active topics It is currently Tue Apr 21, 2026 4:25 pm



Reply to topic  [ 10 posts ] 
 Timer in TWX 
Author Message
Commander
User avatar

Joined: Fri Aug 20, 2004 2:00 am
Posts: 1801
Location: Outer Rims
Unread post 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
Profile
Ambassador
User avatar

Joined: Mon Feb 09, 2004 3:00 am
Posts: 3141
Location: Kansas
Unread post 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
Profile ICQ
Commander
User avatar

Joined: Fri Aug 20, 2004 2:00 am
Posts: 1801
Location: Outer Rims
Unread post 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
Profile
Veteran Op

Joined: Tue Nov 28, 2006 4:04 pm
Posts: 5025
Unread post 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
Profile
Ambassador
User avatar

Joined: Mon Feb 09, 2004 3:00 am
Posts: 3141
Location: Kansas
Unread post 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
Profile ICQ
Commander
User avatar

Joined: Fri Aug 20, 2004 2:00 am
Posts: 1801
Location: Outer Rims
Unread post 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
Profile
Commander
User avatar

Joined: Tue Oct 07, 2003 2:00 am
Posts: 1134
Location: Augusta, GA
Unread post 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
Profile WWW
Commander
User avatar

Joined: Fri Aug 20, 2004 2:00 am
Posts: 1801
Location: Outer Rims
Unread post 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
Profile
Gameop
User avatar

Joined: Thu Aug 24, 2006 2:00 am
Posts: 1737
Location: USA
Unread post 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
Profile WWW
Ambassador
User avatar

Joined: Mon Feb 09, 2004 3:00 am
Posts: 3141
Location: Kansas
Unread post 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
Profile ICQ
Display posts from previous:  Sort by  
Reply to topic   [ 10 posts ] 

Who is online

Users browsing this forum: Google [Bot] and 10 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.