Jump to content

[Encerrado] Ajuda com problema nas porta do mapa do meu poketibia


Duhisback

Recommended Posts

Olá pessoa estou aqui a um pedido de ajuda ou socorro quem poder min ajudar ficarei muito agradecido e vou dar rep + estou com problema nas portas de todo o mapa do meu poketibia tipo "quando abro a porta de quest ele entra e sai" ou seja ele entra na porta e volta pra traz na mesma hora já botei varias source pensando que o problema era na source mais não é já encontrei vários tópicos nesse e em outros fórum mais não tem resposta pra isso alguém pode tentar min ajudar?

Link to comment
Share on other sites

Posta o script doors.lua que provavelmente está em:

Data/actions/other/

 

 

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

 

 

 

tipo agora ele tá abrindo ai entra e volta ai quando clico dnv abre ai se clicar outra vez fecha a porta mais n passa por ela de jeito nenhum

 

A imagem explica direito

2jfltfm.jpg

Edited by Eduzinhonho
Link to comment
Share on other sites

 

 

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

 

 

 

tipo agora ele tá abrindo ai entra e volta ai quando clico dnv abre ai se clicar outra vez fecha a porta mais n passa por ela de jeito nenhum

 

A imagem explica direito

2jfltfm.jpg

Se eu não estiver enganado, o problema não é no script e sim nas sprites. eu acho que uma vez deu isso comigo, eu resolvi usando o Item Editor, como já faz muito tempo, não sei se é o mesmo problema do seu.

Link to comment
Share on other sites

Se eu não estiver enganado, o problema não é no script e sim nas sprites. eu acho que uma vez deu isso comigo, eu resolvi usando o Item Editor, como já faz muito tempo, não sei se é o mesmo problema do seu.

 

Eu já comparei com as porta de outro ot e tá igual

@Up

Link to comment
Share on other sites

  • Diretor

Cara não tem nada haver com as sprites kkk isso é problema no movements ou no actions .

Vai em \data\actions\scripts

 

Abra o arquivo leveldoor.lua e substitue tudo por isto:

function onUse(cid, item, frompos, item2, topos)

			if getPlayerLevel(cid) >= item.actionid - 1000 then

				doTransformItem(item.uid, item.itemid + 1)

				playerpos = getPlayerPosition(cid)

				doorpos = {x = frompos.x, y = frompos.y, z = frompos.z, stackpos = 253}

				if playerpos.y == doorpos.y + 1 and playerpos.x == doorpos.x then

					doMoveCreature(cid, 0)

				elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y then

					doMoveCreature(cid, 1)

				elseif playerpos.y == doorpos.y - 1 and playerpos.x == doorpos.x then

					doMoveCreature(cid, 2)

				elseif playerpos.y == doorpos.y and playerpos.x == doorpos.x + 1 then

					doMoveCreature(cid, 3)

				elseif playerpos.x == doorpos.x + 1 and playerpos.y == doorpos.y - 1 then

					doMoveCreature(cid, 4)

				elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y - 1 then

					doMoveCreature(cid, 5)

				elseif playerpos.x == doorpos.x + 1 and playerpos.y == doorpos.y + 1 then

					doMoveCreature(cid, 6)

				elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y + 1 then

					doMoveCreature(cid, 7)

				end

			else
					doPlayerSendTextMessage(cid, 22, "Você precisa de "..(item.actionid - 1000).." de level para passar esta porta.")

			end

    return 1

end

Se precisar da TAG estarei deixando aqui. Creio que você já tenha ela então verifique.

 

 

 

<action itemid="1227" script="leveldoor.lua" />
<action itemid="1229" script="leveldoor.lua" />
<action itemid="1245" script="leveldoor.lua" />
<action itemid="1247" script="leveldoor.lua" />
<action itemid="1259" script="leveldoor.lua" />
<action itemid="1261" script="leveldoor.lua" />
<action itemid="6206" script="leveldoor.lua" />
<action itemid="6208" script="leveldoor.lua" />
<action itemid="6263" script="leveldoor.lua" />
<action itemid="6265" script="leveldoor.lua" />

 

 

 

O erro pode ocorrer também no movements, exemplo: na hora de você passar na porta ela fica aberta e não fecha...

Vai em \data\movements\scripts

E abra o closingdoor.lua e cole isto dentro:

