Code:
local npcid = 49996
local pclass = player:GetPlayerClass()
function NPC_main_menu(pUnit, player)
pUnit:GossipCreateMenu(3543, player, 0)
pUnit:GossipMenuAddItem(0, "Welcome to Power WoW's Custom Trainer", 1, 0)
pUnit:GossipMenuAddItem(0, "I am here to train you ur missing spells.", 2, 0)
pUnit:GossipMenuAddItem(3, "Hunter.", 3, 0)
pUnit:GossipMenuAddItem(3, "Warlock", 4, 0)
pUnit:GossipSendMenu(player)
end
function NPC_on_gossip_talk(pUnit, event, player)
NPC_main_menu(pUnit, player)
end
function NPC_on_gossip_select(pUnit, event, player, id, intid, code, pMisc)
if(intid == 3) then
if ( class[pclass] == 3 ) then
pUnit:GossipCreateMenu(3543, player, 0)
pUnit:GossipMenuAddItem(4, "Hello, this is the Hunter Training Area, Please click one of the following spells to learn them.", 100, 0)
pUnit:GossipMenuAddItem(3, "Pet Skills", 10, 0)
pUnit:GossipMenuAddItem(3, "Arcane Shot", 11, 0)
pUnit:GossipMenuAddItem(0, "Back", 100, 0)
pUnit:GossipSendMenu(player)
end
if(intid == 4) then && if ( class[pclass] == 9) then
pUnit:GossipCreateMenu(3543, player, 0)
pUnit:GossipMenuAddItem(4, "Hello, this is the Warlock Training Area, Please click one of the following spells to learn them.", 100, 0)
pUnit:GossipMenuAddItem(4, "Give me my Pets Please", 12, 0)
pUnit:GossipSendMenu(player)
end
if ( class[pclass] == 3 ) then
if(intid == 10) then
pUnit:GossipMenuAddItem(0, "Welcome to Power WoW's Custom Trainer", 1, 0)
pUnit:GossipMenuAddItem(0, "I am here to train you ur missing spells.", 2, 0)
pUnit:GossipMenuAddItem(3, "Hunter.", 3, 0)
pUnit:GossipMenuAddItem(3, "Warlock", 4, 0)
player:AddSpell(883)
player:AddSpell(2641)
player:AddSpell(6991)
player:AddSpell(982)
player:AddSpell(1515)
player:AddSpell(5149)
end
if(intid == 100) then
pUnit:GossipCreateMenu(3543, player, 0)
pUnit:GossipMenuAddItem(0, "Welcome to Power WoW's Custom Trainer", 1, 0)
pUnit:GossipMenuAddItem(0, "I am here to train you ur missing spells.", 2, 0)
pUnit:GossipMenuAddItem(3, "Hunter.", 3, 0)
pUnit:GossipMenuAddItem(3, "Warlock", 4, 0)
pUnit:GossipSendMenu(player)
end
end
RegisterUnitGossipEvent(49996, 1, "NPC_on_gossip_talk")
RegisterUnitGossipEvent(49996, 2, "NPC_on_gossip_select")