Maker Palace
Si quiere un completo acceso al contenido del foro. Registrate

Maker Palace

¡El Reino del RpgMaker y del Ocio!
 
ÍndiceBuscarGrupos de UsuariosScriptsRecursosTutorialesJuegos creados por los PalacersPalaceWikiFAQRegistrarseConectarse
Conectarse
Nombre de Usuario:
Contraseña:
Entrar automáticamente en cada visita: 
:: Recuperar mi contraseña
Temas similares
  • » peticiones de script de elfbot
  • » [VX] [Programa + Script + Tutoriales] SwapXT: Herramienta de intercambio para RPG Maker VX
  • » Nesesito un script o a un Scriptador
  • » Como agregar bien el script de ABS HERO E 3 RPG MAKER VX
  • » Script anti lag RMVX
  • » [VX] Script "thomas edison"
  • » [RPG Maker XP] Script: Mini juego de cocina.
  • » [RPG Maker XP] Script: Pescar en tiempo real.
  • »  Necesito script para crear objetos (crafting system VX)
  • » necesito script de nadar en el mapa RPG MAKER XP
  • Buscar
     
     

    Resultados por:
     
    Rechercher Búsqueda avanzada
    Últimos temas
    » Zekirom : La Leyenda !Descargalo completo ya¡(RMXP)
    por SagahonArturo Hoy a las 6:49 pm

    » Secret of Namira 4 [Survival horror] COMPLETO
    por Agustintin2 Hoy a las 9:13 am

    » nueva beta de dross el rompe muelas
    por acoatlrpg Hoy a las 7:12 am

    » fire emblem mode
    por Shooter Hoy a las 5:19 am

    » Nvidea Shield
    por Shooter Ayer a las 6:47 am

    » Xbox Wire - Nuevo servicio de Microsoft
    por Shooter Vie Mayo 17, 2013 9:19 am

    » Problemas de instalación RMXP en Win8
    por Shooter Vie Mayo 17, 2013 9:15 am

    Recomendados
    RPG en RPG Maker
    La importancia de un Backup
    Que requiere un sistema de Batalla para ser exitoso
    9 Minutos de Juegos por fans
    Neoland
    Indice de Scripts Locales XP
    Falcao Pearl ABS Liquid
    ¿Quién está en línea?
    En total hay 8 usuarios en línea: 0 Registrados, 0 Ocultos y 8 Invitados :: 1 Motor de búsqueda

    Ninguno

    La mayor cantidad de usuarios en línea fue 179 el Mar Ago 30, 2011 1:06 pm.
    MiniChat
    Mejores posteadores
    Shooter (2932)
     
    DaviX (2724)
     
    Frikilangelo (2429)
     
    Falcao (1768)
     
    kyonides-arkanthos (1443)
     
    SagahonArturo (1439)
     
    555goku5551 (1434)
     
    Webmaster24 (1353)
     
    Ares (1336)
     
    xDarkLinkx (1309)
     
    Afiliados
    Crear foro Mundo Maker Foro de anime y RM2k3/XP/VX Computer mix
    Flag Counter
    free counters
    Visitas

    Compartir | .
     

     Script Dificultat avansada

    Ver el tema anterior Ver el tema siguiente Ir abajo 
    AutorMensaje
    DaviX
    Admin.
    Admin.


    Cantidad de envíos: 2724
    Miembro desde: 08/07/2009
    Edad: 19
    Localización: España
    Sexo: Masculino

    Maker: RMXP

    Logros MP:



    MensajeTema: Script Dificultat avansada   Dom Dic 12, 2010 9:13 am

    Es un script de dificultades avansado, muy bueno. Para mas info leet el sciprt


    Instrucciones:

    Tiene cuatro modos de definir a que enemigos afectara un efecto:

    -Por las ids de los enemigos.
    -Por las ids de los mapas. Si el combate sucede alli tendra efecto.
    -Usando el sistema de arboles de mapas del rpgmaker. Gracias a esto solo necesitaras hacer que todos los mapas que quieras modificar se encuentren debajo de un mapa con cierto nombre.
    -Global.

    -Todos los valores en los efectos son opcionales.

    -Permite hacer que el valor de un efecto de dificultad se defina en base al
    valor de una variable de evento.

    -Ademas de todos los atributos basicos, tiene la opcion de modificar el dinero,
    experiencia y ratio de items.
    Gracias a comunidad rpgmaker.es


    Código:
    #==============================================================================
    # Challengue compensator (Compensador de dificultad)
    # By gerkrt/gerrtunk
    # Version: 1
    # License: GPL, creditos
    #==============================================================================

    =begin

    Este script da un control total sobre la dificultad del juego, mas alla de los
    scripts selectores de dificultad inicial.

    Caracteristicas:

    -Tiene cuatro modos de definir a que enemigos afectara un efecto:

    Por las ids de los enemigos.
    Por las ids de los mapas. Si el combate sucede alli tendra efecto.
    Usando el sistema de arboles de mapas del rpgmaker. Gracias a esto solo necesitaras
    hacer que todos los mapas que quieras modificar se encuentren debajo de un mapa
    con cierto nombre.
    Global.

    Los valores de todos los efectos son acumulativos.

    -Todos los valores en los efectos son opcionales.

    -Permite hacer que el valor de un efecto de dificultad se defina en base al
    valor de una variable de evento.

    -Ademas de todos los atributos basicos, tiene la opcion de modificar el dinero,
    experiencia y ratio de items.

    Algunos usos:

    -Hacer que una mazmorra, reto o enemigo resulte mas duro cada vez que mueres. O al
    inreves.

    -Permitirte crear tu propio sistema de dificultad por eventos.

    -Equilibrar el reto en juegos con muchas sidequest. Por ejemplo: si has hecho una u
    otra activas o modificas un efecto de dificultad.

    -Modificar la dificultad del juego desde un menu, evento, etc.

    -Hacer que el reto se adapte a la pericia del jugador.


    ############ Sintaxis y valores #########

    Los atributos de los enemigos se recalculan en base a %. Cada atributo que vayas
    a modificar empieza con un valor de 100%, y luego tu puedes restarle o sumarle
    lo que quieras.

    Ejemplo:
          Difficulty_effects[5] = { 
        :active  => false,           
        :type  => 3,                 
        :base_map_name  => 'Bosque', 
        :hp => 50,                   
        :sp =>-30           
        }

    Esto hara que el hp quede en 150 y el sp en 70.   

    :campo => valor del campo,

    Debes respetar el : antes del nombre del campo, el => separandolos y la , final.

    Por otro lado debes respetar estas otras normas de sintaxis al escribir nuevos
    niveles:

    -Cada uno debe tener un nuevo numero en Difficulty_effects[X]
    -No borres los {}. Marcan el principio y fin de la lista de datos y obviamente
    deberan estar siempre en las mismas posiciones.
    -Puedes añadir o quitar campos, solo respeta los {} y recuerda usar la misma sintaxi
    -El ultimo campo no debe llevar la , final

    ############ Tipos de campos #########
     
    Los efectos de dificultad tienen dos tipos de campos: los que son obligatorios
    y los que no. El orden en que los escribas encanvio da igual.

    Obligatorios:

    active: Marca si el efecto esta activo o no. Si le dieras un valor true estaria
    activado de forma automatica en el inicio.

    type: Define como sabra el script a que enemigos hay que activar un efecto o no.
    Nota que esto se explica mas detalladamente mas abajo. Posibles valores:
      1.Por enemigos
      2.Por ids de los mapas
      3.Por arbol de mapas
      4.Global
     
    enemies_ids: Necesario cuando el tipo es 1. Define que enemigos son afectados.
    Usa el valor ID de la base de datos.
      :enemies_ids => [1,2,3]
     
    maps_ids: Necesario cuando el tipo es 2. Define que mapas son afectados.
    Usa el valor ID unico de cada mapa.
      :maps_ids => [1,2,3]

    base_map_name: Necesario cuando el tipo es 3. Define el nombre del mapa
    que marca el arbol de mapas.

    Opcionales:

    variable: Hace que todos los valores del efecto dependan del valor de una
    variable de evento. Esta variable es dividida 100 y multiplicada por cada valor,
    modificandolos proporcionalmente.

    hp  PV
    sp  PH

    atk  ATAQUE
    pdef  PDEF
    mdef  MDEF
    evs  EVASION

    str  FUERZA
    dex  DEFENSA
    agi  DESTREZA
    int  INTELIGENCIA

    exp  EXPERIENCIA
    gold  DINERO
    drop  % DE OBJETOS

    Nota que incorporan algunos efectos de ejemplo. Puedes borrarlos.
     
    ############ Seleccionar que enemigos tendran los efectos #########

    Hay tres formas de de definir un efecto de dificultad:

    -Efecto global. Afectara a todos los combates.

    -Por enemigos: Podras seleccionar segun sus ids.

    -Por mapas: Escribes las ids de cada uno de ellos. Afectaran en todo combate alli.

    -Por arbol de mapas: Usando este metodo, solo tienes que poner el nombre de un
    mapa en el efecto de dificultad. Todos los mapas en su arbol inferior de mapas seran considerados
    de una misma zona.

    El arbol de mapas se ve en la pequeña seccion debajo del tileset. Alli veras que
    hay algunos nombres de mapas mas a la izquierda que otros. Eso marca cada nivel
    del arbol de mapas, que no tiene porque ser lineal(pueden haber subarboles
    infinitos).

    Si clickas en el boton - veras como desaparecen todo un arbol de submapas.

    Nota: Nose si realmente podria afectar al rendimiento del combate, pero este metodo
    resulta mucho mas pesado que los demas. Si te da problemas recomendaria organizar
    las cosas de forma que el mapa padre que define a los demas sea el mapa superior
    de los que te interesen de forma directa, asi la comprovacion seria mas rapida.

    Ejemplo de uso:

    Mapamundi
      Bosque
        Mapa3
        Mapa4
        Mapa5
          Mapa6
          Mapa7
         
      Pantano del Wep
        Mapa9
       
    Si creamos el siguiente efecto:
       
          Difficulty_effects[2] = {
        :active  => false,
        :hp => 50,
        :sp => 30,
        :atk  => 20,
        :spi  => 20,
        :agi  => 10,
        :drop  => -20,
        :variable  => 6,
        :type  => 3,
        :base_map_name  => 'Bosque'
      }

    Los mapas 3,4,5,6,7, y Bosque incluido sufriran el efecto. Como ves se añaden
    tambien los mapas existentes en subgrupos.

    Mientras que el Pantano del Wep, el Mapamundi y el Mapa 9 no lo sufriran.

    ############ Activando y desactivando efectos #########

    Activar: start_difficulty_effect(numero del efecto)

    Desactivar: stop_difficulty_effect(numero del efecto)

    ej: start_difficulty_effect(1)

    Los cambios efectuados se mantienen al guarda y cargar la partida

    ############ Anotaciones importantes #########

    -Todos los efectos validos para un enemigo se suman entre si y luego se aplican.

    -Puedes generar largas cadenas de numeros consecutivas usando este metodo:

      :enemies_ids => (1..25).to_a
     
      Esto seria el equivalente a poner las ids de los enemigos del 1 al 25.
     
    -Creditos: Este script ha sido creado estudiando y con algo de codigo del KGC
    BattleDifficuly


    =end

    module Wep
      # No toques esto
      Difficulty_effects = []
     
     
      Difficulty_effects[1] = {
        :active  => false,
        :hp => 50,
        :mp => 30,
        :atk  => 20,
        :agi  => 10,
        :drop  => 20,
        :variable  => 4,
        :type  => 1,
        :enemies_ids  => [2,3]
      }
        Difficulty_effects[2] = {
        :active  => false,
        :hp => 50,
        :mp =>30,
        :atk  => 20,
        :agi  => 10,
        :drop  => 20,
        :gold => 20,
        :exp => 20,
        :variable  => 5,
        :type  => 2,
        :maps_ids  => [1,2,3,4,6,7]
      }
          Difficulty_effects[3] = {
        :active  => false,
        :hp => 50,
        :mp => 30,
        :atk  => 20,
        :dex  => 20,
        :agi  => 10,
        :drop  => -20,
        :variable  => 6,
        :type  => 3,
        :base_map_name  => 'Forest'
      }
            Difficulty_effects[4] = {
        :active  => false,
        :hp => 50,
        :mp => 30,
        :atk  => 20,
        :agi  => 10,
        :drop  => -20,
        :variable  => 6,
        :type  => 4
      }
     
    end

    class Game_System
      attr_accessor :difficulty_effects
      alias gs_wep_cc_init initialize
      def initialize
        @difficulty_effects = Wep::Difficulty_effects
        gs_wep_cc_init
      end
     
    end

    class Interpreter
     
      def start_difficulty_effect(num)
        $game_system.difficulty_effects[num][:active] = true
      end
     
      def stop_difficulty_effect(num)
        $game_system.difficulty_effects[num][:active] = false
      end

    end 

    class Game_Party
      def tree_includes_map? (name)
        # Load mapinfos for map name
        mapinfos = load_data("Data/MapInfos.rxdata")   
        # If his name is the name searched
        if mapinfos[$game_map.map_id].name == name
            return true
        end

        map = $game_map.map_id
       
        # Iterate all parents maps
        while mapinfos[map].parent_id != 0
            if mapinfos[mapinfos[map].parent_id].name == name
              return true
            else
              map = mapinfos[map].parent_id
            end
        end
      end
    end

    #==============================================================================
    # ■ Game_Enemy
    #==============================================================================

    class Game_Enemy < Game_Battler
      #--------------------------------------------------------------------------
      # ● MaxHP
      #--------------------------------------------------------------------------
      alias base_maxhp_Challengue_Compensator base_maxhp
      def base_maxhp
        # Gets normal atribute
        n = base_maxhp_Challengue_Compensator
        # Sets total to a base 100%
        total = 100
        # Search in all effects
        for effect in $game_system.difficulty_effects
            # Effect type 1
            if effect[:active] and effect[:type] == 1  and effect[:hp] != nil and  effect[:enemies_ids].include?(@enemy_id)
              if effect[:variable] != nil
                total+=effect[:hp]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:hp]
              end
            end
            # Effect type 2
            if effect[:active] and effect[:type] == 2  and effect[:hp] != nil and  effect[:maps_ids].include?($game_map.map_id)
              if effect[:variable] != nil
                total+=effect[:hp]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:hp]
              end
            end
            # Effect type 3
            if effect[:active] and effect[:type] == 3  and effect[:hp] != nil and $game_party.tree_includes_map? (effect[:base_map_name])
              if effect[:variable] != nil           
                total+=effect[:hp]*$game_variables[effect[:variable]].to_f/100
              else
                total+=effect[:hp]
              end
            end
            # Effect type 4
            if effect[:active] and effect[:type] == 4 and effect[:hp] != nil
              if effect[:variable] != nil
                total+=effect[:hp]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:hp]
              end
            end
        end
        n = n * total / 100 
        return n.to_i
      end
     
      #--------------------------------------------------------------------------
      # ● MaxSP
      #--------------------------------------------------------------------------
      alias base_maxsp_Challengue_Compensator base_maxsp
      def base_maxsp
        # Gets normal atribute
        n = base_maxsp_Challengue_Compensator
        # Sets total to a base 100%
        total = 100
        # Search in all effects
        for effect in $game_system.difficulty_effects
            # Effect type 1
            if effect[:active] and effect[:type] == 1  and effect[:sp] != nil and  effect[:enemies_ids].include?(@enemy_id)
              if effect[:variable] != nil
                total+=effect[:sp]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:sp]
              end
            end
            # Effect type 2
            if effect[:active] and effect[:type] == 2  and effect[:sp] != nil and  effect[:maps_ids].include?($game_map.map_id)
              if effect[:variable] != nil
                total+=effect[:sp]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:sp]
              end
            end
            # Effect type 3
            if effect[:active] and effect[:type] == 3  and effect[:sp] != nil and $game_party.tree_includes_map? (effect[:base_map_name])
              if effect[:variable] != nil           
                total+=effect[:sp]*$game_variables[effect[:variable]].to_f/100
              else
                total+=effect[:sp]
              end
            end
            # Effect type 4
            if effect[:active] and effect[:type] == 4 and effect[:sp] != nil
              if effect[:variable] != nil
                total+=effect[:sp]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:sp]
              end
            end
        end
        n = n * total / 100 
        return n.to_i
      end
     
      #--------------------------------------------------------------------------
      # ● Maxstr
      #--------------------------------------------------------------------------
      alias base_str_Challengue_Compensator base_str
      def base_str
        # Gets normal atribute
        n = base_str_Challengue_Compensator
        # Sets total to a base 100%
        total = 100
        # Search in all effects
        for effect in $game_system.difficulty_effects
            # Effect type 1
            if effect[:active] and effect[:type] == 1  and effect[:str] != nil and  effect[:enemies_ids].include?(@enemy_id)
              if effect[:variable] != nil
                total+=effect[:str]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:str]
              end
            end
            # Effect type 2
            if effect[:active] and effect[:type] == 2  and effect[:str] != nil and  effect[:maps_ids].include?($game_map.map_id)
              if effect[:variable] != nil
                total+=effect[:str]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:str]
              end
            end
            # Effect type 3
            if effect[:active] and effect[:type] == 3  and effect[:str] != nil and $game_party.tree_includes_map? (effect[:base_map_name])
              if effect[:variable] != nil           
                total+=effect[:str]*$game_variables[effect[:variable]].to_f/100
              else
                total+=effect[:str]
              end
            end
            # Effect type 4
            if effect[:active] and effect[:type] == 4 and effect[:str] != nil
              if effect[:variable] != nil
                total+=effect[:str]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:str]
              end
            end
        end
        n = n * total / 100 
        return n.to_i
      end
     
      #--------------------------------------------------------------------------
      # ● Maxdex
      #--------------------------------------------------------------------------
      alias base_dex_Challengue_Compensator base_dex
      def base_dex
        # Gets normal atribute
        n = base_dex_Challengue_Compensator
        # Sets total to a base 100%
        total = 100
        # Search in all effects
        for effect in $game_system.difficulty_effects
            # Effect type 1
            if effect[:active] and effect[:type] == 1  and effect[:dex] != nil and  effect[:enemies_ids].include?(@enemy_id)
              if effect[:variable] != nil
                total+=effect[:dex]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:dex]
              end
            end
            # Effect type 2
            if effect[:active] and effect[:type] == 2  and effect[:dex] != nil and  effect[:maps_ids].include?($game_map.map_id)
              if effect[:variable] != nil
                total+=effect[:dex]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:dex]
              end
            end
            # Effect type 3
            if effect[:active] and effect[:type] == 3  and effect[:dex] != nil and $game_party.tree_includes_map? (effect[:base_map_name])
              if effect[:variable] != nil           
                total+=effect[:dex]*$game_variables[effect[:variable]].to_f/100
              else
                total+=effect[:dex]
              end
            end
            # Effect type 4
            if effect[:active] and effect[:type] == 4 and effect[:dex] != nil
              if effect[:variable] != nil
                total+=effect[:dex]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:dex]
              end
            end
        end
        n = n * total / 100 
        return n.to_i
      end
     
      #--------------------------------------------------------------------------
      # ● Maxagi
      #--------------------------------------------------------------------------
      alias base_agi_Challengue_Compensator base_agi
      def base_agi
        # Gets normal atribute
        n = base_agi_Challengue_Compensator
        # Sets total to a base 100%
        total = 100
        # Search in all effects
        for effect in $game_system.difficulty_effects
            # Effect type 1
            if effect[:active] and effect[:type] == 1  and effect[:agi] != nil and  effect[:enemies_ids].include?(@enemy_id)
              if effect[:variable] != nil
                total+=effect[:agi]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:agi]
              end
            end
            # Effect type 2
            if effect[:active] and effect[:type] == 2  and effect[:agi] != nil and  effect[:maps_ids].include?($game_map.map_id)
              if effect[:variable] != nil
                total+=effect[:agi]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:agi]
              end
            end
            # Effect type 3
            if effect[:active] and effect[:type] == 3  and effect[:agi] != nil and $game_party.tree_includes_map? (effect[:base_map_name])
              if effect[:variable] != nil           
                total+=effect[:agi]*$game_variables[effect[:variable]].to_f/100
              else
                total+=effect[:agi]
              end
            end
            # Effect type 4
            if effect[:active] and effect[:type] == 4 and effect[:agi] != nil
              if effect[:variable] != nil
                total+=effect[:agi]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:agi]
              end
            end
        end
        n = n * total / 100 
        return n.to_i
      end
     
      #--------------------------------------------------------------------------
      # ● Maxint
      #--------------------------------------------------------------------------
      alias base_int_Challengue_Compensator base_int
      def base_int
        # Gets normal atribute
        n = base_int_Challengue_Compensator
        # Sets total to a base 100%
        total = 100
        # Search in all effects
        for effect in $game_system.difficulty_effects
            # Effect type 1
            if effect[:active] and effect[:type] == 1  and effect[:int] != nil and  effect[:enemies_ids].include?(@enemy_id)
              if effect[:variable] != nil
                total+=effect[:int]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:int]
              end
            end
            # Effect type 2
            if effect[:active] and effect[:type] == 2  and effect[:int] != nil and  effect[:maps_ids].include?($game_map.map_id)
              if effect[:variable] != nil
                total+=effect[:int]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:int]
              end
            end
            # Effect type 3
            if effect[:active] and effect[:type] == 3  and effect[:int] != nil and $game_party.tree_includes_map? (effect[:base_map_name])
              if effect[:variable] != nil           
                total+=effect[:int]*$game_variables[effect[:variable]].to_f/100
              else
                total+=effect[:int]
              end
            end
            # Effect type 4
            if effect[:active] and effect[:type] == 4 and effect[:int] != nil
              if effect[:variable] != nil
                total+=effect[:int]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:int]
              end
            end
        end
        n = n * total / 100 
        return n.to_i
      end
     
      #--------------------------------------------------------------------------
      # ● Maxatk
      #--------------------------------------------------------------------------
      alias base_atk_Challengue_Compensator base_atk
      def base_atk
        # Gets normal atribute
        n = base_atk_Challengue_Compensator
        # Sets total to a base 100%
        total = 100
        # Search in all effects
        for effect in $game_system.difficulty_effects
            # Effect type 1
            if effect[:active] and effect[:type] == 1  and effect[:atk] != nil and  effect[:enemies_ids].include?(@enemy_id)
              if effect[:variable] != nil
                total+=effect[:atk]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:atk]
              end
            end
            # Effect type 2
            if effect[:active] and effect[:type] == 2  and effect[:atk] != nil and  effect[:maps_ids].include?($game_map.map_id)
              if effect[:variable] != nil
                total+=effect[:atk]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:atk]
              end
            end
            # Effect type 3
            if effect[:active] and effect[:type] == 3  and effect[:atk] != nil and $game_party.tree_includes_map? (effect[:base_map_name])
              if effect[:variable] != nil           
                total+=effect[:atk]*$game_variables[effect[:variable]].to_f/100
              else
                total+=effect[:atk]
              end
            end
            # Effect type 4
            if effect[:active] and effect[:type] == 4 and effect[:atk] != nil
              if effect[:variable] != nil
                total+=effect[:atk]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:atk]
              end
            end
        end
        n = n * total / 100 
        return n.to_i
      end
     
      #--------------------------------------------------------------------------
      # ● Maxpdef
      #--------------------------------------------------------------------------
      alias base_pdef_Challengue_Compensator base_pdef
      def base_pdef
        # Gets normal atribute
        n = base_pdef_Challengue_Compensator
        # Sets total to a base 100%
        total = 100
        # Search in all effects
        for effect in $game_system.difficulty_effects
            # Effect type 1
            if effect[:active] and effect[:type] == 1  and effect[:pdef] != nil and  effect[:enemies_ids].include?(@enemy_id)
              if effect[:variable] != nil
                total+=effect[:pdef]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:pdef]
              end
            end
            # Effect type 2
            if effect[:active] and effect[:type] == 2  and effect[:pdef] != nil and  effect[:maps_ids].include?($game_map.map_id)
              if effect[:variable] != nil
                total+=effect[:pdef]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:pdef]
              end
            end
            # Effect type 3
            if effect[:active] and effect[:type] == 3  and effect[:pdef] != nil and $game_party.tree_includes_map? (effect[:base_map_name])
              if effect[:variable] != nil           
                total+=effect[:pdef]*$game_variables[effect[:variable]].to_f/100
              else
                total+=effect[:pdef]
              end
            end
            # Effect type 4
            if effect[:active] and effect[:type] == 4 and effect[:pdef] != nil
              if effect[:variable] != nil
                total+=effect[:pdef]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:pdef]
              end
            end
        end
        n = n * total / 100 
        return n.to_i
      end
     
      #--------------------------------------------------------------------------
      # ● Maxmdef
      #--------------------------------------------------------------------------
      alias base_mdef_Challengue_Compensator base_mdef
      def base_mdef
        # Gets normal atribute
        n = base_mdef_Challengue_Compensator
        # Sets total to a base 100%
        total = 100
        # Search in all effects
        for effect in $game_system.difficulty_effects
            # Effect type 1
            if effect[:active] and effect[:type] == 1  and effect[:mdef] != nil and  effect[:enemies_ids].include?(@enemy_id)
              if effect[:variable] != nil
                total+=effect[:mdef]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:mdef]
              end
            end
            # Effect type 2
            if effect[:active] and effect[:type] == 2  and effect[:mdef] != nil and  effect[:maps_ids].include?($game_map.map_id)
              if effect[:variable] != nil
                total+=effect[:mdef]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:mdef]
              end
            end
            # Effect type 3
            if effect[:active] and effect[:type] == 3  and effect[:mdef] != nil and $game_party.tree_includes_map? (effect[:base_map_name])
              if effect[:variable] != nil           
                total+=effect[:mdef]*$game_variables[effect[:variable]].to_f/100
              else
                total+=effect[:mdef]
              end
            end
            # Effect type 4
            if effect[:active] and effect[:type] == 4 and effect[:mdef] != nil
              if effect[:variable] != nil
                total+=effect[:mdef]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:mdef]
              end
            end
        end
        n = n * total / 100 
        return n.to_i
      end
     
      #--------------------------------------------------------------------------
      # ● Maxeva
      #--------------------------------------------------------------------------
      alias base_eva_Challengue_Compensator base_eva
      def base_eva
        # Gets normal atribute
        n = base_eva_Challengue_Compensator
        # Sets total to a base 100%
        total = 100
        # Search in all effects
        for effect in $game_system.difficulty_effects
            # Effect type 1
            if effect[:active] and effect[:type] == 1  and effect[:eva] != nil and  effect[:enemies_ids].include?(@enemy_id)
              if effect[:variable] != nil
                total+=effect[:eva]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:eva]
              end
            end
            # Effect type 2
            if effect[:active] and effect[:type] == 2  and effect[:eva] != nil and  effect[:maps_ids].include?($game_map.map_id)
              if effect[:variable] != nil
                total+=effect[:eva]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:eva]
              end
            end
            # Effect type 3
            if effect[:active] and effect[:type] == 3  and effect[:eva] != nil and $game_party.tree_includes_map? (effect[:base_map_name])
              if effect[:variable] != nil           
                total+=effect[:eva]*$game_variables[effect[:variable]].to_f/100
              else
                total+=effect[:eva]
              end
            end
            # Effect type 4
            if effect[:active] and effect[:type] == 4 and effect[:eva] != nil
              if effect[:variable] != nil
                total+=effect[:eva]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:eva]
              end
            end
        end
        n = n * total / 100 
        return n.to_i
      end
     
      #--------------------------------------------------------------------------
      # ● Maxexp
      #--------------------------------------------------------------------------
      alias exp_Challengue_Compensator exp
      def exp
        # Gets normal atribute
        n = exp_Challengue_Compensator
        # Sets total to a base 100%
        total = 100
        # Search in all effects
        for effect in $game_system.difficulty_effects
            # Effect type 1
            if effect[:active] and effect[:type] == 1  and effect[:exp] != nil and  effect[:enemies_ids].include?(@enemy_id)
              if effect[:variable] != nil
                total+=effect[:exp]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:exp]
              end
            end
            # Effect type 2
            if effect[:active] and effect[:type] == 2  and effect[:exp] != nil and  effect[:maps_ids].include?($game_map.map_id)
              if effect[:variable] != nil
                total+=effect[:exp]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:exp]
              end
            end
            # Effect type 3
            if effect[:active] and effect[:type] == 3  and effect[:exp] != nil and $game_party.tree_includes_map? (effect[:base_map_name])
              if effect[:variable] != nil           
                total+=effect[:exp]*$game_variables[effect[:variable]].to_f/100
              else
                total+=effect[:exp]
              end
            end
            # Effect type 4
            if effect[:active] and effect[:type] == 4 and effect[:exp] != nil
              if effect[:variable] != nil
                total+=effect[:exp]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:exp]
              end
            end
        end
        n = n * total / 100 
        return n.to_i
      end
     
      #--------------------------------------------------------------------------
      # ● Maxgold
      #--------------------------------------------------------------------------
      alias gold_Challengue_Compensator gold
      def gold
        # Gets normal atribute
        n = gold_Challengue_Compensator
        # Sets total to a base 100%
        total = 100
        # Search in all effects
        for effect in $game_system.difficulty_effects
            # Effect type 1
            if effect[:active] and effect[:type] == 1  and effect[:gold] != nil and  effect[:enemies_ids].include?(@enemy_id)
              if effect[:variable] != nil
                total+=effect[:gold]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:gold]
              end
            end
            # Effect type 2
            if effect[:active] and effect[:type] == 2  and effect[:gold] != nil and  effect[:maps_ids].include?($game_map.map_id)
              if effect[:variable] != nil
                total+=effect[:gold]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:gold]
              end
            end
            # Effect type 3
            if effect[:active] and effect[:type] == 3  and effect[:gold] != nil and $game_party.tree_includes_map? (effect[:base_map_name])
              if effect[:variable] != nil           
                total+=effect[:gold]*$game_variables[effect[:variable]].to_f/100
              else
                total+=effect[:gold]
              end
            end
            # Effect type 4
            if effect[:active] and effect[:type] == 4 and effect[:gold] != nil
              if effect[:variable] != nil
                total+=effect[:gold]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:gold]
              end
            end
        end
        n = n * total / 100 
        return n.to_i
      end
     
      #--------------------------------------------------------------------------
      # ● Maxdrop
      #--------------------------------------------------------------------------
      alias treasure_prob_Challengue_Compensator treasure_prob
      def treasure_prob
        # Gets normal atribute
        n = treasure_prob_Challengue_Compensator
        # Sets total to a base 100%
        total = 100
        # Search in all effects
        for effect in $game_system.difficulty_effects
            # Effect type 1
            if effect[:active] and effect[:type] == 1  and effect[:drop] != nil and  effect[:enemies_ids].include?(@enemy_id)
              if effect[:variable] != nil
                total+=effect[:drop]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:drop]
              end
            end
            # Effect type 2
            if effect[:active] and effect[:type] == 2  and effect[:drop] != nil and  effect[:maps_ids].include?($game_map.map_id)
              if effect[:variable] != nil
                total+=effect[:drop]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:drop]
              end
            end
            # Effect type 3
            if effect[:active] and effect[:type] == 3  and effect[:drop] != nil and $game_party.tree_includes_map? (effect[:base_map_name])
              if effect[:variable] != nil           
                total+=effect[:drop]*$game_variables[effect[:variable]].to_f/100
              else
                total+=effect[:drop]
              end
            end
            # Effect type 4
            if effect[:active] and effect[:type] == 4 and effect[:drop] != nil
              if effect[:variable] != nil
                total+=effect[:drop]*$game_variables[effect[:variable]]/100
              else
                total+=effect[:drop]
              end
            end
        end
        n = n * total / 100 
        return n.to_i
      end
    end




    Volver arriba Ir abajo
    Ver perfil de usuario
     

    Script Dificultat avansada

    Ver el tema anterior Ver el tema siguiente Volver arriba 
    Página 1 de 1.

     Temas similares

    -
    » Los script en OGAME
    » Script ABS Hero , RPG Maker VX Ace
    » Necesito script de "cargando" [XP]
    » [RPG Maker XP] [Actualizado] Script creados por Moghunter.
    » script para cambiar de arma izq y derch?

    Permisos de este foro:No puedes responder a temas en este foro.
    Maker Palace :: RGSS Scripts :: Scripts Maker XP-