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
Noodles
Beginner


Joined: 03 Mar 2004
Posts: 12
Location: USA

PostPosted: Sat Mar 06, 2004 4:45 am   

Another dumb question :)
 
Told you I would be back ;)

Looking to make a trigger for an event, or 20 of the same events, after 20 - execute a command.. like

Noodles posts another question for help 1~
2~ 3~ etc 20! = Execute Noodles.

I looked and I would post what I have, but it confused me so much I thought about making 20 triggers 1-20 that turned themselves on and off... [xx(] Ooo Ooo wait...

#TRIGGER {Noodles asks another question} {#ADD DUMBQUESTION 1}
#UNTIL (@DUMBQUESTIONS = 20) {#SHOW @DUMBQUESTIONS;#ADD DUMBQUESTIONS 1)
#IF (@DUMBQUESTIONS = 20) {Execute Noodles; #VAR 0} {#ADD DUMBQUESTIONS 1}

I had a brainstorm, typed out above, what do you think? Doesn't work ever here :P
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Mar 06, 2004 6:11 am   
 
You have #IF as a standalone command, not as part of the trigger.
#VAR 0? Did you mean #VAR DUMBQUESTIONS 0?
Is is DUMBQUESTION or DUMBQUESTIONS?

#TR {Noodles asks another question} {#ADD DUMBQUESTIONS 1;#IF (@DUMBQUESTIONS = 20) {Execute Noodles;#VAR DUMBQUESTIONS 0}}
Reply with quote
Noodles
Beginner


Joined: 03 Mar 2004
Posts: 12
Location: USA

PostPosted: Sat Mar 06, 2004 7:24 pm   
 
Howdy! Along the same lines as my post above, however, this is using 6,000,000 as the number to subtract from literally. I've gotten everything imaginable to appear in @EXPNEEDED except what I need.

#VAR LEVEL 6000000
#VAR EXP %1
#VAR EXPNEEDED

#TR {you gain %1 exp) {#MATH EXPNEEDED (%eval (@LEVEL - @EXP)); #IF %eval (@EXPNEEDED < 0) {#SHOW LEVEL SOON!; #VAR EXPNEEDED 6000000}}
#ST {EXP!: @EXPNEEDED}

And thanks again for even taking the time to read/respond - it is helpin me out tremendously :)

Noodles
(#ADD DUMBQUESTIONS 3)
Reply with quote
musishun00
Wanderer


Joined: 16 Dec 2003
Posts: 77
Location: USA

PostPosted: Sat Mar 06, 2004 8:07 pm   
 
Couple problems that I can see. You need a different pattern matching char in your trigger, and you've got the Variables set up wrong. Try this:

#VAR level 6000000
#VAR expneeded ""
#TR {you gain (%d) exp} {#VAR expneeded %eval(@level-%1); #IF {@expneeded<0} {#SHOW LEVEL SOON!;#VAR expneeded 6000000} {}}
#ST {EXP!: @expneeded}

Hope that works!
Reply with quote
Noodles
Beginner


Joined: 03 Mar 2004
Posts: 12
Location: USA

PostPosted: Sun Mar 07, 2004 1:31 am   
 
It helped :) Now works after a little tweaking. But I see where I was going wrong with having spaces between (@level - %1) so on..

#VAR level 6000000
#TR {you gain (%d) exp} {#VAR level %eval(@level-%1); #IF {@level<0} {#SHOW LEVEL SOON!;#VAR level 6000000} {}}
#ST {EXP!: @level}


Thanks again :)
Noodles
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