function onStepOut(cid, item, position, fromPosition)
	local newPosition = {x = position.x, y = position.y, z = position.z}
	if(isInArray(verticalOpenDoors, item.itemid)) then
		newPosition.x = newPosition.x + 1
	else
		newPosition.y = newPosition.y + 1
	end

	doRelocate(position, newPosition)
	local tmpPos = {x = position.x, y = position.y, z = position.z, stackpos = -1}
	local tileCount = getTileThingByPos(tmpPos)

	local i = 1
	local tmpItem = {uid = 1}
	while(tmpItem.uid ~= 0 and i < tileCount) do
		tmpPos.stackpos = i
		tmpItem = getTileThingByPos(tmpPos)
		if(tmpItem.uid ~= item.uid and tmpItem.uid ~= 0 and isMoveable(tmpItem.uid)) then
			doRemoveItem(tmpItem.uid)
		else
			i = i + 1
		end
	end

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

Se caso não funcionar acho que tem mais uma script...

 

Abra o walkback.lua e cole isto dentro:

local SPECIAL_QUESTS = {2001}

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
	if(not isPlayer(cid)) then
		return true
	end

	if(isContainer(item.uid)) then
		if(not isInArray(SPECIAL_QUESTS, item.actionid) and item.uid > 65535) then
			return true
		end
	elseif(getTileInfo(position).creatures <= 1) then
		return true
	end
	
	if(fromPosition.x == 0) then -- player just logged in
		fromPosition = getTownTemplePosition(getPlayerTown(cid))
		doSendMagicEffect(fromPosition, CONST_ME_TELEPORT)
	end

	doTeleportThing(cid, fromPosition, true)
	return true
end

Se precisar das TAG estarei deixando, creio que você já tem.

 

 

<!-- Walkback when walking on quest chest -->
<movevent type="StepIn" itemid="1738" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="1740" event="script" value="walkback.lua"/>
<movevent type="StepIn" fromid="1746" toid="1749" event="script" value="walkback.lua"/>
<!-- (Level & quest) doors -->
<movevent type="StepOut" itemid="1228" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="1230" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="1246" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="1248" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="1260" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="1262" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="3541" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="3550" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="5104" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="5113" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="5122" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="5131" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="5293" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="5295" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="1224" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="1226" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="1242" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="1244" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="1256" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="1258" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="3543" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="3552" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="5106" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="5115" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="5124" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="5133" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="5289" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="5291" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="5746" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="5749" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="6203" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="6205" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="6207" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="6209" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="6260" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="6262" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="6264" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="6266" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="6897" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="6899" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="6906" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="6908" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="7039" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="7041" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="7048" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="7050" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="8552" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="8554" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="8556" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="8558" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="9176" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="9178" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="9180" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="9182" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="9278" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="9280" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="9282" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="9284" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="10279" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="10281" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="10283" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="10285" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="10474" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="10476" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="10483" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="10485" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="10783" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="10785" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="10792" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="10794" event="script" value="closingdoor.lua"/>
<movevent type="StepIn" itemid="1228" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="1230" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="1246" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="1248" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="1260" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="1262" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="3541" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="3550" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="5104" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="5113" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="5122" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="5131" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="5293" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="5295" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="1224" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="1226" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="1242" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="1244" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="1256" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="1258" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="3543" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="3552" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="5106" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="5115" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="5124" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="5133" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="5289" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="5291" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="5746" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="5749" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="6203" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="6205" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="6207" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="6209" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="6260" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="6262" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="6264" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="6266" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="6897" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="6899" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="6906" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="6908" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="7039" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="7041" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="7048" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="7050" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="8552" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="8554" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="8556" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="8558" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="9176" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="9178" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="9180" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="9182" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="9278" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="9280" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="9282" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="9284" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="10279" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="10281" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="10283" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="10285" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="10474" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="10476" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="10483" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="10485" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="10783" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="10785" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="10792" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="10794" event="script" value="walkback.lua"/>

 

 

Edited by nedroesdoksdja
Link to comment
Share on other sites

Cara não tem nada haver com as sprites kkk isso é problema no movements ou no actions .

 

Vai em \data\actions\scripts

 

Abra o arquivo leveldoor.lua e substitue tudo por isto:

