• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Hello I need a door script!

legendofwar

Banned User
Joined
Mar 25, 2009
Messages
5
Reaction score
0
Hello i need a script i want its like this!

If somebody enter door its only for lvl 10 to 20 or 50 to 100
do you understand?

Please post its!
 
you mean, to pass the door, player need be more than lvl 50 and less than lvl 100?

PHP:
local config = { minlvl = 50, maxlvl = 100 }

function onUse(cid, item, frompos, item2, topos)
local pos = getPlayerPosition(cid)
local lvl = getPlayerLevel(cid)

            if item.uid == 54321 then
            if lvl >= config.minlvl and lvl <= config.maxlvl then
            if pos.x == topos.x then
            if pos.y < topos.y then
                    pos.y = topos.y + 1
            else
                    pos.y = topos.y - 1
            end
            elseif pos.y == topos.y then
            if pos.x < topos.x then
                    pos.x = topos.x + 1
            else
                    pos.x = topos.x - 1
            end
            else
                doPlayerSendTextMessage(cid,22,'Stand front of the door.')
              return TRUE
            end

                doTeleportThing(cid,pos)
                doSendMagicEffect(topos,12)
            else
                doPlayerSendTextMessage(cid,22,'You need blablabla...')
            end
              return TRUE
            else
              return FALSE
            end
            end

PHP:
put "54321" as unique ID at door or change it d:

not tested/
 
Last edited:
Back
Top