• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

Priest Racial spells autolearn

mibu

Enthusiast
With Great help From Salja i succeed making this lil thing...wut it does is auto learn Priest racial spells wen priest reaches lvl 8...onlly teaches Rank 1 of both appropriate spells...the rest should be available via Priest Trainer.
I needed this since many of the quests rewarding these were bugged...and this was the fastest fix..
All be making one for all Class related Quest skills (poisons,mounts,shapes..etc) wen i have time
BTw this i made For "Eluna mangosone" core dunno if it works on any other cores..but don't rlly see way not..

Code:
-- Learn Racial Spells wehn priest is level 8
function LevelUp1 (event, player, oldLevel)
    if (player:GetLevel() == 8) then -- Check Level
        if player:GetClass() == 5 then -- Check is Priest
            if (player:GetRace() == 5) then -- Check is Undead
                player:LearnSpell(2652)
                player:LearnSpell(2944)
                elseif (player:GetRace() == 1) then -- Check is Human
                        player:LearnSpell(13908)
                        player:LearnSpell(13896)
                        elseif (player:GetRace() == 3) then -- Check is Dwarf
                                player:LearnSpell(13908)
                                player:LearnSpell(44041)
                                elseif (player:GetRace() == 4) then -- Check is Nightelf
                                        player:LearnSpell(10797)
                                        player:LearnSpell(2651)
                                        elseif (player:GetRace() == 10) then -- Check is Blood Elf
                                                player:LearnSpell(2652)
                                                player:LearnSpell(32676)
                                                 elseif (player:GetRace() == 8) then -- Check is Troll
                                                         player:LearnSpell(9035)
                                                         player:LearnSpell(18137)
                                                         elseif (player:GetRace() == 11) then -- Check is Draenei
                                                                 player:LearnSpell(32548)
                                                                 player:LearnSpell(44041)
           end
        end
    end
end

RegisterPlayerEvent(13, LevelUp1)


All make soon a separate one for each other class...my every day players...r that lazy!! (Wut? i have to do poison quest? blea cant u teach me??) and m like o_O
 

Tommy

Founder
Thanks for the script! However, there are some flaws..

You forgot to call 'RegisterPlayerEvent(eventId, function)' to register the hook. Also, your script could use some TLC and I did it for you:

Code:
local Spells = -- Level, ClassId, RaceId, SpellId
{
    { 8, 5, 1, 13908 }, -- 1 = Human
    { 8, 5, 1, 13896 },
    { 8, 5, 3, 13908 }, -- 3 = Dwarf
    { 8, 5, 3, 44041 },
    { 8, 5, 4, 10797 }, -- 4 = Night Elf
    { 8, 5, 4, 2651 },
    { 8, 5, 5, 2652 }, -- 5 = Undead
    { 8, 5, 5, 2944 },
    { 8, 5, 8, 9035 }, -- 8 = Troll
    { 8, 5, 8, 18137 },
    { 8, 5, 10, 2652 }, -- 10 = Blood Elf
    { 8, 5, 10, 32676 },
    { 8, 5, 11, 32548 }, -- 11 = Draenei
    { 8, 5, 11, 44041 },
}

function OnLevelChange(event, player, oldLevel)
    for k,_ in ipairs(Spells) do
        if (player:GetLevel() == Spells[k][1] and player:GetClass() == Spells[k][2] and player:GetRace() == Spells[k][3]) then
            player:LearnSpell(Spells[k][4])
        end
    end
end

RegisterPlayerEvent(13, OnLevelChange)

Regardless, thanks for sharing this!
 

mibu

Enthusiast
it's down there :) the hook...true i dunt know wut TLC means..and ho to..lemme google


Tender , Love ,Care =))

After i uploaded it i got more issues...curentlly m using TBC-db newest release ...i find it better than mangos db...eyther way i checked Eluna and Corona Repack's db ...including the newest mangosone db...and gues wut? 60% of this spells r missing from Npc Priest trainer...i mean all other ranks from rank 2 UP(m talking About priest racial Quest spells..other ranks)

If u going to use this script ...well here is the npc_trainer_template.sql Fixed one (i added the missing Ranks from rank 2 and up...) And if ure not going to use this Lua script ..even if u fix the Priest Quests...and ure using those Tbc Db's ure still going to need to fix this template manually :p
 
Last edited:
Top