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


Joined: 03 May 2002
Posts: 9
Location: USA

PostPosted: Mon Apr 01, 2002 1:24 pm   

Battle tracking.
 
I have a variable "battle" & i want it to change its value from 0 to 1. Value 1 must be set if i'm fighting now. In other cases value of the variable must be 0.
In what ways I can do it? Now I'm using triggers whick shot on difference between my battleprompt & "peace" prompt. But is there other ways? I don't thin that my desicion is the best...

PS Sorry for my English %)

Creator of Kibilturg, Elder of the Masters's Guild.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Mon Apr 01, 2002 7:04 pm   
 
You can toggle it upon

#VAR battle 1
in:
Attacking a monster
Monster attacking you
Special attacks that result in battle (backstab...)

#VAR battle 0
in:
You kill your attacker
You die
You flee

Otherwise the variable is being set/reset
each prompt you receive.


Ton Diening
Reply with quote
Socko
Newbie


Joined: 03 May 2002
Posts: 9
Location: USA

PostPosted: Mon Apr 01, 2002 9:23 pm   
 
Thanks for you answer. But I'm using such structure, that turn off triggers when variable is changed. So when var Battle is 1 I use commands: #t- battledetect ; #t+ peacedetect.
And when var is 0 it looks like so:
#t+ battledetect ; #t- peacedetec.


Creator of Kibilturg, Elder of the Masters's Guild.
Reply with quote
kognesty
Newbie


Joined: 08 Jan 2001
Posts: 8
Location: USA

PostPosted: Mon Apr 01, 2002 9:27 pm   
 
This becomes an issue of "how automatic do you want the process?" Because quite literally you can do all this using aliases. But in using aliases you'll have to type when you want your variable to be 0 or 1. Otherwise, going off your prompt changes is probably the wisest method, its easier then dealing with conditionals that relate directly to battle as suggested above, and it's automatic. I'd stick with what you have unless its broken.
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