local DefensiveStance = 71
local RighteousFury = 25780
local ShieldBlock = 2565
local Taunt = 355
local button = CreateFrame("Button", "ReRoll", UIParent, "ActionButtonTemplate, InsecureActionButtonTemplate")
local type = "item"
local id = 777992
--local name, icon = GetItemInfo(id)
local name, _, _, _, _, _, _, _, _, icon = GetItemInfo(id)
button:SetPoint("TOP", 0, -150)
local frame = CreateFrame('Frame')
frame:SetScript('OnEvent', function(self, event, ...)
function frame:LEARNED_SPELL_IN_TAB(self, ...)
if IsSpellKnown(DefensiveStance, false) and IsSpellKnown(RighteousFury, false) and IsSpellKnown(ShieldBlock, false) and IsSpellKnown(Taunt, false) then end
else C_Timer.After(3, ReRoll) --To loop back to the button frame
The first part of the code I am trying to create a button that will use an item in my inventory (ID: 777992) and then automatically click yes on the pop up box (StaticPopup1Button1:Click() ) checking if I want to use the item.
The second part is to check if the skills I am looking for have been learned or not.
What Im trying to figure out is how can I get it to Loop so if the skills are not learned it can automatically use the item (777992) and click the check box over and over. It would need to be on a 3 second timer for the loop.
This code is for 3.3.5 in case it makes much difference
Essentially I want to create a button that will use an item and accept the pop up, check if certain spells are learnt and then automatically re use the item and accept the pop up if the skills are not learnt/ on action bar.
Discussion of Private Servers, in any manner other than theoretical, is completely against our rules. We are an Official Fan Site. We follow Blizzard's rules, on top of our own rules.
Threads requesting assistance with Private Servers get locked. Repeated postings get you banned.
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh