Execution: Custom Alert Mod (GUI now available)

All things /script related

Moderators: Fridmarr, Worldie, Aergis, _Chloe

Re: New Personal Project? Addon Idea

Postby Mert » Thu Aug 06, 2009 4:17 am

Would it possible to assign different rules to trigger for different members of the raid or at least the different archetypes? I'm thinking a menu where you can tell the addon who the tanks, healers, melee and ranged are and have different rules that appear for those different groups. Probably with a "global" channel for stuff that everyone needs to know or for situational things that apply to anyone, like whether or not you're standing in the fire.

As an example, I'm thinking Kologarn - we tank-swap whenever someone gets two stacks of the debuff, so having it announce to the tanks something like "[Current Tank] has two stacks, taunt now!" without unnecessarily spamming the DPS could be nice, especially if you could add in exceptions to it... in pseudo-code, I'm thinking something like this:

Code: Select all
LET CurrentTank=HighestCurrentThreat;
LET OffTank=SecondHighestCurrentThreat;
WHILE CurrentTank_CrunchArmorStacks=2
{
IF (OffTank_CruchArmorStacks=0) WARN_TANKS "[CurrentTank] has two stacks, taunt now!", WARN_HEALERS "Tanks switching now, [OffTank] will now be on the boss";
ELSE WARN_TANKS "[OffTank]'s stacks haven't fallen off yet, hold for now", WARN_HEALERS "Tanks cannot swap yet, expect heavy damage on [CurrentTank]";
}


Obviously my code is drivel and would probably end up spamming everyone repeatedly until they actually manage to switch, but you get the gist - basically giving different warnings specific to the different groups on only the things that group might need to know.

Expanding on that, possibly even tying two players together, such as if a Chopper Driver was assigned to pick up a specific person when they get shot off Flame Leviathan?

Of course it's not essential by any stretch of the imagination but I get the impression you're doing this as much to write the most comprehensive boss warning / announcement mod as anything so figured I'd suggest it all the same :)
User avatar
Mert
 
Posts: 152
Joined: Tue Feb 24, 2009 8:38 pm

Re: New Personal Project? Addon Idea

Postby moduspwnens » Thu Aug 06, 2009 6:16 am

Mert wrote:Would it possible to assign different rules to trigger for different members of the raid or at least the different archetypes? I'm thinking a menu where you can tell the addon who the tanks, healers, melee and ranged are and have different rules that appear for those different groups. Probably with a "global" channel for stuff that everyone needs to know or for situational things that apply to anyone, like whether or not you're standing in the fire.

As an example, I'm thinking Kologarn - we tank-swap whenever someone gets two stacks of the debuff, so having it announce to the tanks something like "[Current Tank] has two stacks, taunt now!" without unnecessarily spamming the DPS could be nice, especially if you could add in exceptions to it... in pseudo-code, I'm thinking something like this:

Obviously my code is drivel and would probably end up spamming everyone repeatedly until they actually manage to switch, but you get the gist - basically giving different warnings specific to the different groups on only the things that group might need to know.

Expanding on that, possibly even tying two players together, such as if a Chopper Driver was assigned to pick up a specific person when they get shot off Flame Leviathan?

Of course it's not essential by any stretch of the imagination but I get the impression you're doing this as much to write the most comprehensive boss warning / announcement mod as anything so figured I'd suggest it all the same :)

I've been thinking through something like this, and I'm left with somewhat of a problem. I plan to be able to calculate the normal raid roles based on health, attack power, talents, or whatever, so I should be able to break them down to Melee DPS, Ranged DPS, Tanks, Healers. That will be a big help with raid assignment.

