Thread Tools Display Modes
06-07-11, 03:19 PM   #1
Xaelic
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Apr 2011
Posts: 4
AutoTrainSpells addon

I have find out the script that you can use in game to have u learn all available spells at the trainer. If you press the macro once then until you logout when ever you go to the trainer you will learn the spells automatically. I just need help making the addon and could use some help

Last edited by Xaelic : 06-07-11 at 03:21 PM.
  Reply With Quote
06-07-11, 04:17 PM   #2
Nobgul
A Molten Giant
 
Nobgul's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 693
well post the macro. you have. and someone will turn it into a addon for you, maybe.
__________________
[SIGPIC][/SIGPIC]
  Reply With Quote
06-07-11, 05:21 PM   #3
Xaelic
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Apr 2011
Posts: 4
Originally Posted by Nobgul View Post
well post the macro. you have. and someone will turn it into a addon for you, maybe.
/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
  Reply With Quote
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
06-08-11, 07:31 PM   #5
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
I would actually do:
Originally Posted by Ketho View Post
AutoTrainSpells.toc
Code:
## Interface: 40100
## Version: 0.1
## Title: AutoTrainSpells
## Notes: Auto trains your spells
## Author: Xaelic
## LoadOnDemand: 1
## LoadWith: Blizzard_TrainerUI

AutoTrainSpells.lua
That way the addon doesn't even load until you visit a trainer.
__________________
"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

  Reply With Quote
06-08-11, 08:17 PM   #6
Xaelic
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Apr 2011
Posts: 4
thanks guys, i will post this with credits to you two
  Reply With Quote
06-08-11, 08:55 PM   #7
Xaelic
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Apr 2011
Posts: 4
ok Addon is posted in Miscellaneous
Ty both of u
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » AutoTrainSpells addon


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off