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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Tue Oct 09, 2007 5:25 pm   

Trigger States
 
It has been quite some time since I have played with zMUD/cMUD and decided to try the trial version of 2.04cMUDPro.

Anyways, Can someone give me a good example of a trigger with states? I am not sure of the purpose of them.
_________________
Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian)
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Tue Oct 09, 2007 5:47 pm   
 
Trigger states, simply, are a sequence of triggers that always fire in order.

#trig "AutoCast" {You begin casting the spell} {cast spell part 2}
#cond {You cast the second part of the spell} {cast spell part 3}
#cond {You cast the third part of the spell} {cast spell part 4}

This will first wait for the begin line, then do "cast spell part 2", then stop waiting for the begin line and start waiting for the second part line. When that line arrives, it sends "cast spell part 3" and starts waiting for the third part line, when it casts the fourth part. Having reached the end, it then stops waiting for the last state, the third part trigger, and starts waiting for the first.

The other advantage is that you can disable and enable this trigger, no matter which state it's on, using the single name "AutoCast".

There are lots of different options to change how trigger states match - within lines, which loop the trigger back to the first state if the within state doesn't match before that number of lines are received, wait states, which only start matching after a period of time, duration states that're only active for a certain period of time, and so on.

EDIT: By the way, CMUD is now at version 2.05. Don't forget to update, and remember that it's still a beta and you're likely to encounter bugs, potentially serious ones.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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