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

Gate Of Expertise Error!

lord azteck

New Member
Joined
Jan 4, 2009
Messages
221
Reaction score
3
*UNSOLVED*
what happens is that the gate of expertise are not working on my server and i do not know why ..
when I put them look just show this..
EX:
14:06 You see a gate of expertise.

Information from the server:
- Using RL FrankFarmer map.
- Distro: [8.54] The Forgotten Server 0.3.6pl1 (Crying Damson)
- Mysql

Doors.lua scripts using:
data\actions\scripts\other\doors.lua
Code:
local function checkStackpos(item, position)
	position.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
	local thing = getThingFromPos(position)

	position.stackpos = STACKPOS_TOP_FIELD
	local field = getThingFromPos(position)

	return (item.uid == thing.uid or thing.itemid < 100 or field.itemid == 0)
end

local function doorEnter(cid, item, toPosition)
	doTransformItem(item.uid, item.itemid + 1)
	doTeleportThing(cid, toPosition)
end

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(fromPosition.x ~= CONTAINER_POSITION and isPlayerPzLocked(cid) and getTileInfo(fromPosition).protection) then
		doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
		return true
	end

	if(getItemLevelDoor(item.itemid) > 0) then
		if(item.actionid == 189) then
			if(not isPremium(cid)) then
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
				return true
			end

			doorEnter(cid, item, toPosition)
			return true
		end

		local gender = item.actionid - 186
		if(isInArray({PLAYERSEX_FEMALE,  PLAYERSEX_MALE, PLAYERSEX_GAMEMASTER}, gender)) then
			if(gender ~= getPlayerSex(cid)) then
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
				return true
			end

			doorEnter(cid, item, toPosition)
			return true
		end

		local skull = item.actionid - 180
		if(skull >= SKULL_NONE and skull <= SKULL_BLACK) then
			if(skull ~= getCreatureSkullType(cid)) then
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
				return true
			end

			doorEnter(cid, item, toPosition)
			return true
		end

		local group = item.actionid - 150
		if(group >= 0 and group < 30) then
			if(group > getPlayerGroupId(cid)) then
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
				return true
			end

			doorEnter(cid, item, toPosition)
			return true
		end

		local vocation = item.actionid - 100
		if(vocation >= 0 and vocation < 50) then
			local playerVocationInfo = getVocationInfo(getPlayerVocation(cid))
			if(playerVocationInfo.id ~= vocation and playerVocationInfo.fromVocation ~= vocation) then
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
				return true
			end

			doorEnter(cid, item, toPosition)
			return true
		end

		if(item.actionid == 190 or (item.actionid ~= 0 and getPlayerLevel(cid) >= (item.actionid - getItemLevelDoor(item.itemid)))) then
			doorEnter(cid, item, toPosition)
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
		end

		return true
	end

	if(isInArray(specialDoors, item.itemid)) then
		if(item.actionid == 100 or (item.actionid ~= 0 and getPlayerStorageValue(cid, item.actionid) > 0)) then
			doorEnter(cid, item, toPosition)
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The door seems to be sealed against unwanted intruders.")
		end

		return true
	end

	if(isInArray(keys, item.itemid)) then
		if(itemEx.actionid > 0) then
			if(item.actionid == itemEx.actionid and doors[itemEx.itemid] ~= nil) then
				doTransformItem(itemEx.uid, doors[itemEx.itemid])
				return true
			end

			doPlayerSendCancel(cid, "The key does not match.")
			return true
		end

		return false
	end

	if(isInArray(horizontalOpenDoors, item.itemid) and checkStackpos(item, fromPosition)) then
		local newPosition = toPosition
		newPosition.y = newPosition.y + 1
		local doorPosition = fromPosition
		doorPosition.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
		local doorCreature = getThingfromPos(doorPosition)
		if(doorCreature.itemid ~= 0) then
			local pzDoorPosition = getTileInfo(doorPosition).protection
			local pzNewPosition = getTileInfo(newPosition).protection
			if((pzDoorPosition and not pzNewPosition and doorCreature.uid ~= cid) or
				(not pzDoorPosition and pzNewPosition and doorCreature.uid == cid and isPlayerPzLocked(cid))) then
				doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
			else
				doTeleportThing(doorCreature.uid, newPosition)
				if(not isInArray(closingDoors, item.itemid)) then
					doTransformItem(item.uid, item.itemid - 1)
				end
			end

			return true
		end

		doTransformItem(item.uid, item.itemid - 1)
		return true
	end

	if(isInArray(verticalOpenDoors, item.itemid) and checkStackpos(item, fromPosition)) then
		local newPosition = toPosition
		newPosition.x = newPosition.x + 1
		local doorPosition = fromPosition
		doorPosition.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
		local doorCreature = getThingfromPos(doorPosition)
		if(doorCreature.itemid ~= 0) then
			if(getTileInfo(doorPosition).protection and not getTileInfo(newPosition).protection and doorCreature.uid ~= cid) then
				doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
			else
				doTeleportThing(doorCreature.uid, newPosition)
				if(not isInArray(closingDoors, item.itemid)) then
					doTransformItem(item.uid, item.itemid - 1)
				end
			end

			return true
		end

		doTransformItem(item.uid, item.itemid - 1)
		return true
	end

	if(doors[item.itemid] ~= nil and checkStackpos(item, fromPosition)) then
		if(item.actionid == 0) then
			doTransformItem(item.uid, doors[item.itemid])
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is locked.")
		end

		return true
	end

	return false
