• 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!

Help me for vip zone plz!

cheskum

New Member
Joined
Nov 9, 2008
Messages
6
Reaction score
0
Okey! i need information or scrips for i can make vip zone on my ot...

Please give me links for i can found it.... Thanks
 
I use PREMIUM account as VIP account so I just make a tile where only premium accounts can enter.

Either you do like that, or you make so that VIP players have a certain storage id and make a teleport that only that storage id can use.
 
Just change the coordinates, action-id and the storage value to whatever you want.

Name it viptp and save it at data/movements/
Code:
function onStepIn(cid, item, pos, frompos)
if isPlayer(cid) == TRUE and item.actionid == 6666 and getPlayerStorageValue(cid,6666) == 1 then
doTeleportThing(cid, {x=358, y=638, z=7})
doPlayerSendTextMessage(cid,22,"You're now in the VIP zone.")
else
doPlayerSendTextMessage(cid,22,"Sorry only VIP players may enter.")
doTeleportThing(cid, frompos)
end
end

Add this in movements.xml
Code:
<movevent event="StepIn" actionid="6666" script="viptp.lua"/>

Put the action-id out on a tile in the mapeditor.
When they walk on the tile they'll be teleported to the coordinates.
 
Code:
local vipStorage = 12345
function onStepIn(cid, fromPos)
    if isPlayer(cid) == TRUE then
        if getPlayerStorageValue(cid, vipStorage) == -1 then
            doTeleportThing(cid, fromPos, 0)
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You can not enter VIP city.")
        end
    end
    return TRUE
end

function onStepOut(cid)
    if isPlayer(cid) == TRUE then
        if getPlayerStorageValue(cid, vipStorage) == TRUE then
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Enjoy your stay.")
        end
    end
    return TRUE
end
 
how do i give premium players storagevalue?


PHP:
        <talkaction words="/vip" script="VIP.lua" />


PHP:
function onSay(cid,words,param)
if getPlayerAccess(cid) > 3 and param ~= "" and getPlayerStorageValue(getPlayerByName(param), 12345) == -1 or getPlayerStorageValue(getPlayerByName(param), 12345) == 0 then

doPlayerSendTextMessage(getPlayerByName(param),20,'VIP ADDED.')
setPlayerStorageValue(getPlayerByName(param), 12345, 1)
doPlayerSendTextMessage(cid,21,'VIP ADDED.')
elseif getPlayerAccess(cid) < 3 then
doPlayerSendTextMessage(cid,25,"You're Not a Gamemaster.")

elseif getPlayerStorageValue(getPlayerByName(param), 12345) ~= -1 then
doPlayerSendTextMessage(cid,25,"Sorry, not possible.")
else
doPlayerSendTextMessage(cid,21,"Sorry, not possible.")

end
end


NOT TESTED!
 
Thanks Jose for a fast reply. But i want it like this. When someone buy premium on my website thru donation system. I want it to add 7 days pacc and storagevalue for 7 days. So when the premium ends, they can't use the door with the storagevalue. If you know what i mean. :)
 
Thanks Jose for a fast reply. But i want it like this. When someone buy premium on my website thru donation system. I want it to add 7 days pacc and storagevalue for 7 days. So when the premium ends, they can't use the door with the storagevalue. If you know what i mean. :)

Use the script of "premium bridge"

Code:
function onStepIn(cid, item, pos) 

local look = getPlayerLookDir(cid) 

 if isPremium(cid) ~= 1 then
        if look == 0 or look == 1 then
          doMoveCreature(cid, look+2)
        elseif look == 2 or look == 3 then
          doMoveCreature(cid, look-2)
        end
  doPlayerSendTextMessage(cid,21, "Sorry you need VIP account to enter.")
 else
   return 0
 end
end

Only players with premium account can enter.
 
Save the code as "vip.lua" in movements script folder.

Add this line in movements.xml

Code:
<movevent event="StepIn" actionid="6666" script="vip.lua"/>

Put action ID 6666 on the tile you want to be only for VIP/PREM.

I don't know how to make only doors for prem, I'm a newb scripter. :)
 
Back
Top