Making the jump to encounter-specific roles is where I'm still stuck, though. That'll be a little tougher to figure out since they differ so much from encounter to encounter. I'd hate to force a raid leader to assign roles to people before encounters, but I also know how crazy important these roles are. I may be able to get around some (like knowing who clicked on a portal for Yogg, or who's actually in a Chopper or Siege Engine), but it's going to take some MacGyvering. Or maybe not. I've already been considering things like "temporary rules" or rules that can disable or enable other rules. I might just have the Chopper rules enabled when you enter a Chopper and disabled when you leave. Likewise for Yogg, I'd have the "up top" rules enabled for everyone unless you click on a portal, and then they're disabled (and the illusion's rules enabled) until you click on the exit portal (or Induce Madness finishes).

It's one of my hurdles, though, because I think it would be too much to ask someone to assign people roles. If it were just that, maybe, but then that means if X disconnects or Y replaces Z, that means either your raid leader has to reconfigure groups or your warnings are off, spammy, or otherwise incorrect. If it can't be solved by the temporary enabling/disabling of certain rules by other rules, unless someone else has a good idea, it's probably not going to happen.
I rule.
moduspwnens
Moderator
 
Posts: 3382
Joined: Tue Nov 06, 2007 12:28 pm
Location: Shattered Hand

Re: New Personal Project? Addon Idea

Postby Mert » Thu Aug 06, 2009 7:18 am

I'm not entirely sure how it works, but ZOMGBuffs does some kind of check of the members of your raid and uses their stats to predict what role it thinks they are and assigns them accordingly. Occasionally it still gets it wrong, but its strength is that you can assign them to Healer, Ranged DPS or whatever if needed and then it will remember who is what until you change it so rather than having to reconfigure for each fight it will just default to what it thinks is the case unless told otherwise.

I see what you mean about when people have non-standard roles (like portal team on Yogg) to fulfil however - maybe that could work as you suggest if there's something they activaly do or some event they trigger that's different but I guess it'd be a lot of work to have an assignment for "kiter" on Gluth or whatever.

I see what you mean - assigning to generic tank, healer, etc groups shouldn't be that hard in itself and won't take a raid leader too long to set up but drilling down any further might prove to be enough work that it ends up going unused on account of being unwieldy. Best of luck anyway if you do find a solution :)
User avatar
Mert
 
Posts: 152
Joined: Tue Feb 24, 2009 8:38 pm

Re: New Personal Project? Addon Idea

Postby moduspwnens » Thu Aug 06, 2009 8:45 am

Mert wrote:I'm not entirely sure how it works, but ZOMGBuffs does some kind of check of the members of your raid and uses their stats to predict what role it thinks they are and assigns them accordingly. Occasionally it still gets it wrong, but its strength is that you can assign them to Healer, Ranged DPS or whatever if needed and then it will remember who is what until you change it so rather than having to reconfigure for each fight it will just default to what it thinks is the case unless told otherwise.

I see what you mean about when people have non-standard roles (like portal team on Yogg) to fulfil however - maybe that could work as you suggest if there's something they activaly do or some event they trigger that's different but I guess it'd be a lot of work to have an assignment for "kiter" on Gluth or whatever.

I see what you mean - assigning to generic tank, healer, etc groups shouldn't be that hard in itself and won't take a raid leader too long to set up but drilling down any further might prove to be enough work that it ends up going unused on account of being unwieldy. Best of luck anyway if you do find a solution :)

Well, I suppose by definition, if you're fulfilling a different role you'll be doing something differently (different vehicle, clicking portal, tanking adds instead of boss, etc.). I'll see how far I can take that. You'll be able to define what happens after the rules in your own Lua code if you'd like, so the possibilities are essentially limited by what you could do with an add-on anyway. For example, the current way I have "rules" implemented are (with spaces and line breaks for readability):

Rule:
Event ;
paremeter1, parameter2, parameter3, parameter4 ;
extraFilter1, extraFilter2, extraFilter3 ;
reaction1, reaction2, reaction3

The red is the event. For TJH, that's always COMBAT_LOG_EVENT_UNFILTERED. The blue is the event-based parameters, which is also what TJH does, except other events have parameters, too. The green are extra filters, something I thought that was heavily useful but absent in TJH. They're basically anything that would determine if the event should trigger that aren't directly related to the event. Three are shown here, but you should be able to make infinitely many. Reactions are fairly self-explanatory. What to do after the rule has been triggered, and they will execute in order. This is going to take a little MacGyvering code-wise, but should be quite reasonable. See my *note at the bottom.

Ideally the GUI will make it so you never have to know this, but here's how a typical rule might look:

Rule:
COMBAT_LOG_EVENT_UNFILTERED ;
, SPELL_CAST_SUCCESS, , Moduspwnens, , , , , 498, Divine Protection ;
heroic, combat, notresting ;
chat:YELL("Shield Wall up!"), [ ShieldWallCounter = ShieldWallCounter + 1 ], chat:SELF("DP used "..ShieldWallCounter.." times.")