end

i think i can do it manually door by door, but i can't imagine how many exp doors are in an rl map :S

thnx 4 ur attention!
hope u guys could help me
thnx! :peace::$
 
Last edited:
Here's my Doors.lua :p try it, maybe it will work better.
Lua:
local function checkStackpos(item, position)
	position.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
	local thing = getThingFromPos(position)

	position.stackpos = STACKPOS_TOP_FIELD
	local field = getThingFromPos(position)

	return (item.uid == thing.uid or thing.itemid < 100 or field.itemid == 0)
end

local function doorEnter(cid, item, toPosition)
	doTransformItem(item.uid, item.itemid + 1)
	doTeleportThing(cid, toPosition)
end

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(fromPosition.x ~= CONTAINER_POSITION and isPlayerPzLocked(cid) and getTileInfo(fromPosition).protection) then
		doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
		return true
	end

	if(getItemLevelDoor(item.itemid) > 0) then
		if(item.actionid == 189) then
			if(not isPremium(cid)) then
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
				return true
			end

			doorEnter(cid, item, toPosition)
			return true
		end

		local gender = item.actionid - 186
		if(isInArray({PLAYERSEX_FEMALE,  PLAYERSEX_MALE, PLAYERSEX_GAMEMASTER}, gender)) then
			if(gender ~= getPlayerSex(cid)) then
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
				return true
			end

			doorEnter(cid, item, toPosition)
			return true
		end

		local skull = item.actionid - 180
		if(skull >= SKULL_NONE and skull <= SKULL_BLACK) then
			if(skull ~= getCreatureSkullType(cid)) then
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
				return true
			end

			doorEnter(cid, item, toPosition)
			return true
		end

		local group = item.actionid - 150
		if(group >= 0 and group < 30) then
			if(group > getPlayerGroupId(cid)) then
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
				return true
			end

			doorEnter(cid, item, toPosition)
			return true
		end

		local vocation = item.actionid - 100
		if(vocation >= 0 and vocation < 50) then
			local playerVocationInfo = getVocationInfo(getPlayerVocation(cid))
			if(playerVocationInfo.id ~= vocation and playerVocationInfo.fromVocation ~= vocation) then
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
				return true
			end

			doorEnter(cid, item, toPosition)
			return true
		end

		if(item.actionid == 190 or (item.actionid ~= 0 and getPlayerLevel(cid) >= (item.actionid - getItemLevelDoor(item.itemid)))) then
			doorEnter(cid, item, toPosition)
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
		end

		return true
	end

	if(isInArray(specialDoors, item.itemid)) then
		if(item.actionid == 100 or (item.actionid ~= 0 and getPlayerStorageValue(cid, item.actionid) > 0)) then
			doorEnter(cid, item, toPosition)
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The door seems to be sealed against unwanted intruders.")
		end

		return true
	end

	if(isInArray(keys, item.itemid)) then
		if(itemEx.actionid > 0) then
			if(item.actionid == itemEx.actionid and doors[itemEx.itemid] ~= nil) then
				doTransformItem(itemEx.uid, doors[itemEx.itemid])
				return true
			end

			doPlayerSendCancel(cid, "The key does not match.")
			return true
		end

		return false
	end

	if(isInArray(horizontalOpenDoors, item.itemid) and checkStackpos(item, fromPosition)) then
		local newPosition = toPosition
		newPosition.y = newPosition.y + 1
		local doorPosition = fromPosition
		doorPosition.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
		local doorCreature = getThingfromPos(doorPosition)
		if(doorCreature.itemid ~= 0) then
			local pzDoorPosition = getTileInfo(doorPosition).protection
			local pzNewPosition = getTileInfo(newPosition).protection
			if((pzDoorPosition and not pzNewPosition and doorCreature.uid ~= cid) or
				(not pzDoorPosition and pzNewPosition and doorCreature.uid == cid and isPlayerPzLocked(cid))) then
				doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
			else
				doTeleportThing(doorCreature.uid, newPosition)
				if(not isInArray(closingDoors, item.itemid)) then
					doTransformItem(item.uid, item.itemid - 1)
				end
			end

			return true
		end

		doTransformItem(item.uid, item.itemid - 1)
		return true
	end

	if(isInArray(verticalOpenDoors, item.itemid) and checkStackpos(item, fromPosition)) then
		local newPosition = toPosition
		newPosition.x = newPosition.x + 1
		local doorPosition = fromPosition
		doorPosition.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
		local doorCreature = getThingfromPos(doorPosition)
		if(doorCreature.itemid ~= 0) then
			if(getTileInfo(doorPosition).protection and not getTileInfo(newPosition).protection and doorCreature.uid ~= cid) then
				doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
			else
				doTeleportThing(doorCreature.uid, newPosition)
				if(not isInArray(closingDoors, item.itemid)) then
					doTransformItem(item.uid, item.itemid - 1)
				end
			end

			return true
		end

		doTransformItem(item.uid, item.itemid - 1)
		return true
	end

	if(doors[item.itemid] ~= nil and checkStackpos(item, fromPosition)) then
		if(item.actionid == 0) then
			doTransformItem(item.uid, doors[item.itemid])
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is locked.")
		end

		return true
	end

	return false
