Leveler NPC/script Ascent 

Joined
Feb 23, 2008
Messages
3
Reaction score
0
Can any one make me a .lua script with one leveler npc who required level 70 and levelup you to 80 please i work with arcemu and try this

Code:
function Leveler_OnGossipTalk(pUnit, event, player)
pUnit:GossipCreateMenu(**** player, 0)
pUnit:GossipMenuAddItem(0,"Make me level 80", 1, 0)
pUnit:GossipSendMenu(player)
end

function Leveler_OnGossipSelect(pUnit, event, player, id, intid, code)
if (intid == 1) then
pUnit:RequiredPlayerLevel(70)
pUnit:SetPlayerLevel(80)
end
end

RegisterUnitGossipEvent(9999*** 1, "Leveler_OnGossipTalk")
RegisterUnitGossipEvent(9999*** 2, "Leveler_OnGossipSelect")


but dont do nothing Thanks
 
local Token_ID = 80500 -- The ID of the item you want exchanged.
local Amount = 50 -- The amount of tokens that should be removed.
local NPC_ID = 75009 -- The ID of the NPC you want to use.
local Level = 10 -- How many levels the player should get.

-- Nothing to change below this!




function GossipLevelereightOnTalk(unit, event, plr)
unit:GossipCreateMenu(**** plr, 0)
unit:GossipMenuAddItem(0, "I want to exhange tokens for "..Level.." levels!", 1, 0)
unit:GossipMenuAddItem(0, "Nevermind", 2, 0)
unit:GossipSendMenu(plr)
end

function GossipLevelereightOnSelect(unit, event, plr, id, intid, code)
if (intid == 1) then
if (plr:GetPlayerLevel() == 90) then
plr:GossipComplete()
plr:SendAreaTriggerMessage("You are already level 90")
else
if (plr:GetItemCount(Token_ID) > 0) then
unit:SendChatMessage(12, 0, "Congratulations, you have been granted "..Level.. " levels")
local CurrentLevel = plr:GetPlayerLevel()
plr:RemoveItem(Token_ID, Amount)
local SetLevel = CurrentLevel + Level
if (90 < SetLevel) then
SetLevel = 90
end
plr:SetPlayerLevel(SetLevel)
plr:GossipComplete()
else
local Items = plr:GetItemCount(Token_ID)
plr:SendAreaTriggerMessage("You need "..Amount.." token, you got "..Items.."!")
end
end
end
if(intid == 2) then
plr:GossipComplete()
end
end

RegisterUnitGossipEvent(75009,1,"GossipLevelereightOnTalk")
RegisterUnitGossipEvent(75009,2,"GossipLevelereightOnSelect")[/code]
 
Last edited:
Back