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

Door teleport help (Easy Script help)

merfus

Member
Joined
Dec 27, 2011
Messages
214
Reaction score
5
Location
Poland
i got script for door:

PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if (item.actionid == 5788 and getPlayerStorageValue(cid,63111) >= 1) then
		doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)
		doCreatureSay(cid, "You can Pass Survival Door.", TALKTYPE_ORANGE_1)
	else
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You cannot pass this Survival Door.")
	end
	return true
end

But when i go into door i am in wall near the door

i try to change that:
PHP:
		doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)
to that:
PHP:
		doTeleportThing(cid, {x=toPosition.x,y=toPosition.y-1,z=toPosition.z}, TRUE)
but now i can go with that door only with one side
 
Try this

function onUse(cid, item, fromPosition, itemEx, toPosition)
if (item.actionid == 5788 and getPlayerStorageValue(cid,63111) >= 1) then
doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)
doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)
doCreatureSay(cid, "You can Pass Survival Door.", TALKTYPE_ORANGE_1)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You cannot pass this Survival Door.")
end
return true
end
 
Dude... are you using Magic Door?

Yes
123mdr.png
 
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(getPlayerStorageValue(cid, 63111) < 0) then
		return doPlayerSendCancel(cid, "Sorry, not possible.")
	end
	
	doTeleportThing(cid, {x = 100, y = 100, z = 7}, true)
	return true
end
 
Last edited:
What version of TFS are you using?

LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(getPlayerStorageValue(cid, 63111) < 0) then
		return doPlayerSendCancel(cid, "You cannot pass.")
	end
	
	doTeleportThing(cid, {x = toPosition.x, y = toPosition.y, z = toPosition.z}, true)
	return true
end
0.3.6pl1
With this script i go into closed door, i 'am on the same SQM what is closed door, yes i can go but it looks ugly.
I want to be teleport behind the door
 
x = toPosition.x+1 it'll only work if you're standing in the north side of the door.

i saw this on so many OTS when you click on door you just get teleported.
I got script from 7.92 can anyone change for tfs 0.3.6pl1?
PHP:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 7011 then
if getPlayerStorageValue(cid, 1111) == 21 then
pos = getPlayerPosition(cid)
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 in front of the door.')
return 1
end

doTeleportThing(cid,pos)
else
doPlayerSendTextMessage(cid,22,'You can do this saga.')
end
return 1
else
return 0
end
end
 
Last edited:
Back
Top