I've got 2 questiont:
How to detect is "target" is enemy faction player (with valid pvp on, etc. attackable)... I need it to blow some cooldowns if target is ppl..
How to check how much hp does have my pet (I'm hunter)...
Thanks in advance...
I've got 2 questiont:
How to detect is "target" is enemy faction player (with valid pvp on, etc. attackable)... I need it to blow some cooldowns if target is ppl..
How to check how much hp does have my pet (I'm hunter)...
Thanks in advance...
Been getting flaged AFK as of late.
Never mind what haters say, ignore them 'til they fade away.
just curious were there ever offsets released for ptrs ?
So what is the issue?
"How do I get the time of trinket13 or trinket14? " What time do u mean, the buff or icd?
Change toPHP Code:
local doubleJeopardy = { 41092, 57030, 54922, 121027 }
for i=1,#doubleJeopardy do
if HaveGlyph(i) then
PHP Code:
local doubleJeopardy = { 41092, 57030, 54922, 121027 }
for i=1,#doubleJeopardy do
if HaveGlyph(doubleJeopardy[i]) then
Looking for exploiters and botters to Elder Scrolls Online.
Verdammt...Sheuron...r u leaving us? Loved ur profiles...would give u more rep to show my appreciation...if the system lets me. Pls dont bother with the dailys...try having fun with people in raids and maybe...just maybe...STAY!
About the trinket, I want to get the time of an on use trinket.
I want to compare trinket time for glove use so I don't delay the trinket 10 seconds
The doublejeopardy code
I tried this in my last post but it didn't seem to work, if I get rid of my double jeopardy glyph it breaks the whole rotation?
HaveGlyph functionPHP Code:
local doubleJeopardy = { 41092, 57030, 54922, 121027 }
for i=1,#doubleJeopardy do
if HaveGlyph(doubleJeopardy[i]) then
Judgment codePHP Code:
function HaveGlyph(id)
for i=1, GetNumGlyphSockets() do
if select(4, GetGlyphSocketInfo(i)) == id then return true end
end
return false
end
I will go try it again and see if it works.PHP Code:
-- HoW Check
local howSTART, howDURATION = GetSpellCooldown(24275)
if howSTART - GetTime() + howDURATION < 0.1 and howSTART - GetTime() + howDURATION > 0 then
return false
-- Holy Avenger Check
elseif UnitBuffID("player", 105809) and UnitPower("player", 9) >= 3 then
return false
-- Prevents Wrong Spell Cast
elseif PQR_SpellAvailable(879)
or PQR_SpellAvailable(24275)
or PQR_SpellAvailable(35395)
or UnitBuffID("player", 87138) then
return false
end
-- Seal Check
if GetShapeshiftForm() ~= 0 then hasSeal = true else hasSeal = false end
-- Double Jeporady
if switchedTargets == nil then switchedTargets = false end
-- Judgment
if UnitCanAttack("player","target") and UnitAffectingCombat("player") then
local doubleJeopardy = { 41092, 57030, 54922, 121027 }
for i=1,#doubleJeopardy do
if HaveGlyph(i) then
if UnitExists("focus") and RangeCheck(20271, "focus") and switchedTargets == false then
CastSpellByName(GetSpellInfo(20271), "focus")
switchedTargets = true
elseif UnitExists("target") and RangeCheck(20271, "target") and switchedTargets == true then
CastSpellByName(GetSpellInfo(20271), "target")
switchedTargets = false
end
elseif not HaveGlyph(i) then
if UnitExists("focus") and RangeCheck(20271, "focus") then
CastSpellByName(GetSpellInfo(20271), "focus")
elseif UnitExists("target") and RangeCheck(20271, "target") then
CastSpellByName(GetSpellInfo(20271), "target")
end
end
end
end
My Svn - https://subversion.assembla.com/svn/averykeys-svn/
Today, I lag at lot when I use PQR.
Am I the only one ? I play on EU server.
@Avery
start, duration, enable = GetInventoryItemCooldown("unit", slotId) will give you cooldown. Use 10 for Gloves and 13 or 14 for trinket.
Regarding your code, it is hard to understand what you are trying to do but you need to perhaps structure it a bit better,
As i understand this we will not actually test all glyphs because the first glyph "41092" only checked since if it exist we execute first statement otherwise we execute the second statement.
if UnitCanAttack("player","target") and UnitAffectingCombat("player") then
local doubleJeopardy = { 41092, 57030, 54922, 121027 }
for i=1,#doubleJeopardy do
if HaveGlyph(i) then
-- We do this
elseif not HaveGlyph(i) then <----------------- This is wrong remove this
-- Or this
end
end
<------------------ Put logic regarding not having glyphs here instead
end
So you basically only check the first glyph.
Looking for exploiters and botters to Elder Scrolls Online.
Hey, can anyone please help me with this addon. Can't seem to get it working and i would much rather talk to someone over micskype name is "blackmamba19191" any help would be appreciated allot.
I'm not sure which id is the double jeopardy glyph, so I got all the ids that have something to do with the glyph, so if any id is correct it will work.
Trink code?
PHP Code:
local enable10 = GetInventoryItemCooldown("unit", 10)
local start13, duration13, enable13 = GetInventoryItemCooldown("unit", 13)
local start14, duration14, enable14 = GetInventoryItemCooldown("unit", 14)
if (start13 - getTime() + duration13) > 10 and (start14 - getTime() + duration14) > 10 and enable13 == 1 and enable14 == 1 and enable10 == 0 then
UseInventoryItem(10)
end
Spaced it out so it makes more sense
Does someone have a better incombat check, the current one seems a bit slow? I have an idea for a better check.PHP Code:
if UnitCanAttack("player","target") and UnitAffectingCombat("player") then
local doubleJeopardy = { 41092, 57030, 54922, 121027 }
for i=1,#doubleJeopardy do
if HaveGlyph(doubleJeopardy[i]) then
if UnitExists("focus") and RangeCheck(20271, "focus") and switchedTargets == false then
CastSpellByName(GetSpellInfo(20271), "focus")
switchedTargets = true
elseif UnitExists("target") and RangeCheck(20271, "target") and switchedTargets == true then
CastSpellByName(GetSpellInfo(20271), "target")
switchedTargets = false
end
elseif not HaveGlyph(doubleJeopardy[i]) then
if UnitExists("focus") and RangeCheck(20271, "focus") then
CastSpellByName(GetSpellInfo(20271), "focus")
elseif UnitExists("target") and RangeCheck(20271, "target") then
CastSpellByName(GetSpellInfo(20271), "target")
end
end -- ends glyph check
end -- ends double jep check
end -- ends combat/attack check, I have this because it will attack once from range but if I'm kiting it won't attack again because the only combat check I have is in pause
tankcheckcode, check for roles in current group
if (tankhasagro or tankisattacking or tankstargetisattacking) or (playerhasagro or playerisattacking or playerstargetisattacking) then
incombat = true else incombat = false end
a better way to to check party members and if 2 have agro or the tank has agro or the player has agro then start attacking, but I don't know how to write that.
Last edited by averykey; 10-26-2012 at 03:10 PM.
My Svn - https://subversion.assembla.com/svn/averykeys-svn/
I perhaps was a bit unclear
PHP Code:
if UnitCanAttack("player","target") and UnitAffectingCombat("player") then
local doubleJeopardy = { 41092, 57030, 54922, 121027 }
for i=1,#doubleJeopardy do
if HaveGlyph(doubleJeopardy[i]) then
if UnitExists("focus") and RangeCheck(20271, "focus") and switchedTargets == false then
CastSpellByName(GetSpellInfo(20271), "focus")
switchedTargets = true
return true -- Should add this
elseif UnitExists("target") and RangeCheck(20271, "target") and switchedTargets == true then
CastSpellByName(GetSpellInfo(20271), "target")
switchedTargets = false
return true -- Should add this
end
end
end -- End of the loop going through all glyphs in list
-- So we are here only if no hit in list
if UnitExists("focus") and RangeCheck(20271, "focus") then
CastSpellByName(GetSpellInfo(20271), "focus")
return true
elseif UnitExists("target") and RangeCheck(20271, "target") then
CastSpellByName(GetSpellInfo(20271), "target")
return true
end
end
-- ends combat/attack check, I have this because it will attack once from range but if I'm kiting it won't attack again because the only combat check I have is in pause
Looking for exploiters and botters to Elder Scrolls Online.