Hey guys,
need some help. Can someone tell me how to code autoIntervene on Member if they`re for example Scatter Shotted?
Thanks so far.
Who can help? Why this code does not work?
Bot does not want to skip this step , when the player has Stagger but no buff Shuffle. It just stopsPHP Code:
local SPELL = 119582
local Shuffle,_,_,_,_,_,ShuffleTime = UnitBuffID("player", 115307)
local HStagger = UnitDebuffID("player", 124273)
local MStagger = UnitDebuffID("player", 124274)
local LStagger = UnitDebuffID("player", 124275)
if PQR_SpellAvailable(SPELL) and PlayerCombat then
if HStagger then
CastSpellByName(GetSpellInfo(SPELL),nil)
return true
end
if MStagger and ShuffleTime - GetTime() >= 2 then
CastSpellByName(GetSpellInfo(SPELL),nil)
return true
end
if LStagger and ShuffleTime - GetTime() >= 8 then
CastSpellByName(GetSpellInfo(SPELL),nil)
return true
end
end
Last edited by Dimonoff; 12-22-2012 at 07:17 AM.
That's because ShuffleTime will return nil when Shuffle isn't up. You can either check that Shuffle is up before calculating ShuffleTime which would look like this:
Or you can return 0 for ShuffleTime when Shuffle isn't up which would look like this:PHP Code:
local SPELL = 119582
local Shuffle,_,_,_,_,_,ShuffleTime = UnitBuffID("player", 115307)
local HStagger = UnitDebuffID("player", 124273)
local MStagger = UnitDebuffID("player", 124274)
local LStagger = UnitDebuffID("player", 124275)
if PQR_SpellAvailable(SPELL) and PlayerCombat then
if HStagger then
CastSpellByName(GetSpellInfo(SPELL),nil)
return true
end
if MStagger and Shuffle and ShuffleTime - GetTime() >= 2 then
CastSpellByName(GetSpellInfo(SPELL),nil)
return true
end
if LStagger and Shuffle and ShuffleTime - GetTime() >= 8 then
CastSpellByName(GetSpellInfo(SPELL),nil)
return true
end
end
PHP Code:
local SPELL = 119582
local Shuffle,_,_,_,_,_,ShuffleTime = UnitBuffID("player", 115307)
local HStagger = UnitDebuffID("player", 124273)
local MStagger = UnitDebuffID("player", 124274)
local LStagger = UnitDebuffID("player", 124275)
if Shuffle then
ShuffleTime = ShuffleTime - GetTime()
else
ShuffleTime = 0
end
if PQR_SpellAvailable(SPELL) and PlayerCombat then
if HStagger then
CastSpellByName(GetSpellInfo(SPELL),nil)
return true
end
if MStagger and ShuffleTime >= 2 then
CastSpellByName(GetSpellInfo(SPELL),nil)
return true
end
if LStagger and ShuffleTime >= 8 then
CastSpellByName(GetSpellInfo(SPELL),nil)
return true
end
end
Hey people! I'm in Norway now. Been a few hectic days for me but I'm here!
@avery: Let me unpack my laptop and I'll post the code for you here instead.![]()
DiabloFan , Tnx
Having problems with the updater, when I press download latest version nothing happens
Im looking for a way (without having to create a boss list) ti identify if my target is a boss or not (heroic dungeons and raid bosses). Any idea?
UnitLevel - World of Warcraft Programming: A Guide and Reference for Creating WoW Addons
Can check if it returns -1, which would mean it's a boss.
or
UnitIsUnit - World of Warcraft Programming: A Guide and Reference for Creating WoW Addons
And just simply check if the target is boss1, 2, etc.
if bossExists ~= nilPHP Code:
local bossExists = nil
local bossTarget = nil
for i=1,4 do
local bossCheck = "boss"..i
if UnitExists(bossCheck) then
bossExists = true
if UnitIsUnit(bossCheck, "target") then
bossTarget = bossCheck
end
end
end
checks for boss
if bossTarget ~= nil
checks if current target is a boss
Thank you!
My Svn - https://subversion.assembla.com/svn/averykeys-svn/
Can someone help me get this straightened out, I'm not 100% sure what I need to change to make this work properly but I want it to work anytime Raid, Instance, Solo as long as I'm in combat.
Right now it seems to rarely work in or out of instances.PHP Code:
if not IsInInstance() or IsInInstance() and select(2, GetInstanceInfo()) ~= "party" and select(2, GetInstanceInfo()) ~= "raid" then
if IsLeftControlKeyDown() and not GetCurrentKeyBoardFocus() and not IsMounted() and UnitAffectingCombat("player") then
CastSpellByName(GetSpellInfo(108271), "player")
end
end