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


Joined: 21 Nov 2002
Posts: 3
Location: USA

PostPosted: Wed Nov 19, 2003 4:20 am   

Trigger Help
 
I am having difficulty (since I only know minimal basics) trying to create a "trigger" as a cleric. I want something relatively simple to display a text message to group or form when my cleric character has his mana level drop below a certain level (eg., at 50% "Mana level dropping...") and a second one for mana level at like 10% "Mana level at CRITICAL stage... Any help would be greatly appreciated... racking my last brain cell trying to get this right. Thanks....

Wolfshadow
Reply with quote
Cuttlefish
Apprentice


Joined: 28 Oct 2003
Posts: 164

PostPosted: Wed Nov 19, 2003 4:47 am   
 
There are about a billion ways to do this. The thing you'll want to read about is the basic trigger syntax and a few of the commands listed below. Here's the basic description way I would write it:

Put your current and max mana in your prompt. It differs depending on your mud, but you basically want it to look something like <12/45mana> where 12 is your current and 45 is your max. If you don't use this EXACT prompt, you'll need to modify the pattern below.

Trigger on your prompt, capturing the current and max mana values
In your trigger, do something like:

#TRIGGER {<(%d)/(%d)mana>} {#IF (%eval( %1<=%2/10)) {#ECHO "Mana level at CRITICAL stage"} { #IF (%eval( %1<=%2/2)) {#ECHO "Mana level dropping"}}}

However, this one will fire EVERY time you see your prompt.

If you really want it to fire only the FIRST time your mana drops below a certain level, you'll need to get more complicated. You could have two triggers that both trigger on the same thing but that enable/disable each other. Or you could do this with a variable that tracks the state of your mana alert. Basically, I'd recommend you try to understand the trigger above and read some of the docs on triggers. If you still can't figure it out, throw another post on this thread.
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