function onUse(cid, item, frompos, item2, topos)

			if getPlayerLevel(cid) >= item.actionid - 1000 then

				doTransformItem(item.uid, item.itemid + 1)

				playerpos = getPlayerPosition(cid)

				doorpos = {x = frompos.x, y = frompos.y, z = frompos.z, stackpos = 253}

				if playerpos.y == doorpos.y + 1 and playerpos.x == doorpos.x then

					doMoveCreature(cid, 0)

				elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y then

					doMoveCreature(cid, 1)

				elseif playerpos.y == doorpos.y - 1 and playerpos.x == doorpos.x then

					doMoveCreature(cid, 2)

				elseif playerpos.y == doorpos.y and playerpos.x == doorpos.x + 1 then

					doMoveCreature(cid, 3)

				elseif playerpos.x == doorpos.x + 1 and playerpos.y == doorpos.y - 1 then

					doMoveCreature(cid, 4)

				elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y - 1 then

					doMoveCreature(cid, 5)

				elseif playerpos.x == doorpos.x + 1 and playerpos.y == doorpos.y + 1 then

					doMoveCreature(cid, 6)

				elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y + 1 then

					doMoveCreature(cid, 7)

				end

			else
					doPlayerSendTextMessage(cid, 22, "Você precisa de "..(item.actionid - 1000).." de level para passar esta porta.")

			end

    return 1

end

Se precisar da TAG estarei deixando aqui. Creio que você já tenha ela então verifique.

 

 

 

<action itemid="1227" script="leveldoor.lua" />
<action itemid="1229" script="leveldoor.lua" />
<action itemid="1245" script="leveldoor.lua" />
<action itemid="1247" script="leveldoor.lua" />
<action itemid="1259" script="leveldoor.lua" />
<action itemid="1261" script="leveldoor.lua" />
<action itemid="6206" script="leveldoor.lua" />
<action itemid="6208" script="leveldoor.lua" />
<action itemid="6263" script="leveldoor.lua" />
<action itemid="6265" script="leveldoor.lua" />

 

 

 

O erro pode ocorrer também no movements, exemplo: na hora de você passar na porta ela fica aberta e não fecha...

Vai em \data\movements\scripts

 

E abra o closingdoor.lua e cole isto dentro:

function onStepOut(cid, item, position, fromPosition)
	local newPosition = {x = position.x, y = position.y, z = position.z}
	if(isInArray(verticalOpenDoors, item.itemid)) then
		newPosition.x = newPosition.x + 1
	else
		newPosition.y = newPosition.y + 1
	end

	doRelocate(position, newPosition)
	local tmpPos = {x = position.x, y = position.y, z = position.z, stackpos = -1}
	local tileCount = getTileThingByPos(tmpPos)

	local i = 1
	local tmpItem = {uid = 1}
	while(tmpItem.uid ~= 0 and i < tileCount) do
		tmpPos.stackpos = i
		tmpItem = getTileThingByPos(tmpPos)
		if(tmpItem.uid ~= item.uid and tmpItem.uid ~= 0 and isMoveable(tmpItem.uid)) then
			doRemoveItem(tmpItem.uid)
		else
			i = i + 1
		end
	end

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

Se caso não funcionar acho que tem mais uma script...

 

Abra o walkback.lua e cole isto dentro:

local SPECIAL_QUESTS = {2001}

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
	if(not isPlayer(cid)) then
		return true
	end

	if(isContainer(item.uid)) then
		if(not isInArray(SPECIAL_QUESTS, item.actionid) and item.uid > 65535) then
			return true
		end
	elseif(getTileInfo(position).creatures <= 1) then
		return true
	end
	
	if(fromPosition.x == 0) then -- player just logged in
		fromPosition = getTownTemplePosition(getPlayerTown(cid))
		doSendMagicEffect(fromPosition, CONST_ME_TELEPORT)
	end

	doTeleportThing(cid, fromPosition, true)
	return true
end

Se precisar das TAG estarei deixando, creio que você já tem.

 

 

