Postado Dezembro 31, 2017 7 anos Gente gostaria de saber se alguem pode me ajudar, uma mensagem que aparece para todos no server falando que nasceu um shiny, tanto no mapa, tanto na Outland. Ex: [Mensagem automatica]Nasceu um Shiny Magmar no mapa, temos que pegalo! Se alguem puder me ajudar +rep
Postado Dezembro 31, 2017 7 anos Se você já tem o script que faz nascer o Pokemon Shiny, no proprio script basta colocar essa linha: doBroadcastMessage("Nasceu um Shiny Magmar no mapa, temos que pegalo!")
Postado Dezembro 31, 2017 7 anos Autor 12 minutos atrás, Luis360 disse: Se você já tem o script que faz nascer o Pokemon Shiny, no proprio script basta colocar essa linha: doBroadcastMessage("Nasceu um Shiny Magmar no mapa, temos que pegalo!") Mas no caso eu colocaria isso na spawn.lua ?? Lembrando que ñ é especificamente para o Sh Magmar, mas sim para qualquer Shiny.
Postado Dezembro 31, 2017 7 anos A mensagem ali só coloquei de exemplo, poderia colocar uma mensagem indicando que nasceu um shiny assim abrange todos, sim seria no spawn.lua, caso tenha outro arquivo.lua que faz nascer shiny coloque em outro, se é o spawn.lua que faz nascer o shiny, coloque nele. Editado Dezembro 31, 2017 7 anos por Luis360 (veja o histórico de edições)
Postado Dezembro 31, 2017 7 anos Autor 14 minutos atrás, Luis360 disse: A mensagem ali só coloquei de exemplo, poderia colocar uma mensagem indicando que nasceu um shiny assim abrange todos, sim seria no spawn.lua, caso tenha outro arquivo.lua que faz nascer shiny coloque em outro, se é o spawn.lua que faz nascer o shiny, coloque nele. Colocaria em qual parte para ser mais exato ? Obrigado você esta ajudando bastante spawn.lua Segue meu SPAWN.LUA>>>> local shinys = { "Venusaur", "Blastoise", "Butterfree", "Beedrill", "Pidgeot", "Rattata", "Raticate", "Raichu", "Golbat", "Paras", "Parasect", "Magmar", "Typhlosion", "Xatu", "Growlithe", "Arcanine", "Tentacruel", "Farfetch'd", "Gengar", "Krabby", "Tauros", "Kingler", "Cubone", "Horsea", "Seadra", "Weezing", "Scyther", "Pinsir", "Crobat", "Zubat", "Tentacool", "Feraligatr", "Machamp", "Meganium", "Alakazam", "Tangela", "Ampharos", "Electabuzz", "Jynx", "Charizard", "Voltorb", "Electrode"} local raros = {"Dragonair", "Dratini", "Giant Magikarp", "Gyarados", "Magmortar", "Electivire", "Salamence", "Mantine"} local specialSummon = { chance = 0.5, --Chance, em porcentagem, do pokémon especial nascer. pokes = { {"Shiny Alakazam", "Shiny Arcanine", "Shiny Ampharos", "Shiny Ariados", "Shiny Blastoise", "Shiny Charizard", "Shiny Venusaur", "Shiny Crobat", "Shiny Cubone", "Shiny Marowak", "Shiny Zubat", "Shiny Golbat", "Shiny Salamence", "Shiny Gyarados", "Shiny Tentacruel", "Shiny Raichu", "Shiny Dratini", "Shiny Dragonair", "Shiny Feraligatr", "Shiny Grimer", "Shiny Muk", "Shiny Jynx", "Shiny Machamp", "Shiny Magcargo", "Shiny Magmar", "Shiny Ninetales", "Shiny Tangela", "Shiny Electrode"}, --Pokémons que podem ser summonados. {"Ancient Alakazam", "Ancient Dragonite", "Ancient Meganium", "Ancient Onix", "Ancient Scyther", "Ancient Snorlax", "Aviator Pidgeot", "Banshee Misdreavus", "Bone Marowak", "Boxer Hitmonchan", "Brave Blastoise", "Brave Charizard", "Brave Nidoking", "Brave Nidoqueen", "Brave Noctwol", "Brave Venusaur", "Brute Farfetch'd", "Brute Rhydon", "Brute Ursaring", "Capoeira Hitmontop", "Charged Raichu", "Dark Crobat", "Dragon Machamp", "Elder Arcanine", "Elder Blastoise", "Elder Charizard", "Elder Electabuzz", "Elder Gengar", "Elder Jynx", "Elder Marowak", "Elder Muk", "Elder Pidgeot", "Elder Pinsir", "Elder Tangela", "Elder Raichu", "Elder Tentacruel", "Elder Tyranitar", "Enigmatic Girafarig", "Enraged Typhlosion", "Evil Cloyster", "Freezing Dewgong", "Furios Ampharos", "Furios Mantine", "Furios Murkrow", "Furious Sandslash", "Furious Scyther", "Gordo Snorlax", "Hard Golem", "Heavy Piloswine", "Iron Steelix", "Lava Magmar", "Iron Steelix", "Milch-Miltank", "Milch-Miltank", "Roll Donphan", "Tribal Feraligatr", "Tribal Xatu", "War Heracross", "Ancient Kingdra", "Hard Rhydon"}, --Pokémons que, quando spawnados, há chance de summonar um dos pokémons acima. }, } local function ShinyName(cid) if isCreature(cid) then if string.find(tostring(getCreatureName(cid)), "Shiny") then local newName = tostring(getCreatureName(cid)):match("Shiny (.*)") doCreatureSetNick(cid, newName) if isMonster(cid) then doSetCreatureDropLoot(cid, false) end end end end 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 == 500 then gender = 4 elseif rate == -1 then gender = 0 elseif math.random(1, 500) <= 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 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 = 1.0 --1% chance elseif isInArray(raros, getCreatureName(cid)) then --n coloquem valores menores que 0.1 !! chance = 0.5 --1% chance else return true end if math.random(1, 500) <= 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(function() if isCreature(cid) then if isInArray(specialSummon.pokes[2], getCreatureName(cid)) then if math.random(1, 100) <= specialSummon.chance then local position = getThingPos(cid) doRemoveCreature(cid) doCreateMonster(specialSummon.pokes[1][math.random(#specialSummon.pokes[1])], position) end end end end, 15) addEvent(doShiny, 10, cid) addEvent(ShinyName, 15, cid) addEvent(adjustWildPoke, 5, cid) return true end Editado Dezembro 31, 2017 7 anos por Theodorojose (veja o histórico de edições)
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.