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


Joined: 10 Oct 2005
Posts: 2

PostPosted: Fri Jul 25, 2008 6:53 am   

#if question
 
I'm sure this has been answered elsewhere, but I can't find it. I'm using zmud, and want to create an #if to check if 2 conditions are true, and if so, execute a command. Any help from the gurus would be much appreciated.

basically I'll have @hits and @mana, checking to see if each is less than 80% of @maxhit and @maxmana, to lay hands

Thanks in advance.

Phil
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4689
Location: Pensacola, FL, USA

PostPosted: Fri Jul 25, 2008 7:03 am   
 
#IF (@hits<@maxhit/5 AND @mana<@maxmana/5) {do this}
_________________
Discord: Shalimarwildcat
Reply with quote
Qaiia
Wanderer


Joined: 06 Apr 2007
Posts: 59

PostPosted: Fri Jul 25, 2008 9:11 am   
 
If you want to check for EITHER stat being less than 80% of full value, use the following:

#IF (@hits<@maxhit*.8 OR @mana<@maxmana*.8) {lay hands}

Swap out OR for AND if you want them BOTH to be less than 80% before laying hands.
_________________
Citrus: The Juicy Alternative
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