/run
LoadAddOn"Blizzard_TrainerUI"
f=ClassTrainerTrainButton
f.e = 0
if
f:GetScript"OnUpdate"
then
f:SetScript("OnUpdate", nil)
else
f:SetScript("OnUpdate", function(f,e)
f.e=f.e+e
if
f.e>.01
then
f.e=0 f:Click()
end
end
)end
This is the basic scripting. I separated the If,Then,Else and the If,Then statements so you can understand them...
This is know as a "nested IF,THEN, ELSE" in a scripting language.