|
Wrens Novice
Joined: 01 Jun 2003 Posts: 32 Location: USA
|
Posted: Mon Nov 20, 2006 5:22 am
Expression trigger |
In ZMUD, there was a nice little trigger that helped count down the seconds for roundtime. @roundtime > 0 as long as the roundtime varible was greater than 0, it would go to a second state and wait 1000ms, then subtract a second from roundtime. I can't seem to get this to work in CMUD. Any suggestions?
|
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Mon Nov 20, 2006 5:55 am |
If you post the trigger, we may be able to help.
|
|
_________________ Asati di tempari! |
|
|
|
Wrens Novice
Joined: 01 Jun 2003 Posts: 32 Location: USA
|
Posted: Mon Nov 20, 2006 12:38 pm |
I was unable to figure out how to get the trigger to export into a nice text format. I went back to Zmud to get this.
#TRIGGER (@roundtime>0) {} "DragonRealms"
#COND {} {#ADD roundtime -1} {wait|param=1000}
This should be pretty much how it looks in CMUD. As near as I can tell it isn't triggering. As a side note, is there a way to export from CMUD into a nice text format. I exported to XML, but used around 100 charaters to show the above, and was in greek to me.
Thanks |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Mon Nov 20, 2006 2:37 pm |
Wouldn't the #alarm command work for this?
#alarm {1} {#if (@roundtime > 0) {#add roundtime -1} {#echo Roundtime Expired!}}
or something?
Btw, XML is supposed to be in a format that makes sense to CMUD - it stops it garbling very complicated scripts, which was a problem with zMUD's txt export. Though now I think about it, since the new format will compile, won't it also export to .txt a little more reliably? |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Nov 20, 2006 3:57 pm |
Your trigger:
Code: |
#TRIGGER (@roundtime>0) {} "DragonRealms" |
will fire in CMUD whenever the @roundtime variable is changed. However, in CMUD right now you can't have expression triggers in multi-state triggers...it doesn't fire the other states properly.
Also, I noticied the the #COND command doesn't work properly when the pattern is empty. It thinks this is the ID field for the #COND instead of a blank pattern. I've added both of these issues to the bug list. |
|
|
|
Wrens Novice
Joined: 01 Jun 2003 Posts: 32 Location: USA
|
Posted: Tue Nov 21, 2006 3:02 am |
Thanks tell me when I can try again.
|
|
|
|
|
|