Ir para conteúdo

Arena Svargrond


gocazi

Posts Recomendados

Iae galerinha do xTibia, to com um problema no meu otserver e queria a ajuda de voces.

 

É o seguinte, os players entram na Arena e quando matam o 1 bixo o teleport n eh liberado...

 

muita gente reclamando e queria saber de vocês podem me ajuda.

 

E outra coisa, sempre que adiciono um script diferente buga todas minhas actions...

 

 

 

 

@EDIT

 

valendo REP+ [1 Semana]

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

Ai estão os cripts,... repetindo o ERRO - entro na arena mato 1 bixo e n libera o teleport pro proximo.

 

Script - arenadoors

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

 

Script - arenareward

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,'Yo u found ' .. getItemName(getThing(reward).uid) .. '.')

setPlayerStorageValue(cid, 42361, 1)

else

doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'Yo u 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,'Yo u found ' .. getItemName(getThing(reward).uid) .. '.')

setPlayerStorageValue(cid, 42371, 1)

else

doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'Yo u 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, 5080, 1)

elseif item.actionid == 42382 then

reward = doCreateItemEx(7390,1)

elseif item.actionid == 42383 then

reward = doCreateItemEx(7434,1)

elseif item.actionid == 42384 then

reward = doCreateItemEx(7429,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,'Yo u found ' .. getItemName(getThing(reward).uid) .. '.')

setPlayerStorageValue(cid, 42381, 1)

else

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

end

end

return TRUE

end

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...