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

Solved One person per tile - training monks

Status
Not open for further replies.

ligus

New Member
Joined
Apr 26, 2010
Messages
253
Reaction score
0
Hey, how can I make tiles on training monks which won't allow second person stand and train on one tile in the same time? Is there any solution except depot ID (11062)?
 
Add a movement script connected with an action id which checks if there is a player on the tile when moving on it and if so teleport to exit position.
Or you look for the door script that says "This room is already occupied."
 
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
 
YOU ARE MY BOSS!!!!!!! but when first player logout at glowing switch and second player will stand at glowing switch.... and first player will login then they can standing together with 2 player at glowing switch

can you add to this script when someone is standing at this glowing switch.. the second player which want to login in the same glowing switch he will be moved to temple?
 
Last edited by a moderator:
YOU ARE MY BOSS!!!!!!! but when first player logout at glowing switch and second player will stand at glowing switch.... and first player will login then they can standing together with 2 player at glowing switch

can you add to this script when someone is standing at this glowing switch.. the second player which want to login in the same glowing switch he will be moved to temple?
non-logout tile in mapeditor?
 
non-logout tile in mapeditor?
cbrm ,,, he said player can logout :eek:
so it's not logout tile

but i got a nice idea and you can make it for him because i have exam tomorrow

you make it if there players it say only 1 player .. and return false :D
make it to return to temple xD

so if someone logging again it will send him to temple if someone stand on this tile <3
 
yup man if someone will logging again at this glowing switch he should be moved to Temple position can you make it for me?? please
 
I meant he can make those tiles non-logout in map editor so when player relogs he gets tp'ed to his temple and then there won't be 2 players over the tile
a login script can be made too, but the mapeditor trick also works
 
Status
Not open for further replies.
Back
Top