[Encerrado] Shiny Não Spawna

celinhob
em Tópicos Sem Resposta

celinhob

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 07/08/08Posts: 19

Eai galera, tudo bom? Venho através desse post pedir uma ajuda meio que URGENTE x_x. Não está spawnando pokemon shiny no mapa. Tentei aumentar as rates, fiz de tudo, mas nada está dando certo. Alguém por favor pode me ajudar? Eu já procurei aqui, pesquisei no google, nos fóruns, aqui na xTibia principalmente mas não obtive sucesso ):

 

Meu script "spawn" que se encontra data/creaturescript/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", "Porygo Z", "Dragonair", "Dratini", "Absol", "Altaria", "Baltoy", "Claydol", "Buneary", "Beldum", "Metang", "Metagross", "Camerupt", "Carnivine", "Carvanha", "Sharpedo", "Croagunk", "Toxicroak", "Buizel", "Floatzel", "Gabite", "Gible", "Gliscor", "Honchkrow", "Luxray", "Mamoswine", "Pachirisu", "Plusle", "Minun", "Probopass", "Purugly", "Froslass", "Glalie", "Snorunt", "Lunatone", "Solrock", "Staraptor", "Tropius", "Yanmega", "Zangoose", "Rhyperior", "Gastrodon", "Typhlosion", "Quilava", "Cyndaquil", "Chikorita", "Meganium", "Bayleef", "Totodile", "Croconaw", "Feraligatr"

}

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(10, 100) --100% chance

elseif isInArray(raros, getCreatureName(cid)) then

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

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

return true

end

if transform == 1 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

 

não sei o que fazer mais :/ por favor me ajudem, estou desesperado x-x

 

Obrigado desde já! :D

 

Abraço!

Slicer

Insanity
avatar
Príncipe
Príncipe

INFOS

Grupo: PríncipeRegistrado: 19/08/10Posts: 4014Gênero: Masculino

mano isso ja foi respondido achu q umas 500x --' se tu procurase aki no forum tu acharia..

http://www.xtibia.com/forum/topic/202708-bug-nao-nasce-pokes-shinys-aleatorios/

http://www.xtibia.com/forum/topic/201733-duvidapokemon-pda-by-slicer-shinys-e-catch/

e por ae vai --'

"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬

"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein

 

celinhob

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 07/08/08Posts: 19

mano isso ja foi respondido achu q umas 500x --' se tu procurase aki no forum tu acharia..

http://www.xtibia.co...nys-aleatorios/

http://www.xtibia.co...shinys-e-catch/

e por ae vai --'

 

cara, eu disse lá em cima que eu já vi os seus posts, já vi você reclamando com o cara que já postou umas 20x... Mas mesmo assim cara, eu fiz oque você disse pra ele e aqui não deu! :/

Slicer

Insanity
avatar
Príncipe
Príncipe

INFOS

Grupo: PríncipeRegistrado: 19/08/10Posts: 4014Gênero: Masculino

if isInArray(shinys, getCreatureName(cid)) then

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

elseif isInArray(raros, getCreatureName(cid)) then

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

 

vc concerteza n seguiu oq eu flei...

90 - 100
1 - x
100 / 90 = 1.11%...

 

mano isso eh simplismente mtm.. n tem nenhum misterio... coloque

transform = 1 

e veja q todos os pokes vao virar shinys..

se ms assim nenhum poke virar shiny dai sim pode ter algum problema.. mas eh algum problema causado por alguma ediçao tua...

"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬

"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein

 

celinhob

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 07/08/08Posts: 19

É pra mim por em qualquer lugar do script? Muito obrigado pela paciência cara, relaxa que você já ta levando seu +REP hahaha! :))

 

Obrigadão mesmo

Slicer

Insanity
avatar
Príncipe
Príncipe

INFOS

Grupo: PríncipeRegistrado: 19/08/10Posts: 4014Gênero: Masculino

hã... olha ali no teu script ms.. tem 2 variaveis transform.. muda elas pra 1...

e REP eh o de menos aki mano.. ;/

"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬

"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein

 

celinhob

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 07/08/08Posts: 19

cara, só tem o

if transform == 1 then

e os outros tem esse

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

e esse

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

 

mas eu quero por 15% em de chance nos 2... já tentei mudando o (10,100) para (15,100) e o (10,1000) para (150,1000) mas não surge nada

Yan Oliveira

Yan18
avatar
Moderador
Moderador

INFOS

Grupo: ModeradorRegistrado: 05/06/12Posts: 2221Gênero: Masculino

Cara se quer 15% em spawn.lua procure por isso:

 

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(10, 100) --100% chance 
elseif isInArray(raros, getCreatureName(cid)) then
transform = math.random(10, 1000) --100% chance 
elseif not isInArray(raros, getCreatureName(cid)) and not isInArray(shinys, getCreatureName(cid)) then
return true
end 
if transform == 1 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

 

E troque por:

 

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 = 15 -- 15%
elseif isInArray(raros, getCreatureName(cid)) then
transform = 15 -- 15%
elseif not isInArray(raros, getCreatureName(cid)) and not isInArray(shinys, getCreatureName(cid)) then
return true
end
if math.random(100) <= transform 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

 

Simples assim.

celinhob

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 07/08/08Posts: 19

Ah cara, maravilha! Ja vou dar uma olhada nisso, é que pelo que eu mexia eu pensava que tinha que por com o (x, y)

 

Mas mesmo assim, obrigadão! Acho que ta resolvido! Obrigadão!

 

Abraço!

Slicer

Insanity
avatar
Príncipe
Príncipe

INFOS

Grupo: PríncipeRegistrado: 19/08/10Posts: 4014Gênero: Masculino

sanado, movido

"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬

"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein

 

celinhob

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 07/08/08Posts: 19

Continua não respawnando :/

Yan Oliveira

Yan18
avatar
Moderador
Moderador

INFOS

Grupo: ModeradorRegistrado: 05/06/12Posts: 2221Gênero: Masculino

Continua não respawnando :/

 

Cara você pediu 15% se quer mais aumente a rate, se tiver duvida crie outro topico pois este ja esta nos resolvidos.

Stigal

don't ever stop...
avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 28/11/10Posts: 3402Gênero: Masculino
A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta.

+ Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda.
* Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado.

VI6MDIG.png

 

"O fracasso é a oportunidade de se começar de novo inteligentemente"

Minhas Redes Sociais: Youtube | Página & Grupo | Steam  | Discord Xtibia | Skype: @mrooger

 

OTpanel