Tipo, o sistema de goblet (trofeu) da minha arena não ta funfando...
Aqui esta ele, alguem poderia ver o que esta de errado e me ajudar? Ou então me dar outro que funcione.
function onStepIn(cid, item, position, fromPosition)local gobletPos = getThingPos(item.uid)
if item.actionid == 42360 then
if getPlayerStorageValue(cid,42331) ~= 1 then
setPlayerStorageValue(cid,42331,1)
local goblet = doCreateItemEx(5807, 1)
doSetItemSpecialDescription(goblet, "It is given to the courageous victor of the barbarian arena at greenhorn difficulty level.\nAwarded to " .. getCreatureName(cid) .. ".")
pos = {x=gobletPos.x,y=gobletPos.y-1,z=gobletPos.z}
doSendMagicEffect(pos,12)
doTileAddItemEx({x=gobletPos.x,y=gobletPos.y-1,z=gobletPos.z}, goblet)
end
elseif item.actionid == 42370 then
if getPlayerStorageValue(cid, 42370) ~= 1 then
setPlayerStorageValue(cid, 42370, 1)
local goblet = doCreateItemEx(5806, 1)
doSetItemSpecialDescription(goblet, "It is given to the courageous victor of the barbarian arena at scrapper difficulty level.\nAwarded to " .. getCreatureName(cid) .. ".")
pos = {x=gobletPos.x,y=gobletPos.y-1,z=gobletPos.z}
doSendMagicEffect(pos,12)
doTileAddItemEx({x=gobletPos.x,y=gobletPos.y-1,z=gobletPos.z}, goblet)
end
elseif item.actionid == 42380 then
if getPlayerStorageValue(cid, 42380) ~= 1 then
setPlayerStorageValue(cid, 42380, 1)
local goblet = doCreateItemEx(5805, 1)
doSetItemSpecialDescription(goblet, "It is given to the courageous victor of the barbarian arena at warlord difficulty level.\nAwarded to " .. getCreatureName(cid) .. ".")
pos = {x=gobletPos.x,y=gobletPos.y-1,z=gobletPos.z}
doSendMagicEffect(pos,12)
doTileAddItemEx({x=gobletPos.x,y=gobletPos.y-1,z=gobletPos.z}, goblet)
end
end
doTransformItem(item.uid, item.itemid - 1)
return TRUE
end
function onStepOut(cid, item, pos)
doTransformItem(item.uid, item.itemid + 1)
return TRUE
end
Tipo nesta parte em vermelho:
if item.actionid == 42360 thenif getPlayerStorageValue(cid,42331) ~= 1 then
setPlayerStorageValue(cid,42331,1)
era pra ser o mesmo número da parte azul, mais eu mudei, porque se colocar o mesmo número da azul, o player não pode pisar no tile que cria o trofeu, porque tipo, ele não vai ter a storage id, e eu coloquei para quando o player matar o ultimo monstro ele ganhar a storage 42360 para poder pisar em cima do tile que ganha o trofeu, e se colocar a mesma, ele não vai ganhar o trofeu, pois vai constar que ele ja ganhou...
Mais continuando... quando ele pisa não cria o trofeu... e ja coloquei la certinho o actionid no piso, ja tem isto adicionado no movements.xml:
<movevent event="StepIn" actionid="42360" script="arenagoblet.lua"/><movevent event="StepIn" actionid="42370" script="arenagoblet.lua"/>
<movevent event="StepIn" actionid="42380" script="arenagoblet.lua"/>
<movevent event="StepOut" actionid="42360" script="arenagoblet.lua"/>
<movevent event="StepOut" actionid="42370" script="arenagoblet.lua"/>
<movevent event="StepOut" actionid="42380" script="arenagoblet.lua"/>
Mais nada de dar o trofeu para o player...
Gostaria que alguem me ajudasse por favor, não precisa ser este script, pode ser qualquer um que funcione, dando o trofeu com a descrição e o nome do player que ganho .
Obrigado.
aff ninguem ajuda... :S