You'd be able to have any number of reactions though, too. Heck, throw in:
startTimer("Modus: Divine Protection", 12)

Basically, those extra filters (examples used above are heroic, combat, notresting) could also be written in code. I just already told the add-on how to check if you're in combat, on heroic difficulty, and whether or not you're resting. The extra filter "combat" could have been rewritten as "[ InCombatLockdown() == 1 ]" and it would do exactly the same thing, because that's what I've told it to do when it sees the filter "combat".

This leads me to the realization that I could define those role-based groups myself. If the user can define his own if he doesn't like mine, then there's really no sense in not making it easier for the vast majority of the people that would agree with me. Just like I've made a "combat" filter, I could just make a "Yogg's Portal Group" filter because even though it would only be useful in the very niche situation of a single encounter, it wouldn't have to be used (or even necessarily shown to the user) when he's creating rules for the other 99.9% of the game. It would just be a string of code that doesn't get used at the worst, but be automated role selection for something that would otherwise be very complicated to figure out at best.

* This is slightly more complicated than I thought it would be because while doing them in order is easy, some actions (like interface option changes) are instant, while others (like sending a chat message) are not. I want to be sure the user doesn't have to understand that complexity, so I'm hoping to make it automatically work around it. So far I see no reason why my implementation idea wouldn't work.
I rule.
moduspwnens
Moderator
 
Posts: 3382
Joined: Tue Nov 06, 2007 12:28 pm
Location: Shattered Hand

Re: New Personal Project? Addon Idea

Postby moduspwnens » Thu Aug 06, 2009 10:24 am

That reminds me... I need to think of a replacement for DBM's reply/status whisper backs to people who aren't in the raid ("<DBM> Modus is fighting Yogg-Saron (50%, 25/25 alive). Whisper with "status" for an update."). I think I'll make that a different add-on. I have some good ideas for making one that's a little, well, better. Well, now that I think about it, though, some of its methods and data would be duplicated if you have both my add-on project and a separate reply add-on. That may be better just as an "extra module."

Basically, it's fairly easy on most fights to tell if it's on hard mode (and what variation of hard mode for Sarth, Freya, FL), so I'd like it to also reply with that. Well, to keep all users happy, it'd would just say the boss' name for normal mode (like, "Thorim") and include details for hard mode if it's hard mode (like, "Thorim and Sif" or "Freya +2K"). Heck, with the new "difficulties", determining boss difficulty (hard or normal) will be based on your dungeon setting in the Coliseum. There's already a Blizzard function to determine whether a mob is a "boss" or not, so I'd have a default template for unknown bosses that would reply like the DBM one does. I think there's easily some room for improvement for the whisper-back, though.

For example, how about for Iron Council, it'd whisper the health % of all three bosses? Or for Hodir, it'd tell you how much time is left for the achievement? Or for Freya, how many waves remain? Or for General, the health of the Animus (or time until it, if necessary). Or what phase you're in for Yogg? Or what phase you're on for Mimiron? /shrug. Nothing too terribly complicated. Just include a few extra snippets of code for each boss to determine these things and use them. Keeping a running list of all targets you're in combat with (as well as probably their health and maybe specific buffs) seems like it'd be best to not do more than once, though, so it'd probably be best if I had both add-ons use the same list and updater.
I rule.
moduspwnens
Moderator
 
Posts: 3382
Joined: Tue Nov 06, 2007 12:28 pm
Location: Shattered Hand

Re: New Personal Project? Addon Idea

Postby moduspwnens » Tue Aug 11, 2009 8:32 am

I'm looking for a good algorithm for rule to event comparisons. I thought what I was doing would work, and while it does, I tried it out on Yogg last night for funsies with only one rule (source -> target for fear) and it quickly jumped to 9MB of memory eaten. I know of some changes I'm going to make, but I thought I'd post here to see if anyone has done something similar or can think of a good algorithm. Storing the rule can be inefficient or slow, as that only really happens at load time or when the user enters a new rule. I just need it to be as fast as possible when comparing the event to rules.
I rule.
moduspwnens
Moderator
 
Posts: 3382
Joined: Tue Nov 06, 2007 12:28 pm
Location: Shattered Hand

Re: New Personal Project? Addon Idea

Postby Arees » Wed Aug 12, 2009 8:20 am

moduspwnens wrote:I just need it to be as fast as possible when comparing the event to rules.


