Postado Julho 22, 2018 7 anos Diga em poucas palavras a base utilizada (Nome do servidor ou nome do website). 0.3.6 Base: PDA Bom dia, então eu queria um script onde X quando abrisse o baú de uma Quest tivesse chance de tirar X pokémon, caso contrario vinha um item normal. Eu usei esse do PokeStorm, porém aparecem vários erros de Distro pela falta de funções Tais como data/lib/some functions.lua:711: in function 'doCorrectString' data/lib/some functions.lua:12: in function 'addPokeToPlayer' Alguém consegue um script para adicionar Pokemon ou Item dependendo da sorte do player ou adapta esse? Você tem o código disponível? Se tiver publique-o aqui: function onUse(cid, item, frompos, item2, topos) local config = { [22006] = {itemid = 11641 , count = 1, msg = "Congratulations! [PosT]Box+4 now is yours."}, [22007] = {itemid = 12227 , count = 1, msg = "You have found a Held Box!."}, [22008] = {itemid = 7369 , count = 1, msg = "You have found a Golden trophy, a little and mysterious gift for the true PokeBlades trainers."}, } local playerPos = getCreaturePosition(cid) local pokes = {"Pelipper","Roserade"} local randomPoke = pokes[math.random(#pokes)] if getPlayerStorageValue(cid, item.uid) < 1 then if item.uid == 22005 then if math.random(10,100) > 95 then doPlayerSendTextMessage(cid,20,"A-W-E-S-O-M-E! You have received a "..randomPoke.."!") if #getPlayerPokeballs(cid) >= 6 then local newpokeball = doCreatePokeball(randomPoke, 11826) doPlayerSendMailByName(getCreatureName(cid), newpokeball) doPlayerSendTextMessage(cid, 20, "You are holding six pokémons, ("..randomPoke..") will be teleported to the Pokemon Center!") else local newpokeball = doCreatePokeball(randomPoke, 11826) doPlayerAddItemEx(cid, newpokeball) end doSendMagicEffect(playerPos, 173) else doPlayerSendTextMessage(cid, 22, 'You have found a Boost Stone.') doPlayerAddItem(cid, 12618, 2) end elseif item.uid >= 22006 and item.uid <= 22008 then doPlayerSendTextMessage(cid,22,config[item.uid].msg) doPlayerAddItem(cid,config[item.uid].itemid,config[item.uid].itemcount) setPlayerStorageValue(cid,item.uid,1) elseif item.uid == 22009 then doPlayerSendTextMessage(cid,22,"You have found 100 Mega Balls, 1 Sylveon Stone and 5 Revives.") doPlayerAddItem(cid,12617,100) doPlayerAddItem(cid,12417,1) doPlayerAddItem(cid,26514,1) elseif item.uid == 22011 then doPlayerSendTextMessage(cid,22,"You have found 80.000 Dollars! You are getting rich, huh?") doPlayerAddMoney(cid, 8000000) else doPlayerSendTextMessage(cid,22,"You earned 2.000.000 EXP!.") doPlayerAddExperience(cid, 2000000) end doSendFireworkCombo(playerPos) doSendMagicEffect(playerPos, 162) setPlayerStorageValue(cid,item.uid,1) else doPlayerSendCancel(cid, "You have already done this quest.") end return true end Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
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.