Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Kaishaku
Beginner


Joined: 01 May 2003
Posts: 20

PostPosted: Mon May 05, 2003 4:37 am   

Gemstone Question regarding timer
 
I haven't done any serious coding in forever, so I've forgotten most of what little I knew to begin with.

I'm running the roundtime button that was so nicely provided here, and it works great, but in trying to mimic some of the Wizards functionality, I'm running into a brick wall. Namely the PAUSE command within the wizards scripting language.

It will wait until the roundtimer has hit 0, and then spit out the next command. I'm trying to find a way to mimic this within Zmud's framework. I see from using the Roundtimer script located in the Finished Script forums, there's a @var named @rt, so I would assume it's easier to use this, then rebuild one for myself.

The end result I'm seeking is to basically create a trigger, that will wait out the roundtime, and then commence with a sequence of commands. As I say, I'm not all that advanced yet, so if anyone could point me in the right direction, I'd be greatly appreciative.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Mon May 05, 2003 4:45 am   
 
You are looking for a queueing concept. Search forums for other examples, the Achaea herb cure thread with kelp amongst others had it.

Basically you have a variable list you sort, add to and delete from:
#VAR Queued_Commands {stand|stretch|belch|scratch|lie|sleep}

You then have something that triggers you to spit out a queued command:
#TRIGGER {Roundtime trigger message} {#IF %numitems(@Queued_Commands)>0) {%item(@Queued_Commands,1);#VAR Queued_Commands %delnitem(@Queued_Commands,1)} {#ECHO Empty queue}}

You can get it more fancier and more reliable.

Ton Diening
Reply with quote
Kaishaku
Beginner


Joined: 01 May 2003
Posts: 20

PostPosted: Mon May 05, 2003 4:59 am   
 
Actually, I'm looking more for a defined pause, that varies from situation to situation.

The command output I'm trying to mimic is more along the lines of...

attack
wait out timer
attack

The timer is already defined as @rt, from another set of triggers that I did not create. Now I'm just trying to figure out how to more or less...

#trigger {yaddayadda}{waitout the timer;attack}

Hope this explains what I'm looking for it a bit better.

Edit: I figured it out. I grabbed the worldtime and roundtime from the gsl codes, and based an #alarm off those. Thank you.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net