Muito bom cara, obrigado por compartilhar.
- Fórum
- OTServ
- Recursos
- Scripting
- Mods, funções e outros
- [Pokemon] Catch System Por Skill
[Pokemon] Catch System Por Skill
Por Lordbaxx, 02 de jun. de 2015 em Mods, funções e outros
info
Grupo: Conde
Registrado: 07/04/15
Posts: 962
Reputação: +258
Gênero: Masculino

info
Grupo: Visconde
Registrado: 18/01/13
Posts: 319
Reputação: +66
Gênero: Masculino

Muito bom, uma dica interessante é usar "elseif" pra não ter que colocar vários "end" no final...
if getPlayerSkillLevel(cid, 2) <= 20 then ---- Skill Cathing 0 a 25 catchinfo.rate = ballcatch[item.itemid].cr + skill20 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate: "..skill20.."x]") else if getPlayerSkillLevel(cid, 2) >= 30 then ---- Skill Cathing 0 a 25 catchinfo.rate = ballcatch[item.itemid].cr + skill30 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate: "..skill30.."x]") else if getPlayerSkillLevel(cid, 2) >= 40 then ---- Skill Cathing 0 a 25 catchinfo.rate = ballcatch[item.itemid].cr + skill40 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate: "..skill40.."x]") else if getPlayerSkillLevel(cid, 2) >= 50 then ---- Skill Cathing 0 a 25 catchinfo.rate = ballcatch[item.itemid].cr + skill50 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate:"..skill50.."x]") else if getPlayerSkillLevel(cid, 2) >= 60 then ---- Skill Cathing 0 a 25 catchinfo.rate = ballcatch[item.itemid].cr + skill60 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate:"..skill60.."x]") else if getPlayerSkillLevel(cid, 2) >= 70 then ---- Skill Cathing 0 a 25 catchinfo.rate = ballcatch[item.itemid].cr + skill70 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate:"..skill70.."x]") else if getPlayerSkillLevel(cid, 2) >= 80 then ---- Skill Cathing 0 a 25 catchinfo.rate = ballcatch[item.itemid].cr + skill80 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate:"..skill80.."x]") else if getPlayerSkillLevel(cid, 2) >= 90 then ---- Skill Cathing 26 a 50 catchinfo.rate = ballcatch[item.itemid].cr + skill90 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate:"..skill90.."x]") else if getPlayerSkillLevel(cid, 2) >= 100 then ---- Skill Cathing 51 a 75 catchinfo.rate = ballcatch[item.itemid].cr + skill100 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate:"..skill100.."x]") else if getPlayerSkillLevel(cid, 2) >= 150 then ---- Skill Cathing 76 a 100...... catchinfo.rate = ballcatch[item.itemid].cr + skill150 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate:"..skill150.."x]") else catchinfo.rate = ballcatch[item.itemid].cr end end end end end end end end end end
ficando:
if getPlayerSkillLevel(cid, 2) <= 30 then ---- Skill Cathing 0 a 30 catchinfo.rate = ballcatch[item.itemid].cr + skill20 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate: "..skill20.."x]") elseif getPlayerSkillLevel(cid, 2) > 30 and getPlayerSkillLevel(cid, 2) < 40 then ---- Skill Cathing 30 a 40 catchinfo.rate = ballcatch[item.itemid].cr + skill30 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate: "..skill20.."x]") elseif getPlayerSkillLevel(cid, 2) >= 40 and getPlayerSkillLevel(cid, 2) < 50 then ---- Skill Cathing 40 a 50 catchinfo.rate = ballcatch[item.itemid].cr + skill40 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate: "..skill20.."x]") elseif getPlayerSkillLevel(cid, 2) >= 50 and getPlayerSkillLevel(cid, 2) < 60 then ---- Skill Cathing 50 a 60 catchinfo.rate = ballcatch[item.itemid].cr + skill50 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate: "..skill20.."x]") elseif getPlayerSkillLevel(cid, 2) >= 60 and getPlayerSkillLevel(cid, 2) < 70 then ---- Skill Cathing 60 a 70 catchinfo.rate = ballcatch[item.itemid].cr + skill60 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate: "..skill20.."x]") elseif getPlayerSkillLevel(cid, 2) >= 70 and getPlayerSkillLevel(cid, 2) < 80 then ---- Skill Cathing 70 a 80 catchinfo.rate = ballcatch[item.itemid].cr + skill70 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate: "..skill20.."x]") elseif getPlayerSkillLevel(cid, 2) >= 80 and getPlayerSkillLevel(cid, 2) < 90 then ---- Skill Cathing 80 a 90 catchinfo.rate = ballcatch[item.itemid].cr + skill80 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate: "..skill20.."x]") elseif getPlayerSkillLevel(cid, 2) >= 90 and getPlayerSkillLevel(cid, 2) < 100 then ---- Skill Cathing 90 a 100 catchinfo.rate = ballcatch[item.itemid].cr + skill90 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate: "..skill20.."x]") elseif getPlayerSkillLevel(cid, 2) >= 100 and getPlayerSkillLevel(cid, 2) < 150 then ---- Skill Cathing 100 a 150 catchinfo.rate = ballcatch[item.itemid].cr + skill100 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate: "..skill20.."x]") elseif getPlayerSkillLevel(cid, 2) >= 150 then ---- Skill Cathing 150 > ...... catchinfo.rate = ballcatch[item.itemid].cr + skill150 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate: "..skill20.."x]") else catchinfo.rate = ballcatch[item.itemid].cr end
Editado Junho 7 por Soulviling
Muito bom, uma dica interessante é usar "elseif" pra não ter que colocar vários "end" no final...
if getPlayerSkillLevel(cid, 2) <= 20 then ---- Skill Cathing 0 a 25 catchinfo.rate = ballcatch[item.itemid].cr + skill20 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate: "..skill20.."x]") else if getPlayerSkillLevel(cid, 2) >= 30 then ---- Skill Cathing 0 a 25 catchinfo.rate = ballcatch[item.itemid].cr + skill30 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate: "..skill30.."x]") else if getPlayerSkillLevel(cid, 2) >= 40 then ---- Skill Cathing 0 a 25 catchinfo.rate = ballcatch[item.itemid].cr + skill40 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate: "..skill40.."x]") else if getPlayerSkillLevel(cid, 2) >= 50 then ---- Skill Cathing 0 a 25 catchinfo.rate = ballcatch[item.itemid].cr + skill50 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate:"..skill50.."x]") else if getPlayerSkillLevel(cid, 2) >= 60 then ---- Skill Cathing 0 a 25 catchinfo.rate = ballcatch[item.itemid].cr + skill60 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate:"..skill60.."x]") else if getPlayerSkillLevel(cid, 2) >= 70 then ---- Skill Cathing 0 a 25 catchinfo.rate = ballcatch[item.itemid].cr + skill70 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate:"..skill70.."x]") else if getPlayerSkillLevel(cid, 2) >= 80 then ---- Skill Cathing 0 a 25 catchinfo.rate = ballcatch[item.itemid].cr + skill80 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate:"..skill80.."x]") else if getPlayerSkillLevel(cid, 2) >= 90 then ---- Skill Cathing 26 a 50 catchinfo.rate = ballcatch[item.itemid].cr + skill90 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate:"..skill90.."x]") else if getPlayerSkillLevel(cid, 2) >= 100 then ---- Skill Cathing 51 a 75 catchinfo.rate = ballcatch[item.itemid].cr + skill100 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate:"..skill100.."x]") else if getPlayerSkillLevel(cid, 2) >= 150 then ---- Skill Cathing 76 a 100...... catchinfo.rate = ballcatch[item.itemid].cr + skill150 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate:"..skill150.."x]") else catchinfo.rate = ballcatch[item.itemid].cr end end end end end end end end end end
ficando:
if getPlayerSkillLevel(cid, 2) <= 30 then ---- Skill Cathing 0 a 30 catchinfo.rate = ballcatch[item.itemid].cr + skill20 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate: "..skill20.."x]") elseif getPlayerSkillLevel(cid, 2) > 30 and getPlayerSkillLevel(cid, 2) < 40 then ---- Skill Cathing 30 a 40 catchinfo.rate = ballcatch[item.itemid].cr + skill30 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate: "..skill20.."x]") elseif getPlayerSkillLevel(cid, 2) >= 40 and getPlayerSkillLevel(cid, 2) < 50 then ---- Skill Cathing 40 a 50 catchinfo.rate = ballcatch[item.itemid].cr + skill40 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate: "..skill20.."x]") elseif getPlayerSkillLevel(cid, 2) >= 50 and getPlayerSkillLevel(cid, 2) < 60 then ---- Skill Cathing 50 a 60 catchinfo.rate = ballcatch[item.itemid].cr + skill50 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate: "..skill20.."x]") elseif getPlayerSkillLevel(cid, 2) >= 60 and getPlayerSkillLevel(cid, 2) < 70 then ---- Skill Cathing 60 a 70 catchinfo.rate = ballcatch[item.itemid].cr + skill60 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate: "..skill20.."x]") elseif getPlayerSkillLevel(cid, 2) >= 70 and getPlayerSkillLevel(cid, 2) < 80 then ---- Skill Cathing 70 a 80 catchinfo.rate = ballcatch[item.itemid].cr + skill70 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate: "..skill20.."x]") elseif getPlayerSkillLevel(cid, 2) >= 80 and getPlayerSkillLevel(cid, 2) < 90 then ---- Skill Cathing 80 a 90 catchinfo.rate = ballcatch[item.itemid].cr + skill80 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate: "..skill20.."x]") elseif getPlayerSkillLevel(cid, 2) >= 90 and getPlayerSkillLevel(cid, 2) < 100 then ---- Skill Cathing 90 a 100 catchinfo.rate = ballcatch[item.itemid].cr + skill90 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate: "..skill20.."x]") elseif getPlayerSkillLevel(cid, 2) >= 100 and getPlayerSkillLevel(cid, 2) < 150 then ---- Skill Cathing 100 a 150 catchinfo.rate = ballcatch[item.itemid].cr + skill100 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate: "..skill20.."x]") elseif getPlayerSkillLevel(cid, 2) >= 150 then ---- Skill Cathing 150 > ...... catchinfo.rate = ballcatch[item.itemid].cr + skill150 doPlayerSendTextMessage(cid, 19, "Catch Rate: [BallName: "..ballcatch[item.itemid].typeee.."] [BallRate: "..ballcatch[item.itemid].cr.."x + BonusRate: "..skill20.."x]") else catchinfo.rate = ballcatch[item.itemid].cr end
Não fui eu quem desenvolvi este sistema, só trouxe para o fórum, porém boa observação!
info
Grupo: Campones
Registrado: 07/11/23
Posts: 2
Reputação: 0

