Ir para conteúdo

Pisar Em Um Title E Sumonar Monster ( ESTILO POKEMON FIRE RED GBA! )

Featured Replies

Postado
  • Autor
1 hora atrás, hiquezerah disse:

Você precisa postar o seu outro sistema para que as pessoas possam te ajudar maninho. kkkkkk eu entendi que você adicionaria os shinys para nascer nesse mesmo script e eles não deveriam sumir.
Poste o seu spawn.lua 

coloquei la men

  • Respostas 32
  • Visualizações 1.2k
  • Created
  • Última resposta

Top Posters In This Topic

Postado
3 horas atrás, Aizuuu disse:

coloquei la men

local shinys = {
    "bug", 
    }
    local raros = {
    "bug", 
    }                               
    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, newNamed)
          if isMonster(cid) then
             doSetCreatureDropLoot(cid, false)  
          end
       end
    end
    end
    
    
    local function doPokemonRegisterLevel(cid)
        if not isCreature(cid) then return true end
        if getWildPokemonLevel(cid) == -1 then
            setWildPokemonLevel(cid)
    if isCreature(cid) then
    local pokesLvl = {"Regice", "Registeel", "Regirock", "Furious Charizard", "Primal Kyogre", "Cresselia", "Regigigas", "Lugia", "Giratina", "Rayquaza",
    "Entei", "Suicune", "Raikou", "Celebi", "Shiny Celebi", "Latios", "Latias", "Shaymin", "Hoopa", "Mew", "Mewtwo", "Palkia", 
    "Articuno", "Zapdos", "Moltres", "Kyogre", "Guardian Magmar", "Dialga", "Charizard Halloween", "Giant Gengar", "Marowak Halloween", "Jirachi", "Groudon",
    "Darkrai", "Darkrai Nightmare", "Primal Dialga", "Zekrom", "Kyurem", "White Kyurem", "Black Kyurem", "Reshiram"}
    
    if not isInArray(pokesLvl, getCreatureName(cid)) then
    local lvl = math.random(1, 10)
    local nick = ""..getCreatureName(cid).." ["..lvl.."]"
    doCreatureSetNick(cid, nick)
    setPlayerStorageValue(cid, 1000, lvl)  
    else
    -- Classe 100-100
    local lvl = 100
    local nick = ""..getCreatureName(cid).." ["..lvl.."]"
    doCreatureSetNick(cid, nick)
    setPlayerStorageValue(cid, 1000, lvl)  
    
    end
    
    
    if string.find(tostring(getCreatureName(cid)), "Shiny") then
    local lvl = math.random(5, 20)
    local nick = ""..getCreatureName(cid).." ["..lvl.."]"
    doCreatureSetNick(cid, nick)
    setPlayerStorageValue(cid, 1000, lvl)  
    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 == 1000 then
                gender = 4
            elseif rate == -1 then
                gender = 1
            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 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 tempo = 1 -- tempo para sumir os monstros sumonados.
          local shi = doCreateMonster(name, pos, false)
          setPlayerStorageValue(shi, 74469, 1) 
          addEvent(function()
            if isCreature(shi) then
                doRemoveCreature(shi)
            end
          end, tempo*60*1000)    
       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(adjustWildPoke, 5, cid)
    
    return true
    end

tenta

Postado
  • Autor
5 horas atrás, hiquezerah disse:

local shinys = {
    "bug", 
    }
    local raros = {
    "bug", 
    }                               
    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, newNamed)
          if isMonster(cid) then
             doSetCreatureDropLoot(cid, false)  
          end
       end
    end
    end
    
    
    local function doPokemonRegisterLevel(cid)
        if not isCreature(cid) then return true end
        if getWildPokemonLevel(cid) == -1 then
            setWildPokemonLevel(cid)
    if isCreature(cid) then
    local pokesLvl = {"Regice", "Registeel", "Regirock", "Furious Charizard", "Primal Kyogre", "Cresselia", "Regigigas", "Lugia", "Giratina", "Rayquaza",
    "Entei", "Suicune", "Raikou", "Celebi", "Shiny Celebi", "Latios", "Latias", "Shaymin", "Hoopa", "Mew", "Mewtwo", "Palkia", 
    "Articuno", "Zapdos", "Moltres", "Kyogre", "Guardian Magmar", "Dialga", "Charizard Halloween", "Giant Gengar", "Marowak Halloween", "Jirachi", "Groudon",
    "Darkrai", "Darkrai Nightmare", "Primal Dialga", "Zekrom", "Kyurem", "White Kyurem", "Black Kyurem", "Reshiram"}
    
    if not isInArray(pokesLvl, getCreatureName(cid)) then
    local lvl = math.random(1, 10)
    local nick = ""..getCreatureName(cid).." ["..lvl.."]"
    doCreatureSetNick(cid, nick)
    setPlayerStorageValue(cid, 1000, lvl)  
    else
    -- Classe 100-100
    local lvl = 100
    local nick = ""..getCreatureName(cid).." ["..lvl.."]"
    doCreatureSetNick(cid, nick)
    setPlayerStorageValue(cid, 1000, lvl)  
    
    end
    
    
    if string.find(tostring(getCreatureName(cid)), "Shiny") then
    local lvl = math.random(5, 20)
    local nick = ""..getCreatureName(cid).." ["..lvl.."]"
    doCreatureSetNick(cid, nick)
    setPlayerStorageValue(cid, 1000, lvl)  
    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 == 1000 then
                gender = 4
            elseif rate == -1 then
                gender = 1
            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 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 tempo = 1 -- tempo para sumir os monstros sumonados.
          local shi = doCreateMonster(name, pos, false)
          setPlayerStorageValue(shi, 74469, 1) 
          addEvent(function()
            if isCreature(shi) then
                doRemoveCreature(shi)
            end
          end, tempo*60*1000)    
       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(adjustWildPoke, 5, cid)
    
    return true
    end

