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


Joined: 10 Dec 2002
Posts: 4

PostPosted: Tue Dec 10, 2002 11:07 pm   

Trigger help
 
Ok..I need a command to put into a trigger that will disable itself, but will finish off the string of commands once the pattern is met. Here's what it is..

pattern: (%d)]
value: %IF( %1>50, <command>; add str 17; add wis 7; add int 7; add dex 8; add con 15; end, roll)

I need something to replace <command> that will disable the trigger, but will let the rest of the commands for the True value finish off("add str 17; add wis 7;" etc...)
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Tue Dec 10, 2002 11:39 pm   
 
First, you need to put a ~ in front of the ] in the pattern to prevent zMUD from parsing it as a special character. Next, what you want is the #IF command, not the %if function. Commands perform actions while functions return text. Finally, what you need to turn off the trigger is to first give it an ID and then use the #T- command to disable it when you want to. All in all, your trigger, in a format for entering into the command line, looks like this:
#TRIGGER "mytrig" {(%d)~]} {#IF (%1 > 50) {add str 17;add wis 7;add int 7;add dex 8;add con 15;end;#T- mytrig} {roll}}

Kjata
Reply with quote
Jhyral
Newbie


Joined: 10 Dec 2002
Posts: 4

PostPosted: Wed Dec 11, 2002 12:15 am   
 
I have used the trigger many times before, except with a different true value, and it works fine..so disregard anything that may be wrong with the rest of it. Also, the trigger does have a class, and I need it to disable BEFORE the "add str 17" and such. The reasoning is this..there may be a way around this that I'm not seeing as well:
After the 'add 17 str' or any of the other commands are entered, the same pattern is shown again, but with a less value, 17 less(makes sense, eh?), the 17 less, will, of course make the value below 51, and it begins rolling again.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Wed Dec 11, 2002 12:52 am   
 
It should still work fine because zMUD will be fast enought to execute all of the commands of the trigger before any new output from the MUD is received.

Kjata
Reply with quote
Jhyral
Newbie


Joined: 10 Dec 2002
Posts: 4

PostPosted: Wed Dec 11, 2002 4:13 am   
 
I tried the pattern/value you gave me with my name substituted for "mytrig", and it showed a syntax error on the first {, and didn't work..no idea why, I don't see an error.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Wed Dec 11, 2002 4:34 am   
 
Did you change from using %if to #IF? Try posting exactly what you have now.

Kjata
Reply with quote
Jhyral
Newbie


Joined: 10 Dec 2002
Posts: 4

PostPosted: Wed Dec 11, 2002 5:02 am   
 
Did that..and several other things, finally got it to where it will add all the things I wanted it to and end before the rolls go through, now I can finally leave my computer completely alone and let it roll my character, thanks.
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