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

Door. If have item you may enter for 30 minutes.

Lightonia

Lightonia.servegame.com
Joined
Jun 4, 2007
Messages
492
Reaction score
9
Hi i have a script that if you have the item you may enter the Spawn for 30 minute, its a teleport.
But it doesn't really work
LUA:
 local aid_of_door = 1790 -- ActionID of all VIP Doors.
local ITEMID_OF_VIPTOKEN = 2157
local COUNT_OF_ITEM = 1

-- DO NOT EDIT BELOW THIS LINE
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if(item.actionid == aid_of_door) then
        local stor = getPlayerStorageValue(cid, item.uid)
        if(stor < 1 or (stor+1800) <= os.time()) then
            local ret = doPlayerRemoveItem(cid, ITEMID_OF_VIPTOKEN, COUNT_OF_ITEM)
            if(ret) then
                setPlayerStorageValue(cid, item.uid, os.time())
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You now have half an hour access to this spawn.")
                if(not doorEnter(cid, item, toPosition)) then return false end
            else
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need atleast 1 VIP Nugget to enter this spawn.")
            end
        else
            if(not doorEnter(cid, item, toPosition)) then return false end
        end
    end
    return true
end

function doorEnter(cid, item, toPosition)
    
    local mob = getTopCreature(toPosition); if(mob.uid > 0) then return false end
    doTransformItem(item.uid, item.itemid + 1)
    doTeleportThing(cid, toPosition)
    return true
end

Its not that i don't enter, i do. But i can stay there as long as i like.
 
Last edited:
Back
Top