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


Joined: 02 Jan 2003
Posts: 5
Location: USA

PostPosted: Thu Jan 02, 2003 1:21 pm   

New To Zmud Stuff
 
New to Zmud, and I have no idea how to use Zmud classes and such, but I'm trying to set up someway to record opponents spells. Like when they use an item such as this:

Person quaffs a sanctuary potion.

And then to start counting down how long until it wears off...

any ideas how to go about doing this?
Reply with quote
IceChild
Magician


Joined: 11 Oct 2000
Posts: 419
Location: Post Falls, ID, USA

PostPosted: Thu Jan 02, 2003 2:06 pm   
 
There really isn't an easy way to be sure of the exact time as to when the potion will wear off, as MOST muds use a "tick" based system, which is somewhat dependant on the load of the server, however.

If you do something like:

#TRIGGER {^Person quaffs a sanctuary potion.$} { #ALARM +X { #SAY Person's Sanctuary has worn off. }}

What that will do, is when you see:

Person quaffs a santuary potion.

It will, after X seconds (so if a tick on your mud is 1 minuteish, and sanc lasts for 2 minutes, then X would be 120), do a say to you (not sent to the mud) of:

Person's Sanctuary has worn off.

If that's what your looking for, that'd most likely be the best way of doing it.

Hope this helps.



Icechild
mv -f message.text /dev/null
Reply with quote
shad_7
Newbie


Joined: 02 Jan 2003
Posts: 5
Location: USA

PostPosted: Thu Jan 02, 2003 2:15 pm   
 
That would work I'd assume, but what about for more than one person, say as in a PKill mud?
Reply with quote
shad_7
Newbie


Joined: 02 Jan 2003
Posts: 5
Location: USA

PostPosted: Thu Jan 02, 2003 2:25 pm   
 
Okay, so I just timed how long this spell lasted... but I'm going to adapt it a little...
say you Have fred and bob and gary....could you create variables for them like

@bob quaffs a sanctuary potion.

Or have different timers going, say
sanctuary potion lasts longer than another potion that casts the same thing....?

Just throwing some things your way

SL7
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Thu Jan 02, 2003 2:49 pm   
 
#TRIGGER {^(%w) quaffs a sanctuary potion.$} {#ALARM +X {#SAY %1's Sanctuary has worn off.}}

For potions that last different times, you'd have to have a way of knowing which potion the person quaffed.

Kjata
Reply with quote
shad_7
Newbie


Joined: 02 Jan 2003
Posts: 5
Location: USA

PostPosted: Fri Jan 03, 2003 2:13 am   
 
Okay,
how bout this.

Fred quaffs a sanctuary potions. - It lasts 4.5 minutes

Bob quaffs a magister's blessing. - it lasts lets say 2.5 minutes...

how would you make a trigger to time both of those, and actually have it set correctly for the right person?

Thanks
SL7
Reply with quote
IceChild
Magician


Joined: 11 Oct 2000
Posts: 419
Location: Post Falls, ID, USA

PostPosted: Fri Jan 03, 2003 2:50 am   
 
#TRIGGER {^(%w) quaffs a sanctuary potion.$} {#ALARM +270 {#SAY %1's Sanctuary has worn off.}}

#TRIGGER {^(%w) quaffs a magister~'s blessing.$} {#ALARM +210 {#SAY %1's Sanctuary has worn off.}}

You'd just have to trigger each on their own... That will work for ANYONE who quaff's them, but for each potion, you'll need an individual trigger.



Icechild
mv -f message.text /dev/null
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