I don't know much about LUA, or scripting languages in general, so I don't know what kind of data structures you have to work with. A hashmap would be incredibly efficient for looking up rules. It has O(1) search time. Its not as efficient for space, but thats a paradigm I studied in my computer science classes... you trade off speed for memory and vice versa.

If you don't know what a hashmap it, think of it this way. Each 'event' stored in it also has a key that references it. For example, if I were writing a hashmap to store people's medical records, I would have some function add(person, ssn). Where ssn is the identifier for that person object. What happens is that ssn is really a pointer to a memory location. So when I called get(ssn) it goes straight to that memory location and grabs the person.

*edit*
We're really busy at work... we're trying to get a beta version of our software out within the next couple weeks, and I am writing a server/client that handles sending alerts to the clients when something goes wrong (like a database crash). When both the server and client have several threads running, there are many concurrency issues to worry about and its a pain to test.

When I'm done writing this pain in the butt server, I'll probably have some time to spare to help you code (after I learn some LUA). I'm really liking TJH and you're new addon sounds intriguing.
Image
User avatar
Arees
 
Posts: 301
Joined: Tue Dec 25, 2007 9:50 pm

Re: New Personal Project? Addon Idea

Postby moduspwnens » Wed Aug 12, 2009 8:29 am

I ended up switching to the following algorithm. When a user inputs a rule, make sure the arguments for the event are in the order the game will be giving. That way, I just have what is essentially a "while" loop that goes from argument to argument and breaks if it sees a parameter that doesn't match (and matching is defined by a function that varies by parameter). I previously had it formatting each event by its expected arguments and whatnot before being processed, but that was just unnecessary overhead.
I rule.
moduspwnens
Moderator
 
Posts: 3382
Joined: Tue Nov 06, 2007 12:28 pm
Location: Shattered Hand

Re: New Personal Project? Addon Idea

Postby moduspwnens » Thu Aug 13, 2009 10:55 pm

I feel like I've come to a point where the add-on is ready enough to be uploaded as working and useful. It has been uploaded to WoWInterface, and a download link is available here.

Execution
Combat Alert Mod

ReadMe Updated 10/15/2009

Commands:
  • /ex - Open rule creation GUI
  • /ex list - List rules
  • /ex load 3 - Load rule 3 into GUI
  • /ex options - Show options


ADVANCED: Logical Operators. You can now use logical operators for both event parameters and extra filters. This means you can use "and", "or", "not" and parentheses to be even more specific with your rules. Execution supports the following logical operators:
    & (and)
    | (or)
    ! (not)
    ( ) (grouping)
Let's say you want to be helpful and announce when someone is hit by Mimiron's Shock Blast, but you want to be a little sneaky and NOT announce when it's you that gets hit. Rather than specify an individual rule for everyone in the raid but yourself, just change your target flags ("affiliation") for it from "RAID" (announces for anyone in the raid) to "RAID&!MINE" (which reads as "in the raid and not me"). Bam. Sneakiness accomplished. These operators are translated and interpreted by the client itself, so the sky is the limit as far as how complex you want to get with them.

Bugs/Feedback. If you find a bug or have feedback on this, feel free to post here or send me a PM. I'll try and get a fix up as soon as possible.
Last edited by moduspwnens on Thu Oct 15, 2009 7:14 am, edited 8 times in total.
I rule.
moduspwnens
Moderator
 
Posts: 3382
Joined: Tue Nov 06, 2007 12:28 pm
Location: Shattered Hand

Re: New Personal Project? Addon Idea

Postby Jerey-Darkspear » Thu Aug 13, 2009 11:35 pm

I was looking for a case-switch statement in lua for something else earlier and found a page that looks like it might be exactly what you're looking for: http://lua-users.org/wiki/SwitchStatement

Enjoy!
Image
Jerey-Darkspear
 
Posts: 135
Joined: Tue Jun 17, 2008 12:38 am

Re: New Personal Project? Addon Idea

Postby moduspwnens » Fri Aug 14, 2009 12:01 am

Jerey-Darkspear wrote:I was looking for a case-switch statement in lua for something else earlier and found a page that looks like it might be exactly what you're looking for: http://lua-users.org/wiki/SwitchStatement

Enjoy!


Nice! It looks like it is exactly what I'm looking for. It'll take a little reworking but that appears to be a great idea. It's definitely on the list.
I rule.
moduspwnens
Moderator
 
