Rep+ paypal money for solution!
Need help, my switching mode stuff is almost done.
Just trying to make aoeMode start on false when I press left alt, right now it starts on true.
Anyone have a solution? I have both variables start as nils when the rotation loads.
Here is all the code where the variables are used, thanks .
PHP Code:
-- Inq Check
if UnitBuffID("player", 84963) == nil or select(7, UnitBuffID( "player", 84963)) - GetTime() < 3 then
return false
end
-- Solo/PvP Check
local PlayerHP = 100 * UnitHealth("player") / UnitHealthMax("player")
if not IsInInstance() or IsInInstance() and select(2, GetInstanceInfo()) ~= "raid" then
if PlayerHP <= 70 then
return false
end
end
-- 5 Holy Power / Divine Purpose - Tv/Ds
if UnitPower("player", 9) == 5 or UnitBuffID("player", 86172) and select(7, UnitBuffID( "player", 90174)) - GetTime() <= 2 then
if singleMode == false then
CastSpellByName(GetSpellInfo(85256), "target")
elseif singleMode == true or aoeMode == false or aoeMode == true then
if RangeCheck(85256, "target") then
CastSpellByName(GetSpellInfo(53385), "target")
end
end
end
PHP Code:
-- Inq Check
if UnitBuffID("player", 84963) == nil or select(7, UnitBuffID( "player", 84963)) - GetTime() <= 4.5 then
return false
end
-- Solo/PvP Check
local PlayerHP = 100 * UnitHealth("player") / UnitHealthMax("player")
if not IsInInstance() or IsInInstance() and select(2, GetInstanceInfo()) ~= "raid" then
if PlayerHP <= 70 then
return false
end
end
-- Holy Power Check
if UnitPower("player", 9) ~= 5 and UnitBuffID("player", 105809) == nil then
if PQR_SpellAvailable(879) or PQR_SpellAvailable(24275) or PQR_SpellAvailable(35395) or PQR_SpellAvailable(20271) or UnitBuffID("player", 87138) then
return false
end
end
-- 3 Holy Power / Divine Purpose - Tv/Ds
if UnitPower("player", 9) == 3 or UnitPower("player", 9) == 4 or UnitBuffID("player", 86172) then
if singleMode == false then
CastSpellByName(GetSpellInfo(85256), "target")
elseif singleMode == true or aoeMode == false or aoeMode == true then
if RangeCheck(85256, "target") then
CastSpellByName(GetSpellInfo(53385), "target")
end
end
end
PHP Code:
-- Holy Avenger Check
if UnitBuffID("player", 105809) and UnitPower("player", 9) >= 3 then
return false
-- Wrong Spell Cast Check
elseif PQR_SpellAvailable(879) or PQR_SpellAvailable(24275) or UnitBuffID("player", 87138) then
return false
end
-- Cs/Hotr
if UnitPower("player", 9) < 5 then
if singleMode == false or singleMode == true then
CastSpellByName(GetSpellInfo(35395), "target")
elseif aoeMode == false or aoeMode == true then
CastSpellByName(GetSpellInfo(53595), "target")
end
end
PHP Code:
-- Seal Check
if not IsMounted() and not UnitInVehicle("player") and not UnitIsDeadOrGhost("player") then
if aoeMode == nil and singleMode == nil and GetShapeshiftForm("player") ~= 1 then
CastShapeshiftForm(1)
end
end
PHP Code:
singleMode = nil
aoeMode = nil
PHP Code:
local seal = GetShapeshiftForm("player")
-- Mode Fix
if singleMode == nil then singleMode = false PQR_WriteToChat("Single Mode: \124cFFE61515Truth/Tv/Cs") end
if modtime == nil then modtime = 0 end
if IsLeftControlKeyDown() and GetTime() - modtime > 1 then
modtime = GetTime()
if singleMode then
singleMode = false
if seal ~= 1 or seal == 2 then CastShapeshiftForm(1) end
PQR_WriteToChat("Single Mode: \124cFFE61515Truth/Tv/Cs")
else
singleMode = true
if seal ~= 1 or seal == 2 then CastShapeshiftForm(1) end
PQR_WriteToChat("Single Mode: \124cFFE61515Truth/Ds/Cs")
end
elseif IsLeftAltKeyDown() and GetTime() - modtime > 1 then
modtime = GetTime()
if aoeMode then
aoeMode = false
if seal ~= 1 or seal == 2 then CastShapeshiftForm(1) end
PQR_WriteToChat("Aoe Mode: \124cFFE61515Truth/Ds/Hotr")
else
aoeMode = true
if seal ~= 2 or seal == 1 then CastShapeshiftForm(2) end
PQR_WriteToChat("Aoe Mode: \124cFFE61515Sotr/Ds/Hotr")
end
end