Ir para conteúdo

[Encerrado] Bug Na Arena


Himmler

Posts Recomendados

Boa Noite.

 

 

Estou tendo um problema com a arena do meu server, uso o REAL SERVER 2.2.3.

 

 

O problema é o seguinte: O PLAYER compra a entrada pra arena normalmente, ai ele vai la entrar no Teleport pra começar a arena e aparece a seguinte mensagem: FIRST KILL MONSTER!. Como se ele estivesse tentando entrar no teleporta pra proxima sala ja de dentro da arena, e nao tivesse matado o monstro.

 

Aqui segue uma foto:

 

bugarena.jpg

 

Uploaded with ImageShack.us

 

 

Vou postar aqui os scripts que tenho referente a Arena.

 

 

Arenadoors.lua

function onUse(cid, item, fromPosition, itemEx, toPosition)

local cidPosition = getCreaturePosition(cid)

if item.actionid ~= 42357 then

if (item.actionid == 42366 and getPlayerStorageValue(cid,42355) >= 1) or (item.actionid == 42376 and getPlayerStorageValue(cid,42355) >= 2) or (item.actionid == 42386 and getPlayerStorageValue(cid,42355) == 3) then

if cidPosition.x < toPosition.x then

doTeleportThing(cid, {x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, TRUE)

else

doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)

end

return TRUE

else

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You can not enter room.")

return TRUE

end

elseif (item.actionid == 42357 and getPlayerStorageValue(cid,42351) == 1) then

if cidPosition.x < toPosition.x then

doTeleportThing(cid, {x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, TRUE)

else

doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)

end

return TRUE

else

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You must pay first.")

return TRUE

end

return FALSE

end

 

 

Arenareward.lua

function onUse(cid, item, fromPosition, itemEx, toPosition)

if item.actionid >= 42361 and item.actionid <= 42365 and getPlayerStorageValue(cid, 42361) ~= 1 then

local reward = 0

if item.actionid == 42361 then

reward = doCreateItemEx(1990,1)

doAddContainerItem(reward, 7372, 1)

doAddContainerItem(reward, 6569, 10)

doAddContainerItem(reward, 6574, 1)

doAddContainerItem(reward, 2114, 1)

elseif item.actionid == 42362 then

reward = doCreateItemEx(7406,1)

elseif item.actionid == 42363 then

reward = doCreateItemEx(7380,1)

elseif item.actionid == 42364 then

reward = doCreateItemEx(7392,1)

elseif item.actionid == 42365 then

reward = doCreateItemEx(7342,1)

doAddContainerItem(reward, 7365, 100)

doAddContainerItem(reward, 7364, 100)

end

if doPlayerAddItemEx(cid, reward, 0) == RETURNVALUE_NOERROR then

doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'You found ' .. getItemName(getThing(reward).uid) .. '.')

setPlayerStorageValue(cid, 42361, 1)

else

doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'You do not have enought capacity or place in backpack.')

end

elseif item.actionid >= 42371 and item.actionid <= 42375 and getPlayerStorageValue(cid, 42371) ~= 1 then

local reward = 0

if item.actionid == 42371 then

reward = doCreateItemEx(1990,1)

doAddContainerItem(reward, 7372, 1)

doAddContainerItem(reward, 6569, 10)

doAddContainerItem(reward, 6574, 1)

doAddContainerItem(reward, 7183, 1)

elseif item.actionid == 42372 then

reward = doCreateItemEx(7384,1)

elseif item.actionid == 42373 then

reward = doCreateItemEx(7389,1)

elseif item.actionid == 42374 then

reward = doCreateItemEx(7415,1)

elseif item.actionid == 42375 then

reward = doCreateItemEx(7342,1)

doAddContainerItem(reward, 7365, 100)

doAddContainerItem(reward, 2547, 100)

doAddContainerItem(reward, 2547, 100)

doAddContainerItem(reward, 2311, 50)

doAddContainerItem(reward, 2304, 50)

end

if doPlayerAddItemEx(cid, reward, 0) == RETURNVALUE_NOERROR then

doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'You found ' .. getItemName(getThing(reward).uid) .. '.')

setPlayerStorageValue(cid, 42371, 1)

else

doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'You do not have enought capacity or place in backpack.')

end

elseif item.actionid >= 42381 and item.actionid <= 42385 and getPlayerStorageValue(cid, 42381) ~= 1 then

local reward = 0

if item.actionid == 42381 then

reward = doCreateItemEx(1990,1)

doAddContainerItem(reward, 7372, 1)

doAddContainerItem(reward, 6569, 10)

doAddContainerItem(reward, 6574, 1)

doAddContainerItem(reward, 6568, 1)

elseif item.actionid == 42382 then

reward = doCreateItemEx(7429,1)

elseif item.actionid == 42383 then

reward = doCreateItemEx(7434,1)

elseif item.actionid == 42384 then

reward = doCreateItemEx(7390,1)

elseif item.actionid == 42385 then

reward = doCreateItemEx(7342,1)

doAddContainerItem(reward, 2273, 50)

doAddContainerItem(reward, 2268, 50)

doAddContainerItem(reward, 7443, 1)

doAddContainerItem(reward, 7440, 1)

doAddContainerItem(reward, 6529, 100)

end

if doPlayerAddItemEx(cid, reward, 0) == RETURNVALUE_NOERROR then

doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'You found ' .. getItemName(getThing(reward).uid) .. '.')

setPlayerStorageValue(cid, 42381, 1)

else

doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'You do not have enought capacity or place in backpack.')

end

end

return TRUE

end

 

Parte da Arena no ACTIONS.XML

<!-- Arena Svargrond -->

<action actionid="42366" script="arena/arenadoors.lua"/>

<action actionid="42376" script="arena/arenadoors.lua"/>

<action actionid="42386" script="arena/arenadoors.lua"/>

<action actionid="42357" script="arena/arenadoors.lua"/>

<action actionid="42361" script="arena/arenareward.lua"/>

<action actionid="42362" script="arena/arenareward.lua"/>

<action actionid="42363" script="arena/arenareward.lua"/>

<action actionid="42364" script="arena/arenareward.lua"/>

<action actionid="42365" script="arena/arenareward.lua"/>

<action actionid="42371" script="arena/arenareward.lua"/>

<action actionid="42372" script="arena/arenareward.lua"/>

<action actionid="42373" script="arena/arenareward.lua"/>

<action actionid="42374" script="arena/arenareward.lua"/>

<action actionid="42375" script="arena/arenareward.lua"/>

<action actionid="42381" script="arena/arenareward.lua"/>

<action actionid="42382" script="arena/arenareward.lua"/>

<action actionid="42383" script="arena/arenareward.lua"/>

<action actionid="42384" script="arena/arenareward.lua"/>

<action actionid="42385" script="arena/arenareward.lua"/>

 

 

Agradeço desde já.

Link para o comentário
Compartilhar em outros sites

  • 1 year later...
  • 6 years later...
A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta.

+ Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda.
* Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado.
Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...