tenta

cara e isso que quero tmj, so que um ultimo pedido, tem como colocar limite de 10 segundos para spawnar outro pokemon? assim vai ficar perfeito exatamente do jeito que quero!

script:

 

Spoiler

    local monsters = {
    [1] = {monstro = "Rattata", chance = 50}, --[Ordem numerica] = {nome do monstro = Bulbasaur, chance = chance de aparecer esse monstro}
    [2] = {monstro = "Caterpie", chance = 80}, --[Ordem numerica] = {nome do monstro = Bulbasaur, chance = chance de aparecer esse monstro}
}

local function getRandomMonster(t)
        local i = math.random(1, #t)
        i = t[i]
        if math.random(1, 100) <= i.chance then
            return i
        end
        return getRandomMonster(t)
    end

local chance = 20 -- 60% de chance de sucesso e 40% de falhar

function onStepIn(cid, item, toPosition, fromPosition)
        if isPlayer(cid) and math.random(1, 100) <= chance then
            local tempo = 1
            local i = getRandomMonster(monsters)
            local monstro = doCreateMonster(i.monstro, getCreaturePosition(cid))
            doCreatureSay(monstro, "Um " ..i.monstro.. " Selvagem Apareceu!", TALKTYPE_MONSTER)
            addEvent(function()
                if isCreature(monstro) then
                    doRemoveCreature(monstro)
                end
            end, tempo*60*1000)
        end    
    return true
end

 

Postado
10 minutos atrás, Aizuuu disse:

cara e isso que quero tmj, so que um ultimo pedido, tem como colocar limite de 10 segundos para spawnar outro pokemon? assim vai ficar perfeito exatamente do jeito que quero!

script:

 

  Mostrar conteúdo oculto

    local monsters = {
    [1] = {monstro = "Rattata", chance = 50}, --[Ordem numerica] = {nome do monstro = Bulbasaur, chance = chance de aparecer esse monstro}
    [2] = {monstro = "Caterpie", chance = 80}, --[Ordem numerica] = {nome do monstro = Bulbasaur, chance = chance de aparecer esse monstro}
}

local function getRandomMonster(t)
        local i = math.random(1, #t)
        i = t[i]
        if math.random(1, 100) <= i.chance then
            return i
        end
        return getRandomMonster(t)
    end

local chance = 20 -- 60% de chance de sucesso e 40% de falhar

function onStepIn(cid, item, toPosition, fromPosition)
        if isPlayer(cid) and math.random(1, 100) <= chance then
            local tempo = 1
            local i = getRandomMonster(monsters)
            local monstro = doCreateMonster(i.monstro, getCreaturePosition(cid))
            doCreatureSay(monstro, "Um " ..i.monstro.. " Selvagem Apareceu!", TALKTYPE_MONSTER)
            addEvent(function()
                if isCreature(monstro) then
                    doRemoveCreature(monstro)
                end
            end, tempo*60*1000)
        end    
    return true
end

 

local shinys = {
    "bug", 
    }
    local raros = {
    "bug", 
    }                               
    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, newNamed)
          if isMonster(cid) then
             doSetCreatureDropLoot(cid, false)  
          end
       end
    end
    end
    
    
    local function doPokemonRegisterLevel(cid)
        if not isCreature(cid) then return true end
        if getWildPokemonLevel(cid) == -1 then
            setWildPokemonLevel(cid)
    if isCreature(cid) then
    local pokesLvl = {"Regice", "Registeel", "Regirock", "Furious Charizard", "Primal Kyogre", "Cresselia", "Regigigas", "Lugia", "Giratina", "Rayquaza",
    "Entei", "Suicune", "Raikou", "Celebi", "Shiny Celebi", "Latios", "Latias", "Shaymin", "Hoopa", "Mew", "Mewtwo", "Palkia", 
    "Articuno", "Zapdos", "Moltres", "Kyogre", "Guardian Magmar", "Dialga", "Charizard Halloween", "Giant Gengar", "Marowak Halloween", "Jirachi", "Groudon",
    "Darkrai", "Darkrai Nightmare", "Primal Dialga", "Zekrom", "Kyurem", "White Kyurem", "Black Kyurem", "Reshiram"}
    
    if not isInArray(pokesLvl, getCreatureName(cid)) then
    local lvl = math.random(1, 10)
    local nick = ""..getCreatureName(cid).." ["..lvl.."]"
    doCreatureSetNick(cid, nick)
    setPlayerStorageValue(cid, 1000, lvl)  
    else
    -- Classe 100-100
    local lvl = 100
    local nick = ""..getCreatureName(cid).." ["..lvl.."]"
    doCreatureSetNick(cid, nick)
    setPlayerStorageValue(cid, 1000, lvl)  
    
    end
    
    
    if string.find(tostring(getCreatureName(cid)), "Shiny") then
    local lvl = math.random(5, 20)
    local nick = ""..getCreatureName(cid).." ["..lvl.."]"
    doCreatureSetNick(cid, nick)
    setPlayerStorageValue(cid, 1000, lvl)  
    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 == 1000 then
                gender = 4
            elseif rate == -1 then
                gender = 1
            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 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 and getPlayerStorageValue(cid, 74480) <= os.time() then  
          doSendMagicEffect(getThingPos(cid), 18)               
          local name, pos = "Shiny ".. getCreatureName(cid), getThingPos(cid)
          doRemoveCreature(cid)
          local tempo = 1 -- tempo para sumir os monstros sumonados.
          local shi = doCreateMonster(name, pos, false)
          setPlayerStorageValue(shi, 74469, 1)
          setPlayerStorageValue(cid, 74480, 10000 + os.time())
          addEvent(function()
            if isCreature(shi) then
                doRemoveCreature(shi)
            end
          end, tempo*60*1000)    
       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(adjustWildPoke, 5, cid)
    
    return true
    end

testa

Postado
  • Autor
36 minutos atrás, hiquezerah disse:

local shinys = {
    "bug", 
    }
    local raros = {
    "bug", 
    }                               
    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, newNamed)
          if isMonster(cid) then
             doSetCreatureDropLoot(cid, false)  
          end
       end
    end
    end
    
    
    local function doPokemonRegisterLevel(cid)
        if not isCreature(cid) then return true end
        if getWildPokemonLevel(cid) == -1 then
            setWildPokemonLevel(cid)
    if isCreature(cid) then
    local pokesLvl = {"Regice", "Registeel", "Regirock", "Furious Charizard", "Primal Kyogre", "Cresselia", "Regigigas", "Lugia", "Giratina", "Rayquaza",
    "Entei", "Suicune", "Raikou", "Celebi", "Shiny Celebi", "Latios", "Latias", "Shaymin", "Hoopa", "Mew", "Mewtwo", "Palkia", 
    "Articuno", "Zapdos", "Moltres", "Kyogre", "Guardian Magmar", "Dialga", "Charizard Halloween", "Giant Gengar", "Marowak Halloween", "Jirachi", "Groudon",
    "Darkrai", "Darkrai Nightmare", "Primal Dialga", "Zekrom", "Kyurem", "White Kyurem", "Black Kyurem", "Reshiram"}
    
    if not isInArray(pokesLvl, getCreatureName(cid)) then
    local lvl = math.random(1, 10)
    local nick = ""..getCreatureName(cid).." ["..lvl.."]"
    doCreatureSetNick(cid, nick)
    setPlayerStorageValue(cid, 1000, lvl)  
    else
    -- Classe 100-100
    local lvl = 100
    local nick = ""..getCreatureName(cid).." ["..lvl.."]"
    doCreatureSetNick(cid, nick)
    setPlayerStorageValue(cid, 1000, lvl)  
    
    end
    
    
    if string.find(tostring(getCreatureName(cid)), "Shiny") then
    local lvl = math.random(5, 20)
    local nick = ""..getCreatureName(cid).." ["..lvl.."]"
    doCreatureSetNick(cid, nick)
    setPlayerStorageValue(cid, 1000, lvl)  
    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 == 1000 then
                gender = 4
            elseif rate == -1 then
                gender = 1
            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 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 and getPlayerStorageValue(cid, 74480) <= os.time() then  
          doSendMagicEffect(getThingPos(cid), 18)               
          local name, pos = "Shiny ".. getCreatureName(cid), getThingPos(cid)
          doRemoveCreature(cid)
          local tempo = 1 -- tempo para sumir os monstros sumonados.
          local shi = doCreateMonster(name, pos, false)
          setPlayerStorageValue(shi, 74469, 1)
          setPlayerStorageValue(cid, 74480, 10000 + os.time())
          addEvent(function()
            if isCreature(shi) then
                doRemoveCreature(shi)
            end
          end, tempo*60*1000)    
       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(adjustWildPoke, 5, cid)
    
    return true
    end

testa

tu se confundiu pow, eu tava falando no script do movements kk mais tmj pela atençao

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo