Postado Dezembro 15, 2014 10 anos Autor @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 Eu tentei mas não ganha mais do que 1
Postado Dezembro 15, 2014 10 anos Vc precisa configurar onde tem: local qnt = 1 --QUANTIDADE_QUE_VC_QR Logo na primeira linha. Onde tem 1 vc coloca a quantidade que vc qr que o player ganhe. Se ajudei, REP+ Te ajudei?? REP + e ficamos quites... http://www.tibiaking.com/forum/uploads/emoticons/default_happyy.png' alt=';D'> Atenciosamente, Daniel. Abraços! Meus tutoriais: Programação: Resolvendo QUALQUER erro na data base. Scripts (system's, creaturescripts, mod's, NPC's, etc): (Sistema) GOD Ambient Light Full. Adicionando novas mounts ao servidor [NPC] Papai Noel que dá presente todo ano. Web-site: Resolvendo problema de caracteres especiais em PHP Formatando textos em PHP! Mudando a cor, tamanho, fonte, etc. Criando e configurando tabelas para paginas PHP
Postado Dezembro 15, 2014 10 anos 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, qnt) 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 Ve agr... Te ajudei?? REP + e ficamos quites... http://www.tibiaking.com/forum/uploads/emoticons/default_happyy.png' alt=';D'> Atenciosamente, Daniel. Abraços! Meus tutoriais: Programação: Resolvendo QUALQUER erro na data base. Scripts (system's, creaturescripts, mod's, NPC's, etc): (Sistema) GOD Ambient Light Full. Adicionando novas mounts ao servidor [NPC] Papai Noel que dá presente todo ano. Web-site: Resolvendo problema de caracteres especiais em PHP Formatando textos em PHP! Mudando a cor, tamanho, fonte, etc. Criando e configurando tabelas para paginas PHP
Postado Dezembro 15, 2014 10 anos Não testei. local items = { [1740] = {ammount = 5}, [1747} = {ammount = 5}, [1748] = {ammount = 10}, [1749] = {ammount = 2}, } function onUse(cid, item) local i = items[item.uid] if i then if getPlayerFreeCap(cid) >= getItemWeightById(item.uid, i.ammount) then for a = 1, i.ammount do doPlayerAddItem(cid, item.uid) end doPlayerSendTextMessage(cid, 27, "Voce ganhou "..i.ammount.."x "..getItemNameById(item.uid)) return true end doPlayerSendCancel(cid, "Voce precisa de "..getItemWeightById(item.uid, i.ammount).." de cap para fazer esta quest.") return true end end Editado Dezembro 15, 2014 10 anos por Orochi Elf (veja o histórico de edições) Tony Araújo
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.