Ir para conteúdo

Featured Replies

Postado

Galera essa é uma script de uma quest quero saber como faço para alterar o valor da quantia que o player vai receber.

 

Nessa script tem 3 quest o que eu quero mudar é do item 884 e deixar que os player façam essa quest quando quiserem.Pra que ele consigam abrir o bau todas as vezes.

 

 

Script:

 

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 getPlayerStorageValue(cid, item.uid) == -1 then
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
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.")
end
else
return false
end
return true

end                        884884884884

  • Respostas 23
  • Visualizações 984
  • 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
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 getPlayerStorageValue(cid, item.uid) == -1 then
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                        
Postado

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 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

Obs: não esquece de colocar a quantidade que vc qr q o player ganhe:


local qnt = QUANTIDADE_QUE_VC_QR

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

Postado
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   

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