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
Brujah
Wanderer


Joined: 13 Nov 2002
Posts: 88
Location: USA

PostPosted: Thu Mar 06, 2003 2:34 am   

Low Health - Healing Trigger
 
I want to go ahead and get all of my questions out of the way now so i dont keep bugging everyone with them.

Lets say my status bar, when im completely healthy, looks thusly

[*]<1000hp 1000sp 1000st>

How would i make a trigger to automatically "sleep" when my HP got below say... 250?

If i can get this basic information i can configure it to work properly with how i need it. thank you in advance.

<_,-'
Reply with quote
Toetag
Magician


Joined: 10 Oct 2000
Posts: 356
Location: USA

PostPosted: Thu Mar 06, 2003 3:04 am   
 
First, you'll need to set a variable for 250. (@lowhealth)

then you'll need to make a trigger for your prompt. something like:

Pattern:
~[~*~]~<(%d)hp (%d)sp (%d)st~>

Command:

If {%1 < @lowhealth}{sleep}

Try that.

Killing a fly on a friends forhead may not be overkill, use a hatchet to make sure the job is done.
Reply with quote
Brujah
Wanderer


Joined: 13 Nov 2002
Posts: 88
Location: USA

PostPosted: Thu Mar 06, 2003 3:15 am   
 
so i would enter this in?

#VAR {lowhealth} {250}
#TR {~[~*~]~<(%d)hp (%2)sp (%3)st~>} {If {%1 < @lowhealth}{sleep}???

That looks so wrong i dont even want to try it lol. i dont think i have it right at all.

<_,-'
Reply with quote
iljhar
GURU


Joined: 10 Oct 2000
Posts: 1116
Location: USA

PostPosted: Thu Mar 06, 2003 4:08 am   
 
#var sleeping 0
#var lowhealth 250
#trigger {^~[~*~]~<(%d)hp *sp *st~>} {#if (%1<@lowhealth && @sleeping=0) {sleep;#var sleeping 1}}

Try that, if it doesn't work, just play around with it.

Iljhar
Reply with quote
Brujah
Wanderer


Joined: 13 Nov 2002
Posts: 88
Location: USA

PostPosted: Thu Mar 06, 2003 8:14 pm   
 
it kind of works. but it has a few problems i cant figure out. IE

How do i make it wake me up when i reach 600 health? i tried making another variable exactly the oposite but that just spams me because every status line but that doesnt work at all. it spams me with hundreds of lines trying to wake me up and start the script.

I was thinking maybe inserting a line into the sleep trigger/variable that started the tick timer to stand;start after 60 seconds but then i run into the problem that it keeps trying to do it. the #alarm command doesnt work in this instance does it? how could i insert this?

<_,-'
Reply with quote
Brujah
Wanderer


Joined: 13 Nov 2002
Posts: 88
Location: USA

PostPosted: Thu Mar 06, 2003 9:02 pm   
 
this is what i am using and it seems to be working but i dont know if i have it quite right. would appreciate the input from a Guru :) i dont suppose any Guru's play MM do they?

#var goodhealth 550
#var lowhealth 250
#TR {^~[~*~]~<(%d)hp *sp *st~>} {#if (%1>@goodhealth & @sleeping=1) {wake;start;#var sleeping 0 #if (%1<@lowhealth & @sleeping=0) flee n;flee s;flee e;flee w;stop;sleep;#var sleeping 1}

<_,-'
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Mar 10, 2003 9:11 pm   
 
You need a few minor changes to the trigger. Also, this looks like it's operating from your prompt, so I've added the nocrand prompt options. If you aren't using the prompt to control the trigger, remove them.
#var goodhealth 550
#var lowhealth 250
#TR {^~[~*~]~<(%d)hp *sp *st~>} {#if (%1>@goodhealth & @sleeping=1) {wake;start;#var sleeping 0};#if (%1<@lowhealth & @sleeping=0) {flee n;flee s;flee e;flee w;stop;sleep;#var sleeping 1}} {} {nocr|prompt}

LightBulb
Advanced 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