Likes: 0
Results 1 to 1 of 1
Thread: [LUA] NPC Level up with tokens
-
05-04-14, 11:48 PM #1
[LUA] NPC Level up with tokens
Register to remove this adOriginally Posted by cliftonCode:local function On_Gossip_Talk(unit, event, player) unit:GossipCreateMenu(3544, player, 0) unit:GossipMenuAddItem(3, "Level me to 80!", 0, 0) unit:GossipMenuAddItem(3, "Grant Me One Level!", 1, 0) unit:GossipMenuAddItem(3, "Grant Me Two Levels!", 2, 0) unit:GossipMenuAddItem(3, "Grant Me Three Levels!", 3, 0) unit:GossipSendMenu(player) end local function On_Gossip_Select(unit, event, player, id, intid, code) if(intid == 0) then if(player:GetLevel() < 80 and player:GetItemCount(88980) >= 1) then player:SetLevel(80) player:RemoveItem(88980, 1) end elseif(intid == 1) then if(player:GetLevel() < 80 and player:GetItemCount(88981) >= 1) then player:SetLevel(player:GetLevel()+1) player:RemoveItem(88981, 1) end elseif(intid == 2) then if(player:GetLevel() < 80 and player:GetItemCount(88982) >= 1) then player:SetLevel(player:GetLevel()+2) player:RemoveItem(88982, 1) end elseif(intid == 3) then if(player:GetLevel() < 80 and player:GetItemCount(88983) >= 1) then player:SetLevel(player:GetLevel()+3) player:RemoveItem(88983, 1) end end end RegisterUnitGossipEvent(90000, 1, On_Gossip_Talk) RegisterUnitGossipEvent(90000, 2, On_Gossip_Select)
clifton
rochet2 for helping
› See More: [LUA] NPC Level up with tokens
Related Threads - Scroll Down after related threads if you are only interested to view replies for above post/thread
Visitors found this page by searching for:
Nobody landed on this page from a search engine, yet!
SEO Blog