Os pokémons do configuration.lua estão entre 500 a 750 e isso acontece no old e no new client.
- Fórum
- OTServ
- Suporte
- Resolvidos
- [Resolvido] Pokémons Selvagem sem sexo
Coloquei no 500 estava 750 mais mesmo assim todos os selvagem estão assim.
Em 02/09/2018 em 09:28, Maiconmafrah disse:
vá na pasta creaturescripts/spawn.lua e veja sem tem algo como isso:
Citarfunction onThink(cid)
if isMonster(cid)then
Se tiver coloque isso em baixo do isMonster:
CitaraddEvent(doSetRandomGender, 5, cid)
Não tem isso lá > function onThink(cid)
9 minutos atrás, joaopera disse:vá na pasta creaturescripts/spawn.lua e veja sem tem algo como isso:
Se tiver coloque isso em baixo do isMonster:

Já estava
Me manda seu spawn inteiro
local shinys = {
"Venusaur", "Charizard", "Blastoise", "Butterfree", "Beedrill", "Pidgeot", "Rattata", "Raticate", "Raichu", "Zubat", "Golbat", "Paras", "Parasect",
"Venonat", "Venomoth", "Growlithe", "Arcanine", "Abra", "Alakazam", "Tentacool", "Tentacruel", "Farfetch'd", "Grimer", "Muk", "Gengar", "Onix", "Krabby",
"Kingler", "Voltorb", "Electrode", "Cubone", "Marowak", "Hitmonlee", "Hitmonchan", "Tangela", "Horsea", "Seadra", "Scyther", "Jynx", "Electabuzz", "Pinsir",
"Magikarp", "Gyarados", "Snorlax", "Dragonair", "Dratini"}
local raros = {"Dragonite"}
local function doSetRandomGender(cid)
if not isCreature(cid) then return true end
if isSummon(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 = 1
elseif math.random(1, 1000) <= rate then
gender = 4
else
gender = 3
end
if gender == 1 then
doCreatureSetSkullType(cid, gender)
end
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 getPlayerStorageValue(cid, 22546) >= 1 then return true end
if isNpcSummon(cid) then return true end
if getPlayerStorageValue(cid, 637500) >= 1 then return true end --alterado v1.9
if isInArray(shinys, getCreatureName(cid)) then --alterado v1.9 \/
chance = 0.1 --1% chance
elseif isInArray(raros, getCreatureName(cid)) then --n coloquem valores menores que 0.1 !!
chance = 0.1 --1% chance
else
return true
end
if math.random(1, 1000) <= chance*10 then
doSendMagicEffect(getThingPos(cid), 18)
local name, pos = "Shiny ".. getCreatureName(cid), getThingPos(cid)
doRemoveCreature(cid)
local shi = doCreateMonster(name, pos, false)
setPlayerStorageValue(shi, 74469, 1)
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(doSetRandomGender, 5, cid)
addEvent(doShiny, 10, cid)
addEvent(adjustWildPoke, 5, cid)
return true
end
Em 03/09/2018 em 11:38, Maiconmafrah disse:local shinys = {
"Venusaur", "Charizard", "Blastoise", "Butterfree", "Beedrill", "Pidgeot", "Rattata", "Raticate", "Raichu", "Zubat", "Golbat", "Paras", "Parasect",
"Venonat", "Venomoth", "Growlithe", "Arcanine", "Abra", "Alakazam", "Tentacool", "Tentacruel", "Farfetch'd", "Grimer", "Muk", "Gengar", "Onix", "Krabby",
"Kingler", "Voltorb", "Electrode", "Cubone", "Marowak", "Hitmonlee", "Hitmonchan", "Tangela", "Horsea", "Seadra", "Scyther", "Jynx", "Electabuzz", "Pinsir",
"Magikarp", "Gyarados", "Snorlax", "Dragonair", "Dratini"}
local raros = {"Dragonite"}local function doSetRandomGender(cid)
if not isCreature(cid) then return true end
if isSummon(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 = 1
elseif math.random(1, 1000) <= rate then
gender = 4
else
gender = 3
end
if gender == 1 then
doCreatureSetSkullType(cid, gender)
end
endlocal function doShiny(cid)
if isCreature(cid) then
if isSummon(cid) then return true end
if getPlayerStorageValue(cid, 74469) >= 1 then return true end
if getPlayerStorageValue(cid, 22546) >= 1 then return true end
if isNpcSummon(cid) then return true end
if getPlayerStorageValue(cid, 637500) >= 1 then return true end --alterado v1.9
if isInArray(shinys, getCreatureName(cid)) then --alterado v1.9 \/
chance = 0.1 --1% chance
elseif isInArray(raros, getCreatureName(cid)) then --n coloquem valores menores que 0.1 !!
chance = 0.1 --1% chance
else
return true
end
if math.random(1, 1000) <= chance*10 then
doSendMagicEffect(getThingPos(cid), 18)
local name, pos = "Shiny ".. getCreatureName(cid), getThingPos(cid)
doRemoveCreature(cid)
local shi = doCreateMonster(name, pos, false)
setPlayerStorageValue(shi, 74469, 1)
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(doSetRandomGender, 5, cid)
addEvent(doShiny, 10, cid)
addEvent(adjustWildPoke, 5, cid)return true
end
troca seu spawn.lua por esse \/
local shinys = { "Venusaur", "Charizard", "Blastoise", "Butterfree", "Beedrill", "Pidgeot", "Rattata", "Raticate", "Raichu", "Zubat", "Golbat", "Paras", "Parasect", "Venonat", "Venomoth", "Growlithe", "Arcanine", "Abra", "Alakazam", "Tentacool", "Tentacruel", "Farfetch'd", "Grimer", "Muk", "Gengar", "Onix", "Krabby", "Kingler", "Voltorb", "Electrode", "Cubone", "Marowak", "Hitmonlee", "Hitmonchan", "Tangela", "Horsea", "Seadra", "Scyther", "Jynx", "Electabuzz", "Pinsir", "Magikarp", "Gyarados", "Snorlax", "Dragonair", "Dratini"} local raros = {"Dragonite"} local function doSetRandomGender(cid) if not isCreature(cid) then return true end if isSummon(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 = 1 elseif math.random(1, 1000) <= rate then gender = 4 else gender = 3 end if gender == 1 then doCreatureSetSkullType(cid, gender) end 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 getPlayerStorageValue(cid, 22546) >= 1 then return true end if isNpcSummon(cid) then return true end if getPlayerStorageValue(cid, 637500) >= 1 then return true end --alterado v1.9 if isInArray(shinys, getCreatureName(cid)) then --alterado v1.9 \/ chance = 0.1 --1% chance elseif isInArray(raros, getCreatureName(cid)) then --n coloquem valores menores que 0.1 !! chance = 0.1 --1% chance else return true end if math.random(1, 1000) <= chance*10 then doSendMagicEffect(getThingPos(cid), 18) local name, pos = "Shiny ".. getCreatureName(cid), getThingPos(cid) doRemoveCreature(cid) local shi = doCreateMonster(name, pos, false) setPlayerStorageValue(shi, 74469, 1) 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(doSetRandomGender, 5, cid) addEvent(doShiny, 10, cid) addEvent(adjustWildPoke, 5, cid) return true end
conseguiu fazer o poke salvar o sexo certo?
sim só que quando dou catch nele ele vem com sexo por sorteio.
3 minutos atrás, Maiconmafrah disse:sim só que quando dou catch nele ele vem com sexo por sorteio.
Eu tava mexendo nisso, mais o corpse só fica com sexo indefinido
Vou te passar vai em lib/catch system.lua e procure por:
local quero_esses = {4,3} if rate >= totalChance then local status = {} status.gender = quero_esses[math.random(1, #quero_esses)] status.happy = 160
e Troque por:
if rate >= totalChance then local status = {} status.gender = getItemAttribute(corpse, "gender") status.happy = 160
tem mais 1 desse /\ q ta mais pra baixo, só q o corpse q fica com genderless e então ele só copia to tentando arrumar um jeito de salvar o gender do poke no corpse porem não to conseguindo
Não manjo nada de .lua foi na gambiarra mesmo kk
ok vou tenta.
7 horas atrás, joaopera disse:Eu tava mexendo nisso, mais o corpse só fica com sexo indefinido
![]()
Vou te passar vai em lib/catch system.lua e procure por:
local quero_esses = {4,3} if rate >= totalChance then local status = {} status.gender = quero_esses[math.random(1, #quero_esses)] status.happy = 160e Troque por:
if rate >= totalChance then local status = {} status.gender = getItemAttribute(corpse, "gender") status.happy = 160tem mais 1 desse /\ q ta mais pra baixo, só q o corpse q fica com genderless e então ele só copia to tentando arrumar um jeito de salvar o gender do poke no corpse porem não to conseguindo
Não manjo nada de .lua foi na gambiarra mesmo kk
ai se tem que ir no onDeath e colocar algo assim
if corpse.itemid ~= 0 then
doItemSetAttribute(corpse.uid, "gender", getPokemonGender(cid))
end
13 minutos atrás, nociam disse:ai se tem que ir no onDeath e colocar algo assim
if corpse.itemid ~= 0 then
doItemSetAttribute(corpse.uid, "gender", getPokemonGender(cid))
end
Blz vou tentar







info
Grupo: Campones
Registrado: 28/04/18
Posts: 76
Reputação: +2
Gênero: Masculino
Bom dia, eu venho tendo esse problema que os pokémons selvagem estão nascendo sem sexo, quando eu dou por exemplo > /cb metagross , ele vem male ou femea. Mais os selvagem do mapa vem tudo indefinido ( sem sexo ).