Posts: 3382
Joined: Tue Nov 06, 2007 12:28 pm
Location: Shattered Hand

Re: New Personal Project? Addon Idea

Postby trellian » Fri Aug 14, 2009 5:14 am

moduspwnens wrote:That reminds me... I need to think of a replacement for DBM's reply/status whisper backs to people who aren't in the raid ("<DBM> Modus is fighting Yogg-Saron (50%, 25/25 alive). Whisper with "status" for an update."). I think I'll make that a different add-on. I have some good ideas for making one that's a little, well, better. Well, now that I think about it, though, some of its methods and data would be duplicated if you have both my add-on project and a separate reply add-on. That may be better just as an "extra module."


BossWhisperer (Ace addon) allready exist
User avatar
trellian
 
Posts: 343
Joined: Wed Jul 16, 2008 3:02 am
Location: Silvermoon, EU

Re: New Personal Project? Addon Idea

Postby moduspwnens » Fri Aug 14, 2009 9:58 am

trellian wrote:BossWhisperer (Ace addon) allready exist

/shrug. Might not have to worry about that one then.

If anyone needs help creating any rule for this new add-on, post here and I'll see if I can help you out.
I rule.
moduspwnens
Moderator
 
Posts: 3382
Joined: Tue Nov 06, 2007 12:28 pm
Location: Shattered Hand

Re: Execution: Custom Alert Mod (Now available for testing)

Postby Arees » Fri Aug 14, 2009 10:34 am

I've been investigating the vehicle thing. I'm probably gonna mess with it some this weekend. I'm going to make a small addon with a / command to run it so that whatever your targeting it will either say "X is a person" or "X is a vehicle and Z is driving it."

This code should decide if a unit is a vehicle or not, but I haven't tested it yet, and I'm not sure if I have the correct syntax either.

Code: Select all
function yourmod.UnitIsVehicle( unit )

   local g = UnitGUID( unit )

   if not g then return end

   local t = tonumber( g:sub( 5, 5 ), 16 ) % 8

   if t == 5 then return true end

end


I'm still trying to work out how to tell who is driving it.
Image
User avatar
Arees
 
Posts: 301
Joined: Tue Dec 25, 2007 9:50 pm

Re: Execution: Custom Alert Mod (Now available for testing)

Postby moduspwnens » Fri Aug 14, 2009 10:39 am

WATERBOYsh wrote:I'm still trying to work out how to tell who is driving it.

Yeah, that was my problem. The only way I can think of is, well:

Code: Select all
for i=1,40 do
    local petGUID = UnitGUID("raidpet"..i) or 0
    if petGUID == targetVehicleGUID then -- Presumably whatever the GUID of the vehicle you've found is
        return UnitName("raid"..i)
    end
end


It would work, but be pretty inefficient unless you mapped it for future events, which is when I decided it was outside the scope of TJH.
I rule.
moduspwnens
Moderator
 
Posts: 3382
Joined: Tue Nov 06, 2007 12:28 pm
Location: Shattered Hand

Re: Execution: Custom Alert Mod (Now available for testing)

Postby Arees » Fri Aug 14, 2009 10:47 am

http://wowprogramming.com/docs/api/UnitVehicleSeatInfo

Code: Select all
controlType, occupantName, occupantRealm, canEject, canSwitchSeats = UnitVehicleSeatInfo("unit", seat)


hopefully the drivers seat is index 0... or does lua start at 1? I've seen several for loops that start at 1 instead of 0.
Image
User avatar
Arees
 
Posts: 301
Joined: Tue Dec 25, 2007 9:50 pm

Re: Execution: Custom Alert Mod (Now available for testing)

Postby moduspwnens » Fri Aug 14, 2009 10:49 am

WATERBOYsh wrote:http://wowprogramming.com/docs/api/UnitVehicleSeatInfo

Code: Select all
controlType, occupantName, occupantRealm, canEject, canSwitchSeats = UnitVehicleSeatInfo("unit", seat)


hopefully the drivers seat is index 0... or does lua start at 1? I've seen several for loops that start at 1 instead of 0.


Well, the problem is that you'll need a unitID to use that function.
I rule.
moduspwnens
Moderator
 
Posts: 3382
Joined: Tue Nov 06, 2007 12:28 pm
Location: Shattered Hand