<!-- Walkback when walking on quest chest -->
<movevent type="StepIn" itemid="1738" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="1740" event="script" value="walkback.lua"/>
<movevent type="StepIn" fromid="1746" toid="1749" event="script" value="walkback.lua"/>
<!-- (Level & quest) doors -->
<movevent type="StepOut" itemid="1228" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="1230" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="1246" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="1248" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="1260" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="1262" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="3541" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="3550" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="5104" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="5113" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="5122" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="5131" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="5293" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="5295" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="1224" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="1226" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="1242" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="1244" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="1256" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="1258" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="3543" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="3552" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="5106" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="5115" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="5124" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="5133" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="5289" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="5291" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="5746" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="5749" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="6203" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="6205" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="6207" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="6209" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="6260" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="6262" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="6264" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="6266" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="6897" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="6899" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="6906" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="6908" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="7039" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="7041" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="7048" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="7050" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="8552" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="8554" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="8556" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="8558" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="9176" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="9178" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="9180" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="9182" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="9278" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="9280" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="9282" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="9284" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="10279" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="10281" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="10283" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="10285" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="10474" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="10476" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="10483" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="10485" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="10783" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="10785" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="10792" event="script" value="closingdoor.lua"/>
<movevent type="StepOut" itemid="10794" event="script" value="closingdoor.lua"/>
<movevent type="StepIn" itemid="1228" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="1230" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="1246" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="1248" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="1260" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="1262" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="3541" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="3550" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="5104" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="5113" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="5122" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="5131" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="5293" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="5295" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="1224" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="1226" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="1242" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="1244" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="1256" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="1258" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="3543" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="3552" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="5106" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="5115" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="5124" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="5133" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="5289" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="5291" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="5746" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="5749" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="6203" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="6205" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="6207" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="6209" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="6260" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="6262" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="6264" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="6266" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="6897" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="6899" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="6906" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="6908" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="7039" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="7041" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="7048" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="7050" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="8552" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="8554" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="8556" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="8558" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="9176" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="9178" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="9180" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="9182" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="9278" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="9280" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="9282" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="9284" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="10279" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="10281" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="10283" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="10285" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="10474" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="10476" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="10483" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="10485" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="10783" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="10785" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="10792" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="10794" event="script" value="walkback.lua"/>

 

 

 

Lembrando que o servidor é de pokemon poketibia o walkback dele é esse \/

 

 

 

local SPECIAL_QUESTS = {2001}

