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


Joined: 31 Jul 2002
Posts: 4
Location: USA

PostPosted: Wed Jul 31, 2002 2:55 pm   

How Do You Make A Variables Less than? Or greater?
 

The Subject Says it all,
Thx in advance.

The boogieman
Reply with quote
BoogieMan
Newbie


Joined: 31 Jul 2002
Posts: 4
Location: USA

PostPosted: Wed Jul 31, 2002 3:06 pm   
 

i mean a range, i dont get how to use it.
Reply with quote
BoogieMan
Newbie


Joined: 31 Jul 2002
Posts: 4
Location: USA

PostPosted: Wed Jul 31, 2002 3:21 pm   
 

Example:
I want it to Drink potion when my health Drops below 300/998hp
how would i do that?
Pattern:(Wut goes here?)/998hp
Command:Drink Potion
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Jul 31, 2002 3:31 pm   
 
#VAR potion 1

Pattern: (%d)/(%d)hp
Command: #IF ((%1 < 300) AND (@potion)) {#VAR potion 0;drink potion}

Pattern: You drink a potion
Command: #VAR potion 1

I've included a control variable since most MUD's will send you a prompt at your command, before the potion has done anything, and that would make you drink a second potion. You'll probably need to change the Pattern for it.


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