MA
dúvida

[Encerrado] Como colocar shiny no nome dos pokemons

Por Malusz, 30 de nov. de 2013 em Tópicos Sem Resposta

12
2.5k
MaluszM
30 de novembro de 2013 às 14:36

Bom, eu queria saber como colocar shiny no nome dos pokemons shinyes, porque geralmente eles tem o mesmo nome dos pokemons normais.

Rep+ ae pra quem ajudar.

zipter98Z
30 de novembro de 2013 às 15:42

Se estiver usando PDA,

data/monster/pokes/Shiny, abra o arquivo .xml do pokémon desejado. Tomando como exemplo o Scyther, você verá algo assim, logo na segunda linha:

<monster name="Scyther"

Mude para

<monster name="Shiny Scyther"

Editado Novembro 30 por zipter98

MaluszM
30 de novembro de 2013 às 15:54

Então amigo, eu dei uma olhada aqui e está assim

 

<?xml version="1.0" encoding="UTF-8"?>

<monster name="Shiny Scyther" nameDescription="a Shiny scyther" race="bug" experience="1044" speed="177" manacost="0">
Só que no servidor só mostra Scyther.
SoulvilingS
01 de dezembro de 2013 às 00:55

vai em lib/level system.lua

 

aperta crtl+f e procura por:

if string.find(tostring(nick), "Shiny") then

vai ter:

if string.find(tostring(nick), "Shiny") then
  nick = tostring(nick):match("Shiny (.*)")
    end

Só excluir.

MaluszM
01 de dezembro de 2013 às 01:22

Então man, funcionou mas só está nos pokemons de players é possivel colocar nos selvagens também?

SoulvilingS
01 de dezembro de 2013 às 01:32

vá em creaturescripts/spawn.lua apaga e substitui por:

 

 

 

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 ShinyName(cid)
if isCreature(cid) then
if string.find(tostring(getCreatureName(cid)), "Shiny") then
local newName = tostring(getCreatureName(cid)):match("Shiny (.*)")
local newNamed = newName.." ["..getPokemonLevel(cid).."]"
doCreatureSetNick(cid, newNamed)
end
end
end


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 isNpcSummon(cid) then return true end
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
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, "Experience")
registerCreatureEvent(cid, "GeneralConfiguration")
registerCreatureEvent(cid, "DirectionSystem")
registerCreatureEvent(cid, "CastSystem")

if isSummon(cid) then
registerCreatureEvent(cid, "SummonDeath")
return true
end

addEvent(doPokemonRegisterLevel, 5, cid)
addEvent(doSetRandomGender, 5, cid)
addEvent(doShiny, 10, cid)
addEvent(ShinyName, 15, cid)

return true
end

 

 

 

Obs: Pode dar a reputação pra zipter98

Editado Dezembro 1 por Soulviling

MaluszM
01 de dezembro de 2013 às 01:48

Man poderia verificar a script? deu um erro no change log que bugou meu pc todo e não consegui captar.

SoulvilingS
01 de dezembro de 2013 às 02:11

Não precisa substituir o arquivo, aquele é antigo, pega o seu original mesmo e procura por :

      local newName = tostring(getCreatureName(cid)):match("Shiny (.*)")

e apaga o nome "Shiny" ficando assim:

local newName = tostring(getCreatureName(cid)):match("(.*)")
MaluszM
01 de dezembro de 2013 às 12:03

Funcionou amigo, como pedido rep+ pro zipter98

SoulvilingS
01 de dezembro de 2013 às 12:09

Ok, irei reportar para fecharem o tópico.

GabrieltxuG
01 de dezembro de 2013 às 12:23

Duvida Senada, movido

4 anos depois...
StigalS
21 de abril de 2018 às 03:13
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.