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


Joined: 19 May 2002
Posts: 15

PostPosted: Mon Jun 17, 2002 1:22 am   

Embedded #IF command..HELP`
 
we are trying to write a trigger set that allows us to remort and recast spells again only if the level is appropriate.
Currently our thoughts are:
#IF (@level >= 2) {#AD stotal 1}
#IF (@level >= 2 and ARMOR = 0) {c armor;#AD total 1} {#IF (@level >=2) {#AD total 1}}
#IF (total = stotal) {#SA DONE!} {aff}

stotal should be a total of spells castable
total is the number of spells cast or already affecting the player
The problem seems to lie in using #AD in an #IF statement...
fyi Armor would be a variable pulling whether Armor has been cast using an affect list trigger
aff is an alias setting total and stotal to 0 and then pulling up the current affect list. I will clarify, if you have any ideas please help us out

Double0fro
Reply with quote
double0fro
Beginner


Joined: 19 May 2002
Posts: 15

PostPosted: Mon Jun 17, 2002 1:38 am   
 
well here's my tip to everyone, if your new trigger set starts looping and you click the trigger icon in the bottom left to turn it off, don't forget to turn it back on to get your trigger working...yeah, 3 hours gone to that...anyhow
Reply with quote
leick
Newbie


Joined: 06 Jun 2002
Posts: 3

PostPosted: Mon Jun 17, 2002 6:44 am   
 
have you tried using %if instead of #if?

it follows the general pattern kinda like this:
%if(@var=2,cast this,cast this instead)
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Jun 17, 2002 6:42 pm   
 
What are the trigger phrases?
What is the problem?

I can confidently state, from my own experience, that #ADD works in #IF statements. That's not the problem.

By the way, #IF (total = stotal) will never be true. #IF (@total = @stotal) might be.

LightBulb
Senior Member
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