Postado Junho 4, 2015 10 anos Obrigado, aqui funcionou De nada ~~ Mas não funciona, Fly, ride, surf, e nei mudar cor dos addons, por isso o do dxp e 100%, mas no momento também uso o do PxR vou ver se consigo pegar esse do DxP ~~ pow mais o meu é dash é bem diferente e não tem level no meu poke, meu golback é diferente tudo é diferente, nenhum do tk funfo '0' se alguém ajudar rep+ dash é muito diferente mesmo, quando adicionou deu algum erro na distro?
Postado Junho 4, 2015 10 anos Autor Diretor De nada ~~ vou ver se consigo pegar esse do DxP ~~ dash é muito diferente mesmo, quando adicionou deu algum erro na distro? nenhum erro nada só n usa o item, fala que o pokemon n é da quele addon, mais é o addon que configurei tentei mesmo e se tiver como me ajudar rep+ Editado Junho 4, 2015 10 anos por alexxxxxxx (veja o histórico de edições) Eu sou um entusiasta da programação apaixonado por ajudar a comunidade open source a crescer. Sempre em busca de novos desafios e oportunidades para contribuir com meu código. #OpenSource #Programação #Contribuição
Postado Junho 4, 2015 10 anos De nada ~~ vou ver se consigo pegar esse do DxP ~~ dash é muito diferente mesmo, quando adicionou deu algum erro na distro? Man passei meia hora tentando passar o do dxp pro meu Serv, além de demorar meia hora procurando em qual lugar colocar, meia hora colocando e tals, quando adicionei tudo, o da dxp deu erro, no arquivo principal, no actions! int eu recomendo pegar o da pokémonxrain q n causa bug sério, e adaptar, tipo pega o order.lua da dxp e do seu ot, pega tudo que tenha a ver com o addon system, remove os colors e adapta com seu Order.lua mas tipo, isto só na ideia, pq o principal do addon system, o pokémonxrain já tem, e o restante de fly, surf, ride e tals já tem na dxp, então é só adaptar. Alexxxxxx... se quizer posso postar todas as tags nescessárias para adicionar no seu ot, ai qual quer erro, eu tento ajuda pra resolver! vou caçar aq as tags e já já edito Pokémon Dust Evolution É aonde começa sua nova aventura!! Facebook Verifique Atualizações
Postado Junho 4, 2015 10 anos Autor Diretor Man passei meia hora tentando passar o do dxp pro meu Serv, além de demorar meia hora procurando em qual lugar colocar, meia hora colocando e tals, quando adicionei tudo, o da dxp deu erro, no arquivo principal, no actions! int eu recomendo pegar o da pokémonxrain q n causa bug sério, e adaptar, tipo pega o order.lua da dxp e do seu ot, pega tudo que tenha a ver com o addon system, remove os colors e adapta com seu Order.lua mas tipo, isto só na ideia, pq o principal do addon system, o pokémonxrain já tem, e o restante de fly, surf, ride e tals já tem na dxp, então é só adaptar. Alexxxxxx... se quizer posso postar todas as tags nescessárias para adicionar no seu ot, ai qual quer erro, eu tento ajuda pra resolver! vou caçar aq as tags e já já edito só pra começar meu goback é assim local pokes = { ["Bulbasaur"] = {level = 20, cons = 2, vida = 1200}, ["Ivysaur"] = {level = 40, cons = 2, vida = 2600}, ["Venusaur"] = {level = 85, cons = 140, vida = 5200}, ["Charmander"] = {level = 20, cons = 2, vida = 970}, ["Charmeleon"] = {level = 40, cons = 2, vida = 2900}, ["Charizard"] = {level = 85, cons = 1, vida = 5200}, ["Squirtle"] = {level = 20, cons = 2, vida = 1350}, ["Wartortle"] = {level = 40, cons = 2, vida = 2800}, ["Blastoise"] = {level = 85, cons = 2, vida = 5900}, ["Caterpie"] = {level = 1, cons = 2, vida = 300}, ["Metapod"] = {level = 10, cons = 2, vida = 1100}, ["Butterfree"] = {level = 30, cons = 2, vida = 2000}, ["Weedle"] = {level = 1, cons = 2, vida = 325}, ["Kakuna"] = {level = 10, cons = 2, vida = 900}, ["Beedrill"] = {level = 30, cons = 2, vida = 1900}, ["Pidgey"] = {level = 1, cons = 2, vida = 380}, ["Pidgeotto"] = {level = 20, cons = 2, vida = 1400}, ["Pidgeot"] = {level = 65, cons = 2, vida = 3800}, ["Rattata"] = {level = 1, cons = 2, vida = 350}, ["ShinyRattata"] = {level = 10, cons =2, vida = 900}, ["Raticate"] = {level = 20, cons = 2, vida = 900}, ["Spearow"] = {level = 5, cons = 2, vida = 450}, ["Fearow"] = {level = 50, cons = 2, vida = 3300}, ["Ekans"] = {level = 12, cons = 2, vida = 600}, ["Arbok"] = {level = 30, cons = 2, vida = 2900}, ["Pikachu"] = {level = 20, cons = 2, vida = 900}, ["Raichu"] = {level = 50, cons = 2, vida = 3200}, ["Sandshrew"] = {level = 18, cons = 2, vida = 700}, ["Sandslash"] = {level = 55, cons = 2, vida = 3400}, ["Nidoran Female"] = {level = 10, cons = 2, vida = 600}, ["Nidorina"] = {level = 25, cons = 2, vida = 2000}, ["Nidoqueen"] = {level = 65, cons = 2, vida = 4200}, ["Nidoran Male"] = {level = 10, cons = 2, vida = 650}, ["Nidorino"] = {level = 25, cons = 2, vida = 2500}, ["Nidoking"] = {level = 65, cons = 2, vida = 4800}, ["Clefairy"] = {level = 10, cons = 2, vida = 600}, ["Clefable"] = {level = 35, cons = 2, vida = 2400}, ["Vulpix"] = {level = 20, cons = 2, vida = 680}, ["Ninetales"] = {level = 65, cons = 2, vida = 3400}, ["Jigglypuff"] = {level = 10, cons = 2, vida = 550}, ["Wigglytuff"] = {level = 42, cons = 2, vida = 2900}, ["Zubat"] = {level = 5, cons = 2, vida = 450}, ["Golbat"] = {level = 30, cons = 2, vida = 1900}, ["Oddish"] = {level = 5, cons = 2, vida = 340}, ["Gloom"] = {level = 18, cons = 2, vida = 1400}, ["Vileplume"] = {level = 50, cons = 2, vida = 3300}, ["Paras"] = {level = 1, cons = 2, vida = 850}, ["Parasect"] = {level = 50, cons = 2, vida = 3800}, ["Venonat"] = {level = 18, cons = 2, vida = 1350}, ["Venomoth"] = {level = 50, cons = 2, vida = 3850}, ["Diglett"] = {level = 5, cons = 2, vida = 900}, ["Dugtrio"] = {level = 35, cons = 2, vida = 3500}, ["Meowth"] = {level = 12, cons = 2, vida = 950}, ["Persian"] = {level = 25, cons = 2, vida = 2250}, ["Psyduck"] = {level = 12, cons = 2, vida = 950}, ["Golduck"] = {level = 55, cons = 2, vida = 4000}, ["Mankey"] = {level = 10, cons = 2, vida = 1050}, ["Primeape"] = {level = 45, cons = 2, vida = 4500}, ["Growlithe"] = {level = 20, cons = 2, vida = 1000}, ["Arcanine"] = {level = 80, cons = 2, vida = 6800}, ["Poliwag"] = {level = 5, cons = 2, vida = 400}, ["Poliwhirl"] = {level = 20, cons = 2, vida = 1200}, ["Poliwrath"] = {level = 65, cons = 2, vida = 4400}, ["Abra"] = {level = 15, cons = 2, vida = 620}, ["Kadabra"] = {level = 50, cons = 2, vida = 2500}, ["Alakazam"] = {level = 80, cons = 94, vida = 4000}, ["Machop"] = {level = 18, cons = 2, vida = 1100}, ["Machoke"] = {level = 40, cons = 2, vida = 3500}, ["Machamp"] = {level = 65, cons = 2, vida = 7500}, ["Bellsprout"] = {level = 5, cons = 2, vida = 420}, ["Weepinbell"] = {level = 18, cons = 2, vida = 1100}, ["Victreebel"] = {level = 50, cons = 2, vida = 4000}, ["Tentacool"] = {level = 12, cons = 2, vida = 1050}, ["Tentacruel"] = {level = 70, cons = 2, vida = 7050}, ["Geodude"] = {level = 15, cons = 2, vida = 700}, ["Graveler"] = {level = 40, cons = 2, vida = 3000}, ["Golem"] = {level = 70, cons = 2, vida = 6500}, ["Ponyta"] = {level = 20, cons = 2, vida = 1400}, ["Rapidash"] = {level = 60, cons = 2, vida = 5500}, ["Slowpoke"] = {level = 12, cons = 2, vida = 1200}, ["Slowbro"] = {level = 45, cons = 2, vida = 4600}, ["Magnemite"] = {level = 15, cons = 2, vida = 450}, ["Magneton"] = {level = 40, cons = 2, vida = 1750}, ["Farfetchd"] = {level = 40, cons = 2, vida = 3000}, ["Doduo"] = {level = 12, cons = 2, vida = 600}, ["Dodrio"] = {level = 45, cons = 2, vida = 2650}, ["Seel"] = {level = 20, cons = 2, vida = 1000}, ["Dewgong"] = {level = 65, cons = 2, vida = 5200}, ["Grimer"] = {level = 12, cons = 2, vida = 600}, ["Muk"] = {level = 30, cons = 2, vida = 2400}, ["Shellder"] = {level = 5, cons = 2, vida = 800}, ["Cloyster"] = {level = 65, cons = 2, vida = 5000}, ["Gastly"] = {level = 18, cons = 2, vida = 1000}, ["Haunter"] = {level = 45, cons = 2, vida = 3000}, ["Gengar"] = {level = 80, cons = 2, vida = 7000}, ["Onix"] = {level = 50, cons = 2, vida = 5300}, ["Drowzee"] = {level = 22, cons = 2, vida = 1150}, ["Hypno"] = {level = 50, cons = 95, vida = 4600}, ["Krabby"] = {level = 5, cons = 2, vida = 850}, ["Kingler"] = {level = 35, cons = 2, vida = 3250}, ["Voltorb"] = {level = 14, cons = 2, vida = 620}, ["Electrode"] = {level = 38, cons = 2, vida = 2000}, ["Elekid"] = {level = 38, cons = 2, vida = 2000}, ["Exeggcute"] = {level = 8, cons = 2, vida = 800}, ["Exeggutor"] = {level = 48, cons = 2, vida = 4000}, ["Cubone"] = {level = 18, cons = 2, vida = 1200}, ["Marowak"] = {level = 45, cons = 2, vida = 3900}, ["Hitmonlee"] = {level = 60, cons = 2, vida = 9250}, ["Hitmonchan"] = {level = 60, cons = 2, vida = 10500}, ["Lickitung"] = {level = 45, cons = 2, vida = 4800}, ["Koffing"] = {level = 15, cons = 2, vida = 900}, ["Weezing"] = {level = 30, cons = 2, vida = 2800}, ["Rhyhorn"] = {level = 35, cons = 2, vida = 3800}, ["Rhydon"] = {level = 65, cons = 2, vida = 7000}, ["Chansey"] = {level = 60, cons = 2, vida = 7500}, ["Tangela"] = {level = 40, cons = 2, vida = 3500}, ["Kangaskhan"] = {level = 60, cons = 2, vida = 7000}, ["Horsea"] = {level = 5, cons = 2, vida = 300}, ["Seadra"] = {level = 45, cons = 2, vida = 2500}, ["Goldeen"] = {level = 10, cons = 2, vida = 950}, ["Seaking"] = {level = 25, cons = 2, vida = 2000}, ["Staryu"] = {level = 15, cons = 2, vida = 1050}, ["Starmie"] = {level = 45, cons = 2, vida = 3800}, ["Mr.mime"] = {level = 60, cons = 2, vida = 5500}, ["Scyther"] = {level = 70, cons = 2, vida = 6500}, ["Jynx"] = {level = 65, cons = 2, vida = 6000}, ["Electabuzz"] = {level = 70, cons = 2, vida = 6800}, ["Magmar"] = {level = 70, cons = 2, vida = 7200}, ["Pinsir"] = {level = 42, cons = 2, vida = 4000}, ["Tauros"] = {level = 40, cons = 2, vida = 4200}, ["Magikarp"] = {level = 1, cons = 2, vida = 120}, ["ShinyMagikarp"] = {level = 10, cons = 2, vida = 240}, ["Gyarados"] = {level = 75, cons = 2, vida = 7800}, ["Lapras"] = {level = 70, cons = 2, vida = 7000}, ["Ditto"] = {level = 40, cons = 2, vida = 4000}, ["Eevee"] = {level = 20, cons = 2, vida = 1500}, ["Vaporeon"] = {level = 55, cons = 2, vida = 4500}, ["Jolteon"] = {level = 55, cons = 2, vida = 4500}, ["Flareon"] = {level = 55, cons = 2, vida = 4500}, ["Porygon"] = {level = 45, cons = 2, vida = 100}, ["Omanyte"] = {level = 20, cons = 2, vida = 1300}, ["Omastar"] = {level = 70, cons = 2, vida = 6000}, ["Kabuto"] = {level = 20, cons = 2, vida = 1300}, ["Kabutops"] = {level = 70, cons = 2, vida = 6500}, ["Aerodactyl"] = {level = 100, cons = 2, vida = 8000}, ["Snorlax"] = {level = 85, cons = 2, vida = 9500}, ["Articuno"] = {level = 120, cons = 2, vida = 11000}, ["Zapdos"] = {level = 120, cons = 2, vida = 11000}, ["Moltres"] = {level = 120, cons = 2, vida = 11000}, ["Dratini"] = {level = 10, cons = 2, vida = 1200}, ["Dragonair"] = {level = 70, cons = 2, vida = 5600}, ["Dragonite"] = {level = 100, cons = 2, vida = 10800}, ["Mewtwo"] = {level = 100, cons = 2, vida = 8500}, ["Mew"] = {level = 100, cons = 2, vida = 7200}, ["Shiny Flygon"] = {level = 90, cons = 2, vida = 7000}, ["Shiny Milotic"] = {level = 8, cons = 2, vida = 8000}, } local msgunica = true local msgunicago1, msgunicaback1 = "Escolho você, doka!", "Volte, doka!" local msgunicago2, msgunicaback2 = "Escolho você, doka!", "Volte, doka!" local msgunicago3, msgunicaback3 = "Escolho você, doka!", "Volte, doka!" local msgunicago4, msgunicaback4 = "Escolho você, doka!", "Volte, doka!" local msgunicago5, msgunicaback5 = "Escolho você, doka!", "Volte, doka!" local msgunicago6, msgunicaback6 = "Escolho você, doka!", "Volte, doka!" function onUse(cid, item, frompos, item2, topos) for a, b in pairs(ginasios) do if getPlayerStorageValue(cid, b.storage) == 1 then -- GYM doPlayerSendCancel(cid, "You can't return your pokemon during gym battles.") return true end end if #getCreatureSummons(cid) >= 1 and getPlayerStorageValue(getCreatureSummons(cid)[1], 33) >= 1 then return true end local random2 = math.random(1,6) if random2 == 1 then msgunicaback = msgunicaback1 elseif random2 == 2 then msgunicaback = msgunicaback2 elseif random2 == 3 then msgunicaback = msgunicaback3 elseif random2 == 4 then msgunicaback = msgunicaback4 elseif random2 == 5 then msgunicaback = msgunicaback5 elseif random2 == 6 then msgunicaback = msgunicaback6 end local random = math.random(1,6) if random == 1 then msgunicago = msgunicago1 elseif random == 2 then msgunicago = msgunicago2 elseif random == 3 then msgunicago = msgunicago3 elseif random == 4 then msgunicago = msgunicago4 elseif random == 5 then msgunicago = msgunicago5 elseif random == 6 then msgunicago = msgunicago6 end if item.itemid == 2222 or item.itemid == 2223 then gobackeff = 188 elseif item.itemid == 2220 or item.itemid == 2221 then gobackeff = 191 elseif item.itemid == 2651 or item.itemid == 2652 then gobackeff = 189 elseif item.itemid == 2653 or item.itemid == 2654 then gobackeff = 190 elseif item.itemid == 2655 or item.itemid == 2656 then gobackeff = 195 end local effect = gobackeff local exhausted = 1 if item.itemid == 2223 or item.itemid == 2221 or item.itemid == 2652 or item.itemid == 2654 or item.itemid == 2656 then if (getPlayerStorageValue(cid, storage) >= os.time()) then doSendMagicEffect(getThingPos(cid), 2) return true end if #getCreatureSummons(cid) >= 1 then local z = getCreatureSummons(cid)[1] local pokename = getCreatureName(z) local mbk = msgunicaback:gsub("doka", pokename) if getItemAttribute(item.uid, "poke"):find(getCreatureName(z)) then doTransformItem(item.uid, item.itemid-1) doCreatureSay(cid, mbk, TALKTYPE_ORANGE_1) local summom = getCreatureSummons(cid) local maxh = pokes[getCreatureName(summom[1])].vida local pct2 = ((getCreatureHealth(summom[1])) / (getCreatureMaxHealth(summom[1]))) local vids = ((getCreatureHealth(summom[1])) - 2) doCreatureAddHealth(summom[1], -vids) setCreatureMaxHealth(summom[1], maxh) doCreatureAddHealth(summom[1], ((maxh) * (pct2))) doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")) .. " HP = ["..getCreatureHealth(z).."/"..getCreatureMaxHealth(z).."]") setPlayerStorageValue(cid,storage,os.time()+exhausted) setPlayerStorageValue(cid, 2, 0) doSendMagicEffect(getCreaturePosition(z), effect) doRemoveCreature(z) return true end end elseif item.itemid == 2222 or item.itemid == 2220 or item.itemid == 2651 or item.itemid == 2653 or item.itemid == 2655 then if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then doPlayerSendCancel(cid, "You must put your pokeball in the correct place!") return TRUE end if not canSummon(cid) then return doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTENOUGHROOM) end if getPlayerStorageValue(cid, 63215) >= 1 then return doPlayerSendCancel(cid, "You can't use pokeball while surfing.") end if getPlayerStorageValue(cid, 62314) >= 1 then return doPlayerSendCancel(cid, "You can't use pokeball while flying.") end if #getCreatureSummons(cid) >= 1 then return doPlayerSendCancel(cid, "You have already summoned a pokemon.") end for i,x in pairs(pokes) do if i == getItemAttribute(item.uid, "poke"):sub(9, findLetter(getItemAttribute(item.uid, "poke"), "'")-1) then if getPlayerLevel(cid) < x.level then doPlayerSendCancel(cid, "You need level "..x.level.." or higher to use this pokemon.") return true end local removed = doCreateItem(1285, 1, getThingPos(cid)) doSummonMonster(cid, i) local pk = getCreatureSummons(cid)[1] doTeleportThing(pk, getClosestFreeTile(pk, getThingPos(cid)), false) doRemoveItem(removed, 1) doCreatureSetLookDir(pk, 2) local maxh = pokes[getCreatureName(pk)].vida local levellife = ((getPlayerLevel(cid)) * (pokes[getCreatureName(pk)].cons)) local health = tonumber(getItemAttribute(item.uid, "poke"):match("%[(.-)/")) doConvinceCreature(cid, pk) doCreatureAddHealth(pk, health-maxh) local pct = ((getCreatureHealth(pk)) / (getCreatureMaxHealth(pk))) local vidis = (getCreatureHealth(pk)) setCreatureMaxHealth(pk, ((maxh) + (levellife))) doCreatureAddHealth(pk, 2) doCreatureAddHealth(pk, -vidis) doCreatureAddHealth(pk, ((getCreatureMaxHealth(pk)) * (pct)) - 2) doTransformItem(item.uid, item.itemid+1) local pokename = getCreatureName(getCreatureSummons(cid)[1]) local mgo = msgunicago:gsub("doka", pokename) doCreatureSay(cid, mgo, TALKTYPE_ORANGE_1) doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), "."))) doSendMagicEffect(getCreaturePosition(pk), effect) setPlayerStorageValue(cid,storage,os.time()+exhausted) registerCreatureEvent(pk, "DiePoke") registerCreatureEvent(pk, "Exp") break end end end local pk = getCreatureSummons(cid)[1] local pb = getPlayerSlotItem(cid, 8).uid local look = getItemAttribute(pb,"addon") if not look then doSetItemAttribute(pb,"addon", 0) return false end if look > 0 then doSetCreatureOutfit(pk, {lookType = look}, -1) return true end return TRUE end meu catch system é assim estão em teste mais funcionando perfeitamente vamos nessa cara bora me ajuda! local pokes = { ["Ditto"] = {chance = 1, corpse = 2817, health = 14000, maxhealth = 4000}, ["Magikarp"] = {chance = 1, corpse = 2818, health = 120, maxhealth = 120}, ["Eevee"] = {chance = 1, corpse = 6364, health = 1500, maxhealth = 1500}, ["Abra"] = {chance = 1, corpse = 2905, health = 620, maxhealth = 620}, ["Kadabra"] = {chance = 1, corpse = 6060, health = 2500, maxhealth = 2500}, ["Alakazam"] = {chance = 1, corpse = 6057, health = 4000, maxhealth = 4000}, ["Rattata"] = {chance = 1, corpse = 5974, health = 350, maxhealth = 350}, ["Raticate"] = {chance = 1, corpse = 6007, health = 900, maxhealth = 900}, ["Pidgey"] = {chance = 1, corpse = 5961, health = 380, maxhealth = 380}, ["Pidgeotto"] = {chance = 1, corpse = 5966, health = 1400, maxhealth = 1400}, ["Pidgeot"] = {chance = 1, corpse = 6020, health = 3800, maxhealth = 3800}, ["Zubat"] = {chance = 1, corpse = 5989, health = 450, maxhealth = 450}, ["Golbat"] = {chance = 1, corpse = 6053, health = 1900, maxhealth = 1900}, ["Bellsprout"] = {chance = 1, corpse = 2806, health = 420, maxhealth = 420}, ["Weepinbell"] = {chance = 1, corpse = 2928, health = 1100, maxhealth = 1100}, ["Victreebel"] = {chance = 1, corpse = 6332, health = 4000, maxhealth = 4000}, ["Poliwag"] = {chance = 1, corpse = 6042, health = 400, maxhealth = 400}, ["Poliwhirl"] = {chance = 1, corpse = 6054, health = 1200, maxhealth = 1200}, ["Poliwrath"] = {chance = 1, corpse = 6033, health = 4400, maxhealth = 4400}, ["Oddish"] = {chance = 1, corpse = 3008, health = 340, maxhealth = 340}, ["Gloom"] = {chance = 1, corpse = 6017, health = 1400, maxhealth = 1400}, ["Vileplume"] = {chance = 1, corpse = 6025, health = 3300, maxhealth = 3300}, ["Horsea"] = {chance = 1, corpse = 2973, health = 300, maxhealth = 300}, ["Seadra"] = {chance = 1, corpse = 2872, health = 2500, maxhealth = 2500}, ["Grimer"] = {chance = 1, corpse = 6055, health = 600, maxhealth = 600}, ["Weedle"] = {chance = 1, corpse = 5964, health = 325, maxhealth = 325}, ["Kakuna"] = {chance = 1, corpse = 6000, health = 900, maxhealth = 900}, ["Beedrill"] = {chance = 1, corpse = 5990, health = 1900, maxhealth = 1900}, ["Muk"] = {chance = 1, corpse = 2845, health = 2400, maxhealth = 2400}, ["Doduo"] = {chance = 1, corpse = 2842, health = 600, maxhealth = 600}, ["Dodrio"] = {chance = 1, corpse = 6047, health = 2650, maxhealth = 2650}, ["Magnemite"] = {chance = 1, corpse = 6056, health = 450, maxhealth = 450}, ["Magneton"] = {chance = 1, corpse = 6076, health = 1750, maxhealth = 1750}, ["Voltorb"] = {chance = 1, corpse = 6049, health = 620, maxhealth = 620}, ["Electrode"] = {chance = 1, corpse = 6051, health = 2000, maxhealth = 2000}, ["Geodude"] = {chance = 1, corpse = 6071, health = 700, maxhealth = 700}, ["Graveler"] = {chance = 1, corpse = 6516, health = 3000, maxhealth = 3000}, ["Golem"] = {chance = 1, corpse = 6043, health = 6500, maxhealth = 6500}, ["Sandshrew"] = {chance = 1, corpse = 5988, health = 700, maxhealth = 700}, ["Sandslash"] = {chance = 1, corpse = 6041, health = 3400, maxhealth = 3400}, ["Charmander"] = {chance = 1, corpse = 5983, health = 970, maxhealth = 970}, ["Charmeleon"] = {chance = 1, corpse = 5981, health = 2900, maxhealth = 2900}, ["Charizard"] = {chance = 1, corpse = 6005, health = 5200, maxhealth = 5200}, ["Vulpix"] = {chance = 1, corpse = 6003, health = 680, maxhealth = 680}, ["Ninetales"] = {chance = 1, corpse = 6040, health = 2650, maxhealth = 2650}, ["Bulbasaur"] = {chance = 1, corpse = 5969, health = 1200, maxhealth = 1200}, ["Ivysaur"] = {chance = 1, corpse = 5982, health = 2600, maxhealth = 2600}, ["Venusaur"] = {chance = 1, corpse = 5962, health = 5200, maxhealth = 5200}, ["Squirtle"] = {chance = 1, corpse = 6008, health = 1350, maxhealth = 1350}, ["Wartortle"] = {chance = 1, corpse = 5978, health = 2800, maxhealth = 2800}, ["Blastoise"] = {chance = 1, corpse = 5999, health = 5900, maxhealth = 5900}, ["Growlithe"] = {chance = 1, corpse = 6036, health = 1000, maxhealth = 1000}, ["Arcanine"] = {chance = 1, corpse = 6031, health = 6800, maxhealth = 6800}, ["Psyduck"] = {chance = 1, corpse = 6029, health = 950, maxhealth = 950}, ["Golduck"] = {chance = 1, corpse = 6028, health = 4000, maxhealth = 4000}, ["Pikachu"] = {chance = 1, corpse = 6001, health = 900, maxhealth = 900}, ["Raichu"] = {chance = 1, corpse = 5996, health = 3500, maxhealth = 3500}, ["Ekans"] = {chance = 1, corpse = 5979, health = 600, maxhealth = 600}, ["Arbok"] = {chance = 1, corpse = 5984, health = 2900, maxhealth = 2900}, ["Cubone"] = {chance = 1, corpse = 6050, health = 1200, maxhealth = 1200}, ["Marowak"] = {chance = 1, corpse = 6072, health = 3900, maxhealth = 3900}, ["Caterpie"] = {chance = 1, corpse = 5971, health = 300, maxhealth = 300}, ["Metapod"] = {chance = 1, corpse = 5970, health = 1100, maxhealth = 1100}, ["Butterfree"] = {chance = 1, corpse = 5985, health = 2000, maxhealth = 2000}, ["Goldeen"] = {chance = 1, corpse = 2970, health = 950, maxhealth = 950}, ["Seaking"] = {chance = 1, corpse = 3038, health = 2000, maxhealth = 2000}, ["Spearow"] = {chance = 1, corpse = 5968, health = 200, maxhealth = 200}, ["Fearow"] = {chance = 1, corpse = 5992, health = 3300, maxhealth = 3300}, ["Drowzee"] = {chance = 1, corpse = 6026, health = 1150, maxhealth = 1150}, ["Hypno"] = {chance = 1, corpse = 6046, health = 4600, maxhealth = 4600}, ["Diglett"] = {chance = 1, corpse = 6023, health = 900, maxhealth = 900}, ["Dugtrio"] = {chance = 1, corpse = 6024, health = 3450, maxhealth = 3450}, ["Krabby"] = {chance = 1, corpse = 6039, health = 850, maxhealth = 850}, ["Kingler"] = {chance = 1, corpse = 6340, health = 3250, maxhealth = 3250}, ["Paras"] = {chance = 1, corpse = 3007, health = 850, maxhealth = 850}, ["Parasect"] = {chance = 1, corpse = 6027, health = 3800, maxhealth = 3800}, ["Dratini"] = {chance = 1, corpse = 2879, health = 520, maxhealth = 520}, ["Dragonair"] = {chance = 1, corpse = 6002, health = 3000, maxhealth = 3000}, ["Dragonite"] = {chance = 1, corpse = 4295, health = 17000, maxhealth = 17000}, ["Ponyta"] = {chance = 1, corpse = 5975, health = 1400, maxhealth = 1400}, ["Rapidash"] = {chance = 1, corpse = 4323, health = 5500, maxhealth = 5500}, ["Pinsir"] = {chance = 1, corpse = 7282, health = 55, maxhealth = 55}, ["Seel"] = {chance = 1, corpse = 6030, health = 1000, maxhealth = 1000}, ["Dewgong"] = {chance = 1, corpse = 6038, health = 5200, maxhealth = 5200}, ["Exeggcute"] = {chance = 1, corpse = 2982, health = 800, maxhealth = 800}, ["Exeggutor"] = {chance = 1, corpse = 3005, health = 450, maxhealth = 4000}, ["Koffing"] = {chance = 1, corpse = 2936, health = 900, maxhealth = 900}, ["Weezing"] = {chance = 1, corpse = 6306, health = 2800, maxhealth = 2800}, ["Staryu"] = {chance = 1, corpse = 5987, health = 1050, maxhealth = 1050}, ["Starmie"] = {chance = 1, corpse = 7320, health = 3800, maxhealth = 3800}, ["Rhyhorn"] = {chance = 1, corpse = 3035, health = 3800, maxhealth = 3800}, ["Rhydon"] = {chance = 1, corpse = 2858, health = 7000, maxhealth = 7000}, ["Shellder"] = {chance = 1, corpse = 2837, health = 800, maxhealth = 800}, ["Snorlax"] = {chance = 1, corpse = 6016, health = 9000, maxhealth = 9000}, ["Gyarados"] = {chance = 1, corpse = 6331, health = 7800, maxhealth = 7800}, ["Machop"] = {chance = 1, corpse = 6045, health = 1100, maxhealth = 1100}, ["Machoke"] = {chance = 1, corpse = 4251, health = 2850, maxhealth = 3500}, ["Machamp"] = {chance = 1, corpse = 6048, health = 6100, maxhealth = 7500}, ["Clefairy"] = {chance = 1, corpse = 2968, health = 600, maxhealth = 600}, ["Clefable"] = {chance = 1, corpse = 6006, health = 2400, maxhealth = 2400}, ["Jigglypuff"] = {chance = 1, corpse = 6011, health = 550, maxhealth = 550}, ["Wigglytuff"] = {chance = 1, corpse = 6012, health = 2900, maxhealth = 2900}, ["Venonat"] = {chance = 1, corpse = 5997, health = 1350, maxhealth = 1350}, ["Venomoth"] = {chance = 1, corpse = 2925, health = 3850, maxhealth = 3850}, ["Meowth"] = {chance = 1, corpse = 6034, health = 950, maxhealth = 950}, ["Persian"] = {chance = 1, corpse = 6009, health = 2250, maxhealth = 2250}, ["Mankey"] = {chance = 1, corpse = 6035, health = 1050, maxhealth = 1050}, ["Primeape"] = {chance = 1, corpse = 6032, health = 4500, maxhealth = 4500}, ["Tentacool"] = {chance = 1, corpse = 2961, health = 1050, maxhealth = 1050}, ["Tentacruel"] = {chance = 1, corpse = 6037, health = 7050, maxhealth = 7050}, ["Slowpoke"] = {chance = 1, corpse = 2926, health = 1200, maxhealth = 1200}, ["Slowbro"] = {chance = 1, corpse = 5986, health = 4600, maxhealth = 4600}, ["Cloyster"] = {chance = 1, corpse = 2932, health = 120, maxhealth = 5000}, ["Gastly"] = {chance = 1, corpse = 5993, health = 1000, maxhealth = 1000}, ["Haunter"] = {chance = 1, corpse = 6004, health = 3000, maxhealth = 3000}, ["Gengar"] = {chance = 1, corpse = 6336, health = 7000, maxhealth = 7000}, ["Onix"] = {chance = 1, corpse = 2990, health = 5300, maxhealth = 5300}, ["Hitmonlee"] = {chance = 1, corpse = 6067, health = 9250, maxhealth = 9250}, ["Hitmonchan"] = {chance = 1, corpse = 5977, health = 10500, maxhealth = 10500}, ["Lickitung"] = {chance = 1, corpse = 2953, health = 4800, maxhealth = 4800}, ["Chansey"] = {chance = 1, corpse = 6010, health = 7500, maxhealth = 7500}, ["Tangela"] = {chance = 1, corpse = 5976, health = 3500, maxhealth = 3500}, ["Kangaskhan"] = {chance = 1, corpse = 6073, health = 7000, maxhealth = 7000}, ["Scyther"] = {chance = 1, corpse = 3002, health = 6500, maxhealth = 6500}, ["Electabuzz"] = {chance = 1, corpse = 6065, health = 6800, maxhealth = 6800}, ["Elekid"] = {chance = 1, corpse = 5762, health = 6800, maxhealth = 6800}, ["Magmar"] = {chance = 1, corpse = 7283, health = 7200, maxhealth = 7200}, ["Jynx"] = {chance = 1, corpse = 5765, health = 7000, maxhealth = 7000}, ["Nidoran Male"] = {chance = 1, corpse = 6015, health = 650, maxhealth = 650}, ["Nidoran Female"] = {chance = 1, corpse = 6013, health = 600, maxhealth = 600}, ["Nidoking"] = {chance = 2, corpse = 5995, health = 4800, maxhealth = 4800}, ["Nidoqueen"] = {chance = 1, corpse = 3004, health = 4200, maxhealth = 4200}, ["Nidorina"] = {chance = 1, corpse = 6014, health = 2000, maxhealth = 2000}, ["Nidorino"] = {chance = 1, corpse = 6019, health = 2500, maxhealth = 2500}, ["Farfetchd"] = {chance = 1, corpse = 2836, health = 2500, maxhealth = 2500}, ["Mrmime"] = {chance = 1, corpse = 6069, health = 5500, maxhealth = 5500}, ["Tauros"] = {chance = 1, corpse = 6302, health = 4200, maxhealth = 4200}, ["Lapras"] = {chance = 1, corpse = 6018, health = 8000, maxhealth = 8000}, ["Omanyte"] = {chance = 1, corpse = 5998, health = 1300, maxhealth = 1300}, ["Omastar"] = {chance = 1, corpse = 5994, health = 6000, maxhealth = 6000}, ["Kabuto"] = {chance = 1, corpse = 5972, health = 1375, maxhealth = 1375}, ["Kabutops"] = {chance = 1, corpse = 6345, health = 6920, maxhealth = 6920}, ["Aerodactyl"] = {chance = 1, corpse = 6338, health = 7100, maxhealth = 7100}, ["Articuno"] = {chance = 1, corpse = 7256, health = 12000, maxhealth = 12000}, ["Zapdos"] = {chance = 1, corpse = 6074, health = 11000, maxhealth = 11000}, ["Moltres"] = {chance = 1, corpse = 7330, health = 11000, maxhealth = 11000}, ["Mewtwo"] = {chance = 1, corpse = 5973, health = 8500, maxhealth = 8500}, ["Mew"] = {chance = 1, corpse = 2939, health = 7200, maxhealth = 7200}, ["Shiny Milotic"] = {chance = 1, corpse = 9632, health = 8000, maxhealth = 8000}, ["Elder Charizard"] = {chance = 1, corpse = 2954, health = 7200, maxhealth = 7200}, ["Shiny Magikarp"] = {chance = 1, corpse = 105, health = 280, maxhealth = 280}, ["Shiny Rattata"] = {chance = 1, corpse = 110, health = 900, maxhealth = 900}, ["Shiny Paras"] = {chance = 1, corpse = 116, health = 1400, maxhealth = 1400}, ["Shiny Oddish"] = {chance = 1, corpse = 115, health = 990, maxhealth = 990}, ["Shiny Zubat"] = {chance = 1, corpse = 114, health = 1200, maxhealth = 1200}, ["Shiny Tentacool"] = {chance = 1, corpse = 122, health = 2200, maxhealth = 2200}, ["Shiny Tentacruel"] = {chance = 1, corpse = 128, health = 7000, maxhealth = 7000}, ["Shiny Raticate"] = {chance = 0, corpse = 136, health = 0, maxhealth = 0}, ["Shiny Krabby"] = {chance = 1, corpse = 126, health = 0, maxhealth = 0}, ["Shiny Kingler"] = {chance = 1, corpse = 138, health = 0, maxhealth = 0}, ["Shiny Horsea"] = {chance = 1, corpse = 139, health = 0, maxhealth = 0}, ["Shiny Seadra"] = {chance = 1, corpse = 131, health = 0, maxhealth = 0}, ["Shiny Gyarados"] = {chance = 2000, corpse = 144, health = 18000, maxhealth = 18000}, ["Shiny Parasect"] = {chance = 50, corpse = 127, health = 0, maxhealth = 0}, ["Shiny Scyther"] = {chance = 50, corpse = 142, health = 0, maxhealth = 0}, ["Shiny Electabuz"] = {chance = 50, corpse = 143, health = 0, maxhealth = 0}, ["Shiny Jynx"] = {chance = 50, corpse = 129, health = 0, maxhealth = 0}, ["Shiny Electrode"] = {chance = 50, corpse = 124, health = 0, maxhealth = 0}, ["Shiny Voltorb"] = {chance = 50, corpse = 125, health = 0, maxhealth = 0}, ["Shiny Raichu"] = {chance = 50, corpse = 140, health = 0, maxhealth = 0}, ["Shiny Venonat"] = {chance = 50, corpse = 130, health = 0, maxhealth = 0}, ["Shiny Venomoth"] = {chance = 50, corpse = 132, health = 0, maxhealth = 0}, ["Shiny Beedrill"] = {chance = 50, corpse = 137, health = 0, maxhealth = 0}, ["Shiny Butterfree"] = {chance = 50, corpse = 133, health = 0, maxhealth = 0}, ["Shiny Venusaur"] = {chance = 50, corpse = 135, health = 0, maxhealth = 0}, ["Shiny Blastoise"] = {chance = 1, corpse = 134, health = 0, maxhealth = 0}, ["Shiny Farfetchd"] = {chance = 50, corpse = 119, health = 7000, maxhealth = 7000}, ["Shiny Grimer"] = {chance = 50, corpse = 123, health = 2600, maxhealth = 2600}, ["Shiny Muk"] = {chance = 50, corpse = 121, health = 7400, maxhealth = 7400}, ["Shiny Growlithe"] = {chance = 50, corpse = 117, health = 3000, maxhealth = 3000}, ["Shiny Arcanine"] = {chance = 50, corpse = 120, health = 17000, maxhealth = 17000}, ["Shiny Dratini"] = {chance = 40, corpse = 118, health = 5400, maxhealth = 5400}, ["Shiny Abra"] = {chance = 50, corpse = 141, health = 3620, maxhealth = 3620}, ["Shiny Flygon"] = {chance = 1, corpse = 11381, health = 7000, maxhealth = 7000}, } local description = "Contains a %pokename." function onUse(cid, item, frompos, item2, topos) local name = getItemNameById(item2.itemid) if item.itemid == 2147 then -- POKEBALL catchrate = 4 oncatch = 24 onfail = 23 bolabola = 2222 elseif item.itemid == 2642 then -- GREATBALL catchrate = 5 oncatch = 198 onfail = 197 bolabola = 2651 elseif item.itemid == 2645 then -- SUPERBALL catchrate = 6 oncatch = 202 onfail = 201 bolabola = 2653 elseif item.itemid == 2146 then -- ULTRABALL catchrate = 8 oncatch = 200 onfail = 199 bolabola = 2220 elseif item.itemid == 0 then -- MEGABALL catchrate = 10 oncatch = 0 onfail = 0 bolabola = 0 elseif item.itemid == 2644 then -- EXBALL(Saffari) catchrate = 80000 oncatch = 204 onfail = 203 bolabola = 2655 end local rate = (catchrate) local catch = oncatch local fail = onfail local newid = bolabola for i,x in pairs(pokes) do if getItemNameById(item2.itemid):find(i:lower()) then if getItemIdByName(name) == pokes.corpse then if cid ~= getItemAttribute(item2.uid, "corpseowner") and isInArray({1,8}, getPlayerGroupId(cid)) then doPlayerSendCancel(cid, "You are not allowed to catch this pokemon.") return true end doRemoveItem(item.uid, 1) doRemoveItem(item2.uid, 1) local pegar = math.random(1, x.chance) if pegar <= 1*(rate) then doSendMagicEffect(topos, catch) local nas = { ["%%pokename"] = i } for i,x in pairs(nas) do if description:find(i) then description = description:gsub(i, x) end end local function capturou(params) if not isCreature(params.cid) then return true end if not string.find(getPlayerStorageValue(cid, 54842), ""..i..",") then doPlayerAddSoul(cid, 1) setPlayerStorageValue(cid, 54842, getPlayerStorageValue(cid, 54842)..""..i..", ") end if getPlayerFreeCap(cid) <= 0 then item = doCreateItemEx(newid-1) doItemSetAttribute(item, "poke", params.poke) doItemSetAttribute(item, "nome", params.nome) doItemSetAttribute(item, "description", params.description) doItemSetAttribute(item, "addon", 0) doPlayerSendMailByName(getCreatureName(params.cid), item, 1) doPlayerSendTextMessage(cid, 27, "Parabéns, você capturou um "..i.."!") doPlayerSendTextMessage(cid, 27, "Since you are already holding six pokemons, this pokeball has been sent to your depot.") else item = doCreateItemEx(params.ball) doItemSetAttribute(item, "poke", params.poke) doItemSetAttribute(item, "nome", params.nome) doItemSetAttribute(item, "description", params.description) doItemSetAttribute(item, "addon", 0) doPlayerAddItemEx(params.cid, item, true) doTransformItem(item, newid) doPlayerSendTextMessage(cid, 27, "Parabéns, você capturou um "..i.."!") doSendMagicEffect(getThingPos(cid), 177) end end local description = "Contains a "..i.."." local poke1 = "This is "..i.."'s pokeball. HP = ["..x.health.."/"..x.maxhealth.."]" addEvent(capturou, 4000, {cid = cid, poke = poke1, nome = i, description = description, ball = 2219, letter = 2597}) else function ruim(params) if not isCreature(params.cid) then return true end doPlayerSendTextMessage(params.cid, 27, "Sorry, you didn\'t catch that pokemon.") if #getCreatureSummons(params.cid) >= 1 then doSendMagicEffect(getThingPos(getCreatureSummons(params.cid)[1]), 166) else doSendMagicEffect(getThingPos(params.cid), 166) end end addEvent(ruim, 4000, {cid = cid}) doSendMagicEffect(topos, fail) end end end end return TRUE end Eu sou um entusiasta da programação apaixonado por ajudar a comunidade open source a crescer. Sempre em busca de novos desafios e oportunidades para contribuir com meu código. #OpenSource #Programação #Contribuição
Postado Junho 4, 2015 10 anos só pra começar meu goback é assim local pokes = { ["Bulbasaur"] = {level = 20, cons = 2, vida = 1200}, ["Ivysaur"] = {level = 40, cons = 2, vida = 2600}, ["Venusaur"] = {level = 85, cons = 140, vida = 5200}, ["Charmander"] = {level = 20, cons = 2, vida = 970}, ["Charmeleon"] = {level = 40, cons = 2, vida = 2900}, ["Charizard"] = {level = 85, cons = 1, vida = 5200}, ["Squirtle"] = {level = 20, cons = 2, vida = 1350}, ["Wartortle"] = {level = 40, cons = 2, vida = 2800}, ["Blastoise"] = {level = 85, cons = 2, vida = 5900}, ["Caterpie"] = {level = 1, cons = 2, vida = 300}, ["Metapod"] = {level = 10, cons = 2, vida = 1100}, ["Butterfree"] = {level = 30, cons = 2, vida = 2000}, ["Weedle"] = {level = 1, cons = 2, vida = 325}, ["Kakuna"] = {level = 10, cons = 2, vida = 900}, ["Beedrill"] = {level = 30, cons = 2, vida = 1900}, ["Pidgey"] = {level = 1, cons = 2, vida = 380}, ["Pidgeotto"] = {level = 20, cons = 2, vida = 1400}, ["Pidgeot"] = {level = 65, cons = 2, vida = 3800}, ["Rattata"] = {level = 1, cons = 2, vida = 350}, ["ShinyRattata"] = {level = 10, cons =2, vida = 900}, ["Raticate"] = {level = 20, cons = 2, vida = 900}, ["Spearow"] = {level = 5, cons = 2, vida = 450}, ["Fearow"] = {level = 50, cons = 2, vida = 3300}, ["Ekans"] = {level = 12, cons = 2, vida = 600}, ["Arbok"] = {level = 30, cons = 2, vida = 2900}, ["Pikachu"] = {level = 20, cons = 2, vida = 900}, ["Raichu"] = {level = 50, cons = 2, vida = 3200}, ["Sandshrew"] = {level = 18, cons = 2, vida = 700}, ["Sandslash"] = {level = 55, cons = 2, vida = 3400}, ["Nidoran Female"] = {level = 10, cons = 2, vida = 600}, ["Nidorina"] = {level = 25, cons = 2, vida = 2000}, ["Nidoqueen"] = {level = 65, cons = 2, vida = 4200}, ["Nidoran Male"] = {level = 10, cons = 2, vida = 650}, ["Nidorino"] = {level = 25, cons = 2, vida = 2500}, ["Nidoking"] = {level = 65, cons = 2, vida = 4800}, ["Clefairy"] = {level = 10, cons = 2, vida = 600}, ["Clefable"] = {level = 35, cons = 2, vida = 2400}, ["Vulpix"] = {level = 20, cons = 2, vida = 680}, ["Ninetales"] = {level = 65, cons = 2, vida = 3400}, ["Jigglypuff"] = {level = 10, cons = 2, vida = 550}, ["Wigglytuff"] = {level = 42, cons = 2, vida = 2900}, ["Zubat"] = {level = 5, cons = 2, vida = 450}, ["Golbat"] = {level = 30, cons = 2, vida = 1900}, ["Oddish"] = {level = 5, cons = 2, vida = 340}, ["Gloom"] = {level = 18, cons = 2, vida = 1400}, ["Vileplume"] = {level = 50, cons = 2, vida = 3300}, ["Paras"] = {level = 1, cons = 2, vida = 850}, ["Parasect"] = {level = 50, cons = 2, vida = 3800}, ["Venonat"] = {level = 18, cons = 2, vida = 1350}, ["Venomoth"] = {level = 50, cons = 2, vida = 3850}, ["Diglett"] = {level = 5, cons = 2, vida = 900}, ["Dugtrio"] = {level = 35, cons = 2, vida = 3500}, ["Meowth"] = {level = 12, cons = 2, vida = 950}, ["Persian"] = {level = 25, cons = 2, vida = 2250}, ["Psyduck"] = {level = 12, cons = 2, vida = 950}, ["Golduck"] = {level = 55, cons = 2, vida = 4000}, ["Mankey"] = {level = 10, cons = 2, vida = 1050}, ["Primeape"] = {level = 45, cons = 2, vida = 4500}, ["Growlithe"] = {level = 20, cons = 2, vida = 1000}, ["Arcanine"] = {level = 80, cons = 2, vida = 6800}, ["Poliwag"] = {level = 5, cons = 2, vida = 400}, ["Poliwhirl"] = {level = 20, cons = 2, vida = 1200}, ["Poliwrath"] = {level = 65, cons = 2, vida = 4400}, ["Abra"] = {level = 15, cons = 2, vida = 620}, ["Kadabra"] = {level = 50, cons = 2, vida = 2500}, ["Alakazam"] = {level = 80, cons = 94, vida = 4000}, ["Machop"] = {level = 18, cons = 2, vida = 1100}, ["Machoke"] = {level = 40, cons = 2, vida = 3500}, ["Machamp"] = {level = 65, cons = 2, vida = 7500}, ["Bellsprout"] = {level = 5, cons = 2, vida = 420}, ["Weepinbell"] = {level = 18, cons = 2, vida = 1100}, ["Victreebel"] = {level = 50, cons = 2, vida = 4000}, ["Tentacool"] = {level = 12, cons = 2, vida = 1050}, ["Tentacruel"] = {level = 70, cons = 2, vida = 7050}, ["Geodude"] = {level = 15, cons = 2, vida = 700}, ["Graveler"] = {level = 40, cons = 2, vida = 3000}, ["Golem"] = {level = 70, cons = 2, vida = 6500}, ["Ponyta"] = {level = 20, cons = 2, vida = 1400}, ["Rapidash"] = {level = 60, cons = 2, vida = 5500}, ["Slowpoke"] = {level = 12, cons = 2, vida = 1200}, ["Slowbro"] = {level = 45, cons = 2, vida = 4600}, ["Magnemite"] = {level = 15, cons = 2, vida = 450}, ["Magneton"] = {level = 40, cons = 2, vida = 1750}, ["Farfetchd"] = {level = 40, cons = 2, vida = 3000}, ["Doduo"] = {level = 12, cons = 2, vida = 600}, ["Dodrio"] = {level = 45, cons = 2, vida = 2650}, ["Seel"] = {level = 20, cons = 2, vida = 1000}, ["Dewgong"] = {level = 65, cons = 2, vida = 5200}, ["Grimer"] = {level = 12, cons = 2, vida = 600}, ["Muk"] = {level = 30, cons = 2, vida = 2400}, ["Shellder"] = {level = 5, cons = 2, vida = 800}, ["Cloyster"] = {level = 65, cons = 2, vida = 5000}, ["Gastly"] = {level = 18, cons = 2, vida = 1000}, ["Haunter"] = {level = 45, cons = 2, vida = 3000}, ["Gengar"] = {level = 80, cons = 2, vida = 7000}, ["Onix"] = {level = 50, cons = 2, vida = 5300}, ["Drowzee"] = {level = 22, cons = 2, vida = 1150}, ["Hypno"] = {level = 50, cons = 95, vida = 4600}, ["Krabby"] = {level = 5, cons = 2, vida = 850}, ["Kingler"] = {level = 35, cons = 2, vida = 3250}, ["Voltorb"] = {level = 14, cons = 2, vida = 620}, ["Electrode"] = {level = 38, cons = 2, vida = 2000}, ["Elekid"] = {level = 38, cons = 2, vida = 2000}, ["Exeggcute"] = {level = 8, cons = 2, vida = 800}, ["Exeggutor"] = {level = 48, cons = 2, vida = 4000}, ["Cubone"] = {level = 18, cons = 2, vida = 1200}, ["Marowak"] = {level = 45, cons = 2, vida = 3900}, ["Hitmonlee"] = {level = 60, cons = 2, vida = 9250}, ["Hitmonchan"] = {level = 60, cons = 2, vida = 10500}, ["Lickitung"] = {level = 45, cons = 2, vida = 4800}, ["Koffing"] = {level = 15, cons = 2, vida = 900}, ["Weezing"] = {level = 30, cons = 2, vida = 2800}, ["Rhyhorn"] = {level = 35, cons = 2, vida = 3800}, ["Rhydon"] = {level = 65, cons = 2, vida = 7000}, ["Chansey"] = {level = 60, cons = 2, vida = 7500}, ["Tangela"] = {level = 40, cons = 2, vida = 3500}, ["Kangaskhan"] = {level = 60, cons = 2, vida = 7000}, ["Horsea"] = {level = 5, cons = 2, vida = 300}, ["Seadra"] = {level = 45, cons = 2, vida = 2500}, ["Goldeen"] = {level = 10, cons = 2, vida = 950}, ["Seaking"] = {level = 25, cons = 2, vida = 2000}, ["Staryu"] = {level = 15, cons = 2, vida = 1050}, ["Starmie"] = {level = 45, cons = 2, vida = 3800}, ["Mr.mime"] = {level = 60, cons = 2, vida = 5500}, ["Scyther"] = {level = 70, cons = 2, vida = 6500}, ["Jynx"] = {level = 65, cons = 2, vida = 6000}, ["Electabuzz"] = {level = 70, cons = 2, vida = 6800}, ["Magmar"] = {level = 70, cons = 2, vida = 7200}, ["Pinsir"] = {level = 42, cons = 2, vida = 4000}, ["Tauros"] = {level = 40, cons = 2, vida = 4200}, ["Magikarp"] = {level = 1, cons = 2, vida = 120}, ["ShinyMagikarp"] = {level = 10, cons = 2, vida = 240}, ["Gyarados"] = {level = 75, cons = 2, vida = 7800}, ["Lapras"] = {level = 70, cons = 2, vida = 7000}, ["Ditto"] = {level = 40, cons = 2, vida = 4000}, ["Eevee"] = {level = 20, cons = 2, vida = 1500}, ["Vaporeon"] = {level = 55, cons = 2, vida = 4500}, ["Jolteon"] = {level = 55, cons = 2, vida = 4500}, ["Flareon"] = {level = 55, cons = 2, vida = 4500}, ["Porygon"] = {level = 45, cons = 2, vida = 100}, ["Omanyte"] = {level = 20, cons = 2, vida = 1300}, ["Omastar"] = {level = 70, cons = 2, vida = 6000}, ["Kabuto"] = {level = 20, cons = 2, vida = 1300}, ["Kabutops"] = {level = 70, cons = 2, vida = 6500}, ["Aerodactyl"] = {level = 100, cons = 2, vida = 8000}, ["Snorlax"] = {level = 85, cons = 2, vida = 9500}, ["Articuno"] = {level = 120, cons = 2, vida = 11000}, ["Zapdos"] = {level = 120, cons = 2, vida = 11000}, ["Moltres"] = {level = 120, cons = 2, vida = 11000}, ["Dratini"] = {level = 10, cons = 2, vida = 1200}, ["Dragonair"] = {level = 70, cons = 2, vida = 5600}, ["Dragonite"] = {level = 100, cons = 2, vida = 10800}, ["Mewtwo"] = {level = 100, cons = 2, vida = 8500}, ["Mew"] = {level = 100, cons = 2, vida = 7200}, ["Shiny Flygon"] = {level = 90, cons = 2, vida = 7000}, ["Shiny Milotic"] = {level = 8, cons = 2, vida = 8000}, } local msgunica = true local msgunicago1, msgunicaback1 = "Escolho você, doka!", "Volte, doka!" local msgunicago2, msgunicaback2 = "Escolho você, doka!", "Volte, doka!" local msgunicago3, msgunicaback3 = "Escolho você, doka!", "Volte, doka!" local msgunicago4, msgunicaback4 = "Escolho você, doka!", "Volte, doka!" local msgunicago5, msgunicaback5 = "Escolho você, doka!", "Volte, doka!" local msgunicago6, msgunicaback6 = "Escolho você, doka!", "Volte, doka!" function onUse(cid, item, frompos, item2, topos) for a, b in pairs(ginasios) do if getPlayerStorageValue(cid, b.storage) == 1 then -- GYM doPlayerSendCancel(cid, "You can't return your pokemon during gym battles.") return true end end if #getCreatureSummons(cid) >= 1 and getPlayerStorageValue(getCreatureSummons(cid)[1], 33) >= 1 then return true end local random2 = math.random(1,6) if random2 == 1 then msgunicaback = msgunicaback1 elseif random2 == 2 then msgunicaback = msgunicaback2 elseif random2 == 3 then msgunicaback = msgunicaback3 elseif random2 == 4 then msgunicaback = msgunicaback4 elseif random2 == 5 then msgunicaback = msgunicaback5 elseif random2 == 6 then msgunicaback = msgunicaback6 end local random = math.random(1,6) if random == 1 then msgunicago = msgunicago1 elseif random == 2 then msgunicago = msgunicago2 elseif random == 3 then msgunicago = msgunicago3 elseif random == 4 then msgunicago = msgunicago4 elseif random == 5 then msgunicago = msgunicago5 elseif random == 6 then msgunicago = msgunicago6 end if item.itemid == 2222 or item.itemid == 2223 then gobackeff = 188 elseif item.itemid == 2220 or item.itemid == 2221 then gobackeff = 191 elseif item.itemid == 2651 or item.itemid == 2652 then gobackeff = 189 elseif item.itemid == 2653 or item.itemid == 2654 then gobackeff = 190 elseif item.itemid == 2655 or item.itemid == 2656 then gobackeff = 195 end local effect = gobackeff local exhausted = 1 if item.itemid == 2223 or item.itemid == 2221 or item.itemid == 2652 or item.itemid == 2654 or item.itemid == 2656 then if (getPlayerStorageValue(cid, storage) >= os.time()) then doSendMagicEffect(getThingPos(cid), 2) return true end if #getCreatureSummons(cid) >= 1 then local z = getCreatureSummons(cid)[1] local pokename = getCreatureName(z) local mbk = msgunicaback:gsub("doka", pokename) if getItemAttribute(item.uid, "poke"):find(getCreatureName(z)) then doTransformItem(item.uid, item.itemid-1) doCreatureSay(cid, mbk, TALKTYPE_ORANGE_1) local summom = getCreatureSummons(cid) local maxh = pokes[getCreatureName(summom[1])].vida local pct2 = ((getCreatureHealth(summom[1])) / (getCreatureMaxHealth(summom[1]))) local vids = ((getCreatureHealth(summom[1])) - 2) doCreatureAddHealth(summom[1], -vids) setCreatureMaxHealth(summom[1], maxh) doCreatureAddHealth(summom[1], ((maxh) * (pct2))) doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")) .. " HP = ["..getCreatureHealth(z).."/"..getCreatureMaxHealth(z).."]") setPlayerStorageValue(cid,storage,os.time()+exhausted) setPlayerStorageValue(cid, 2, 0) doSendMagicEffect(getCreaturePosition(z), effect) doRemoveCreature(z) return true end end elseif item.itemid == 2222 or item.itemid == 2220 or item.itemid == 2651 or item.itemid == 2653 or item.itemid == 2655 then if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then doPlayerSendCancel(cid, "You must put your pokeball in the correct place!") return TRUE end if not canSummon(cid) then return doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTENOUGHROOM) end if getPlayerStorageValue(cid, 63215) >= 1 then return doPlayerSendCancel(cid, "You can't use pokeball while surfing.") end if getPlayerStorageValue(cid, 62314) >= 1 then return doPlayerSendCancel(cid, "You can't use pokeball while flying.") end if #getCreatureSummons(cid) >= 1 then return doPlayerSendCancel(cid, "You have already summoned a pokemon.") end for i,x in pairs(pokes) do if i == getItemAttribute(item.uid, "poke"):sub(9, findLetter(getItemAttribute(item.uid, "poke"), "'")-1) then if getPlayerLevel(cid) < x.level then doPlayerSendCancel(cid, "You need level "..x.level.." or higher to use this pokemon.") return true end local removed = doCreateItem(1285, 1, getThingPos(cid)) doSummonMonster(cid, i) local pk = getCreatureSummons(cid)[1] doTeleportThing(pk, getClosestFreeTile(pk, getThingPos(cid)), false) doRemoveItem(removed, 1) doCreatureSetLookDir(pk, 2) local maxh = pokes[getCreatureName(pk)].vida local levellife = ((getPlayerLevel(cid)) * (pokes[getCreatureName(pk)].cons)) local health = tonumber(getItemAttribute(item.uid, "poke"):match("%[(.-)/")) doConvinceCreature(cid, pk) doCreatureAddHealth(pk, health-maxh) local pct = ((getCreatureHealth(pk)) / (getCreatureMaxHealth(pk))) local vidis = (getCreatureHealth(pk)) setCreatureMaxHealth(pk, ((maxh) + (levellife))) doCreatureAddHealth(pk, 2) doCreatureAddHealth(pk, -vidis) doCreatureAddHealth(pk, ((getCreatureMaxHealth(pk)) * (pct)) - 2) doTransformItem(item.uid, item.itemid+1) local pokename = getCreatureName(getCreatureSummons(cid)[1]) local mgo = msgunicago:gsub("doka", pokename) doCreatureSay(cid, mgo, TALKTYPE_ORANGE_1) doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), "."))) doSendMagicEffect(getCreaturePosition(pk), effect) setPlayerStorageValue(cid,storage,os.time()+exhausted) registerCreatureEvent(pk, "DiePoke") registerCreatureEvent(pk, "Exp") break end end end local pk = getCreatureSummons(cid)[1] local pb = getPlayerSlotItem(cid, 8).uid local look = getItemAttribute(pb,"addon") if not look then doSetItemAttribute(pb,"addon", 0) return false end if look > 0 then doSetCreatureOutfit(pk, {lookType = look}, -1) return true end return TRUE end meu catch system é assim estão em teste mais funcionando perfeitamente vamos nessa cara bora me ajuda! local pokes = { ["Ditto"] = {chance = 1, corpse = 2817, health = 14000, maxhealth = 4000}, ["Magikarp"] = {chance = 1, corpse = 2818, health = 120, maxhealth = 120}, ["Eevee"] = {chance = 1, corpse = 6364, health = 1500, maxhealth = 1500}, ["Abra"] = {chance = 1, corpse = 2905, health = 620, maxhealth = 620}, ["Kadabra"] = {chance = 1, corpse = 6060, health = 2500, maxhealth = 2500}, ["Alakazam"] = {chance = 1, corpse = 6057, health = 4000, maxhealth = 4000}, ["Rattata"] = {chance = 1, corpse = 5974, health = 350, maxhealth = 350}, ["Raticate"] = {chance = 1, corpse = 6007, health = 900, maxhealth = 900}, ["Pidgey"] = {chance = 1, corpse = 5961, health = 380, maxhealth = 380}, ["Pidgeotto"] = {chance = 1, corpse = 5966, health = 1400, maxhealth = 1400}, ["Pidgeot"] = {chance = 1, corpse = 6020, health = 3800, maxhealth = 3800}, ["Zubat"] = {chance = 1, corpse = 5989, health = 450, maxhealth = 450}, ["Golbat"] = {chance = 1, corpse = 6053, health = 1900, maxhealth = 1900}, ["Bellsprout"] = {chance = 1, corpse = 2806, health = 420, maxhealth = 420}, ["Weepinbell"] = {chance = 1, corpse = 2928, health = 1100, maxhealth = 1100}, ["Victreebel"] = {chance = 1, corpse = 6332, health = 4000, maxhealth = 4000}, ["Poliwag"] = {chance = 1, corpse = 6042, health = 400, maxhealth = 400}, ["Poliwhirl"] = {chance = 1, corpse = 6054, health = 1200, maxhealth = 1200}, ["Poliwrath"] = {chance = 1, corpse = 6033, health = 4400, maxhealth = 4400}, ["Oddish"] = {chance = 1, corpse = 3008, health = 340, maxhealth = 340}, ["Gloom"] = {chance = 1, corpse = 6017, health = 1400, maxhealth = 1400}, ["Vileplume"] = {chance = 1, corpse = 6025, health = 3300, maxhealth = 3300}, ["Horsea"] = {chance = 1, corpse = 2973, health = 300, maxhealth = 300}, ["Seadra"] = {chance = 1, corpse = 2872, health = 2500, maxhealth = 2500}, ["Grimer"] = {chance = 1, corpse = 6055, health = 600, maxhealth = 600}, ["Weedle"] = {chance = 1, corpse = 5964, health = 325, maxhealth = 325}, ["Kakuna"] = {chance = 1, corpse = 6000, health = 900, maxhealth = 900}, ["Beedrill"] = {chance = 1, corpse = 5990, health = 1900, maxhealth = 1900}, ["Muk"] = {chance = 1, corpse = 2845, health = 2400, maxhealth = 2400}, ["Doduo"] = {chance = 1, corpse = 2842, health = 600, maxhealth = 600}, ["Dodrio"] = {chance = 1, corpse = 6047, health = 2650, maxhealth = 2650}, ["Magnemite"] = {chance = 1, corpse = 6056, health = 450, maxhealth = 450}, ["Magneton"] = {chance = 1, corpse = 6076, health = 1750, maxhealth = 1750}, ["Voltorb"] = {chance = 1, corpse = 6049, health = 620, maxhealth = 620}, ["Electrode"] = {chance = 1, corpse = 6051, health = 2000, maxhealth = 2000}, ["Geodude"] = {chance = 1, corpse = 6071, health = 700, maxhealth = 700}, ["Graveler"] = {chance = 1, corpse = 6516, health = 3000, maxhealth = 3000}, ["Golem"] = {chance = 1, corpse = 6043, health = 6500, maxhealth = 6500}, ["Sandshrew"] = {chance = 1, corpse = 5988, health = 700, maxhealth = 700}, ["Sandslash"] = {chance = 1, corpse = 6041, health = 3400, maxhealth = 3400}, ["Charmander"] = {chance = 1, corpse = 5983, health = 970, maxhealth = 970}, ["Charmeleon"] = {chance = 1, corpse = 5981, health = 2900, maxhealth = 2900}, ["Charizard"] = {chance = 1, corpse = 6005, health = 5200, maxhealth = 5200}, ["Vulpix"] = {chance = 1, corpse = 6003, health = 680, maxhealth = 680}, ["Ninetales"] = {chance = 1, corpse = 6040, health = 2650, maxhealth = 2650}, ["Bulbasaur"] = {chance = 1, corpse = 5969, health = 1200, maxhealth = 1200}, ["Ivysaur"] = {chance = 1, corpse = 5982, health = 2600, maxhealth = 2600}, ["Venusaur"] = {chance = 1, corpse = 5962, health = 5200, maxhealth = 5200}, ["Squirtle"] = {chance = 1, corpse = 6008, health = 1350, maxhealth = 1350}, ["Wartortle"] = {chance = 1, corpse = 5978, health = 2800, maxhealth = 2800}, ["Blastoise"] = {chance = 1, corpse = 5999, health = 5900, maxhealth = 5900}, ["Growlithe"] = {chance = 1, corpse = 6036, health = 1000, maxhealth = 1000}, ["Arcanine"] = {chance = 1, corpse = 6031, health = 6800, maxhealth = 6800}, ["Psyduck"] = {chance = 1, corpse = 6029, health = 950, maxhealth = 950}, ["Golduck"] = {chance = 1, corpse = 6028, health = 4000, maxhealth = 4000}, ["Pikachu"] = {chance = 1, corpse = 6001, health = 900, maxhealth = 900}, ["Raichu"] = {chance = 1, corpse = 5996, health = 3500, maxhealth = 3500}, ["Ekans"] = {chance = 1, corpse = 5979, health = 600, maxhealth = 600}, ["Arbok"] = {chance = 1, corpse = 5984, health = 2900, maxhealth = 2900}, ["Cubone"] = {chance = 1, corpse = 6050, health = 1200, maxhealth = 1200}, ["Marowak"] = {chance = 1, corpse = 6072, health = 3900, maxhealth = 3900}, ["Caterpie"] = {chance = 1, corpse = 5971, health = 300, maxhealth = 300}, ["Metapod"] = {chance = 1, corpse = 5970, health = 1100, maxhealth = 1100}, ["Butterfree"] = {chance = 1, corpse = 5985, health = 2000, maxhealth = 2000}, ["Goldeen"] = {chance = 1, corpse = 2970, health = 950, maxhealth = 950}, ["Seaking"] = {chance = 1, corpse = 3038, health = 2000, maxhealth = 2000}, ["Spearow"] = {chance = 1, corpse = 5968, health = 200, maxhealth = 200}, ["Fearow"] = {chance = 1, corpse = 5992, health = 3300, maxhealth = 3300}, ["Drowzee"] = {chance = 1, corpse = 6026, health = 1150, maxhealth = 1150}, ["Hypno"] = {chance = 1, corpse = 6046, health = 4600, maxhealth = 4600}, ["Diglett"] = {chance = 1, corpse = 6023, health = 900, maxhealth = 900}, ["Dugtrio"] = {chance = 1, corpse = 6024, health = 3450, maxhealth = 3450}, ["Krabby"] = {chance = 1, corpse = 6039, health = 850, maxhealth = 850}, ["Kingler"] = {chance = 1, corpse = 6340, health = 3250, maxhealth = 3250}, ["Paras"] = {chance = 1, corpse = 3007, health = 850, maxhealth = 850}, ["Parasect"] = {chance = 1, corpse = 6027, health = 3800, maxhealth = 3800}, ["Dratini"] = {chance = 1, corpse = 2879, health = 520, maxhealth = 520}, ["Dragonair"] = {chance = 1, corpse = 6002, health = 3000, maxhealth = 3000}, ["Dragonite"] = {chance = 1, corpse = 4295, health = 17000, maxhealth = 17000}, ["Ponyta"] = {chance = 1, corpse = 5975, health = 1400, maxhealth = 1400}, ["Rapidash"] = {chance = 1, corpse = 4323, health = 5500, maxhealth = 5500}, ["Pinsir"] = {chance = 1, corpse = 7282, health = 55, maxhealth = 55}, ["Seel"] = {chance = 1, corpse = 6030, health = 1000, maxhealth = 1000}, ["Dewgong"] = {chance = 1, corpse = 6038, health = 5200, maxhealth = 5200}, ["Exeggcute"] = {chance = 1, corpse = 2982, health = 800, maxhealth = 800}, ["Exeggutor"] = {chance = 1, corpse = 3005, health = 450, maxhealth = 4000}, ["Koffing"] = {chance = 1, corpse = 2936, health = 900, maxhealth = 900}, ["Weezing"] = {chance = 1, corpse = 6306, health = 2800, maxhealth = 2800}, ["Staryu"] = {chance = 1, corpse = 5987, health = 1050, maxhealth = 1050}, ["Starmie"] = {chance = 1, corpse = 7320, health = 3800, maxhealth = 3800}, ["Rhyhorn"] = {chance = 1, corpse = 3035, health = 3800, maxhealth = 3800}, ["Rhydon"] = {chance = 1, corpse = 2858, health = 7000, maxhealth = 7000}, ["Shellder"] = {chance = 1, corpse = 2837, health = 800, maxhealth = 800}, ["Snorlax"] = {chance = 1, corpse = 6016, health = 9000, maxhealth = 9000}, ["Gyarados"] = {chance = 1, corpse = 6331, health = 7800, maxhealth = 7800}, ["Machop"] = {chance = 1, corpse = 6045, health = 1100, maxhealth = 1100}, ["Machoke"] = {chance = 1, corpse = 4251, health = 2850, maxhealth = 3500}, ["Machamp"] = {chance = 1, corpse = 6048, health = 6100, maxhealth = 7500}, ["Clefairy"] = {chance = 1, corpse = 2968, health = 600, maxhealth = 600}, ["Clefable"] = {chance = 1, corpse = 6006, health = 2400, maxhealth = 2400}, ["Jigglypuff"] = {chance = 1, corpse = 6011, health = 550, maxhealth = 550}, ["Wigglytuff"] = {chance = 1, corpse = 6012, health = 2900, maxhealth = 2900}, ["Venonat"] = {chance = 1, corpse = 5997, health = 1350, maxhealth = 1350}, ["Venomoth"] = {chance = 1, corpse = 2925, health = 3850, maxhealth = 3850}, ["Meowth"] = {chance = 1, corpse = 6034, health = 950, maxhealth = 950}, ["Persian"] = {chance = 1, corpse = 6009, health = 2250, maxhealth = 2250}, ["Mankey"] = {chance = 1, corpse = 6035, health = 1050, maxhealth = 1050}, ["Primeape"] = {chance = 1, corpse = 6032, health = 4500, maxhealth = 4500}, ["Tentacool"] = {chance = 1, corpse = 2961, health = 1050, maxhealth = 1050}, ["Tentacruel"] = {chance = 1, corpse = 6037, health = 7050, maxhealth = 7050}, ["Slowpoke"] = {chance = 1, corpse = 2926, health = 1200, maxhealth = 1200}, ["Slowbro"] = {chance = 1, corpse = 5986, health = 4600, maxhealth = 4600}, ["Cloyster"] = {chance = 1, corpse = 2932, health = 120, maxhealth = 5000}, ["Gastly"] = {chance = 1, corpse = 5993, health = 1000, maxhealth = 1000}, ["Haunter"] = {chance = 1, corpse = 6004, health = 3000, maxhealth = 3000}, ["Gengar"] = {chance = 1, corpse = 6336, health = 7000, maxhealth = 7000}, ["Onix"] = {chance = 1, corpse = 2990, health = 5300, maxhealth = 5300}, ["Hitmonlee"] = {chance = 1, corpse = 6067, health = 9250, maxhealth = 9250}, ["Hitmonchan"] = {chance = 1, corpse = 5977, health = 10500, maxhealth = 10500}, ["Lickitung"] = {chance = 1, corpse = 2953, health = 4800, maxhealth = 4800}, ["Chansey"] = {chance = 1, corpse = 6010, health = 7500, maxhealth = 7500}, ["Tangela"] = {chance = 1, corpse = 5976, health = 3500, maxhealth = 3500}, ["Kangaskhan"] = {chance = 1, corpse = 6073, health = 7000, maxhealth = 7000}, ["Scyther"] = {chance = 1, corpse = 3002, health = 6500, maxhealth = 6500}, ["Electabuzz"] = {chance = 1, corpse = 6065, health = 6800, maxhealth = 6800}, ["Elekid"] = {chance = 1, corpse = 5762, health = 6800, maxhealth = 6800}, ["Magmar"] = {chance = 1, corpse = 7283, health = 7200, maxhealth = 7200}, ["Jynx"] = {chance = 1, corpse = 5765, health = 7000, maxhealth = 7000}, ["Nidoran Male"] = {chance = 1, corpse = 6015, health = 650, maxhealth = 650}, ["Nidoran Female"] = {chance = 1, corpse = 6013, health = 600, maxhealth = 600}, ["Nidoking"] = {chance = 2, corpse = 5995, health = 4800, maxhealth = 4800}, ["Nidoqueen"] = {chance = 1, corpse = 3004, health = 4200, maxhealth = 4200}, ["Nidorina"] = {chance = 1, corpse = 6014, health = 2000, maxhealth = 2000}, ["Nidorino"] = {chance = 1, corpse = 6019, health = 2500, maxhealth = 2500}, ["Farfetchd"] = {chance = 1, corpse = 2836, health = 2500, maxhealth = 2500}, ["Mrmime"] = {chance = 1, corpse = 6069, health = 5500, maxhealth = 5500}, ["Tauros"] = {chance = 1, corpse = 6302, health = 4200, maxhealth = 4200}, ["Lapras"] = {chance = 1, corpse = 6018, health = 8000, maxhealth = 8000}, ["Omanyte"] = {chance = 1, corpse = 5998, health = 1300, maxhealth = 1300}, ["Omastar"] = {chance = 1, corpse = 5994, health = 6000, maxhealth = 6000}, ["Kabuto"] = {chance = 1, corpse = 5972, health = 1375, maxhealth = 1375}, ["Kabutops"] = {chance = 1, corpse = 6345, health = 6920, maxhealth = 6920}, ["Aerodactyl"] = {chance = 1, corpse = 6338, health = 7100, maxhealth = 7100}, ["Articuno"] = {chance = 1, corpse = 7256, health = 12000, maxhealth = 12000}, ["Zapdos"] = {chance = 1, corpse = 6074, health = 11000, maxhealth = 11000}, ["Moltres"] = {chance = 1, corpse = 7330, health = 11000, maxhealth = 11000}, ["Mewtwo"] = {chance = 1, corpse = 5973, health = 8500, maxhealth = 8500}, ["Mew"] = {chance = 1, corpse = 2939, health = 7200, maxhealth = 7200}, ["Shiny Milotic"] = {chance = 1, corpse = 9632, health = 8000, maxhealth = 8000}, ["Elder Charizard"] = {chance = 1, corpse = 2954, health = 7200, maxhealth = 7200}, ["Shiny Magikarp"] = {chance = 1, corpse = 105, health = 280, maxhealth = 280}, ["Shiny Rattata"] = {chance = 1, corpse = 110, health = 900, maxhealth = 900}, ["Shiny Paras"] = {chance = 1, corpse = 116, health = 1400, maxhealth = 1400}, ["Shiny Oddish"] = {chance = 1, corpse = 115, health = 990, maxhealth = 990}, ["Shiny Zubat"] = {chance = 1, corpse = 114, health = 1200, maxhealth = 1200}, ["Shiny Tentacool"] = {chance = 1, corpse = 122, health = 2200, maxhealth = 2200}, ["Shiny Tentacruel"] = {chance = 1, corpse = 128, health = 7000, maxhealth = 7000}, ["Shiny Raticate"] = {chance = 0, corpse = 136, health = 0, maxhealth = 0}, ["Shiny Krabby"] = {chance = 1, corpse = 126, health = 0, maxhealth = 0}, ["Shiny Kingler"] = {chance = 1, corpse = 138, health = 0, maxhealth = 0}, ["Shiny Horsea"] = {chance = 1, corpse = 139, health = 0, maxhealth = 0}, ["Shiny Seadra"] = {chance = 1, corpse = 131, health = 0, maxhealth = 0}, ["Shiny Gyarados"] = {chance = 2000, corpse = 144, health = 18000, maxhealth = 18000}, ["Shiny Parasect"] = {chance = 50, corpse = 127, health = 0, maxhealth = 0}, ["Shiny Scyther"] = {chance = 50, corpse = 142, health = 0, maxhealth = 0}, ["Shiny Electabuz"] = {chance = 50, corpse = 143, health = 0, maxhealth = 0}, ["Shiny Jynx"] = {chance = 50, corpse = 129, health = 0, maxhealth = 0}, ["Shiny Electrode"] = {chance = 50, corpse = 124, health = 0, maxhealth = 0}, ["Shiny Voltorb"] = {chance = 50, corpse = 125, health = 0, maxhealth = 0}, ["Shiny Raichu"] = {chance = 50, corpse = 140, health = 0, maxhealth = 0}, ["Shiny Venonat"] = {chance = 50, corpse = 130, health = 0, maxhealth = 0}, ["Shiny Venomoth"] = {chance = 50, corpse = 132, health = 0, maxhealth = 0}, ["Shiny Beedrill"] = {chance = 50, corpse = 137, health = 0, maxhealth = 0}, ["Shiny Butterfree"] = {chance = 50, corpse = 133, health = 0, maxhealth = 0}, ["Shiny Venusaur"] = {chance = 50, corpse = 135, health = 0, maxhealth = 0}, ["Shiny Blastoise"] = {chance = 1, corpse = 134, health = 0, maxhealth = 0}, ["Shiny Farfetchd"] = {chance = 50, corpse = 119, health = 7000, maxhealth = 7000}, ["Shiny Grimer"] = {chance = 50, corpse = 123, health = 2600, maxhealth = 2600}, ["Shiny Muk"] = {chance = 50, corpse = 121, health = 7400, maxhealth = 7400}, ["Shiny Growlithe"] = {chance = 50, corpse = 117, health = 3000, maxhealth = 3000}, ["Shiny Arcanine"] = {chance = 50, corpse = 120, health = 17000, maxhealth = 17000}, ["Shiny Dratini"] = {chance = 40, corpse = 118, health = 5400, maxhealth = 5400}, ["Shiny Abra"] = {chance = 50, corpse = 141, health = 3620, maxhealth = 3620}, ["Shiny Flygon"] = {chance = 1, corpse = 11381, health = 7000, maxhealth = 7000}, } local description = "Contains a %pokename." function onUse(cid, item, frompos, item2, topos) local name = getItemNameById(item2.itemid) if item.itemid == 2147 then -- POKEBALL catchrate = 4 oncatch = 24 onfail = 23 bolabola = 2222 elseif item.itemid == 2642 then -- GREATBALL catchrate = 5 oncatch = 198 onfail = 197 bolabola = 2651 elseif item.itemid == 2645 then -- SUPERBALL catchrate = 6 oncatch = 202 onfail = 201 bolabola = 2653 elseif item.itemid == 2146 then -- ULTRABALL catchrate = 8 oncatch = 200 onfail = 199 bolabola = 2220 elseif item.itemid == 0 then -- MEGABALL catchrate = 10 oncatch = 0 onfail = 0 bolabola = 0 elseif item.itemid == 2644 then -- EXBALL(Saffari) catchrate = 80000 oncatch = 204 onfail = 203 bolabola = 2655 end local rate = (catchrate) local catch = oncatch local fail = onfail local newid = bolabola for i,x in pairs(pokes) do if getItemNameById(item2.itemid):find(i:lower()) then if getItemIdByName(name) == pokes.corpse then if cid ~= getItemAttribute(item2.uid, "corpseowner") and isInArray({1,8}, getPlayerGroupId(cid)) then doPlayerSendCancel(cid, "You are not allowed to catch this pokemon.") return true end doRemoveItem(item.uid, 1) doRemoveItem(item2.uid, 1) local pegar = math.random(1, x.chance) if pegar <= 1*(rate) then doSendMagicEffect(topos, catch) local nas = { ["%%pokename"] = i } for i,x in pairs(nas) do if description:find(i) then description = description:gsub(i, x) end end local function capturou(params) if not isCreature(params.cid) then return true end if not string.find(getPlayerStorageValue(cid, 54842), ""..i..",") then doPlayerAddSoul(cid, 1) setPlayerStorageValue(cid, 54842, getPlayerStorageValue(cid, 54842)..""..i..", ") end if getPlayerFreeCap(cid) <= 0 then item = doCreateItemEx(newid-1) doItemSetAttribute(item, "poke", params.poke) doItemSetAttribute(item, "nome", params.nome) doItemSetAttribute(item, "description", params.description) doItemSetAttribute(item, "addon", 0) doPlayerSendMailByName(getCreatureName(params.cid), item, 1) doPlayerSendTextMessage(cid, 27, "Parabéns, você capturou um "..i.."!") doPlayerSendTextMessage(cid, 27, "Since you are already holding six pokemons, this pokeball has been sent to your depot.") else item = doCreateItemEx(params.ball) doItemSetAttribute(item, "poke", params.poke) doItemSetAttribute(item, "nome", params.nome) doItemSetAttribute(item, "description", params.description) doItemSetAttribute(item, "addon", 0) doPlayerAddItemEx(params.cid, item, true) doTransformItem(item, newid) doPlayerSendTextMessage(cid, 27, "Parabéns, você capturou um "..i.."!") doSendMagicEffect(getThingPos(cid), 177) end end local description = "Contains a "..i.."." local poke1 = "This is "..i.."'s pokeball. HP = ["..x.health.."/"..x.maxhealth.."]" addEvent(capturou, 4000, {cid = cid, poke = poke1, nome = i, description = description, ball = 2219, letter = 2597}) else function ruim(params) if not isCreature(params.cid) then return true end doPlayerSendTextMessage(params.cid, 27, "Sorry, you didn\'t catch that pokemon.") if #getCreatureSummons(params.cid) >= 1 then doSendMagicEffect(getThingPos(getCreatureSummons(params.cid)[1]), 166) else doSendMagicEffect(getThingPos(params.cid), 166) end end addEvent(ruim, 4000, {cid = cid}) doSendMagicEffect(topos, fail) end end end end return TRUE end Man Acabei de Criar o Tópico com o Tutorial, mas como eu falei que ia postar para vc vou dar Ctrl+C e Ctrl+v Para vc! Em Data/actions e Actions.xml adiciona isto: <action itemid="IdAddon;IdAddon" event="script" value="Addon.lua"/> Em IdAddon Coloca os ids dos items dos addons! ai para adicionar mais ids é só colocar o ";" Ou seja aquele negocio verde, e depois colocar o ID Ficando: IdAddon;IdAddon;IdAddon e por ai vai Ai Em Data/actions/scripts cria um arquivo lua Chamado "Addon" e Dentro Dele Adiciona Isto: function onUse(cid, item, fromPosition, itemEx, toPosition) local addons = { [12593] = {pokemon= "Electabuzz" , looktype = 1482}, --xxxx = id do item do addon --- "Scyther" = nome do pokemon --- looktype = 1 é o looktype do pokemon com addon [12925] = {pokemon= "Alakazam" , looktype = 1471}, --xxxx = id do item do addon --- "Scyther" = nome do pokemon --- looktype = 1 é o looktype do pokemon com addon } if #getCreatureSummons(cid) > 0 then doPlayerSendCancel(cid, "Please back your pokemon.") return false end local numero = addons[item.itemid].looktype local pb = getPlayerSlotItem(cid, 8).uid local pk = addons[item.itemid].pokemon if getItemAttribute(pb,"poke") ~= pk then doPlayerSendCancel(cid, "Sorry, you can't use this addon on this poke.") return false end if getItemAttribute(pb,"addon") < 1 then doRemoveItem(item.uid, 1) doPlayerSendTextMessage(cid, 27, "Congratulations! Now your pokemon will use the addon.") doSetItemAttribute(pb,"addon",numero) return true end return true end Ai para adicionar um Novo Addon é só Adicionar esta tag: [ItemID] = {pokemon= "NomeDoPoke" , looktype = IdDaOutfit}, EM ItemID, troca pelo id do addon em pokemon troca NomeDoPoke, pelo Nome Do Pokémon que vai ser adicionado o Addon Em looktype, troca IdDaOutfit, pelo looktype do pokémon com addon! Em Goback.lua Procure Por: else doPlayerSendCancel(cid, "This pokemon is fainted.") end E Adiciona Emcima de Else Isto: local pk = getCreatureSummons(cid)[1] local pb = getPlayerSlotItem(cid, 8).uid local look = getItemAttribute(pb,"addon") if not look then doSetItemAttribute(pb,"addon",0) return false end if look > 0 then doSetCreatureOutfit(pk, {lookType = look}, -1) return true end Em Catch system.lua Procura Por: doItemSetAttribute(item, "description", description) Adiciona Isto embaixo: doItemSetAttribute(item, "addon", 0) Em Some Functions.lua Procure Por: unLock(item.uid) Da Enter Duas Vezes e Adiciona isto: local pk = getCreatureSummons(cid)[1] local pb = getPlayerSlotItem(cid, 8).uid local look = getItemAttribute(pb,"addon") if not look then doSetItemAttribute(pb,"addon",0) return false end if look > 0 then doSetCreatureOutfit(pk, {lookType = look}, -1) return true end Pronto! Sistema de Addon Funcionando Perfeitamente Caso Coloque Tudo Certinho! Caso Queira uma Addon Box... Faz isto Em Actions.xml Adiciona Isto: <action itemid="12595" event="script" value="addonbox.lua"/> E Em Data/Actions/Scripts Cria um Arquivo Lua Chamado "addonbox" e Adiciona Isto Dentro Dele: function onUse(cid, item, frompos, item2, topos, pos) local addons = {12593,12889} local randomChance = math.random(1, 49) if item2.itemid == 12595 then doSendMagicEffect(getCreaturePosition(cid), 28) doRemoveItem(item2.uid, 1) doPlayerAddItem(cid, addons[randomChance], 1) doPlayerSendTextMessage(cid, 27, "Você ganhou um Addon!") return true end end Pronto Addon Box Adicionada! Créditos Pokémon X Rain Pelo Sistema de Addon Summer Slyer (Zet0N0Murmurou) Por Trazer ao Tibiaking, e Por Fazer o Tutorial! Caso de algum erro, manda print e fala ai pra eu tentar ajudar! Editado Junho 4, 2015 10 anos por Summer Slyer (veja o histórico de edições) Pokémon Dust Evolution É aonde começa sua nova aventura!! Facebook Verifique Atualizaçõ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.