I'll repost the code I have in my PQR_functionBleeds.lua file, it shows better ways of handling tables in LUA:
#Bleeds returns the number of entries in the table (you can PQR_DebugP(tostring(#Bleeds)) and it will print that), so it basically says, from the first index in this table to the last index in the table, do the logic contained afterwards, then end the logic and end the loop. As he has mentioned before though, if you use any of the standard global API function calls, you should localize them at the start. I haven't tried localizing UnitDebuffID in the code above, but according to him it might make it that tinier bit faster.Code:local Bleeds = { 16511, -- Rogue, Hemorrhage 33876, -- Druid, Cat: Mangle 33878, -- Druid, Bear: Mangle 35290, -- Hunter Pet: Gore 46857, -- Warrior, Trauma 50271, -- Hunter Pet: Tendon Rip 57386 -- Hunter Pet: Stampede } function PQR_BleedDebuff(unit) for i=1,#Bleeds do if UnitDebuffID(unit,Bleeds[i]) then return true end end return false end function PQR_PlayerBleedDebuff(unit) for i=1,#Bleeds do if UnitDebuffID(unit,Bleeds[i],"player") then return true end end return false end
Edit again: @Xelper, I really like the new updater program, however, I don't like that updating PQR always resets my hotkeys and current profiles. I seem to remember version 1 didn't do this, but I could be wrong. It's only a minor inconvenience, but if it could be fixed I'd <3 you even more!
Last edited by Deva; 03-21-2012 at 08:18 PM.
can someone code a rogue focus target interrupt so that if your focus is within 5 yards and they cast it will kick it but if they are farther then 5 but within 25 it will shadowstep kick them
any help on it would be greatly appreciated
@Bu_ba_911
Are you still supporting your blood dk profile? If not does anyone have a functioning blood dk profile with the tier 13 2-set included?
Thanks,
Saif
I added a "Skip Unknown" option for each ability after seeing sheuron's suggestion. This value will default to true.
If true it will do a IsSpellKnown() on the provided spell ID. Unless there is some bug with IsSpellKnown() it shouldn't have any effect on profiles. I'll be sure to add an alert in the debug log if a spell is skipped for being unknown.
I'll release this update in a day or two once I've finished testing it.
lol i can rarely play the game no because i'm either tracking down awkward bugs I can't reproduce easily to see the exact situation, or trying to code something new which will probably end up having an awkward bug later anyways
I have never done Heroic Dragon Soul yet I've been trying to code in Dispel checks and everything for those that do XD I haven't even killed DW on normal yet I spend so much time doing this stuff..... luckily I do have my moments of happiness when i get stuff working, thats more often than not the only reward i get
Even when I'm at my actual job.... I'm still brought back into thinking how can I improve my profiles....
*edit*
on a side note, everyone who was getting a random error when there was a dangerous buff that shouldn't have been dispelled should update.... i THINK i fixed the error....
@Diesall Addon works superb, nice job +rep when i can.
@[Blinded]
Love your profiles mate but Elemental Shammy's one does't attack drakes and sapper on Blackhorn.
Tried commenting SpecialAggro function call from Init ability with no luck. Whats the best way to make this profile attack any target you have?
Last edited by svs; 03-22-2012 at 07:13 AM.
Tried to add code in for Blind on pvp trinket. I had changed the trinket id to match horde cata medallion of tenacity. Everything worked till I added blind so I assume either there's a punctuation error there or the spell id debuff is different for blind ability that I can't find.
Code:if UnitFactionGroup("player") == "Alliance" then if GetInventoryItemID("player", 14) == 73537 then myTrinket = GetItemCooldown(73537) else myTrinket = nil end else if GetInventoryItemID("player", 14) == 73537 then myTrinket = GetItemCooldown(73537) else myTrinket = nil end end if myTrinket ~= nil then --check if we have a debuff if myTrinket == 0 then pvpdebuffCheck, _, _, _, _, _, expire = UnitDebuffID("player", 118) --Polymorph if pvpdebuffCheck == nil then pvpdebuffCheck, _, _, _, _, _, expire = UnitDebuffID("player", 605) --Mind Control end if pvpdebuffCheck == nil then pvpdebuffCheck, _, _, _, _, _, expire = UnitDebuffID("player", 51514) --Hex end if pvpdebuffCheck == nil then pvpdebuffCheck, _, _, _, _, _, expire = UnitDebuffID("player", 6358) --Seduction end if pvpdebuffCheck == nil then pvpdebuffCheck, _, _, _, _, _, expire = UnitDebuffID("player", 853) --Hammer of Justice end if pvpdebuffCheck == nil then pvpdebuffCheck, _, _, _, _, _, expire = UnitDebuffID("player", 2094) --Blind end if pvpdebuffCheck ~= nil then if (expire - GetTime()) >= 4 then return true else return false end else return false end else return false end end
@ xelper some plans to write offsets for the Beta?