eluna-scripts-ornfelt/lua/WowEmulationScriptPack/Lua/VIP/Stone.lua
2024-09-23 07:59:23 +02:00

14 lines
513 B
Lua

function LevelupStone_Trigger(item, caster, event)
local Vip = ACCT[caster:GetAccountName()].Vip;
if (Vip >= 1)and(Vip <= ACCT["SERVER"].Vip_max-1) then
caster:RemoveItem(ACCT["SERVER"].Level_Up_Stone, 1)
SetVip(caster, Vip + 1)
return false;
end
if(Vip == ACCT["SERVER"].Vip_max)then
caster:SendBroadcastMessage("You are unable to level up your VIP level anymore. You are VIP level "..Vip..".")
return false;
end
end
RegisterItemGossipEvent(ACCT["SERVER"].Level_Up_Stone, 1, LevelupStone_Trigger)