Re: Execution: Custom Alert Mod (Now available for testing)

Postby Arees » Fri Aug 14, 2009 10:52 am

moduspwnens wrote:Well, the problem is that you'll need a unitID to use that function.


Can you not pass it the guid of the vehicle?

I know it can be done... the game knows which one of the pyrite debuffs is mine because its big and farther left than everyone elses. I just have to figure out how...
Image
User avatar
Arees
 
Posts: 301
Joined: Tue Dec 25, 2007 9:50 pm

Re: Execution: Custom Alert Mod (Now available for testing)

Postby moduspwnens » Fri Aug 14, 2009 11:02 am

WATERBOYsh wrote:
moduspwnens wrote:Well, the problem is that you'll need a unitID to use that function.


Can you not pass it the guid of the vehicle?

I know it can be done... the game knows which one of the pyrite debuffs is mine because its big and farther left than everyone elses. I just have to figure out how...


The GUID isn't the same as the UnitID.

http://www.wowwiki.com/UnitId
http://www.wowwiki.com/API_UnitGUID

The way you'd figure out which one is yours is just how I showed above, except rather than cycling through the raid, you'd just see if the GUID in the combat log event matches UnitGUID("vehicle"), which is the vehicle the player is currently in.
I rule.
moduspwnens
Moderator
 
Posts: 3382
Joined: Tue Nov 06, 2007 12:28 pm
Location: Shattered Hand

Re: Execution: Custom Alert Mod (Now available for testing)

Postby fafhrd » Fri Aug 14, 2009 5:04 pm

Hm. Is it possible at all to have a rule span multiple events? Like say you get a UNIT_DIED for a tank, which I think includes the ID of the UNIT that killed him. You then want to see the last buff that unit gained (not the tank, the mob that killed him).

I suppose that's actually jumping ahead a bit by needing to remember past events, a simpler start would be to see something related to the mob after it kills the tank, like the next buff it gets, or the next person it attacks. A rule to catch a mob killing the tank is easy, and a rule to catch a mob hitting a player is easy, but how about a mechanism to pass attributes of an event caught by the first rule (viz. "this is the guid of the mob that killed a player") as input to the second rule (viz. "filter SPELL_DAMAGE for unit with GUID"). And then add something so that the 2nd rule only matches one event and is then disabled (until the first rule triggers again).
ImageImage
1/1 Lore pre-nerf.
User avatar
fafhrd
 
Posts: 3156
Joined: Fri Aug 31, 2007 2:31 pm

Re: Execution: Custom Alert Mod (Now available for testing)

Postby moduspwnens » Fri Aug 14, 2009 5:44 pm

fafhrd wrote:Hm. Is it possible at all to have a rule span multiple events? Like say you get a UNIT_DIED for a tank, which I think includes the ID of the UNIT that killed him. You then want to see the last buff that unit gained (not the tank, the mob that killed him).


