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

One person per tile

kafar1

New Member
Joined
Apr 4, 2013
Messages
78
Reaction score
1
Code:
<movevent type="StepIn" actionid="2025" event="script" value="one_per_tile.lua"/>

Code:
function getBottomPlayer(pos)
for i = 1, getTileInfo(pos).things do
pos.stackpos = getTileInfo(pos).things-i
local cid = getThingFromPos(pos).uid
if isPlayer(cid) then
return cid
end
end
return 0
end

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)

if not isPlayer(cid) then
return doTeleportThing(cid, fromPosition, false)
end

if isPlayer(getBottomPlayer(position)) and cid ~= getBottomPlayer(position) then
doPlayerSendCancel(cid, 'This tile only allows 1 player in it.')
return doTeleportThing(cid, fromPosition, false)
end
return true
end

Can some one add to this script that player can't logout at this tile, glowing switch??
 
Are you talking about no logout or only one person per tile? You ask for one thing and post a diffrent script...

The no logout tile can be done via rme as kikos said.
 
30dbgiu.png
 
Back
Top