Help with a basic (Far)Healing skillset system

by Unknown

Back to Mechanic's Corner.

Unknown2007-02-13 16:14:58
This has been the bane of my existence for some time, and, even though there is most likely some very simple way to do it, I can't figure it out.

I need to be able to tell the difference between this:
QUOTE
3586h, 4850m, 4460e, 10p, 15200en, 23600w ex-succor me

You are:
an insomniac.
3586h, 4850m, 4460e, 10p, 15200en, 23600w ex-
and this:
QUOTE
3586h, 4940m, 3701e, 10p, 15200en, 23600w ex-succor gehn

Gehn is:
suffering from a pierced left leg.
blind.
deaf.
an insomniac.
3586h, 4940m, 3701e, 10p, 15200en, 23600w ex-

At the moment if I succor other people with my Healing Skillset triggers up it would try to spam heal myself of afflictions I don't have, not quite a loop, but it would just repeat every time I succored again. As such I hardly ever keep those triggers on, and I'm looking for a way to tell my triggers "hey this isn't me! heal the other guy!"

I also have a problem telling the difference between them being in the room and being in the zone. (farhealing/farcuring are about 2-3 times as expensive mana-wise when compared with non-ranged healing and curing, so if they're in the room with me it really isn't a good idea if I farheal and farcure them)

Thanks in advance for any help.
Unknown2007-02-13 16:25:46
Your Diagnose triggers should be in a class folder that is disabled until you see the preceding line, either "You are:" or "Person is:" and then you simply need to capture the name of your farhealing target before the diagnose lines start firing.

(I don't know the syntaxes for the healing, so just guessing.)

CODE
#CLASS Diagnose disable
#REGEX {^\\d+h\\, \\d+m} {#T- Diagnose} "" {nocr|prompt}
#REGEX {^suffering from a pierced leg\\.$} {farheal nerves @farheal_target}
#CLASS 0

#VAR farheal_target "me"
#REGEX {^You are\\:$} {farheal_target = "me";#T+ Diagnose}
#REGEX {^(+) is\\:$} {farheal_target = %1;#T+ Diagnose}


You'll want to fix it up a bit, obviously, but this is the basic idea. You might want to restrict the last trigger to only fire for your allies or commune/guild mates, for example. Telling if they're in the same room with you when you try to heal them is trickier, what with lots of forms of movement in or out of a room, not to mention shrouding.
Gwylifar2007-02-13 16:39:51
If you trigger "You are:" to wipe your afflictions and enable your diagnose self class, be careful of GODFEELINGS!

I don't think I'd go with two parallel sets of triggers, though. I'd have a variable which specified whose afflictions I was looking at. I'd trigger "Gehn is:" to set the variable to Gehn (i.e., "^(%w) is:$") and have whatever alias I have doing "diag me" set it to "me". Then all the triggers would call some alias which would handle the affliction according to that variable.

It gets tricky if you want your system to prioritize Gehn's afflictions, of course.

But if all you want to do is not set off your diagnose triggers, you just have to have them once in a class you enable as you do the diag successfully (but not when you do GODFEELINGS) and disable afterwards, which you really should be doing anyway.
Unknown2007-02-13 20:56:44
QUOTE(Gwylifar @ Feb 13 2007, 11:39 AM) 382935
I don't think I'd go with two parallel sets of triggers, though. I'd have a variable which specified whose afflictions I was looking at. I'd trigger "Gehn is:" to set the variable to Gehn (i.e., "^(%w) is:$") and have whatever alias I have doing "diag me" set it to "me". Then all the triggers would call some alias which would handle the affliction according to that variable.



That's almost exactly what I posted!

Good point about the Godfeelings, though. I actually hadn't noticed because I don't check for favors when I'm afflicted. I use a diagnose flag, anyway, to tell my "You are:" trigger that I'm honestly checking for afflictions and it's not prone to illusions... or Godfeelings.
Laysus2007-02-14 00:22:39
#oninput (^diag(nose)?$) {} {regex}
#cond (^You are\\:$} {#t+ diagnose} {regex|within|param=10}

>.>
Shorlen2007-02-14 00:28:23
I wrote a "heal off succor me/target" system for Ixora that includes a way to succor a target at range and auto-farcure them one random (non-insomnia/blind/deaf) afflict they are afflicted with if you'd like to look at it.
Acrune2007-02-14 03:02:44
Make an alias for diagnose and succor that changes a variable or variables to reflect which you used. That way, when the affliction line comes up, you'll know which one it was (if either, this will prevent illusioned diagnose lines too) and you will be able to act accordingly. Reset the variable(s) upon receiving the prompt. Much safer then triggers, but requires slightly more tedious programming.