Auto Trainer Not Working menu

User Tag List

Results 1 to 3 of 3
  1. #1
    choweyiii's Avatar Contributor
    Reputation
    91
    Join Date
    Aug 2010
    Posts
    127
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Auto Trainer Not Working

    I wanted players to automatically learn their class spells upon leveling up, I really thought this would work, but for some reason it does not =(

    Code:
    function Teach_OnPostLevelUp(Event, pPlayer)
    
    	if pPlayer:GetPlayerLevel() == "4" then 
    	if pPlayer:GetPlayerClass() == "Warrior" then
    	pPlayer:LearnSpell(100) -- Charge
    	pPlayer:LearnSpell(772) -- Rend 1
    	end
    	
    	elseif pPlayer:GetPlayerClass() == "Mage" then
    	pPlayer:LearnSpell(116) -- Frostbolt 1
    	end
    end
    
    RegisterServerHook(27, "Teach_OnPostLevelUp")
    I'm not getting any errors when I run this, simply nothing happens when I test it. What's wrong here? As always, I'll +Rep anyone who can post a helpful comment.

    Auto Trainer Not Working
  2. #2
    Thaadevil's Avatar Contributor
    Reputation
    319
    Join Date
    Apr 2011
    Posts
    936
    Thanks G/R
    1/9
    Trade Feedback
    4 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There's a macro to just train everything, how lazy can people be?

  3. #3
    choweyiii's Avatar Contributor
    Reputation
    91
    Join Date
    Aug 2010
    Posts
    127
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I actually figured this out. I fixed it by removing the quotations around the level and added a localization, the correct form is as follows: (if anyone is wondering)


    Code:
    function Teach_OnPostLevelUp(Event, pPlayer)
    local Class = pPlayer:GetPlayerClass()
    	if pPlayer:GetPlayerLevel() == 4 then 
    	if (Class == "Warrior") then
    	pPlayer:LearnSpell(100) -- Charge
    	pPlayer:LearnSpell(772) -- Rend 1
    	end
    
    RegisterServerHook(27, "Teach_OnPostLevelUp")

Similar Threads

  1. Whydb trainers not working?
    By brock106 in forum WoW EMU Questions & Requests
    Replies: 1
    Last Post: 12-12-2008, 07:03 AM
  2. DBC editing not working anymore?
    By Charade in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 12-13-2006, 01:37 PM
  3. Wow glider is not working..
    By dragonmonster in forum World of Warcraft General
    Replies: 0
    Last Post: 10-24-2006, 06:29 PM
  4. weird model edits not working :S
    By nozzie in forum WoW ME Questions and Requests
    Replies: 2
    Last Post: 10-20-2006, 08:51 AM
  5. WoW Glider, key not working?
    By Shadowman2418 in forum World of Warcraft General
    Replies: 3
    Last Post: 07-28-2006, 03:49 AM
All times are GMT -5. The time now is 04:09 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search