local fotos = {

["Bulbasaur"] = {fotopoke = 2377},

["Ivysaur"] = {fotopoke = 2378},

["Venusaur"] = {fotopoke = 2379},

["Charmander"] = {fotopoke = 2380},

["Charmeleon"] = {fotopoke = 2381},

["Charizard"] = {fotopoke = 2382},

["Squirtle"] = {fotopoke = 2383},

["Wartortle"] = {fotopoke = 2384},

["Blastoise"] = {fotopoke = 2385},

["Caterpie"] = {fotopoke = 2386},

["Metapod"] = {fotopoke = 2387},

["Butterfree"] = {fotopoke = 2388},

["Weedle"] = {fotopoke = 2389},

["Kakuna"] = {fotopoke = 2390},

["Beedrill"] = {fotopoke = 2391},

["Pidgey"] = {fotopoke = 2392},

["Pidgeotto"] = {fotopoke = 2393},

["Pidgeot"] = {fotopoke = 2394},

["Rattata"] = {fotopoke = 2395},

["Raticate"] = {fotopoke = 2396},

["Spearow"] = {fotopoke = 2397},

["Fearow"] = {fotopoke = 2398},

["Ekans"] = {fotopoke = 2399},

["Arbok"] = {fotopoke = 2400},

["Pikachu"] = {fotopoke = 2401},

["Raichu"] = {fotopoke = 2402},

["Sandshrew"] = {fotopoke = 2403},

["Sandslash"] = {fotopoke = 2404},

["Nidoran female"] = {fotopoke = 2405},

["Nidorina"] = {fotopoke = 2406},

["Nidoqueen"] = {fotopoke = 2407},

["Nidoran male"] = {fotopoke = 2408},

["Nidorino"] = {fotopoke = 2409},

["Nidoking"] = {fotopoke = 2410},

["Clefairy"] = {fotopoke = 2411},

["Clefable"] = {fotopoke = 2412},

["Vulpix"] = {fotopoke = 2413},

["Ninetales"] = {fotopoke = 2414},

["Jigglypuff"] = {fotopoke = 2415},

["Wigglytuff"] = {fotopoke = 2416},

["Zubat"] = {fotopoke = 2417},

["Golbat"] = {fotopoke = 2418},

["Oddish"] = {fotopoke = 2419},

["Gloom"] = {fotopoke = 2420},

["Vileplume"] = {fotopoke = 2421},

["Paras"] = {fotopoke = 2422},

["Parasect"] = {fotopoke = 2423},

["Venonat"] = {fotopoke = 2424},

["Venomoth"] = {fotopoke = 2425},

["Diglett"] = {fotopoke = 2426},

["Dugtrio"] = {fotopoke = 2427},

["Meowth"] = {fotopoke = 2428},

["Persian"] = {fotopoke = 2429},

["Psyduck"] = {fotopoke = 2430},

["Golduck"] = {fotopoke = 2431},

["Mankey"] = {fotopoke = 2432},

["Primeape"] = {fotopoke = 2433},

["Growlithe"] = {fotopoke = 2434},

["Arcanine"] = {fotopoke = 2435},

["Poliwag"] = {fotopoke = 2436},

["Poliwhirl"] = {fotopoke = 2437},

["Poliwrath"] = {fotopoke = 2438},

["Abra"] = {fotopoke = 2439},

["Kadabra"] = {fotopoke = 2440},

["Alakazam"] = {fotopoke = 2441},

["Machop"] = {fotopoke = 2442},

["Machoke"] = {fotopoke = 2443},

["Machamp"] = {fotopoke = 2444},

["Bellsprout"] = {fotopoke = 2445},

["Weepinbell"] = {fotopoke = 2446},

["Victreebel"] = {fotopoke = 2447},

["Tentacool"] = {fotopoke = 2448},

["Tentacruel"] = {fotopoke = 2449},

["Geodude"] = {fotopoke = 2450},

["Graveler"] = {fotopoke = 2451},

["Golem"] = {fotopoke = 2452},

["Ponyta"] = {fotopoke = 2453},

["Rapidash"] = {fotopoke = 2454},

["Slowpoke"] = {fotopoke = 2455},

["Slowbro"] = {fotopoke = 2456},

["Magnemite"] = {fotopoke = 2457},

["Magneton"] = {fotopoke = 2458},

["Farfetch'd"] = {fotopoke = 2459},

["Doduo"] = {fotopoke = 2460},

["Dodrio"] = {fotopoke = 2461},

["Seel"] = {fotopoke = 2462},

["Dewgong"] = {fotopoke = 2463},

["Grimer"] = {fotopoke = 2464},

["Muk"] = {fotopoke = 2465},

["Shellder"] = {fotopoke = 2466},

["Cloyster"] = {fotopoke = 2467},

["Gastly"] = {fotopoke = 2468},

["Haunter"] = {fotopoke = 2469},

["Gengar"] = {fotopoke = 2470},

["Onix"] = {fotopoke = 2471},

["Drowzee"] = {fotopoke = 2472},

["Hypno"] = {fotopoke = 2473},

["Krabby"] = {fotopoke = 2474},

["Kingler"] = {fotopoke = 2475},

["Voltorb"] = {fotopoke = 2476},

["Electrode"] = {fotopoke = 2477},

["Exeggcute"] = {fotopoke = 2478},

["Exeggutor"] = {fotopoke = 2479},

["Cubone"] = {fotopoke = 2480},

["Marowak"] = {fotopoke = 2481},

["Hitmonlee"] = {fotopoke = 2482},

["Hitmonchan"] = {fotopoke = 2483},

["Lickitung"] = {fotopoke = 2484},

["Koffing"] = {fotopoke = 2485},

["Weezing"] = {fotopoke = 2486},

["Rhyhorn"] = {fotopoke = 2487},

["Rhydon"] = {fotopoke = 2488},

["Chansey"] = {fotopoke = 2489},

["Tangela"] = {fotopoke = 2490},

["Kangaskhan"] = {fotopoke = 2491},

["Horsea"] = {fotopoke = 2492},

["Seadra"] = {fotopoke = 2493},

["Goldeen"] = {fotopoke = 2494},

["Seaking"] = {fotopoke = 2495},

["Staryu"] = {fotopoke = 2496},

["Starmie"] = {fotopoke = 2497},

["Mr. mime"] = {fotopoke = 2498},

["Scyther"] = {fotopoke = 2499},

["Jynx"] = {fotopoke = 2500},

["Electabuzz"] = {fotopoke = 2501},

["Magmar"] = {fotopoke = 2502},

["Pinsir"] = {fotopoke = 2503},

["Tauros"] = {fotopoke = 2504},

["Magikarp"] = {fotopoke = 2505},

["Gyarados"] = {fotopoke = 2506},

["Lapras"] = {fotopoke = 2507},

["Ditto"] = {fotopoke = 2508},

["Eevee"] = {fotopoke = 2509},

["Vaporeon"] = {fotopoke = 2510},

["Jolteon"] = {fotopoke = 2511},

["Flareon"] = {fotopoke = 2512},

["Porygon"] = {fotopoke = 2513},

["Omanyte"] = {fotopoke = 2514},

["Omastar"] = {fotopoke = 2515},

["Kabuto"] = {fotopoke = 2516},

["Kabutops"] = {fotopoke = 2517},

["Aerodactyl"] = {fotopoke = 2518},

["Snorlax"] = {fotopoke = 2519},

["Articuno"] = {fotopoke = 2520},

["Zapdos"] = {fotopoke = 2521},

["Moltres"] = {fotopoke = 2522},

["Dratini"] = {fotopoke = 2523},

["Dragonair"] = {fotopoke = 2524},

["Dragonite"] = {fotopoke = 2525},

["Mewtwo"] = {fotopoke = 2526},

["Mew"] = {fotopoke = 2527},

}

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)

