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
TerrellKl
Novice


Joined: 30 Aug 2005
Posts: 49

PostPosted: Mon Jul 03, 2006 10:17 pm   

Autoheal trigger
 
#TRIGGER {~[%s(%d)%p(%d)hp%s(%d)%p(%d)ma%s(%d)%p(%d)mv~] ~[*~] (%w)} {
#if (%1 < (%eval( %2-200))) {
#Co orange
heal %7
}
}

When I receive this:

(Fighting) [1070/1271hp 275/ 275ma 449/ 485mv] [46 Dwarf Bbr/Cav] Havoc (Head of group)
(Fighting) [ 417/ 618hp 1747/1877ma 168/ 168mv] [50 Elder Pri] Orim
(Fighting) [ 452/ 452hp 749/ 749ma 163/ 163mv] [26 Human Mag] Leto
(Fighting) [ 651/ 651hp 125/ 125ma 219/ 251mv] [27 Orc War] Tul
(Fighting) [ 619/ 619hp 323/1228ma 195/ 195mv] [28 Drow Nec] Nix
(Fighting) [ 798/ 798hp 931/2034ma 108/ 108mv] [49 Irda Pri/Pro] Tyrelia
(Fighting) [ 894/ 894hp 8/1169ma 195/ 195mv] [36 Marid Cle] Peril

Havoc wouldn't be healed.. I believe its because his hp is over 1000, It doesn't work when it does that, and Second, if Havoc could be healed, it would try to heal them both.. I want to only heal one, or cast 'group heal'

can anyone help?
Reply with quote
edb6377
Magician


Joined: 29 Nov 2005
Posts: 482

PostPosted: Mon Jul 03, 2006 11:44 pm   
 
you could do this type of action which would add to the list based on 50% health

#IF %1 > (%2 * .5) {#add healneeds 1}

THen you can figure out if its more than 1 do a group heal if its 1 then heal that person and if its 0 then do nothing.

just one way.. this is the simple quick thinking way. I have to admit i have a lot of my own scripts to convert and as such i am trying to not write anyone elses for them. So im sure there is a more elaborate or eloquent way to process it. Your example fails to add the command you type to view that or any other such information and without lead in and lead out triggers you will have to be a bit creative
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