• 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 Quest door..

wrestler

New Member
Joined
May 20, 2013
Messages
15
Reaction score
0
Hello guys, in my server when going through a quest door. It opens and people are put in the spot of the door, instead of being teleported onto the other side.. allowing noobs to bot gp under them.. how do I have the doors that when they are used you are put through the other side? Thanks for all help!
 
didnt test it but try this:
Code:
local t = {
[10050] = {50,{x = 1350, y = 1435, z = 7},{x = 1350, y = 1433, z = 7}}, -- unique id, level needed, front of door, back of door
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local v = t[item.uid]
	if getPlayerLevel(cid) >= v[1] then
		local pos = getCreaturePosition(cid)
			if pos == v[2] then
				doTeleportThing(cid,v[3])
			elseif pos == v[3] then
				doTeleportThing(cid,v[2])
			else
				doPlayerSendTextMessage(cid, 19, "Please stand infront of the door.")
			end
	else
		doPlayerSendTextMessage(cid, 19, "Sorry you need to be atleast level "..v[1].." to enter.")
	end
	return true
end
 
Didn't work its doing the same thing.. I'm looking for the script most ots have.. when you use a quest door your automatically teleported to the other side.. and it has a blue sparkle on it.
 
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)

local pos = getCreaturePosition(cid)
	if (item.itemid == 6896) then
	local pos = getPlayerPosition(cid)
	if pos.y < toPosition.y then
		doTeleportThing(cid, {x=toPosition.x,y=toPosition.y+1,z=toPosition.z})
		doSendMagicEffect(getPlayerPosition(cid), 12)
	elseif pos.y > toPosition.y then
		doTeleportThing(cid, {x=toPosition.x,y=toPosition.y-1,z=toPosition.z})
		doSendMagicEffect(getPlayerPosition(cid), 12)
	end
	end
	end

this door is for --> direction

PS:don't forget to edit the item.itemid in script
 
It still doesn't work bah.. It still opens the door and puts me where the door is... I want it where if the door is used your automatically teleported to the other side of the door, i hate that it opens..

- - - Updated - - -

Ok I finally figured it out. thanks to everyone who helped!
 
Back
Top