doTeleportThing(cid, fromPosition)

end

 

 

 

Link to comment
Share on other sites

  • Diretor

 

Lembrando que o servidor é de pokemon poketibia o walkback dele é esse \/

 

 

Tendi... Dessa não sabia tente apenas os outros se também for dessa forma de pokémon e tals, recomendo que tu tente achar um outro servidor e pegar um desses arquivos.

 

Mais creio que o problema esteja no actions ou no movements, dei uma olhada aqui no seu doors.lua e não vi nada de errado...

Edited by nedroesdoksdja
Link to comment
Share on other sites

 

Tendi... Dessa não sabia tente apenas os outros se também for dessa forma de pokémon e tals, recomendo que tu tente achar um outro servidor e pegar um desses arquivos.

 

Mais creio que o problema esteja no actions ou no movements, dei uma olhada aqui no seu doors.lua e não vi nada de errado...

 

Eu ja modifiquei esse que tu min mandou agora só tou com problema no script actions/other/doors tipo tá passando por cima da porta mais não tá transformando a porta fechada na porta aberta quando entra vi que o problema é nessa linha \/

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

modifiquei essa linha

botei pra trocar por HD 2160 ai veio o item 2152 que é Dollar e depois modifiquei ai passava por cima da porta mas não transforma ela fechada por ela aberta

doTransformItem(item.uid, item.itemid + 1)

Script completo \/

 

 

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

 

 

Edited by Eduzinhonho
Link to comment
Share on other sites

  • Diretor

Não entendi muito bem, mais no meu eu clico na porta fechada e ela abre, ficando o personagem em cima dela, dentro dela. ai é so eu sair ou entrar... é isso que você quer? ou você quer que quando clica na porta já pula pro outro lado sem a porta abrir?

 

Meu doors.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

Creio que esta igual o seu, no meu funciona direitinho.

Link to comment
Share on other sites

Não entendi muito bem, mais no meu eu clico na porta fechada e ela abre, ficando o personagem em cima dela, dentro dela. ai é so eu sair ou entrar... é isso que você quer? ou você quer que quando clica na porta já pula pro outro lado sem a porta abrir?

 

Meu doors.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

Creio que esta igual o seu, no meu funciona direitinho.

 

Olá cara eu testei esse que tu mandou e ficou assim veja a imagem

 

2ekltl0.gif

 

Obs: teu servidor é de tibia ou poketibia?

tem como você mandar o script pra quando clicar na porta teletransportar pro outro lado? pra min testar

 

 

Link to comment
Share on other sites

Substitui isso:

 

doorEnter(cid, item, toPosition)

 

Por isto:

 

doorEnter(cid, item, fromPosition)

 

Todas essas linhas é pra substituir é ou somente a primeira \/

 

doorEnter(cid, item, toPosition)

Consegui resolver o problema depois posto e explico o que fiz

Edited by Eduzinhonho
Link to comment
Share on other sites

  • 4 months later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...