Jump to content
vrathak

Mining/Herb track

Recommended Posts

Was this macro not working in Vanilla and only working in TBC and up?

 

/run if not THO then local f,t,c=CreateFrame("Frame","THO"),1,0 f:SetScript("OnUpdate", function(_, e) c=c+e if c>3 then c=0 SetTracking(t) if t==1 then t=2 else t=1 end end end) THO:Hide() end
/run if THO:IsVisible() then THO:Hide() else THO:Show() end

 

Im getting nil value on arithmetic when trying to run it on this server

Share this post


Link to post
Share on other sites

You're using the TBC+ version of the OnUpdate function. In Vanilla, OnUpdate is passed just one argument, the elapsed time as arg1. Try:

/run if not THO then local f,t,c=CreateFrame("Frame","THO"),1,0 f:SetScript("OnUpdate", function() c=c+arg1 if c>3 then c=0 SetTracking(t) if t==1 then t=2 else t=1 end end end) THO:Hide() end
/run if THO:IsVisible() then THO:Hide() else THO:Show() end 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×