|
TerrellKl Novice
Joined: 30 Aug 2005 Posts: 49
|
Posted: Wed Jan 18, 2006 5:50 pm
group healing |
Okay.. My cleric has a trigger that automatically heals people in my group.. every round it displays
Code: |
(Fighting) [1066/1213hp 120/ 120ma 437/ 437mv] [41 Troll Cav/Bbr] Poe (Head of group)
(Standing) [ 618/ 618hp 1877/1877ma 168/ 168mv] [50 Elder Pri] Orim
(Standing) [1000/1000hp 10/ 10ma 1250/1250mv] [50 -- ---] an icetusk mammoth
|
and it works fine.. the trigger is this..
Code: |
Pattern: ~[%s(%d)%p(%d)hp%s(%d)%p(%d)ma%s(%d)%p(%d)mv~] ~[*~] (%w)
Value: #if (%1 < (%eval( %2-200))) {
#Co orange
#echo %7 Is Being Attacked
Heal %7
}
|
It works fine.. but If two people in the group get hit.. The trigger tries to heal them both, and my mud wont allow them both to be healed at once, so it creates a very very big mess.
I was wondering if you guys could help me get it where if more than one of the people in my group are hurt to cast 'group heal'
Thanks in advance |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Thu Jan 19, 2006 12:05 am |
You can try adding another condition to your trigger to be the mud prompt so it only executes once every time prompt is displayed. For exampe:
Code: |
#TR {~[%s(%d)%p(%d)hp%s(%d)%p(%d)ma%s(%d)%p(%d)mv~] ~[*~] (%w)} {
#if (%1 < (%eval( %2-200))) {
#Co orange
#echo %7 Is Being Attacked
Heal %7
}
}
#COND {GGGGGGGGG} {#NOOP }
|
Of course where I have 'GGGGGGGGG' you'd substitute your prompt pattern. |
|
_________________ Asati di tempari! |
|
|
|
TerrellKl Novice
Joined: 30 Aug 2005 Posts: 49
|
Posted: Thu Jan 19, 2006 2:10 am |
awesome idea.. thanks
Doh.. Doesn't work. |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Fri Jan 20, 2006 5:29 am |
Post your trigger code and we'll try to debug. What happens when it doesn't work? Does it still fire twice? Does it not fire at all? Do you get some weird output?
|
|
_________________ Asati di tempari! |
|
|
|
TerrellKl Novice
Joined: 30 Aug 2005 Posts: 49
|
Posted: Sat Jan 21, 2006 9:19 pm |
The problem with it is this
Code: |
Your group consists of:
(Fighting) [1066/1213hp 120/ 120ma 437/ 437mv] [41 Troll Cav/Bbr] Poe (Head of group)
(Standing) [ 618/ 618hp 1877/1877ma 168/ 168mv] [50 Elder Pri] Orim
(Standing) [1000/1000hp 10/ 10ma 1250/1250mv] [50 -- ---] an icetusk mammoth |
if I set it up state wise..
The trigger would fire off of Your group consists of
then.. the next one would fire, but then the state would be set back to the Your group consists of trigger.. so the other people in the group get ignored
and the number of people in my group always changes so i cannot make it static |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Mon Jan 23, 2006 5:49 am |
I think there's a slight disconnect. Do you have a mud prompt?.. The way I see it is that you can trigger off of "Your group consists of:" the next condition would be "(Fighting) ..." and the last condition would be your mud prompt.
I'm guessing I'm missing what your mud prompt is, or are you saying the entire piece you have posted as Code is the mud prompt? If not can you post exactly what your MUD prompt is. Could you also post the trigger code that you are currently using. |
|
_________________ Asati di tempari! |
|
|
|
TerrellKl Novice
Joined: 30 Aug 2005 Posts: 49
|
Posted: Tue Jan 24, 2006 6:41 pm |
it doesn't fire off my prompt
It fires off a group report
There are several people in my group, it gives me the prompt for everyone |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Tue Jan 24, 2006 7:25 pm |
Ok.. I get what you mean.. but the same concept still applies... just use the start of the group report to be the second conditon.
Code: |
#TR {~[%s(%d)%p(%d)hp%s(%d)%p(%d)ma%s(%d)%p(%d)mv~] ~[*~] (%w)} {
#if (%1 < (%eval( %2-200))) {
#Co orange
#echo %7 Is Being Attacked
Heal %7
}
}
#COND {^Your group consists of: } {#NOOP } |
It'll be off the first time you use it unless you initialize it to be in the second state. The one thing to note is that it will always heal the first person it encounters that matches your condition. To ensure that everyone gets a chance you will need to do a more complex round robin setup. |
|
_________________ Asati di tempari! |
|
|
|
TerrellKl Novice
Joined: 30 Aug 2005 Posts: 49
|
Posted: Tue Jan 24, 2006 7:51 pm |
tried it your way
It will only heal the first person in the group
it wont fire off the rest of them |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Wed Jan 25, 2006 2:31 pm |
Code: |
#TRIGGER "GroupConsistHealTrig" {Your group consists of:} {#VAR ToHeal %null;#VAR ToHealAmount 0} "ZuggSoft|22946"
#COND {~((%w)~)%s~[%s(%d)%p(%d)hp%s(%d)%p(%d)ma%s(%d)%p(%d)mv~] ~[*~] (%w)} {
#NOOP Do you want to check %1 for fighting or standing to only heal fighting folk? Triage ideas here:
#if ((%2 < (%eval( %3-200))) AND ((%eval(%3-%2)) > @ToHealAmount)) {
#Co orange
#echo %8 Is Being Attacked
#VAR ToHeal %8
#VAR ToHealAmount %eval(%3-%2)
}
#TEMP GroupConsistHealTrigEnd {^$} {#STATE GroupConsistHealTrig 0;heal @ToHeal for @ToHealAmount hp}
} {looppat|param=99}
|
This will loop through your group and grab who should be healed the most.
It assumes that there is a blank line after the group consists of lines. |
|
|
|
TerrellKl Novice
Joined: 30 Aug 2005 Posts: 49
|
Posted: Tue Jan 31, 2006 2:35 am |
problem.. there is no blank line after Your group consists of
|
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Tue Jan 31, 2006 2:08 pm |
Then what comes after when you check the group status?
Paste mudout of a couple of things before you check the group status and a couple of things after the group status so we can determine what to use.
ie:
[1337/1337hp -foo]
look
Tower of Naught
It is very dark and is very cold.
This stone brick room is a circular area which has been reinforced with metal braces along the side facing the gatehouse. Various piles of rocks, pots and sharp sticks surround a few small metal grates on the ground. You know that the gatehouse winch is to the south and the door to the north heads to the northern battlements.
This area is very large.
[1337/1337hp -h4x]
group
Your group consists of:
(Fighting) [1066/1213hp 120/ 120ma 437/ 437mv] [41 Troll Cav/Bbr] Poe (Head of group)
(Standing) [ 618/ 618hp 1877/1877ma 168/ 168mv] [50 Elder Pri] Orim
(Standing) [1000/1000hp 10/ 10ma 1250/1250mv] [50 -- ---] an icetusk mammoth
[1337/1337hp -h0x]
wield
[1337/1337hp -h3x]
You are carrying the mighty uber-drop blade of Pow! |
|
|
|
icedsun Novice
Joined: 20 Jan 2006 Posts: 45 Location: Minnesota
|
Posted: Tue Jan 31, 2006 7:03 pm |
He wants it to cast group heal if there is more than 1 person that needs healing - so how about instead of finding which one needs heal the most, it should just have a variable that starts off as 0 but gets added to during the triggering each time it sees that a person on the list needs healing. Then, do an IF statement to see if that var is 0:(do nothing) 1:(heal the person) greater-than-1:(cast groupheal)
|
|
_________________ "Build a man a fire and he's warm for a night. Light a man on fire and he's warm for the rest of his life." --My Mom |
|
|
|
TerrellKl Novice
Joined: 30 Aug 2005 Posts: 49
|
Posted: Tue Jan 31, 2006 8:15 pm |
Code: |
424ac < 912/1074hp 120/120Ma 467/477Mv 264102gold 16145885xp > look
The general's office
The first thing most people notice upon entering the office is the
large and ornate wooden desk sitting at its center, but the occupants
of this office are typically far more awe inspiring. Having passed
the age of being effective fighters themselves, the brigadier generals
are in charge of maintaining the military readiness and overseeing all
operations and planning for the forces.
Obvious Exits:
/ \ South - The main hallway through the barracks
| |
| * |
| | |
\ S /
The corpse of the brigadier general is lying here.
Orim is here.
.....he is riding on an icetusk mammoth.
424ac < 921/1074hp 120/120Ma 470/477Mv 264102gold 16145885xp > emote kicks orim.
Poe kicks orim.
424ac < 921/1074hp 120/120Ma 470/477Mv 264102gold 16145885xp > group
Your group consists of:
(Standing) [ 950/1074hp 120/ 120ma 477/ 477mv] [45 Troll Cav/Bbr] Poe (Head of group)
(Standing) [ 628/ 628hp 1887/1887ma 168/ 168mv] [50 Elder Pri] Orim
|
|
|
|
|
icedsun Novice
Joined: 20 Jan 2006 Posts: 45 Location: Minnesota
|
Posted: Tue Jan 31, 2006 8:30 pm |
Code: |
#ALIAS HealGrp {#T+ Healer;#VAR HealList "";group}
#TRIGGER {~[ (%d)~/*(%d)hp*~mv] ~[*~] (%w)} {#IF (%1<%2) {#ADDITEM HealList %3} Healer
#TRIGGER {^ %dac ~< %d~/%dhp} {#IF (%numitems(@HealList)>1) {cast groupheal command} {heal %item(@HealList,1)};#T- Healer} |
Not sure if this will do it, but I think so... |
|
_________________ "Build a man a fire and he's warm for a night. Light a man on fire and he's warm for the rest of his life." --My Mom |
|
|
|
icedsun Novice
Joined: 20 Jan 2006 Posts: 45 Location: Minnesota
|
Posted: Tue Jan 31, 2006 10:30 pm |
Woops, make both of those triggers a part of the "Healer" Class... i forgot to do that to the bottom trigger!
|
|
_________________ "Build a man a fire and he's warm for a night. Light a man on fire and he's warm for the rest of his life." --My Mom |
|
|
|
TerrellKl Novice
Joined: 30 Aug 2005 Posts: 49
|
Posted: Sat Feb 04, 2006 5:00 pm |
Oh my god, thank you... how could I overlook such an easy way to do it. Thanks a lot
|
|
|
|
|
|