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
obor
Wanderer


Joined: 20 Dec 2001
Posts: 56
Location: USA

PostPosted: Thu May 09, 2002 3:21 am   

Message set with each tick
 
Okay, here's what I'd like to do, don't know if this is possible.

I cast sanctuary, and it lasts, say, 6 ticks. Each time a tick rolls by, I'd like a little flashing message that indicates how many ticks left on sanctuary.

Is that possible? Thanks.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu May 09, 2002 7:26 am   
 
Of course it's possible. All that's needed is a variable to count with, and a command in the timer to do the counting and display the message. You might need to use 7 or 5 for the initial value, but trial and error is the fastest way to find out.

#AL sanc {#VAR sanc 6;cast sanctuary}
#TIMER {on} {#SAY {%ansi(blink,high,red,white)@sanc ticks of sanctuary left};#ADD sanc {-1}}


LightBulb
Vague questions get vague answers
Reply with quote
obor
Wanderer


Joined: 20 Dec 2001
Posts: 56
Location: USA

PostPosted: Sat May 11, 2002 7:40 am   
 
oops, okay, i need to explain myself a little better.

when I say "tick", I meant to say "tick of gametime", which is half an hour in gametime.

i.e. going from 9:00 to 9:30 is one tick

when I cast sanctuary, it lasts 10 ticks, which is 5 hours of gametime

*that's* what I meant by ticks *slaps self*

thanks for the reply though. Is it still do-able?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat May 11, 2002 4:29 pm   
 
Of course. You just need to replace the #TIMER with a trigger based on your tick text.
#TR {%d:{00|30}} {{#SAY {%ansi(blink,high,red,white)@sanc ticks of sanctuary left};#ADD sanc {-1}}


LightBulb
Vague questions get vague answers
Reply with quote
obor
Wanderer


Joined: 20 Dec 2001
Posts: 56
Location: USA

PostPosted: Sun May 12, 2002 3:46 am   
 
okay, getting closer! thanks so much for your help. I now have 2 issues with this, otherwise, works great.

1) How do I "reset" it if I get dispelled, or I cancel the sanc, or when the sanc wears off?
"The white aura around your body fades"
is the message that occurs when sanc drops. It still counts once that is done.

2) If someone sends me a tell, or says something on one of the channels, like the kingdom channel or auction channel or whatever, it reads the time again, and it automatically does the -1 thing to the sanctimer, even if it is still the same time. in other words, it's 6:00. Someone sends me a tell, it is still 6:00, but the variable for sanc time is reduced by one. Someone says something on the kingdom channel, it's still 6:00, but the sanc timer has decremented by 2.
hurm...any ideas?

thanks again tho. :)
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun May 12, 2002 3:27 pm   
 
1)Reset the @sanc variable.

2) a)Add an if-test to ignore the time after channels.
b)Add a variable to track the last time, and only update the variable when it changes
c)Use two triggers (one for 00 and one for 30), in different classes, and have each trigger turn off its own class (#T- class) and turn on the other class (#T+ class)
d)Find a more reliable source (trigger phrase) for the trigger
e)Turn off all your channels and tell everyone not to talk to you

There are many potential solutions to this kind of problem, you just have to find one that works for you.

LightBulb
Vague questions get vague answers
Reply with quote
obor
Wanderer


Joined: 20 Dec 2001
Posts: 56
Location: USA

PostPosted: Sat May 18, 2002 11:46 am   
 
okay, thanks for the response.

i like choice "b", but i need some help, in case you didn't notice, I am pretty clueless with this stuff. ;) Help please?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat May 18, 2002 5:09 pm   
 
#TR {%d:({00|30})} {#IF (%1 <> @lasttime) {#VAR lasttime %1;#SAY {%ansi(blink,high,red,white)@sanc ticks of sanctuary left};#ADD sanc {-1}}}
Untested, but I think it will work. It would probably be best to set @lasttime to 00 before you change the trigger.

LightBulb
Vague questions get vague answers
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