Ir para conteúdo

[Pedido] Erro No Script Closingdoor


thebeck

Posts Recomendados

Pessoal tive um error no decorrer do tempo. Apareceu no startup:

 

[Error - MoveEvents Interface]

data/movements/scripts/closingdoor.lua:onStepOutDescription:

<luaDoTransformItem> Item Not Found

Ai esta o script

 

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

 

Leiam o que esta em vermelho... Tem alguma porta que o id -1 nao eh ela aberta ou algo assim? posso mexer no map editor vai bugar outras portas? to xeio de duvidas kkkk

abrç pessoal

 

 

----------

 

Resolvido, porta de quest, mas nao tinha essa quest nas actions.

Editado por thebeck
Link para o comentário
Compartilhar em outros sites

vai em "pasta do ot/data/movements/scripts" abre o arquivo chamado "closingdoor" e substitui tudo por este codigo

function onStepOut(cid, item, position, fromPosition)
local newPosition = {x = position.x, y = position.y, z = position.z}
if(isInArray(verticalOpenDoors, item.itemid) == TRUE) 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) == TRUE) then
		doRemoveItem(tmpItem.uid)
	else
		i = i + 1
	end
end

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

 

deois vai em "pasta do ot/data/movements" e abre o arquivo "movements.xml" e cola o codigo abaixo

 

ATENÇÃO: Antes Verifique se ja existe

 

 

	<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"/>
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...