• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

When Premmy ACC finish

Stewie

Family Guy # ;3
Joined
May 3, 2010
Messages
786
Reaction score
12
Location
TV
premium account when finished, go to town 8,and no with addons.

Like Real.
 
PHP:
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

Like this but, i dont know function with remove addons.
 
lol sample,
in config.lua

addonsOnlyPremium = false <~ set to true.

ok you will be able only wear addons if you are premium...but it won't remove addons if you weared it when you was premium...

In my server I'm using this script...
In creaturescripts/scripts make an file called kickfacc.lua and paste it inside:
Code:
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

explaining....
{fromPos = {x=882, y=1230, z=0}, toPos = {x=1118, y=1505, z=14}}, -> thats the position of premium area (you can added more than one premium area.. just add one more line like this)

local vipTowns = {1,2,3,4,5,6,7} -> premium towns IDs

local homeTown = 8 -> free town id (town where player will be teleported if premium runs out)

local homeCords = {x = 720, y = 816, z = 7} -> free town position (position where player will be teleported if premium runs out)

okay...now add this line to creaturescripts.xml:
Code:
	<event type="login" name="KickFacc" event="script" value="kickfacc.lua"/>

and go to data/lib and open 000-constant.lua
add this line at the last line of the script:
Code:
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}
explaining: these are premium outfits ids (look at outfit.xml file) you can add more or remove some if you want.

Hope it help you!
 
Back
Top