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


Joined: 27 Jul 2006
Posts: 2

PostPosted: Thu Jul 27, 2006 6:38 pm   

Trigger Question with If Statement
 
Hi All,

This is my first post, so I hope I don't make myself look like too big of a needlehead.

I want to create a trigger that will run through different conditions and depending on the message the trigger will react differently. I will try and put this in a "clear" way so I don't waste anyone's time.
Code:

Trigger:

Pattern:

,"temper &Item please"

Value:

if (You are currently too mentally drained to cast.)
then (say Please insert mana potion to continue.)

elseif (You cannot temper this any further without destroying it.)
then (say Item in bad condition or already been tempered.)

cast temper @Item
#wait 2000
'@Item has been tempered


I hope this makes sense to someone.

Any help would be appreciated.

Thanks

Phyre
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri Jul 28, 2006 12:12 am   
 
Multiple-state trigger. I'm envisioning at least two states, one for the customer asking for a service, where you apparently accept the item and then try the action on it, and the second for the result of that action. This second state would have both failure and success messages, which will be in stringlist form. This stringlist could then be tested in a #CASE command and the appropriate actions taken.
_________________
EDIT: I didn't like my old signature
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