Originally Posted by
drevil2
example of the problem:
the slaves start casting on a target and the main switches to a new target. now all slaves have the new target ([target=party1target] the standart multiboxer macro), but still casting on the old target. i want my slaves to face the old target (can move around) until the cast is done. at this point i need a "current casting focus" GUID for my auto-facing bot. target/focus GUID won't work, because it's the new target.
i played around with the "UNIT_SPELLCAST_START" event to get a useful GUID but it doesn't work so well.
The WoW API is your friend, would UnitCastingInfo() help?
Loop through your party slaves (2-5) with the following command:
Code:
spell, rank, displayName, icon, startTime, endTime = UnitCastingInfo("party2");
local finish = endTime/1000 - GetTime();
G1(spell);
G2(finish);
'spell' will be NIL if that unit is not casting a spell, otherwise it will contain the name of the spell that unit is casting, the local finish variable contains when the spell will end.
Now, G1(arg) and G2(arg) are 2 self-registered lua functions I use to extract the string value of the argument to a codecave so I can read it from out of process.
That's the hard and stupid way. Best is to reverse engineer that lua function and find out where it grabs the spell name