SmiX 265 Postado Janeiro 13, 2013 Share Postado Janeiro 13, 2013 Olá galerinha, hoje vou ajudar vocês a otimizarem seus respectivos otservidores de pokémon, de base PDA. Como o título já está falando tudo, vamos a instalação. Como quase todo mundo usa a base do slicer vou usar o dele. Vá em: (data/actions/scripts/catch.lua) e substitua tudo por isso: local chance_premium = 200 -- Mude aqui a chance de capiturar local ballcatch = { [2394] = {cr = 3, on = 24, off = 23, ball = 11826, send = 47, typeee = "normal"}, [2391] = {cr = 6, on = 198, off = 197, ball = 11832, send = 48, typeee = "great"}, [2393] = {cr = 10, on = 202, off = 201, ball = 11835, send = 46, typeee = "super"}, [2392] = {cr = 15, on = 200, off = 199, ball = 11829, send = 49, typeee = "ultra"}, } function onUse(cid, item, frompos, item3, topos) local item2 = getTopCorpse(topos) if item2 == null then return true end if getItemAttribute(item2.uid, "catching") == 1 then return true end if getItemAttribute(item2.uid, "golden") and getItemAttribute(item2.uid, "golden") == 1 then return doPlayerSendCancel(cid, "You can't try to catch a pokemon in the Golden Arena!") --alterado v1.6 end local name = string.lower(getItemNameById(item2.itemid)) name = string.gsub(name, "fainted ", "") name = string.gsub(name, "defeated ", "") local x = pokecatches[doCorrectPokemonName(name)] -------------------------------------------------------------------------------- local storage = newpokedex[doCorrectPokemonName(name)].stoCatch --edited brokes count system if getPlayerStorageValue(cid, storage) == -1 then setPlayerStorageValue(cid, storage, "normal = 0, great = 0, super = 0, ultra = 0, saffari = 0") end -------------------------------------------------------------------------------- if not x then return true end local owner = getItemAttribute(item2.uid, "corpseowner") if owner and isCreature(owner) and isPlayer(owner) and cid ~= owner then --alterado v1.5 doPlayerSendCancel(cid, "You are not allowed to catch this pokemon.") return true end ----------------------------------------------------- newidd = ballcatch[item.itemid].ball typeee = ballcatch[item.itemid].typeee ----------------------------------------------------- local catchinfo = {} if isPremium(cid) then catchinfo.rate = ballcatch[item.itemid].cr + chance_premium else catchinfo.rate = ballcatch[item.itemid].cr end catchinfo.catch = ballcatch[item.itemid].on catchinfo.fail = ballcatch[item.itemid].off catchinfo.newid = newidd catchinfo.name = doCorrectPokemonName(name) catchinfo.topos = topos catchinfo.chance = x.chance doSendDistanceShoot(getThingPos(cid), topos, ballcatch[item.itemid].send) doRemoveItem(item.uid, 1) local d = getDistanceBetween(getThingPos(cid), topos) addEvent(doSendPokeBall, d * 70 + 100 - (d * 14) , cid, catchinfo, false, false, typeee) --edited brokes count system addEvent(doSendMagicEffect, (d * 70 + 100 - (d * 14)) - 100, topos, 3) return true end Funciona assim: Se um player for premium ele terá a chance de catch da ball + a chance premium, ou seja; Ele usa uma pokeball e é premium ele terá 3+200 = 203% de capiturar ;D, só precisa mudar a chance de premium lá em cima para seu gosto, deixei 200 pra teste ^}^. Só isso, fui.... Link para o comentário https://xtibia.com/forum/topic/204240-premium-caugtch-by-smix/ Compartilhar em outros sites More sharing options...
AWeskers 14 Postado Janeiro 13, 2013 Share Postado Janeiro 13, 2013 Fico féra cara. Script muito bem feito e vai ajudar muita gente que ta fazendo OT de Pokemon. Parabens ae. Atenciosamente: Jhonsy Link para o comentário https://xtibia.com/forum/topic/204240-premium-caugtch-by-smix/#findComment-1438141 Compartilhar em outros sites More sharing options...
Gabrieltxu 737 Postado Janeiro 13, 2013 Share Postado Janeiro 13, 2013 Smix pega em Server sem lvl u.u? Link para o comentário https://xtibia.com/forum/topic/204240-premium-caugtch-by-smix/#findComment-1438184 Compartilhar em outros sites More sharing options...
SmiX 265 Postado Janeiro 14, 2013 Autor Share Postado Janeiro 14, 2013 @Jhonsy Obrigado. @Gabrieltxu Sim, funciona. Link para o comentário https://xtibia.com/forum/topic/204240-premium-caugtch-by-smix/#findComment-1438376 Compartilhar em outros sites More sharing options...
didogunner 2 Postado Fevereiro 5, 2013 Share Postado Fevereiro 5, 2013 Bom não se só comigo... mas quando joga a ball pra capturar da um freeze de 1 2 seg ai sim começa a capturar ( isso dps que coloquei o script claro, sem ele funfa normal ). E coloquei o local chance_premium = 2003% de chances capturei na primeira e na segunda eu não capturei o charizard " mas na logica 100% já capturaria qualquer coisa... Help? Link para o comentário https://xtibia.com/forum/topic/204240-premium-caugtch-by-smix/#findComment-1461412 Compartilhar em outros sites More sharing options...
StyloMaldoso 330 Postado Fevereiro 6, 2013 Share Postado Fevereiro 6, 2013 Digo Isso ja aconteçeu comigo, ja conversei com o Slicer ele falo que a formula do brun123 é muito loka uhahua. eu testei no servídor, colokei chance vip 30 e + 15 da ultra ball, sucesso ! ahuahu Link para o comentário https://xtibia.com/forum/topic/204240-premium-caugtch-by-smix/#findComment-1461970 Compartilhar em outros sites More sharing options...
Slicer 1070 Postado Fevereiro 6, 2013 Share Postado Fevereiro 6, 2013 @dido essa valor ae nao tem nd a ver com % de sucesso da ball... isso vai ser soh +1 numero q vai ser jogado na formula do brun q dai sim vai calcular a % ... de uma olhada no lib/catch system.lua ... good luck tentando intender aquilo kk Link para o comentário https://xtibia.com/forum/topic/204240-premium-caugtch-by-smix/#findComment-1462465 Compartilhar em outros sites More sharing options...
didogunner 2 Postado Fevereiro 6, 2013 Share Postado Fevereiro 6, 2013 Xentyyyy fu UAHUhahuahUHUAa o .O bom vou deixar esse system pra quando eu/alguem entender aquilo... UHAhuahuaa Link para o comentário https://xtibia.com/forum/topic/204240-premium-caugtch-by-smix/#findComment-1462503 Compartilhar em outros sites More sharing options...
Posts Recomendados