I'll give that a shot Gabbz
I'll give that a shot Gabbz
I am trying to make something for Flame Shock to track the debuff and then reapply it if it doesn't exist on my target.
This is what I have so far.
FS = UnitDebuffID("target", "8050", "", "PLAYER")
inRange = IsSpellInRange("Flame Shock", "target")
if FS == nil and inRange == 1 and UnitExists("target") then
return true
end
It works fine if I am the only person applying Flame Shock to the target. But it returns False if any Flame Shock debuff on the target whether it is mine or not. How do I get it to only recognise my casted Flame Shocks and ignore anyone else's?
Here's how I would do this
local FS = UnitDebuffID("target",8050,"player")
local inRange = IsSpellInRange(GetSpellInfo(8050),"target")
If UnitExists("target")
and not FS
and inRange
then return true end
Update your pqr also. And this will work on any client. Writing the spell names out give issues sometimes aswell
[ Sheuron PQR Profiles Pack ] https://goo.gl/lfAMC
If you like this piece of code feel free to invite me a beer making a donation.
My paypal account: [email protected]
The only one who can help you is Xelper. Tell him on which PQR versión stoped working to check the diferences.
[ Sheuron PQR Profiles Pack ] https://goo.gl/lfAMC
If you like this piece of code feel free to invite me a beer making a donation.
My paypal account: [email protected]
To tell you guys the truth, I've actually had problems out of Xelper's one that he has built into PQR. For all purposes, he could be finding distance the same way I am or just using the Distance variable in Object Manager. But anyways, I kept getting Nil half the time using Xelper's, so I came up with this:
It goes in my Data file and it overwrites the built in one, and never had a problem out of it. It is actually being used in my Honorbuddy Leveling Warrior profile and works great, even better than IsSpellinRange(). I think it might be a couple yards off, but it is more than accurate enough to use in any situation. Those couple yards aren't going to make a very big difference.Code:--Var1 = Target --Var2 = Player function PQR_UnitDistance(var1, var2) if UnitExists(var1) and not UnitIsDead(var1) then local x1 , y1 = select(1,PQR_UnitInfo(var1)), select(2,PQR_UnitInfo(var1)) local x2 , y2 = select(1,PQR_UnitInfo(var2)), select(2,PQR_UnitInfo(var2)) local w = 100000 local h = 100000 local distance = sqrt(min(x1 - x2, w - (x1 - x2))^2 + min(y1 - y2, h - (y1-y2))^2) return distance end end
P.S. The locals W and H do not have to be that high, 5000 would work for both and them and still shit out the same results. I just made them that high in case Blizzard decides to make coords From the whole continent, not just the zone for in (For example, Felwood is about 4500x2000 on its coordinates for the highest point).
P.S.S. Like I stated earlier, a few people have stated, for both Onya's and Sheuron's profiles, that Chain Heal has not worked for them. Again, I think it's a setup on your end as most of the PQRotation base, me included, it is working fine. To tell you the truth, it wouldn't surprise me if it was something Client Locale related.
P.S.S.S My last edit. For players, my UnitDistance code WILL ALWAYS be up to date as Player UnitID are always updated with Object Manager. But for NPC's and Enemies and other target-able object's, it is only updated when the Object actually moves. If the object never moves, it will still be up-to-date because it's take you, the Player, into the equation as well for distance.
Last edited by firepong; 08-23-2012 at 11:58 AM.
So when the next patch hits and all the spells and talents revamped. Should we still use the old profiles or the MoP ones?
As I thought, thx for the fast responses
Looking forward to Gabbz&Firepongs Druid-profiles then, since I made a druid my main. ^^ Keep it up guys, you're fantastic.
Cataclysm migration to Mist of Pandaria:
1. New rotation, new spells
2. Some spells on Cataclysm keep same name but change spellid
3. New API functions and old functions removed
This means NONE 4.3 profile work on pandaria. Mist of Pandaria beta profiles will work on patch release day 28.
[ Sheuron PQR Profiles Pack ] https://goo.gl/lfAMC
If you like this piece of code feel free to invite me a beer making a donation.
My paypal account: [email protected]
I was one of the 1st ppl to report the chain heal stopped working and after maybe one month some else report the having the same problem. I tried everything even downloading new clients but still i get the same problem. well I may try checking it on different pc or windows but playing shaman is not top of my things these days.