end
 
@JoccE
doesn't working ur doors.lua :S

when i look the doors with gm it says this:
EX
16:14 You are hasted.
16:14 You see a gate of expertise.
ItemID: [1227], ActionID: [1100].
Position: [X: 33214] [Y: 31671] [Z: 13].
 
I'm sorry to say this but the only way to fix this is to replace your items.xml I had the same problem This will ruin some specialid things and your costum items but nothing unreplacable in trade you get working gates of expertise and working npcs (be sure to get a 8.54 one)

Rep me if this helps you :)
 
If its fixed by replacing the items.xml its probably also fixed by just replacing the part with the gate of expertise doors.
I'll search for mine and post them in a second. (Tfs 0.3.6pl1)

Lua:
	<item id="1227" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="1228" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
	<item id="1229" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="1230" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
Lua:
	<item id="1245" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="1246" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
	<item id="1247" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="1248" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
Lua:
	<item id="1259" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="1260" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
	<item id="1261" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="1262" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
Lua:
	<item id="3540" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="3541" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
Lua:
	<item id="3549" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="3550" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
Lua:
	<item id="5103" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="5104" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
Lua:
	<item id="5112" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="5113" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
Lua:
	<item id="5121" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="5122" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
Lua:
	<item id="5130" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="5131" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
Lua:
	<item id="5292" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="5293" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
	<item id="5294" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="5295" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
Lua:
	<item id="6206" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="6207" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
	<item id="6208" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="6209" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
Lua:
	<item id="6263" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="6264" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
	<item id="6265" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="6266" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
Lua:
	<item id="6896" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="6897" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
Lua:
	<item id="6905" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="6906" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
Lua:
	<item id="7038" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="7039" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
Lua:
	<item id="7047" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="7048" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
Lua:
	<item id="8555" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="8556" article="an" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
	<item id="8557" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="8558" article="an" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
Lua:
	<item id="9179" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="9180" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
	<item id="9181" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="9182" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
Lua:
	<item id="9281" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="9282" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
	<item id="9283" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="9284" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
Lua:
	<item id="10282" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="10283" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
	<item id="10284" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="10285" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
Lua:
	<item id="10473" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="10474" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
Lua:
	<item id="10482" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="10483" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
Lua:
	<item id="10779" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="10780" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>
Lua:
	<item id="10788" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
		<attribute key="levelDoor" value="1000" />
		<attribute key="blockprojectile" value="1" />
	</item>
	<item id="10789" article="a" name="gate of expertise">
		<attribute key="type" value="door" />
	</item>


Its alot but only took me 15 mins, if you use the right editor (i'm using notepad++) you'll be able to fix them.

Good luck, its better than removing all custom items.
 
Last edited:

Similar threads

Back
Top