function CheckUseItem(itemId)
local status = false;
local count = GetItemCount(itemId);
if (count or 0) > 0 then
local start,duration,enable = GetItemCooldown(itemId);
if start == 0 and duration == 0 and enable then
status = true;
end
end
return status;
end
AzeriteSpells = {}
local function GetAzeriteSpells()
local slotIDs = {1, 3, 5} -- Inventory slots with azerite talents
for _,slot in ipairs(slotIDs) do
if GetInventoryItemID("player",slot)~=nil then
local itemLocation = ItemLocation:CreateFromEquipmentSlot(slot)
if C_AzeriteEmpoweredItem.IsAzeriteEmpoweredItem(itemLocation) then
local allTierInfo = C_AzeriteEmpoweredItem.GetAllTierInfo(itemLocation)
for _, tier in ipairs(allTierInfo) do
for _, azeritePowerID in ipairs(tier.azeritePowerIDs) do
if C_AzeriteEmpoweredItem.IsPowerSelected(itemLocation, azeritePowerID) then
AzeriteSpells[C_AzeriteEmpoweredItem.GetPowerInfo(azeritePowerID).spellID]=true
end
end
end
end
end
end
end
local Eye = CreateFrame("Frame")
Eye:RegisterEvent("PLAYER_ENTERING_WORLD")
Eye:RegisterEvent("PLAYER_EQUIPMENT_CHANGED")
Eye:RegisterEvent("PLAYER_SPECIALIZATION_CHANGED")
Eye:RegisterEvent("AZERITE_EMPOWERED_ITEM_SELECTION_UPDATED")
Eye:SetScript("OnEvent",
function(self, event, ...)
if event == "PLAYER_EQUIPMENT_CHANGED" then
GetAzeriteSpells()
elseif event == "AZERITE_EMPOWERED_ITEM_SELECTION_UPDATED" then
GetAzeriteSpells()
elseif event == "PLAYER_SPECIALIZATION_CHANGED" then
GetAzeriteSpells()
elseif event == "PLAYER_ENTERING_WORLD" then
GetAzeriteSpells()
Eye:UnregisterEvent("PLAYER_ENTERING_WORLD")
end
end
)
Talents = {{}, {}, {}, {}, {}, {}, {}}
Talents.pvp = {}
local function GetTalents()
for tier=1,7 do
for value=1,3 do
Talents[tier][value] = (select(4, GetTalentInfo(tier, value, 1)))
end
end
for slotN, talentID in ipairs (C_SpecializationInfo.GetAllSelectedPvpTalentIDs()) do
Talents.pvp[talentID] = true
end
end
local Eye = CreateFrame("Frame")
Eye:RegisterEvent("PLAYER_ENTERING_WORLD")
Eye:RegisterEvent("PLAYER_SPECIALIZATION_CHANGED")
Eye:RegisterEvent("PLAYER_TALENT_UPDATE")
Eye:SetScript("OnEvent",
function(self, event, ...)
if event == "PLAYER_TALENT_UPDATE" then
GetTalents()
elseif event == "PLAYER_SPECIALIZATION_CHANGED" then
GetTalents()
elseif event == "PLAYER_ENTERING_WORLD" then
GetTalents()
Eye:UnregisterEvent("PLAYER_ENTERING_WORLD")
end
end
)
function inPvP()
return C_PvP.IsWarModeActive() or C_PvP.IsPVPMap()
end
У вас нет необходимых прав для просмотра вложений в этом сообщении.
function CheckUseItem(itemId)
local status = false;
local count = GetItemCount(itemId);
if (count or 0) > 0 then
local start,duration,enable = GetItemCooldown(itemId);
if start == 0 and duration == 0 and enable then
status = true;
end
end
return status;
end
AzeriteSpells = {}
local function GetAzeriteSpells()
local slotIDs = {1, 3, 5} -- Inventory slots with azerite talents
for _,slot in ipairs(slotIDs) do
if GetInventoryItemID("player",slot)~=nil then
local itemLocation = ItemLocation:CreateFromEquipmentSlot(slot)
if C_AzeriteEmpoweredItem.IsAzeriteEmpoweredItem(itemLocation) then
local allTierInfo = C_AzeriteEmpoweredItem.GetAllTierInfo(itemLocation)
for _, tier in ipairs(allTierInfo) do
for _, azeritePowerID in ipairs(tier.azeritePowerIDs) do
if C_AzeriteEmpoweredItem.IsPowerSelected(itemLocation, azeritePowerID) then
AzeriteSpells[C_AzeriteEmpoweredItem.GetPowerInfo(azeritePowerID).spellID]=true
end
end
end
end
end
end
end
local Eye = CreateFrame("Frame")
Eye:RegisterEvent("PLAYER_ENTERING_WORLD")
Eye:RegisterEvent("PLAYER_EQUIPMENT_CHANGED")
Eye:RegisterEvent("PLAYER_SPECIALIZATION_CHANGED")
Eye:RegisterEvent("AZERITE_EMPOWERED_ITEM_SELECTION_UPDATED")
Eye:SetScript("OnEvent",
function(self, event, ...)
if event == "PLAYER_EQUIPMENT_CHANGED" then
GetAzeriteSpells()
elseif event == "AZERITE_EMPOWERED_ITEM_SELECTION_UPDATED" then
GetAzeriteSpells()
elseif event == "PLAYER_SPECIALIZATION_CHANGED" then
GetAzeriteSpells()
elseif event == "PLAYER_ENTERING_WORLD" then
GetAzeriteSpells()
Eye:UnregisterEvent("PLAYER_ENTERING_WORLD")
end
end
)
Talents = {{}, {}, {}, {}, {}, {}, {}}
Talents.pvp = {}
local function GetTalents()
for tier=1,7 do
for value=1,3 do
Talents[tier][value] = (select(4, GetTalentInfo(tier, value, 1)))
end
end
for slotN, talentID in ipairs (C_SpecializationInfo.GetAllSelectedPvpTalentIDs()) do
Talents.pvp[talentID] = true
end
end
local Eye = CreateFrame("Frame")
Eye:RegisterEvent("PLAYER_ENTERING_WORLD")
Eye:RegisterEvent("PLAYER_SPECIALIZATION_CHANGED")
Eye:RegisterEvent("PLAYER_TALENT_UPDATE")
Eye:SetScript("OnEvent",
function(self, event, ...)
if event == "PLAYER_TALENT_UPDATE" then
GetTalents()
elseif event == "PLAYER_SPECIALIZATION_CHANGED" then
GetTalents()
elseif event == "PLAYER_ENTERING_WORLD" then
GetTalents()
Eye:UnregisterEvent("PLAYER_ENTERING_WORLD")
end
end
)
function inPvP()
return C_PvP.IsWarModeActive() or C_PvP.IsPVPMap()
end
брат а можно хоть какоето описание таланты какие брал к примеру и что меняют переключатели в каждой ветке -_-
А как тогда сделать, чтоб бот кастовал Звездопад, а куда его применять я сам уже выбирал, в том плане что когда появляется зеленый круг области Звездопада, чтоб бот остонавливалься и ждал пока я сам выберу и нажму. А не перебивал каст. Надеюсь, както понятно обрисовал проблему.
Byefar писал(а): 23 фев 2020, 21:40
А как тогда сделать, чтоб бот кастовал Звездопад, а куда его применять я сам уже выбирал, в том плане что когда появляется зеленый круг области Звездопада, чтоб бот остонавливалься и ждал пока я сам выберу и нажму. А не перебивал каст. Надеюсь, както понятно обрисовал проблему.
Просто поставить цель на звездопаде таргет
Когда бот дойдет до него и сможет его кастануть он не будет перебивать, а будет ждать каста если выше по приоритету в ротации нету спелов которые он может нажать
function CheckUseItem(itemId)
local status = false;
local count = GetItemCount(itemId);
if (count or 0) > 0 then
local start,duration,enable = GetItemCooldown(itemId);
if start == 0 and duration == 0 and enable then
status = true;
end
end
return status;
end
AzeriteSpells = {}
local function GetAzeriteSpells()
local slotIDs = {1, 3, 5} -- Inventory slots with azerite talents
for _,slot in ipairs(slotIDs) do
if GetInventoryItemID("player",slot)~=nil then
local itemLocation = ItemLocation:CreateFromEquipmentSlot(slot)
if C_AzeriteEmpoweredItem.IsAzeriteEmpoweredItem(itemLocation) then
local allTierInfo = C_AzeriteEmpoweredItem.GetAllTierInfo(itemLocation)
for _, tier in ipairs(allTierInfo) do
for _, azeritePowerID in ipairs(tier.azeritePowerIDs) do
if C_AzeriteEmpoweredItem.IsPowerSelected(itemLocation, azeritePowerID) then
AzeriteSpells[C_AzeriteEmpoweredItem.GetPowerInfo(azeritePowerID).spellID]=true
end
end
end
end
end
end
end
local Eye = CreateFrame("Frame")
Eye:RegisterEvent("PLAYER_ENTERING_WORLD")
Eye:RegisterEvent("PLAYER_EQUIPMENT_CHANGED")
Eye:RegisterEvent("PLAYER_SPECIALIZATION_CHANGED")
Eye:RegisterEvent("AZERITE_EMPOWERED_ITEM_SELECTION_UPDATED")
Eye:SetScript("OnEvent",
function(self, event, ...)
if event == "PLAYER_EQUIPMENT_CHANGED" then
GetAzeriteSpells()
elseif event == "AZERITE_EMPOWERED_ITEM_SELECTION_UPDATED" then
GetAzeriteSpells()
elseif event == "PLAYER_SPECIALIZATION_CHANGED" then
GetAzeriteSpells()
elseif event == "PLAYER_ENTERING_WORLD" then
GetAzeriteSpells()
Eye:UnregisterEvent("PLAYER_ENTERING_WORLD")
end
end
)
Talents = {{}, {}, {}, {}, {}, {}, {}}
Talents.pvp = {}
local function GetTalents()
for tier=1,7 do
for value=1,3 do
Talents[tier][value] = (select(4, GetTalentInfo(tier, value, 1)))
end
end
for slotN, talentID in ipairs (C_SpecializationInfo.GetAllSelectedPvpTalentIDs()) do
Talents.pvp[talentID] = true
end
end
local Eye = CreateFrame("Frame")
Eye:RegisterEvent("PLAYER_ENTERING_WORLD")
Eye:RegisterEvent("PLAYER_SPECIALIZATION_CHANGED")
Eye:RegisterEvent("PLAYER_TALENT_UPDATE")
Eye:SetScript("OnEvent",
function(self, event, ...)
if event == "PLAYER_TALENT_UPDATE" then
GetTalents()
elseif event == "PLAYER_SPECIALIZATION_CHANGED" then
GetTalents()
elseif event == "PLAYER_ENTERING_WORLD" then
GetTalents()
Eye:UnregisterEvent("PLAYER_ENTERING_WORLD")
end
end
)
function inPvP()
return C_PvP.IsWarModeActive() or C_PvP.IsPVPMap()
end
изза твоего кода аддон ломается и приходится все переустанавливать.а если не ставить код он тупо спамит омоложение без остановки.