CE

[Rate] Respawn Pokemon Shiny

Por celinhob, 28 de fev. de 2012 em Archived

script
6
1.3k
celinhobC
28 de fevereiro de 2012 às 23:51

Olá pessoal, o membro Jeferson me passou uma script muito boa de respawn de pokemons shiny.

E eu gostaria de saber aonde que eu mudo pra deixar a rate de respawn maior, ou seja, deixar mais fácil de aparecer shinys, ou mais difícil. Me ajudem ai, muito obrigado!

 

 

Aqui está o script:

local shinys = {

"Bulbasaur", "Ivysaur", "Venusaur", "Charmander", "Charmeleon", "Charizard", "Squirtle", "Wartortle", "Blastoise",

"Caterpie", "Metapod", "Butterfree", "Weedle", "Kakuna", "Beedrill", "Pidgey", "Pidgeotto", "Pidgeot", "Rattata",

"Raticate", "Spearow", "Fearow", "Ekans", "Arbok", "Pikachu", "Raichu", "Sandshrew", "Sandslash", "Nidoran Female",

"Nidorina", "Nidoqueen", "Nidoran Male", "Nidorino", "Nidoking", "Clefairy", "Clefable", "Vulpix", "Ninetales",

"Jigglytuff", "Wigglytuff", "Zubat", "Golbat", "Odish", "Gloom", "Vileplume", "Paras", "Parasect", "Venonat", "Venomoth",

"Diglett", "Dugtrio", "Mewoth", "Persian", "Psyduck", "Golduck", "Mankey", "Primeape", "Growlithe", "Arcanine",

"Poliwag", "Poliwhirl", "Poliwrath", "Abra", "Kadabra", "Alakazam", "Machop", "Machoke", "Machamp", "Bellsprout",

"Weepinbell", "Victreebel", "Tentacool", "Tentacruel", "Geodude", "Graveler", "Golem", "Ponyta", "Rapidash", "Slowpoke",

"Slowbro", "Magnamite", "Magneton", "Farfetch'd", "Doduo", "Dodrio", "Seel", "Dewgong", "Grimer", "Muk", "Shellder",

"Cloyster", "Gastly", "Haunter", "Gengar", "Onix", "Drowzee", "Hypno", "Krabby", "Kingler", "Voltorb", "Electrode",

"Exeggcute", "Exeggutor", "Cubone", "Marowak", "Hitmonlee", "Hitmonchan", "Lickitung", "Koffing", "Weezing", "Rhyhorn",

"Rhydon", "Chansey", "Tangela", "Kangaskhan", "Horsea", "Seadra", "Goldeen", "Seaking", "Staryu", "Starmie", "Mr. Mime",

"Scyther", "Jynx", "Electabuzz", "Magmar", "Pinsir", "Tauros", "Magikarp", "Gyarados", "Lapras", "Ditto", "Eevee", "Vaporeon",

"Jolteon", "Flareon", "Porygon", "Omanyte", "Omastar", "Kabuto", "Kabutops", "Snorlax", "Dragonair", "Dratini"

}

local raros = {"Articuno", "Zapdos", "Moltreas", "Mew", "Mewtwo", "Dragonite", "Aerodactyl"}

 

local function doPokemonRegisterLevel(cid)

if not isCreature(cid) then return true end

if getWildPokemonLevel(cid) == -1 then

setWildPokemonLevel(cid)

end

end

 

local function doSetRandomGender(cid)

if not isCreature(cid) then return true end

local gender = 0

local name = getCreatureName(cid)

if not newpokedex[name] then return true end

local rate = newpokedex[name].gender

if rate == 0 then

gender = 3

elseif rate == 1000 then

gender = 4

elseif rate == -1 then

gender = 0

elseif math.random(1, 1000) <= rate then

gender = 4

else

gender = 3

end

doCreatureSetSkullType(cid, gender)

end

 

local function doShiny(cid)

if isCreature(cid) then

if isSummon(cid) then return true end

if getPlayerStorageValue(cid, 74469) >= 1 then return true end

if isInArray(shinys, getCreatureName(cid)) then

transform = math.random(1, 100) --100% chance

elseif isInArray(raros, getCreatureName(cid)) then

transform = math.random(1, 1000) --100% chance

elseif not isInArray(raros, getCreatureName(cid)) and not isInArray(shinys, getCreatureName(cid)) then

return true

end

if transform == 10 then

doSendMagicEffect(getThingPos(cid), 18)

local shi = doCreateMonster("Shiny ".. getCreatureName(cid) .."", getThingPos(cid))

setPlayerStorageValue(shi, 74469, 1)

setPlayerStorageValue(cid, 74469, 1)

doRemoveCreature(cid)

else

setPlayerStorageValue(cid, 74469, 1)

end

else

return true

end

end

 

function onSpawn(cid)

 

registerCreatureEvent(cid, "GeneralConfiguration")

registerCreatureEvent(cid, "DirectionSystem")

registerCreatureEvent(cid, "CastSystem")

 

if isSummon(cid) then

registerCreatureEvent(cid, "SummonDeath")

return true

end

 

registerCreatureEvent(cid, "Experience")

 

addEvent(doPokemonRegisterLevel, 5, cid)

addEvent(doSetRandomGender, 5, cid)

addEvent(doShiny, 10, cid)

 

return true

end

  • 1

 

 

Abraços,

 

crédito pela script: Jeferson

SlicerS
29 de fevereiro de 2012 às 00:01

o script fui eu q fiz... pra aumentar ou diminuir as rates eh soh alterar essa parte...

if isInArray(shinys, getCreatureName(cid)) then
transform = math.random(1, 100) --1% chance
elseif isInArray(raros, getCreatureName(cid)) then
transform = math.random(1, 1000) --0.1% chance

 

assim.. vai dar o math.random e se parar no numero "10" vai executar o script.. dai no caso.. se tu por "math.random(1, 10)" vai ter 10% chance de virar shiny...

 

tu tb pode mudar essa parte..

if isInArray(shinys, getCreatureName(cid)) then
transform = math.random(1, 100) --1% chance
elseif isInArray(raros, getCreatureName(cid)) then
transform = math.random(1, 1000) --0.1% chance
elseif not isInArray(raros, getCreatureName(cid)) and not isInArray(shinys, getCreatureName(cid)) then
return true
end
if transform == 10 then

por essa...

if isInArray(shinys, getCreatureName(cid)) then
chance = 15	--15% chance
elseif isInArray(raros, getCreatureName(cid)) then
chance = 10   --10% chance
elseif not isInArray(raros, getCreatureName(cid)) and not isInArray(shinys, getCreatureName(cid)) then
return true
end
if math.random(1, 100) <= chance then

dai tu pode modificar ali em chance a % q tu quer.. se por 60 por exemplo vai ter 60% chance de virar shiny...

Editado Fevereiro 29 por Slicer

celinhobC
29 de fevereiro de 2012 às 00:13

Muito obrigado! Me ajudou muito! Ja levou +resp

Pode fechar o tópico, Slicer é um ótimo scriper, parabéns. :D

 

Abraços, e mais uma vez obrigado!

1 mês depois...
xFkyxX
18 de março de 2012 às 16:25

O que significa a a parte do isInArray?

SlicerS
19 de março de 2012 às 10:46

para verificar se o poke esta numa das 2 tabelas do começo do script.. pois eu botei pra pokes "raros" serem mais dificeis de virar shiny...

xFkyxX
19 de março de 2012 às 13:08

Me da outro exemplo, plz