I altered a release put out by someone else on here a while back that created PvP tokens to try to get it to only give tokens on kill while in a specific zone (Azshara Crater) and am having trouble getting it to work. I'm not sure who made the original release, but I didn't; I've just modded it in a way that isn't working. The item ID is a mace I'm aware, was just testing it out.
print("Honor Kill Token Script Initiated...")
function OnKillPlr(event, pPlayer, pVictim)
local pLevel = pPlayer:GetPlayerLevel()
local vicLevel = pVictim:GetPlayerLevel()
local Map = pPlayer:GetMapID()
local modedLevel = vicLevel + 10
if(pLevel > modedLevel) then
pPlayer:SendAreaTriggerMessage("Player "..pVictim:GetName().." is too low of a level to grant a token.")
else
if(Map == 37) then
pPlayer:AddItem(865, 1) --Obviously the token's itemid.
end
end
end















