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
quintosh
Newbie


Joined: 27 Jun 2007
Posts: 2

PostPosted: Wed Jun 27, 2007 12:26 am   

Problem creating timer report
 
ok, so here's the script I've been trying to use and fix it to work, but none of my solutions didnt really help..

#CLASS {Timer|testi}
#ALIAS taimeri {#IF (@shabl =~ "on") {#AD sbtime 1}}
#VAR shabl {off}
#VAR sbtime {8}
#TRIGGER {^Peculiar, grey mist flows from the scepter into your body, causing your shape become blurred!} {p' 'is Blooded!;#VA sbtime 0;#VA shabl on}
#TRIGGER {^You feel the grey mist departs your body and flows back into the scepter.} {p' 'is no more Blooded ([@sbtime/60] min [@sbtime-[@sbtime/60*60]] sec)
#VA shabl off
}
#CLASS 0

basicly I want that thing to start counting time, when I receive the text "Peculiar, grey mist flows from the scepter into your body, causing your shape become blurred!" from the mud, and end when "You feel the grey mist departs your body and flows back into the scepter." comes, now, I do know, that the #VAR sbtime {8} makes me report the time elapsed as Quintosh [party]: share blood off (0 min 8 sec), even when it's longer or shorter than 8 seconds.., but I've been trying to use #VA sbtime 0 to reset it and count it properly, but it doesnt work.

And I'm using zmud 7.04, mud is icesus.org:23, so if anyone knows any kind of solution, please help :P
Reply with quote
Progonoi
Magician


Joined: 28 Jan 2007
Posts: 430

PostPosted: Wed Jun 27, 2007 1:24 am   
 
Perhaps adding an one second alarm to start counting time when the first pattern is received.
And then use %eval function to give the correct time values in the second pattern.

Something like

#alarm "AddSbTime" {*1} {#add sbtime 1;#t- AddSbTime}

and then

p (which I understand is short for 'party' command)

p Is no more blooded @sbtimemins mins @sbtimesecs secs.

@sbtimemins=%eval(@sbtime/60)
@sbtimesecs=%eval(@sbtime/3600)

I hope that'll help you at least somewhat.


Prog
_________________
The Proud new owner of CMud.

--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
--------------------------------
Reply with quote
quintosh
Newbie


Joined: 27 Jun 2007
Posts: 2

PostPosted: Wed Jun 27, 2007 5:09 am   
 
yep, p' is short for party say
I'll test it out and see if it works, ty for quick response tho :)
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