It's not currently possible, but a plan to be able to do something like this is definitely in the works. This would be a little more advanced and specific for something I'd make a function for, but should easily be possible with a custom reaction in Lua after I implement the ability for rules to enable and disable other rules. I don't think UNIT_DIED lists a source normally, but the way you'd probably implement it would be:

    Rule 1: Triggered when an enemy mob gains a buff. Custom reaction is to save a new variable, which would be a table that contains the mob's GUID and the buff gained.
    Rule 2: Triggered when the designated player (or role, such as "tank") takes damage. Custom reaction is to save the GUID of the last mob to do damage to him to a different variable (will be invalid if it's not from a mob with a GUID).
    Rule 3: Triggered when the designated player dies. Custom reaction is to check the variable for last mob to damage him and check that with the variable that matches. If nothing is invalid, announce that value.
    Rule 4 (Optional): Triggered when the player leaves combat. Clears all variables.

You could save yourself a rule by just looking for an overkill value that's more than zero on the tank, but that would (presumably) not work if the tank is hit to exactly 0 HP. Hmph. I guess you wouldn't even have to enable or disable other rules for that one, but it's still on the list because it definitely has some practical uses.

Code: Select all
7/15 19:35:36.858  UNIT_DIED,0x0000000000000000,nil,0x80000000,0x020000000270D6D8,"Durga",0x2000514


fafhrd wrote:I suppose that's actually jumping ahead a bit by needing to remember past events, a simpler start would be to see something related to the mob after it kills the tank, like the next buff it gets, or the next person it attacks. A rule to catch a mob killing the tank is easy, and a rule to catch a mob hitting a player is easy, but how about a mechanism to pass attributes of an event caught by the first rule (viz. "this is the guid of the mob that killed a player") as input to the second rule (viz. "filter SPELL_DAMAGE for unit with GUID"). And then add something so that the 2nd rule only matches one event and is then disabled (until the first rule triggers again).


I'm having difficulty following this. Could you offer a clearer example?
I rule.
moduspwnens
Moderator
 
Posts: 3382
Joined: Tue Nov 06, 2007 12:28 pm
Location: Shattered Hand

Re: Execution: Custom Alert Mod (Now available for testing)

Postby fafhrd » Fri Aug 14, 2009 10:57 pm

i think the 2nd case is doable in a similar way to what you suggested for the first, but for a clearer example:

Suppose for whatever reason, you want to announce who Patchwerk hits first after killing the tank. You only want to announce the first person though, you don't want a listing of all the hits he does on the new "tank".

So you have one rule (rule A) that picks up when tank dies. Maybe it's watching overkill, maybe it's unit_died. For the sake of the example, assume unit_died lists the mob that killed the unit as source. So now this rule has triggered, and knows that Mob#123 killed Player#1.

Now you need to make a rule (rule B) to catch outgoing damage from Mob#123. You only know that it's Mob#123 you want and not some other mob because the first rule you had found out it's Mob#123 that killed Player#1. So you either create a new rule that catches Mob#123's attacks, or you have an existing rule that catches a variable mob's attacks and you feed it #123 so that it catches the ones for the mob you're interested in.

Once this rule triggers, it disables itself so it doesn't keep spamming ever attack on the new tank (although when he dies, the cycle would probably start again).

With the system you outlined for the first case, rule A would likely save "Mob#123" in some variable somewhere, and rule B would be coded to match events for the mob with Guid equal to whatever happens to be saved in that variable.

Other interesting and probably more useful cases for things like this would be "who killed the lasher on freya or guardian on yogg that blew up and killed someone". In both those cases you should be able to trace the GUIDs through a chain of events to find out who started the chain.
ImageImage
1/1 Lore pre-nerf.
User avatar
fafhrd
 
Posts: 3156
Joined: Fri Aug 31, 2007 2:31 pm

Re: Execution: Custom Alert Mod (Now available for testing)

Postby moduspwnens » Sat Aug 15, 2009 8:27 pm

I've posted up an update with the following new stuff:

    An options GUI. "/ex" will bring it up, and it's under the Addon options in the UI.
    Added a localization dropdown. It doesn't yet do much since I only have an English set, but it should work correctly when I add other localizations.
    Added a "hide outgoing whispers sent by this add-on" option.
    Fixed an issue that would cause variables in chat reactions (like *target) to not be replaced if they weren't the first reaction in the list.
Mainly my first attempt at visual frames.
I rule.
moduspwnens
Moderator
 
Posts: 3382
Joined: Tue Nov 06, 2007 12:28 pm
Location: Shattered Hand

Re: Execution: Custom Alert Mod (Now available for testing)

Postby Arees » Sun Aug 16, 2009 7:07 am

I like TJH so much... I'm definitely going to try this out soon modus.
Image
User avatar
Arees
 
Posts: 301
Joined: Tue Dec 25, 2007 9:50 pm

Re: Execution: Custom Alert Mod (Now available for testing)

Postby moduspwnens » Sun Aug 16, 2009 4:16 pm

WATERBOYsh wrote:I like TJH so much... I'm definitely going to try this out soon modus.


I won't recommend it as a 100% replacement until I get the GUI working. The text UI isn't bad, but aside from the TJH import, it's fairly painful to input and manage rules.
I rule.
moduspwnens
Moderator
 
Posts: 3382
Joined: Tue Nov 06, 2007 12:28 pm
Location: Shattered Hand

PreviousNext

Return to Add-ons, UI, and Macros

Who is online

Users browsing this forum: Shieldi, Yahoo [Bot] and 1 guest

Who is online

In total there are 3 users online :: 2 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 380 on Tue Oct 14, 2008 6:28 pm

Users browsing this forum: Shieldi, Yahoo [Bot] and 1 guest