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

Solved help me with a tp script please

kymurax

New Member
Joined
Dec 29, 2009
Messages
53
Reaction score
0
hello OTLAND I have a script but I want this say "to enter need to be level 120" when you can not enter

Code:
function onStepIn(cid, item, position, fromPosition)
pos1 = {x=32202, y=32205, z=7}  ------- Enter the position the teleport should take you here
pos2 = {x=32350, y=32222, z=7}  ------- Enter the position the teleport should take you if you're not level 100 here
if getPlayerLevel(cid) >= 120 then
doTeleportThing(cid, pos1, 1)
else
doTeleportThing(cid, pos2, 1)
return TRUE
    end
end
Thanks !! i will give +rp
 
Code:
local function Position(x, y, z)
    return {x = x, y = y, z = z}
end

local pos1 = Position(32202, 32205, 7)
local pos2 = Position(32350, 32222, 7)

local levelReq = 120

function onStepIn(cid, item, position, fromPosition)
    if getPlayerLevel(cid) >= levelReq then
        doTeleportThing(cid, pos1)
    else
        doTeleportThing(cid, pos2)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, 'You may not enter here until level '.. levelReq ..'.')
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
    end
    return true
end
 
Code:
local teleport_position = {x = 32202, y = 32205, z = 7}  -- Position where they are teleport to if above level 120
local level_required = 120

function onStepIn(cid, item, position, fromPosition)
       if getPlayerLevel(cid) < level_required then
               doTeleportThing(cid, fromPosition, true) -- teleport back to where they came from if not above level 120
               doCreatureSay(cid, "Need to be level " .. level_required .. " or higher to enter!", TALKTYPE_ORANGE_1, cid)
               return true
       end
       doTeleportThing(cid, teleport_position)
       return true
end
 
Back
Top