elfkadu 0 Postado Fevereiro 18, 2011 Share Postado Fevereiro 18, 2011 SCRIPT DO Pokemon Dash server PALAVRAS DO CRIADOR FEITO POR MASTERCRAFT (######) / BRUN123 (XTIBIA.COM) Na pasta data/actions/scripts, você encontra o catch.lua, para adicionar um novo catch, basta adicionar a tag: ["NOME"] = {chance = 10, corpse = 9999, health = 5000, maxhealth = 5000}, Em health/max health, você coloca a vida máxima que esse pokemon possui, basta olhar no xml do monstro. Em corpse, você precisa colocar o id do corpo quando o monstro morrer, e é preciso também editar o items.xml, você procura o id do corpo e faz as seguintes modificações: no campo "decayto", você põem 0, no campo "duration", você põem 50, e o nome, você coloca "defeated <nome>". A chance foi editada na versão 2, agora, quanto menor for a chance, maior é a chance de capturar. Chance 1 = 100% Chance 20 = Aprox. a cada 20 pokeballs você captura 1, mas precisa ter muita sorte também... Ao usar uma ultraball, a chance automaticamente é multiplicada por 4x. MESMO FAZENDO ISSO Ñ CONSIGO CAPTURA UM SIMPLES FEAROW O QUE FALTA ADICIONAR E AONDE? CATCH.LUA local pokes = { ["Fearow"] = {chance = 2, corpse = 5992, health = 2500, maxhealth = 2500}, ["Magikarp"] = {chance = 2, corpse = 2818, health = 120, maxhealth = 120}, ["Abra"] = {chance = 59, corpse = 2905, health = 620, maxhealth = 620}, ["Kadabra"] = {chance = 142, corpse = 6060, health = 2500, maxhealth = 2500}, ["Alakazam"] = {chance = 241, corpse = 6057, health = 2500, maxhealth = 2500}, ["Rattata"] = {chance = 8, corpse = 5974, health = 350, maxhealth = 350}, ["Raticate"] = {chance = 16, corpse = 6007, health = 900, maxhealth = 900}, ["Pidgey"] = {chance = 11, corpse = 5961, health = 380, maxhealth = 380}, ["Pidgeotto"] = {chance = 26, corpse = 5966, health = 1400, maxhealth = 1400}, ["Pidgeot"] = {chance = 167, corpse = 6020, health = 3800, maxhealth = 3800}, ["Zubat"] = {chance = 15, corpse = 5989, health = 450, maxhealth = 450}, ["Golbat"] = {chance = 53, corpse = 6053, health = 1900, maxhealth = 1900}, ["Bellsprout"] = {chance = 13, corpse = 2806, health = 420, maxhealth = 420}, ["Weepinbell"] = {chance = 28, corpse = 2928, health = 1100, maxhealth = 1100}, ["Victreebel"] = {chance = 140, corpse = 6332, health = 4000, maxhealth = 4000}, ["Poliwag"] = {chance = 8, corpse = 6042, health = 400, maxhealth = 400}, ["Poliwhirl"] = {chance = 29, corpse = 6054, health = 1200, maxhealth = 1200}, ["Poliwrath"] = {chance = 186, corpse = 6033, health = 4400, maxhealth = 4400}, ["Oddish"] = {chance = 7, corpse = 3008, health = 340, maxhealth = 340}, ["Gloom"] = {chance = 25, corpse = 6017, health = 1400, maxhealth = 1400}, ["Vileplume"] = {chance = 133, corpse = 6025, health = 3300, maxhealth = 3300}, ["Horsea"] = {chance = 10, corpse = 2973, health = 300, maxhealth = 300}, ["Seadra"] = {chance = 87, corpse = 2872, health = 2500, maxhealth = 2500}, ["Grimer"] = {chance = 14, corpse = 6055, health = 600, maxhealth = 600}, ["Weedle"] = {chance = 3, corpse = 5964, health = 325, maxhealth = 325}, ["Kakuna"] = {chance = 18, corpse = 6000, health = 900, maxhealth = 900}, ["Beedrill"] = {chance = 40, corpse = 5990, health = 1900, maxhealth = 1900}, ["Muk"] = {chance = 55, corpse = 2845, health = 2400, maxhealth = 2400}, ["Doduo"] = {chance = 16, corpse = 2842, health = 600, maxhealth = 600}, ["Dodrio"] = {chance = 79, corpse = 6047, health = 2650, maxhealth = 2650}, ["Magnemite"] = {chance = 19, corpse = 6056, health = 450, maxhealth = 450}, ["Magneton"] = {chance = 70, corpse = 6076, health = 1750, maxhealth = 1750}, ["Voltorb"] = {chance = 13, corpse = 6049, health = 620, maxhealth = 620}, ["Electrode"] = {chance = 60, corpse = 6051, health = 2000, maxhealth = 2000}, ["Geodude"] = {chance = 17, corpse = 6071, health = 700, maxhealth = 700}, ["Graveler"] = {chance = 105, corpse = 6516, health = 3000, maxhealth = 3000}, ["Golem"] = {chance = 205, corpse = 6043, health = 6500, maxhealth = 6500}, ["Sandshrew"] = {chance = 16, corpse = 5988, health = 700, maxhealth = 700}, ["Sandslash"] = {chance = 160, corpse = 6041, health = 3400, maxhealth = 3400}, ["Charmander"] = {chance = 20, corpse = 5983, health = 970, maxhealth = 970}, ["Charmeleon"] = {chance = 73, corpse = 5981, health = 2900, maxhealth = 2900}, ["Charizard"] = {chance = 261, corpse = 6005, health = 5200, maxhealth = 5200}, } local description = "Contains a %pokename." function onUse(cid, item, frompos, item2, topos) local name = getItemNameById(item2.itemid) if item.itemid == 2147 then catchrate = 1 oncatch = 24 onfail = 23 bolabola = 2222 elseif item.itemid == 2146 then catchrate = 4 oncatch = 200 onfail = 199 bolabola = 2220 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[i].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(0, 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.99 then item = doCreateItemEx(newid-1) doItemSetAttribute(item, "poke", params.poke) doItemSetAttribute(item, "nome", params.nome) doItemSetAttribute(item, "description", params.description) doPlayerSendMailByName(getCreatureName(params.cid), item, 1) doPlayerSendTextMessage(cid, 27, "Congratulations, you caught a "..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) doPlayerAddItemEx(params.cid, item, true) doTransformItem(item, newid) doPlayerSendTextMessage(cid, 27, "Congratulations, you caught a "..i.."!") end if #getCreatureSummons(cid) >= 1 then doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 178) else doSendMagicEffect(getThingPos(cid), 178) 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 VLW Link para o comentário Compartilhar em outros sites More sharing options...
drakylucas 159 Postado Fevereiro 18, 2011 Share Postado Fevereiro 18, 2011 (editado) nos registro dos pokemons coloque: ["Fearow"] = {chance = 250, corpse = ID_DO_CORPO_DO_FEAROW, health = hp_maximo_do_fearow, maxhealth = hp_maximo_do_fearow}, EDIT: ja vi que ja tme la (só vi dps que postei) ve se o corpo do fearow é o mmso que ta na ID ai ./\ =d e tb se no items.xml ta com o nome certo do corpo. Editado Fevereiro 18, 2011 por DrakyLucas Link para o comentário Compartilhar em outros sites More sharing options...
elfkadu 0 Postado Fevereiro 18, 2011 Autor Share Postado Fevereiro 18, 2011 ta o mesmo id sim. fiz basiado no look do gm fui no item e eu alterei td sertinho. ja tentei copiar de um pokemon q da pra captura e soh altera o id e o nome, tbm n deu. deve te algum lugar q tem que por o id ou o nome do pokemon só n sei onde Link para o comentário Compartilhar em outros sites More sharing options...
Redspark 23 Postado Fevereiro 19, 2011 Share Postado Fevereiro 19, 2011 (editado) Cara, presta mais atenção, o proprio tutorial que voce boto no post ja diz, é um sistema de catch, só vai capturar os pokemons mortos, então, coloque "Defeated" atrás dos nomes dos pokemons, exemplo: ["Defeated Fearow"] = {chance = 2, corpse = 5992, health = 2500, maxhealth = 2500}, Se funfar, por favor REP+ :smile_positivo: Editado Fevereiro 19, 2011 por Redspark Link para o comentário Compartilhar em outros sites More sharing options...
elfkadu 0 Postado Fevereiro 22, 2011 Autor Share Postado Fevereiro 22, 2011 eu ja resolvi o problema, n tem nd haver com o cath ele esta certo. problema ta no items.xml tem que mudar o tipo do corpo tbm. estou em casa qdo estiver no serviço posto os dados corretamente. obrigado por quem tentou ajudar Link para o comentário Compartilhar em outros sites More sharing options...
peralta52 2 Postado Fevereiro 5, 2012 Share Postado Fevereiro 5, 2012 ALGUEM ME AJUDA N CONSIGO POR CORPSES ALGUEM PODE DISPONIBILIZAR PRA MIM ? Link para o comentário Compartilhar em outros sites More sharing options...
Posts Recomendados