|
Latent Apprentice
Joined: 19 Aug 2002 Posts: 120 Location: USA
|
Posted: 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
|
|
|
|
Emit Magician
Joined: 24 Feb 2001 Posts: 342 Location: USA
|
Posted: 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 |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: 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 |
|
|
|
Latent Apprentice
Joined: 19 Aug 2002 Posts: 120 Location: USA
|
Posted: Sat Feb 08, 2003 10:04 pm |
i thought about that too but the time when solstice is effective is before sunrise
|
|
|
|
Emit Magician
Joined: 24 Feb 2001 Posts: 342 Location: USA
|
Posted: Sat Feb 08, 2003 10:24 pm |
quote:
@TIME > 12 AND @TIME < 9
doh, wtf was i thinking there??
--------
moon.icebound.net:9000 |
|
|
|
|
|