Olá. Há muitos cassinos no mundo, mas você só deve escolher cassinos confiáveis para jogar com segurança. O Mr Jackbet é um deles. Esse cassino é famoso por sua variedade de jogos de azar e oportunidades de resgatar bônus. Afinal, graças aos bônus, é possível aumentar os seus ganhos.



info
Grupo: Conde
Registrado: 01/07/13
Posts: 521
Reputação: +291
Hoje irei postar um Script de Catch Por Skill Configurado No "Sword Fighting" do Seu OLDC/OTC, por NextBr vamos lá:
Resumo: Quanto Maior o Skill "Catching" Maior a chance de Captura do Pokemon!
OBS: Eu nao Vou Postar o Script Completo Pois de Cada (PDA) ou (PDA - COM PokeLevel) é Diferente um do Outro, Eu So vou Ensinar a Voces a como Adicionar o Sistema em Seus Servidores!
Testado em:
- Pokemon Dash Advanced
- Não é difícil adaptar para outros servidores.
Primeiro Vai em Data/Lib/catchsystem.lua e Procure por essa Funçao:
function doCapturePokemon(cid, poke, ballid, status, typeee)
Na Parte aonde manda a MSG de que Voce "capturou um Pokemon" e "Capturou um Pokemon e Foi para o CP" add Isso Abaixo dessas Msg:
doPlayerAddSkillTry(cid,2,10)
- Resumo: doPlayerAddSkillTry(cid,2,10) --- Quando Capturar um Pokemon vai Ganhar 10% de Skill "2".
- Obs: No meu Client o Skill Catching Esta no Skill "Sword Fighting"
Bom logo após você vai em data/actions/catch.lua e no começo do Script adiciona isto:
local skill20 = 10 -- Mude aqui a chance de capiturar
Agora Procure essa Funçao: local catchinfo = {}
E Troca por Isso:
local catchinfo = {}
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)
addEvent(doSendMagicEffect, (d * 70 + 100 - (d * 14)) - 100, topos, 3)
return true
end
-OBS: O Script é Bem Basico. Dar Para adicionar varios Coisas Como (Ganhar EXP Dependendo do Skill/Almentar Chance de Catch para Premium Account e etc...)
Imagens:
OBS: Só vai ganhar Skill se você Capturar o Pokemon e Recomendo á vocês Deixar o catch BAIXO! Por que o script faz a soma de rate um Exemplo:
Pokeball Rate: 50
Skill Cathing Rate (com 25 de Skill Cathing) : 100
Somar: 50+100 = 150 de Rate o Jogador vai ter
[script Atualizado Dia 25/01/2015]
[+] Creditos: NextBR