Me and my friends with our server came up with the idea to have a leveling npc for donation items. Our site had a donation ability to gain a level token or to start with one. It was much rather easy than to edit ExtendedItemCosts.dbc. Well on with my guide.
----------------------------------------------------------------------
I will be using the template we used for our leveling npc. This guide does not show you how to trade the item. I will make another guide for that later. And Ill add a link.
----------------------------------------------------------------------
Red = What needs to be changed. Yellow = Information White = Does not need to be changed/modified
function Leveler_OnTalk(pUnit, event, player) LevelerMenu(pUnit, player)
end
These are function names. These can be changed or can stay the same, your choice.
3544 = This is the menu ID this number must change on each menu. Like -1 the next menu if you put one would be 3543 and so on.
19 - 59 Twink = This is the menu name. Change it as you please.
100 - 104 = This is the submenu ID. 2 can not be the same or you will have a conflict. This number will be used later on.
This part I put here and I will brake down so you can understand.
function Leveler_OnSelect(pUnit, event, player, id, intid, code, pMisc)
if(intid == 100) then
pUnit:SendChatMessage(12, 0, "You have been granted level 19")
player:SetPlayerLevel(19)
end
if(intid == 101) then
pUnit:SendChatMessage(12, 0, "You have been granted level 29")
player:SetPlayerLevel(29)
end
if(intid == 102) then
pUnit:SendChatMessage(12, 0, "You have been granted level 39")
player:SetPlayerLevel(39)
end
if(intid == 103) then
pUnit:SendChatMessage(12, 0, "You have been granted level 49")
player:SetPlayerLevel(49)
end
if(intid == 104) then
pUnit:SendChatMessage(12, 0, "You have been granted level 59")
player:SetPlayerLevel(59)
end
100 - 104 Is the submenu id which i told you about early.
19 - 59 is the level that the player recieves when the npc is clicked.
You have been granted levvel ## is what the npc will say when the player has recieved the level.
Leveler_OnSelect is the name of the function.
function Leveler_OnSelect(pUnit, event, player, id, intid, code, pMisc)
if(intid == 100) then
pUnit:SendChatMessage(12, 0, "You have been granted level 19")
player:SetPlayerLevel(19)
end
if(intid == 101) then
pUnit:SendChatMessage(12, 0, "You have been granted level 29")
player:SetPlayerLevel(29)
end
if(intid == 102) then
pUnit:SendChatMessage(12, 0, "You have been granted level 39")
player:SetPlayerLevel(39)
end
if(intid == 103) then
pUnit:SendChatMessage(12, 0, "You have been granted level 49")
player:SetPlayerLevel(49)
end
if(intid == 104) then
pUnit:SendChatMessage(12, 0, "You have been granted level 59")
player:SetPlayerLevel(59)
end
end
RegisterUnitGossipEvent(npcid, 1, "Leveler_OnTalk")
RegisterUnitGossipEvent(npcid, 2, "Leveler_OnSelect") If you do not feel like making your own script then or to lazy :P send me an email at [Only registered and activated users can see links. ] and ill try to to send you back the script as soon as i can.
__________________
Donate to remove ads, get your "DONATOR title, and get access to the MMOwned community's elite Shoutbawx.