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

Custom Chair

Aiden

New Member
Joined
Oct 12, 2009
Messages
38
Reaction score
1
Location
Uk
Hi i was just woundering if there was any script for where only GM/GOD character can sit on the chair and it wil teleport players away from the chair there is probably scripts out there but i am new to ot's so i was woundering if anyone could help me out

i will give Repp++ :D

:ninja:
 
Could probably put the chair on a tile and create a movements script for that tile with a certain AID and utilize this:

Lua:
getPlayerAccess(cid)

To check their access level. If not a GM/GOD then push them back, etc...
 
Sorry for double posting, but I had a few minutes and wrote a quick script...
The actionid is 7005 for the tile, but you can change it if you wish, just be sure
to edit your movements.xml accordingly.

gmchair.lua
Lua:
function onStepIn(cid, item, position, fromPosition)
	local pos = {x=1000, y=1000, z=7} -- Teleport player to here
	local chair = {x=1010, y=1012, z=7, stackpos = 1} -- Location of tile (where the chair will be)
	local player = getThingFromPos(chair)
	local access = 3 -- Access level required
	
	if getPlayerAccess(cid) < access then
		doTeleportThing(player.uid, pos)
		doSendMagicEffect(pos, CONST_ME_TELEPORT)
		doPlayerSendCancel(cid, "Must have access level of" .. access .. " or higher.")
	end
end

function onStepOut(cid, item, position, fromPosition)
end

add this to movements.xml
XML:
<movement type="StepIn" actionid="7005" event="script" value="gmchair.lua"/>
<movement type="StepOut" actionid="7005" event="script" value="gmchair.lua"/>

Config explanation:
Lua:
local pos = {x=1000, y=1000, z=7} -- Teleport player to here
local chair = {x=1010, y=1012, z=7, stackpos = 1} -- Location of tile (where the chair will be)
local player = getThingFromPos(chair)
local access = 3 -- Access level required

Pos = Position to where to teleport player
Chair = Position of the tile where chair will be
Access = Access level required to stand on the tile

Tested on TFS 0.3.6pl1
 
Last edited:
sorry to ask this noobie question where do i put the config code? and it was np about the double post the more post the more easier it gets for me :)

Thanks again also
 
ok sorry for this noobie thread i just thought it would look cool for my ot when ppl try and sit on my chair :) also your a great hand

gonna try it now :D

Rep++
 
ahh sorry for the fast reply you know the actionid 7005? is that the kick id or would that need to be my chair id 5915?


:)
 
nono you put the actionid on the tile where the chair will go on top of..

So you if you want to put the chair on a tile, simply change the actionID of the tile to 7005 and put the chair over that tile and voila! it'll work :)
 
Back
Top