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
Latent
Apprentice


Joined: 19 Aug 2002
Posts: 120
Location: USA

PostPosted: Sat Feb 08, 2003 8:39 pm   

is there a way to do AND statements?
 
Ok, on the mud I play on certain attacks are more effective during hte day, so i am making an alias to do a certain attack from 6 AM until 9 PM... but here's the problem... i need to make an if statement where like if @TIME is 6-11 AND @AMPM is AM or @TIME is 12-9 AND @AMPM is PM then c solstice, otherwise c grudge... how can i do that
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Sat Feb 08, 2003 9:38 pm   
 
this should work i think, if you make your @AM variable a simple boolean (true or false):

#if ( (@TIME > 6 AND @TIME < 11 AND @AM) OR (@TIME > 12 AND @TIME < 9 AND !@AM) ) {c solstice} {c grudge}

--------

moon.icebound.net:9000
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Feb 08, 2003 9:43 pm   
 
#IF (((@TIME > 5) AND (@TIME < 12) AND (@AMPM = "AM")) OR (((@TIME < 10) OR (@TIME = 12)) AND (@AMPM = "PM"))) {cast solstice} {cast grudge}

It would probably be easier to use a single variable, with triggers to change it at sunrise and sunset.

LightBulb
Advanced Member
Reply with quote
Latent
Apprentice


Joined: 19 Aug 2002
Posts: 120
Location: USA

PostPosted: Sat Feb 08, 2003 10:04 pm   
 
i thought about that too but the time when solstice is effective is before sunrise
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Sat Feb 08, 2003 10:24 pm   
 
quote:

@TIME > 12 AND @TIME < 9


doh, wtf was i thinking there??

--------

moon.icebound.net:9000
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