local pos = {x = 100, y = 100, z = 7} --- position, where player will be teleport.
if getPlayerPremiumDays(cid) < 1 then
doTeleportThing(cid, pos)
doSendMagicEffect(getThingPos(cid),CONST_ME_TELEPORT)
doPlayerSendTextMessage(cid,MESSAGE_FIRST,'You got teleported to temple, as your premium has expired.')
end
lol sample,
in config.lua
addonsOnlyPremium = false <~ set to true.
local vipZones = {
{fromPos = {x=882, y=1230, z=14}, toPos = {x=1118, y=1505, z=14}},
{fromPos = {x=882, y=1230, z=15}, toPos = {x=1118, y=1505, z=15}}
}
local vipTowns = {1,2,3,4,5,6,7}
local homeTown = 8
local homeCords = {x = 720, y = 816, z = 7}
function onLogin(cid)
if (not isPremium(cid)) then
for _, v in ipairs(vipZones) do
if isInRange(getCreaturePosition(cid), v.fromPos, v.toPos) == TRUE then
doTeleportThing(cid, homeCords, TRUE)
end
end
if isInArray(vipTowns, getPlayerTown(cid)) == TRUE then
doPlayerSetTown(cid, homeTown)
end
end
return TRUE
end
<event type="login" name="KickFacc" event="script" value="kickfacc.lua"/>
premiumOutfits = {132,133,134,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,251,252,268,269,270,273,278,279,288,289,324,325,328,329,366,367}