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
PHLN
Adept


Joined: 30 Dec 2001
Posts: 220
Location: Canada

PostPosted: Sun Oct 13, 2002 5:17 am   

Alarm + Loop + Triggers +....
 
Hi all again, I was wondering if anyone can help me tweak one of my healings triggers so that it doesn't need any feedback from the patient (as in they don't need to report for healing). So far, my healing triggers consist of a variable name friends, a trigger (%w) reports: (%d)/(%d) hp with the value #if %ismember( %lower( %1), %lower( @friends)) {#if (%2 < %3) {operate %1} {clear}} in it. How the trigger work is that when a person that is in my friends variable report with the current hp is less than the max hp, I will input the command operate Target. The problem with this, is that they have to keep reporting for a heal, and since on my mud, skill lags is a major problem, sometime they end up not getting the more effecient healing as I could give.

So I was thinking, if there is a way to have so that when I turn my healing bot on, I will start inputing the command gr pc every 5 seconds, and then from the group information that will show their max and current hp, I will do my healing without requiring them to report everytime. When I type gr pc, the following lines appear. [33] Target 225/ 240 hp 281/ 281 mana 258/ 321 mv

I want the mud to stop the 5 seconds gr pc command when it see that my Target current hp is below their max. And start having this loop, gr pc, operate target, gr pc, (to look and compare the hp again), and continue so until they are fully heal. Then back to the 5 seconds gr pc loop. Is this even possible to do in zMUD?
Reply with quote
Troubadour
GURU


Joined: 14 Oct 2000
Posts: 556
Location: USA

PostPosted: Sun Oct 13, 2002 6:04 am   
 
I ignored the whole @friends list since if they're in your group, they must be a friend.
You can set the tank with the setTank alias. After the fight begins type [b]gr pc[b]. The group report is received: if hp of the target is down, you operate and enter gr pc again; if hp is at max, a temporary 5 second alarm is created which will send gr pc then go away. It is assumed that your group has descriptions off.

#TR {~[%d~] {@target} (%d)/ (%d) hp %d/ %d mana %d/ %d mv} {#IF (%1 < %2) {operate @target; gr pc} {#ALARM +5 {gr pc}}}

#TR {turns to attack (%w)} {#VAR target %1}

#AL setTank {#VAR target %1}



Troubadour
(Win 98, Pentium III, 550 MHz)
Reply with quote
PHLN
Adept


Joined: 30 Dec 2001
Posts: 220
Location: Canada

PostPosted: Sun Oct 13, 2002 8:04 am   
 
Hmm, is there anyway I can modify it so that I don't have a temp alarm? Like if I do gr pc auto or something, it will keep gr pc every 5 seconds to check on the hp of my target, and when the target is hurt, it will gr pc, check target hp, operate target, gr pc, looping like that, till he heal, then back to 5 seconds gr pc loop?
Reply with quote
PHLN
Adept


Joined: 30 Dec 2001
Posts: 220
Location: Canada

PostPosted: Sun Oct 13, 2002 8:07 am   
 
also. the problem is that it isn't working, since the space between the name at the hp is like, err ,, alot?, depending how long the name is
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Oct 13, 2002 3:20 pm   
 
Make a 5 second alarm (*5 instead of +5). This should be a stand-alone command, not part of a trigger, since you only need to do it once. Give it an ID or put it in a class, then use #T+ and #T- to control it.

You can use %s in your pattern to represent any number of spaces.

LightBulb
Senior Member
Reply with quote
PHLN
Adept


Joined: 30 Dec 2001
Posts: 220
Location: Canada

PostPosted: Sun Oct 13, 2002 3:52 pm   
 
Hmm, it doesn't seem to work, what I did was insert the %s between target and the (%d) thing. Even when I test it, it won't work and it use the default value
Reply with quote
PHLN
Adept


Joined: 30 Dec 2001
Posts: 220
Location: Canada

PostPosted: Sun Oct 13, 2002 4:19 pm   
 
ahh, figure out the problem, thanks for all your helps
Reply with quote
PHLN
Adept


Joined: 30 Dec 2001
Posts: 220
Location: Canada

PostPosted: Sun Oct 13, 2002 4:33 pm   
 
hmm, I have everything work fine and all, and greatly appreciate all your helps. There is one glitch that I can't seem to figure out however. Is the fact that the temp ALARM will stop if it doesn't receive the "perfect" hp and the same line in the next gr pc. How would I go in modifying it so that it will keep lopping that way and keep checking on the hp even if the line isn't the same in ont point or another because the Target move out of the room? I try using the ALARM class but then couldn't figure out how to stop it when it see that the target is hurt, and start it again when the target is full.. :)
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