View Single Post
06-08-11, 07:14 PM   #4
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
.. I will try to help then~

You could register for TRAINER_SHOW, and only then maybe use an OnUpdate handler to click on the button, and cancel the OnUpdate handler again on TRAINER_CLOSED. but that's just my 2 cents...

This link should also be useful, for in the future
  • AutoTrainSpells.lua
    Code:
    local f = ClassTrainerTrainButton
    f.e = 0
    
    f:SetScript("OnUpdate", function(f, e)
    	f.e = f.e + e
    	if f.e > .01 then
    		f.e = 0
    		f:Click()
    	end
    end)
  • AutoTrainSpells.toc
    Code:
    ## Interface: 40100
    ## Version: 0.1
    ## Title: AutoTrainSpells
    ## Notes: Auto trains your spells
    ## Author: Xaelic
    ## Dependencies: Blizzard_TrainerUI
    
    AutoTrainSpells.lua
Attached Files
File Type: zip AutoTrainSpells-v0.1.zip (679 Bytes, 683 views)
  Reply With Quote