Ir para conteúdo

[ Resolvido ] [action]


Fickss10

Posts Recomendados

eu fiz uma quest bem dificilzinha e colokei no final uns baus e tals mas um script não funciona :X

 

-- Inquisition chests

 

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

 

if item.uid == 7580 then

queststatus = getPlayerStorageValue(cid,7070)

if queststatus == -1 then

doPlayerSendTextMessage(cid,22,"You have found a Ultra Haze Sword.")

doPlayerAddItem(cid,7959,1)

setPlayerStorageValue(cid,7070,1)

else

doPlayerSendTextMessage(cid,22,"It is empty.")

end

elseif item.uid == 7581 then

queststatus = getPlayerStorageValue(cid,7070)

if queststatus == -1 then

doPlayerSendTextMessage(cid,22,"You have found a Ultra Haze Wand.")

doPlayerAddItem(cid,7429,1)

setPlayerStorageValue(cid,7070,1)

else

doPlayerSendTextMessage(cid,22,"It is empty.")

end

elseif item.uid == 7582 then

queststatus = getPlayerStorageValue(cid,7070)

if queststatus == -1 then

doPlayerSendTextMessage(cid,22,"You have found a Ultra Haze Rod.")

doPlayerAddItem(cid,7410,1)

setPlayerStorageValue(cid,7070,1)

else

doPlayerSendTextMessage(cid,22,"It is empty.")

end

elseif item.uid == 7583 then

queststatus = getPlayerStorageValue(cid,7070)

if queststatus == -1 then

doPlayerSendTextMessage(cid,22,"You have found a Ultra Haze Club")

doPlayerAddItem(cid,8829,1)

setPlayerStorageValue(cid,7070,1)

else

doPlayerSendTextMessage(cid,22,"It is empty.")

end

elseif item.uid == 7584 then

queststatus = getPlayerStorageValue(cid,7070)

if queststatus == -1 then

doPlayerSendTextMessage(cid,22,"You have found a Ultra Haze Axe.")

doPlayerAddItem(cid,8925,1)

setPlayerStorageValue(cid,7070,1)

else

doPlayerSendTextMessage(cid,22,"It is empty.")

end

elseif item.uid == 7585 then

queststatus = getPlayerStorageValue(cid,7070)

if queststatus == -1 then

doPlayerSendTextMessage(cid,22,"You have found a Ultra Haze Stilingue.")

doPlayerAddItem(cid,5907,1)

setPlayerStorageValue(cid,7070,1)

else

doPlayerSendTextMessage(cid,22,"It is empty.")

end

elseif item.uid == 7586

queststatus = getPlayerStorageValue(cid,7070)

if queststatus == -1 then

doPlayerSendTextMessage(cid,22,"You have found a Ultra Haze Bolt.")

doPlayerAddItem(cid,7364,1)

setPlayerStorageValue(cid,7070,1)

else

doPlayerSendTextMessage(cid,22,"It is empty.")

end

elseif item.uid == 7587 then

queststatus = getPlayerStorageValue(cid,7070)

if queststatus == -1 then

doPlayerSendTextMessage(cid,22,"You have found a Ultra Haze Bow.")

doPlayerAddItem(cid,8857,1)

setPlayerStorageValue(cid,7070,1)

else

doPlayerSendTextMessage(cid,22,"It is empty.")

end

elseif item.uid == 7578 then

queststatus = getPlayerStorageValue(cid,7070)

if queststatus == -1 then

doPlayerSendTextMessage(cid,22,"You have found a Ultra Haze Arrow")

doPlayerAddItem(cid,2352,1)

setPlayerStorageValue(cid,7070,1)

else

doPlayerSendTextMessage(cid,22,"It is empty.")

end

 

else

return 0

end

 

return 1

end

e no executavel do server aparece esse erro

[09/12/2009 15:37:29] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/inquichest2.lua)

[09/12/2009 15:37:29] data/actions/scripts/inquichest2.lua:60: 'then' expected near 'queststatus'

Link para o comentário
Compartilhar em outros sites

Vê se funciona:

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

if item.uid == 7580 then
queststatus = getPlayerStorageValue(cid,7070)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a Ultra Haze Sword.")
doPlayerAddItem(cid,7959,1)
setPlayerStorageValue(cid,7070,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
elseif item.uid == 7581 then
queststatus = getPlayerStorageValue(cid,7070)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a Ultra Haze Wand.")
doPlayerAddItem(cid,7429,1)
setPlayerStorageValue(cid,7070,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
elseif item.uid == 7582 then
queststatus = getPlayerStorageValue(cid,7070)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a Ultra Haze Rod.")
doPlayerAddItem(cid,7410,1)
setPlayerStorageValue(cid,7070,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
elseif item.uid == 7583 then
queststatus = getPlayerStorageValue(cid,7070)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a Ultra Haze Club")
doPlayerAddItem(cid,8829,1)
setPlayerStorageValue(cid,7070,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
elseif item.uid == 7584 then
queststatus = getPlayerStorageValue(cid,7070)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a Ultra Haze Axe.")
doPlayerAddItem(cid,8925,1)
setPlayerStorageValue(cid,7070,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
elseif item.uid == 7585 then
queststatus = getPlayerStorageValue(cid,7070)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a Ultra Haze Stilingue.")
doPlayerAddItem(cid,5907,1)
setPlayerStorageValue(cid,7070,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
elseif item.uid == 7586 then
queststatus = getPlayerStorageValue(cid,7070)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a Ultra Haze Bolt.")
doPlayerAddItem(cid,7364,1)
setPlayerStorageValue(cid,7070,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
elseif item.uid == 7587 then
queststatus = getPlayerStorageValue(cid,7070)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a Ultra Haze Bow.")
doPlayerAddItem(cid,8857,1)
setPlayerStorageValue(cid,7070,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
elseif item.uid == 7578 then
queststatus = getPlayerStorageValue(cid,7070)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a Ultra Haze Arrow")
doPlayerAddItem(cid,2352,1)
setPlayerStorageValue(cid,7070,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end

else
return 0
end

return 1
end

 

Abraços.

Link para o comentário
Compartilhar em outros sites

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