Ir para conteúdo

Featured Replies

  • Respostas 23
  • Visualizações 985
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Como assim tem 3 quests aí dentro?   @Edit: tenta ae: local qnt = QUANTIDADE_QUE_VC_QR function onUse(cid, item, fromPosition, itemEx, toPosition) if item.uid > 1000 and item.uid < 13000

Postado

Tenta lá, o que script que eu coloquei, eu editei o meu ultimo post.

 

@Edit:

 

@Ka zuza, é desnecessário "setar" a storage do player, se o script ñ vai precisar verificar no futuro...

 

setPlayerStorageValue(cid, item.uid, 1)

Editado por danihcv (veja o histórico de edições)

Postado
  • Autor
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.uid > 1000 and item.uid < 13000 then
local itemWeight = getItemWeightById(item.uid, 1)
local playerCap = getPlayerFreeCap(cid)

if playerCap >= itemWeight then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a ' .. getItemNameById(item.uid) .. '.')
doPlayerAddItem(cid, item.uid ,1)
setPlayerStorageValue(cid, item.uid, 1)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a ' .. getItemNameById(item.uid) .. ' weighing ' .. itemWeight .. ' oz it\'s too heavy.')
end
else
return false
end
return true
end   

Tá a mesma coisa amigo

Postado

@reglachek, tenta o meu:

local qnt = 1 --QUANTIDADE_QUE_VC_QR 

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

if item.uid > 1000 and item.uid < 13000 then
local itemWeight = getItemWeightById(item.uid, 1)
local playerCap = getPlayerFreeCap(cid)
if playerCap >= itemWeight then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a ' .. getItemNameById(item.uid) .. '.')
doPlayerAddItem(cid, item.uid , qnt)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a ' .. getItemNameById(item.uid) .. ' weighing ' .. itemWeight .. ' oz it\'s too heavy.')
end
else
return false
end
return true

end

Editado por danihcv (veja o histórico de edições)

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo