-
Member
Fixing the SWD poly script ONLY when it's casted on you (not on everyone)
Hello, i found a swd poly script that works pretty good (i changed some values because was not so good the script but whatever), the problem is if the enemy is casting a polymorph on let's say, part1 (my partner), it does do the SWD, so when he casts on my I have the SWD on CD, and i need to los (not always possible). Basically there is no command to check is the poly is going towards me or my partner(s), so how can I implement this? Is this hard, can I ask you something like this or do I need to pay to have a script for this?
Thanks in advice, greetings
-
Member
-
Member
Well, if I am not mistaken, you cant make such thing. You cant see who is he going to polymorph, except when he targets you. You cant know(atleast from my knowledge) if your enemy is going to polymorph focus, or arena123, or anything else, there is no combat tracking or anything like that as far as I know.
Ofc you could add checks, like - If your enemy is in range; If your enemy is in LOS; If he is facing you... that could be kinda good swd script, but to answer your question simply: You cant see on who is your enemy casting on. I might be wrong tho.
-
Post Thanks / Like - 1 Thanks
dealerx (1 members gave Thanks to Poper21 for this useful post)
-
Member
Originally Posted by
Poper21
Well, if I am not mistaken, you cant make such thing. You cant see who is he going to polymorph, except when he targets you. You cant know(atleast from my knowledge) if your enemy is going to polymorph focus, or arena123, or anything else, there is no combat tracking or anything like that as far as I know.
Ofc you could add checks, like - If your enemy is in range; If your enemy is in LOS; If he is facing you... that could be kinda good swd script, but to answer your question simply: You cant see on who is your enemy casting on. I might be wrong tho.
Thanks. Well I didn't try with SWD but on other scripts, I tried commands like "is not PQR_IsOutOfSight" or "IsSpellInRange" or also "IsUnitHostile("player","target")", but none of them seem to work, like for example i want to dispel a buff, im behind a pillar and losing the target, he has the buff, the PQR tries costantly to dispel even if i told him "spells needs to be in range, no LOS, he must be hostile" and so on..so IDK if these commands are kinda bugged or I'm just scripting them wrong.
For the poly it's ok, i thought there were something like rogue scripts when they vanish blind, or vanish death coil with "SPELL_CAST_SUCCESS" idk something related to this command...im not an expert but i checked the rogue script and its almost based only on that line to determine when to to Vanish.
(EDIT: btw I found "UnitIsHostile" makes the game drop fps hard (and the line-code is not working if I remember right), a replacing working line it's "UnitCanAttack")
Last edited by dealerx; 09-02-2016 at 09:11 AM.
-
Member
As far as i know you can just count on spell delay when Polymorph is already casted, there is no info in combat log about that who did you start the cast on.
-
Member
What about the addon SoundAlerter (like GladiatorLossa) that announce with a voice the incoming control? Like "poly" or "polyfriend", or "hex", "hexing friend"? Kinda like the addon knows where the control is going to land. (I did some tries with poly'ing target, focus, and doing again both via macro, I can't say it's 100% accurate but sometimes it says right the target, I should do other tries and figure out the logic..)
Anyway I checked the lua and I found this:
Code:
if (event == "SPELL_CAST_START") then
if sourcetype[COMBATLOG_FILTER_HOSTILE_PLAYERS] then
if not sadb.castStart and (sadb.myself and (sourceuid.target or sourceuid.focus) or sadb.enemyinrange) then
self:PlaySpell (self.spellList.castStart,spellID)
elseif ((currentZoneType == "arena") or (pvpType == "arena")) and not sadb.dArenaPartner then
for i = 1, 6 do
if i == 6 then
self:PlaySpell(self.spellList.friendCCs,spellID)
break
end
end
end
end
end
I think there is something from this part of code (SoundAlerter.lua) that can be "translated" into a simple pqr/lua swd script, I'm not advanced enough to understand all these variables and functions, that are initialized on other files like "options.lua" and "spelllist.lua", they are not hard to understand I think but it's kinda messy to do if you are not the author of the addon, but I guess with a deep look into the source code of the addon coul give some result?
-
Member
-
Active Member
Those scripts, just like PQR, are written in lua. The script basically uses flags to track if it's from a hostile source, checks it's target at the time of the event trigger, and plays a sound. It only works for known wow targets (your allies target, your target and focus, or arena targets).
-
Member
Originally Posted by
Numba1stunna1
Those scripts, just like PQR, are written in lua. The script basically uses flags to track if it's from a hostile source, checks it's target at the time of the event trigger, and plays a sound. It only works for known wow targets (your allies target, your target and focus, or arena targets).
The point is I'm kinda sure you can't know who the target of the cast is, the caster could have the spell macroed/mouseover and other things, and if you check the /eventtrace you can clearly see that in the Spell Cast there is no argument about the destination(target), only the source (and other things). Other hand, on Istant spell, you can see the destination (in SPELL_CAST_SUCCEEDED).
Also I did some test with that addon and sometimes if fails, it says "Fearing Friend" but instead you got feared, and viceversa you hear "Fear" and your teammate gets feared (same with polymorph), so it's not reliable at all.
So I understood it's better to know the situation and see what is going to happen, for example if you got already polymorphed 3 times, the poly cast will probably go to your teammate, specially if he is doing excessive pressure on other team. Or if you out of range or behind a pillar it's obvious that the cast isn't going to you, so there's no point in stopcasting to try a SWD, and things like this..