Sign in to follow this  
Followers 0
xXDarkDragonXx

Cambiar Orden

24 posts in this topic

.:Cambiar de Orden:.

Este script lo que hace es que en el menú, se agrega la opción de 'Cambiar' que lo que hace es que eliges un personaje, eliges otro y los cambia de lugar.

Ejemplo...

Alexis
Basil
Gloria
Hilda

Elegimos a Alexis y luego a Hilda... los cambia y quedaría así:

Hilda
Basil
Gloria
Alexis

También el personaje que este "encabezando" la lista saldrá en el mapa.

Script:

Cambien su Scene_Menu por este:

[spoiler]
CODE
class Scene_Menu
# --------------------------------
 def initialize(menu_index = 0)
   @menu_index = menu_index
   @changer = 0
   @where = 0
   @checker = 0
 end
# --------------------------------
 def main
   s1 = $data_system.words.item
   s2 = $data_system.words.skill
   s3 = $data_system.words.equip
   s4 = "Estado"
   s5 = "Guardar"
   s6 = "Salir"
   s7 = "Cambiar"
   @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
   @command_window.index = @menu_index
   if $game_party.actors.size == 0
     @command_window.disable_item(0)
     @command_window.disable_item(1)
     @command_window.disable_item(2)
     @command_window.disable_item(3)
   end
   if $game_system.save_disabled
     @command_window.disable_item(4)
   end
   if $game_party.actors.size == 1
     @command_window.disable_item(6)
   end
   @playtime_window = Window_PlayTime.new
   @playtime_window.x = 0
   @playtime_window.y = 256
   @gold_window = Window_Gold.new
   @gold_window.x = 0
   @gold_window.y = 416
   @status_window = Window_MenuStatus.new
   @status_window.x = 160
   @status_window.y = 0
   Graphics.transition
   loop do
     Graphics.update
     Input.update
     update
     if $scene != self
       break
     end
   end
   Graphics.freeze
   @command_window.dispose
   @playtime_window.dispose
   @gold_window.dispose
   @status_window.dispose
 end
# --------------------------------
 def update
   @command_window.update
   @playtime_window.update
   @gold_window.update
   @status_window.update
   if @command_window.active
     update_command
     return
   end
   if @status_window.active
     update_status
     return
   end
 end
# --------------------------------
 def update_command
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     $scene = Scene_Map.new
     return
   end
   if Input.trigger?(Input::C)
     if $game_party.actors.size == 0 and @command_window.index < 4
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     if $game_party.actors.size == 1 and @command_window.index ==6
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     case @command_window.index
     when 0
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Item.new
     when 1
       $game_system.se_play($data_system.decision_se)
       @command_window.active = false
       @status_window.active = true
       @status_window.index = 0
     when 2
       $game_system.se_play($data_system.decision_se)
       @command_window.active = false
       @status_window.active = true
       @status_window.index = 0
     when 3
       $game_system.se_play($data_system.decision_se)
       @command_window.active = false
       @status_window.active = true
       @status_window.index = 0
     when 4
       if $game_system.save_disabled
         $game_system.se_play($data_system.buzzer_se)
         return
       end
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Save.new
     when 5
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_End.new
     when 6
       $game_system.se_play($data_system.decision_se)
       @checker = 0
       @command_window.active = false
       @status_window.active = true
       @status_window.index = 0
     end
     return
   end
 end
# --------------------------------
 def update_status
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     @command_window.active = true
     @status_window.active = false
     @status_window.index = -1
     return
   end
   if Input.trigger?(Input::C)
     case @command_window.index
     when 1
       if $game_party.actors[@status_window.index].restriction >= 2
         $game_system.se_play($data_system.buzzer_se)
         return
       end
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Skill.new(@status_window.index)
     when 2
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Equip.new(@status_window.index)
     when 3
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Status.new(@status_window.index)
     when 6
       $game_system.se_play($data_system.decision_se)
       if @checker == 0
         @changer = $game_party.actors[@status_window.index]
         @where = @status_window.index
         @checker = 1
       else
         $game_party.actors[@where] = $game_party.actors[@status_window.index]
         $game_party.actors[@status_window.index] = @changer
         @checker = 0
         @status_window.refresh
       end
     end
     return
   end
 end
end
[/spoiler]

Compatible:

-> Interruptor Muerto

Incompatible:

Puede, me imagino yo, que no funcione con menues personalizados.

Conclusión:

Disfruten que más. xD.png
0

Share this post


Link to post
Share on other sites
Si funciona como creo, podeis pasarme vuestro menú personalizado y se lo agrego... La verdad, no se me ocurrió esto... pero todos los RPG 'cools' lo tienen. xD.png
0

Share this post


Link to post
Share on other sites
Buena idea Fegarur, en unas horas posteo el que tengo y en el mismo tema pido que lo hagas compatible con este. icon13.gif
0

Share this post


Link to post
Share on other sites
¿Horas? Igual hasta mañana nada... xD.png Se hará lo que se puede. happy.gif
0

Share this post


Link to post
Share on other sites
a mi no me sale el que ponga de primero en el mapa
0

Share this post


Link to post
Share on other sites
yo tengo el menu de FF X-2 podrias hacerlo copatible con ese fegarur por favor, como se que lo tienes no lo posteo aunque si es necesario lo hago
0

Share this post


Link to post
Share on other sites
Pero el Menú FF X-2 funciona también con imágenes... no sólo con script. Tendrías que hacer la imagen correspondiente.
0

Share this post


Link to post
Share on other sites
Creo que ya se cual es el problema, a lo mejor es que uso este script con el script de límite al estilo ff7 de kotfire que agrega al menu la opcion de limites para seleccionar el límite de cada personaje, pero no estoy muy seguro...

En el menú predeterminado solo se puede agregar una opcion con un script o pueden ser varios?? huh.gif

Saludos laugh.gif
0

Share this post


Link to post
Share on other sites
Puedes agregar todas las opciones que quieras. Pero ten cuidado con la ventana de Pasos, Dinero, y Tiempo que puede que se corten. muerte.gif xD.png
0

Share this post


Link to post
Share on other sites
Es que el menú me quedo así:

user posted image

Que hago para que aparezca la opción de "Cambiar"?, por favor que alguien me explique xD.png, gracias de antemano laugh.gif

Saludos laugh.gif
0

Share this post


Link to post
Share on other sites
Dame tu Scene_Menu a ver si puedo hacerlo. icon13.gif
0

Share this post


Link to post
Share on other sites
Ok, ahi te va:

CODE
class Scene_Menu
# --------------------------------
def initialize(menu_index = 0)
  @menu_index = menu_index
  @changer = 0
  @where = 0
  @checker = 0
end
# --------------------------------
def main
  s1 = $data_system.words.item
  s2 = $data_system.words.skill
  s3 = $data_system.words.equip
  s4 = "Estado"
  s5 = "Guardar"
  s6 = "Salir"
  s7 = "Cambiar"
  @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
  @command_window.index = @menu_index
  if $game_party.actors.size == 0
    @command_window.disable_item(0)
    @command_window.disable_item(1)
    @command_window.disable_item(2)
    @command_window.disable_item(3)
  end
  if $game_system.save_disabled
    @command_window.disable_item(4)
  end
  if $game_party.actors.size == 1
    @command_window.disable_item(6)
  end
  @playtime_window = Window_PlayTime.new
  @playtime_window.x = 0
  @playtime_window.y = 256
  @gold_window = Window_Gold.new
  @gold_window.x = 0
  @gold_window.y = 416
  @status_window = Window_MenuStatus.new
  @status_window.x = 160
  @status_window.y = 0
  Graphics.transition
  loop do
    Graphics.update
    Input.update
    update
    if $scene != self
      break
    end
  end
  Graphics.freeze
  @command_window.dispose
  @playtime_window.dispose
  @gold_window.dispose
  @status_window.dispose
end
# --------------------------------
def update
  @command_window.update
  @playtime_window.update
  @gold_window.update
  @status_window.update
  if @command_window.active
    update_command
    return
  end
  if @status_window.active
    update_status
    return
  end
end
# --------------------------------
def update_command
  if Input.trigger?(Input::B)
    $game_system.se_play($data_system.cancel_se)
    $scene = Scene_Map.new
    return
  end
  if Input.trigger?(Input::C)
    if $game_party.actors.size == 0 and @command_window.index < 4
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    if $game_party.actors.size == 1 and @command_window.index ==6
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    case @command_window.index
    when 0
      $game_system.se_play($data_system.decision_se)
      $scene = Scene_Item.new
    when 1
      $game_system.se_play($data_system.decision_se)
      @command_window.active = false
      @status_window.active = true
      @status_window.index = 0
    when 2
      $game_system.se_play($data_system.decision_se)
      @command_window.active = false
      @status_window.active = true
      @status_window.index = 0
    when 3
      $game_system.se_play($data_system.decision_se)
      @command_window.active = false
      @status_window.active = true
      @status_window.index = 0
    when 4
      if $game_system.save_disabled
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      $game_system.se_play($data_system.decision_se)
      $scene = Scene_Save.new
    when 5
      $game_system.se_play($data_system.decision_se)
      $scene = Scene_End.new
    when 6
      $game_system.se_play($data_system.decision_se)
      @checker = 0
      @command_window.active = false
      @status_window.active = true
      @status_window.index = 0
    end
    return
  end
end
# --------------------------------
def update_status
  if Input.trigger?(Input::B)
    $game_system.se_play($data_system.cancel_se)
    @command_window.active = true
    @status_window.active = false
    @status_window.index = -1
    return
  end
  if Input.trigger?(Input::C)
    case @command_window.index
    when 1
      if $game_party.actors[@status_window.index].restriction >= 2
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      $game_system.se_play($data_system.decision_se)
      $scene = Scene_Skill.new(@status_window.index)
    when 2
      $game_system.se_play($data_system.decision_se)
      $scene = Scene_Equip.new(@status_window.index)
    when 3
      $game_system.se_play($data_system.decision_se)
      $scene = Scene_Status.new(@status_window.index)
    when 6
      $game_system.se_play($data_system.decision_se)
      if @checker == 0
        @changer = $game_party.actors[@status_window.index]
        @where = @status_window.index
        @checker = 1
      else
        $game_party.actors[@where] = $game_party.actors[@status_window.index]
        $game_party.actors[@status_window.index] = @changer
        @checker = 0
        @status_window.refresh
      end
    end
    return
  end
end
end


laugh.gif
0

Share this post


Link to post
Share on other sites
[spoiler]
CODE
class Scene_Menu
# --------------------------------
def initialize(menu_index = 0)
 @menu_index = menu_index
 @changer = 0
 @where = 0
 @checker = 0
end
# --------------------------------
def main
 s1 = $data_system.words.item
 s2 = $data_system.words.skill
 s3 = $data_system.words.equip
 s4 = "Estado"
 s5 = "Guardar"
 s6 = "Salir"
 s7 = "Límites"
 s8 = "Cambiar"
 @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7, s8])
 @command_window.index = @menu_index
 if $game_party.actors.size == 0
   @command_window.disable_item(0)
   @command_window.disable_item(1)
   @command_window.disable_item(2)
   @command_window.disable_item(3)
 end
 if $game_system.save_disabled
   @command_window.disable_item(4)
 end
 if $game_party.actors.size == 1
   @command_window.disable_item(6)
 end
 @playtime_window = Window_PlayTime.new
 @playtime_window.x = 0
 @playtime_window.y = 276
 @gold_window = Window_Gold.new
 @gold_window.x = 0
 @gold_window.y = 416
 @status_window = Window_MenuStatus.new
 @status_window.x = 160
 @status_window.y = 0
 Graphics.transition
 loop do
   Graphics.update
   Input.update
   update
   if $scene != self
     break
   end
 end
 Graphics.freeze
 @command_window.dispose
 @playtime_window.dispose
 @gold_window.dispose
 @status_window.dispose
end
# --------------------------------
def update
 @command_window.update
 @playtime_window.update
 @gold_window.update
 @status_window.update
 if @command_window.active
   update_command
   return
 end
 if @status_window.active
   update_status
   return
 end
end
# --------------------------------
def update_command
 if Input.trigger?(Input::B)
   $game_system.se_play($data_system.cancel_se)
   $scene = Scene_Map.new
   return
 end
 if Input.trigger?(Input::C)
   if $game_party.actors.size == 0 and @command_window.index < 4
     $game_system.se_play($data_system.buzzer_se)
     return
   end
   if $game_party.actors.size == 1 and @command_window.index ==6
     $game_system.se_play($data_system.buzzer_se)
     return
   end
   case @command_window.index
   when 0
     $game_system.se_play($data_system.decision_se)
     $scene = Scene_Item.new
   when 1
     $game_system.se_play($data_system.decision_se)
     @command_window.active = false
     @status_window.active = true
     @status_window.index = 0
   when 2
     $game_system.se_play($data_system.decision_se)
     @command_window.active = false
     @status_window.active = true
     @status_window.index = 0
   when 3
     $game_system.se_play($data_system.decision_se)
     @command_window.active = false
     @status_window.active = true
     @status_window.index = 0
   when 4
     if $game_system.save_disabled
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     $game_system.se_play($data_system.decision_se)
     $scene = Scene_Save.new
   when 5
     $game_system.se_play($data_system.decision_se)
     $scene = Scene_End.new
   when 6
     $game_system.se_play($data_system.decision_se)
     #Poner aquí lo que llama al menú de límites
   when 7
     $game_system.se_play($data_system.decision_se)
     @checker = 0
     @command_window.active = false
     @status_window.active = true
     @status_window.index = 0
   end
   return
 end
end
# --------------------------------
def update_status
 if Input.trigger?(Input::B)
   $game_system.se_play($data_system.cancel_se)
   @command_window.active = true
   @status_window.active = false
   @status_window.index = -1
   return
 end
 if Input.trigger?(Input::C)
   case @command_window.index
   when 1
     if $game_party.actors[@status_window.index].restriction >= 2
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     $game_system.se_play($data_system.decision_se)
     $scene = Scene_Skill.new(@status_window.index)
   when 2
     $game_system.se_play($data_system.decision_se)
     $scene = Scene_Equip.new(@status_window.index)
   when 3
     $game_system.se_play($data_system.decision_se)
     $scene = Scene_Status.new(@status_window.index)
   when 7
     $game_system.se_play($data_system.decision_se)
     if @checker == 0
       @changer = $game_party.actors[@status_window.index]
       @where = @status_window.index
       @checker = 1
     else
       $game_party.actors[@where] = $game_party.actors[@status_window.index]
       $game_party.actors[@status_window.index] = @changer
       @checker = 0
       @status_window.refresh
     end
   end
   return
 end
end
end
[/spoiler]

Busca el
QUOTE
    when 6
      $game_system.se_play($data_system.decision_se)
      #Poner aquí lo que llama al menú de límites

Logicamente, cambiar la línea de '#Poner aquí lo que llama al menú de límites' por lo que llama al menú de límites. icon13.gif
0

Share this post


Link to post
Share on other sites
es un buen aporte este scripts esa
odcion de cambiar es muy importante para
mi proyecto y grasias por postearla icon13.gif
0

Share this post


Link to post
Share on other sites
QUOTE(Goldknight @ Sep 27 2006, 06:43 PM)
Nop, sigue sin aparecer la opcion de "cambiar"  impresionado.gif
[right][snapback]5936[/snapback][/right]


Pero... ¿cómo puede ser? Yo lo probe y salia el comando de Límites y Cambiar. Debes tener un script que crea conflicto con este. ojomorado.gif
0

Share this post


Link to post
Share on other sites
Yo le puse así:

CODE
   when 6
     $game_system.se_play($data_system.decision_se)
     #Poner aquí lo que llama al menú de límites


Poniendole lo de límites puse esto:

CODE
   when 6
     $game_system.se_play($data_system.decision_se)
     Límite


No se si sea asi pero asi le puse y no aparecio lo de cambiar, ¿no tiene nada que ver que en el proyecto donde realizo las pruebas de scripts ya llevo como 30 scripts diferentes en el editor o si?

(una aclaración, digamos que un 98% de todos esos scripts que le puse son de aqui del foro, quiero hacer un superproyecto poniendo toooooodos los scripts del foro en el a ver si son compatibles entre si o no xD.png

Tambien lo hago para testear los efectos de cada uno de los scripts en vez de abrir un nuevo proyecto para testear cada uno)

xXDarkDragonXx, si puse mal lo que me indicaste que pusiera, por favor notificame como es para ya no cometer errores (gracias de antemano laugh.gif) y si la cantidad de scripts tambien afecta, notificamelo tambien por favor (y gracias de antemano xD.png)

Saludos laugh.gif Edited by Goldknight
0

Share this post


Link to post
Share on other sites
Hmmm... nope. Eso no es para llamar al menú de límites. xD.png Es que como no uso el límites de Kotfire, no se como llamarlo (como Scene_Title que es $scene = Scene_Title.new). 30 scripts diferentes... ufff... Eso puede afectar la compatibilidad de scripts unos con otros. Creeme, sino te sale la opción de Cambiar, algún script debe estar creando conflicto. ojomorado.gif
0

Share this post


Link to post
Share on other sites
Porque no en tu scene menu le pones en las opciones del menu una que se llame cambiar, y haces un scene change y lo llamas
0

Share this post


Link to post
Share on other sites
Me parece que es probable que tengas otro tipo de menú activo a la vez que no has cambiado, y por eso no sale la opción.
0

Share this post


Link to post
Share on other sites
Si, probé quitando el script de límites y en efecto ese es el script del problema (por cierto, aprovechando, si alguien puede contactar a kotfire, que postee la nueva version de su script de límite, creo que lo nuevo que tiene la proxima version es que la barra brilla) por ahora veré si puedo de alguna manera hacer compatibles los scripts, y muchas gracias por su ayuda laugh.gif

Saludos laugh.gif

EDIT: LOGRE UNIR LOS SCRIPTS!!!!!!!!!!!! smiliez.de_2283.gif fama.gif

Y eso que no se nada de scripts xD.png, bueno, como pude uni los scripts de cambiar de orden y de límite de modo que funcionaran de ambas maneras y me resulto esto:

[SPOILER]#=============================================================================
# Límites
#=============================================================================
# Información General
#-----------------------------------------------------------------------------
# Basado en el sistema de límites de FF7 (ligeras modificaciones)
# Diseño y colocación de las ventanas basado en el advanced limit break
# de SephirotSpawn
# Agregada por Golknight la opcion de "Cambiar" del script de "Cambiar orden" de
# RPG Advocate
# Por: Kotfire
# Modificado Por: Goldknight
# Versión : 2.0
# Fecha : 27/7/06
#-----------------------------------------------------------------------------
# Instrucciones
#-----------------------------------------------------------------------------
# - Pegar encima de main
# - Editar las opciones
# - Si seleccionas Nivel Manual tendrás que editar la clase skill
# - Crear los límites
# - Disfrutar
#-----------------------------------------------------------------------------
# Creando los límites
#-----------------------------------------------------------------------------
# Para crear los límites accedemos a la base de datos y creamos las habilidades
# que serán límites.
# Añadimos un nuevo atributo que coincida con el número que hemos puesto en las
# opciones y se lo ponemos a las habilidades que serán límites.
# Por último elegimos en que nivel se aprenderán las habilidades.
#=============================================================================

#-----------------------------------------------------------------------------
# Opciones
#-----------------------------------------------------------------------------

MODO = 1 # {0, 1} 0 = Golpear, 1 = Ser Golpeado, 2 = Ambos

ATRIBUTO = 17 # Atributo en la base de datos

NOMBRE = "Límite" # Nombre en el menu

LIMITE = "Límite" # Nombre del límite o un nombre para cada personaje
# en la base de datos, ej para 8 pj en la base de datos:
# ["Destrucción", "Látigo", "Extreme", "Katon",
# "Fuuton", "Suiton", "Rauuu", "Fiuu", "Guauu"]
DIFICULTAD = 4 # {de 1 a infinito} Dificultad para subir el límite
# Contra más mayor sea el número más costará subir el límite

NIVEL = false # {false, true} Seleccionar los niveles de los límites
# manualmente o dejar que el sistema lo haga automaticamente?

SONIDO = "056-Right02" # Sonido cuando el límite está listo para usarse

FLECHA = true # {false, true} Flecha para elegir el límite estilo FFVIII


#=========================================================================
# ** Modulo de RPG
#=========================================================================
module RPG
#=========================================================================
# - Habilidades
#=========================================================================
class Skill
#-------------------------------------------------------------------------
# - Nivel de los Límites
#-------------------------------------------------------------------------
def level
# Editar aquí los niveles de los límites {when skill_id then return nivel}
case @id
when 70 then return 3
else return 1
end
end
#-------------------------------------------------------------------------
end
end

#==============================================================================
# ■ Game_Actor
#==============================================================================

class Game_Actor < Game_Battler
#-------------------------------------------------------------------------
# - Variables
#-------------------------------------------------------------------------
attr_reader :limit
attr_reader :limit_level
attr_reader :exp_limit
attr_accessor :limit_skill
attr_reader :exp_list_limit
attr_accessor :limit_action
#---------------------------------------------------------------------------
# - Alias
#---------------------------------------------------------------------------
alias kot_actor_setup setup
#--------------------------------------------------------------------------
# - Definimos los objetos
#--------------------------------------------------------------------------
def setup(actor_id)
kot_actor_setup(actor_id)
@limit = 0
@limit_level = 1
@exp_list_limit = Array.new(5)
make_exp_list_limit
@exp_limit = @exp_list_limit[@limit_level]
@limit_skill = nil
@limit_action = false
end
#--------------------------------------------------------------------------
# * Limite
#--------------------------------------------------------------------------
def limit=(limit)
@limit = limit
@limit = 1000 if @limit > 1000
@limit = 0 if @limit < 0
end
#--------------------------------------------------------------------------
# - Ajuste del Nivel
#--------------------------------------------------------------------------
def limit_level=(limit_level)
limit_level = [[limit_level, 4].min, 1].max
# Cambio de EXP
self.exp = @exp_list_limit[limit_level]
end
#--------------------------------------------------------------------------
# - EXP Limit_List
#--------------------------------------------------------------------------
def make_exp_list_limit
@exp_list_limit[1] = 0
for i in 2..5
if i >= 5
@exp_list_limit[i] = 0
else
n = 250 + @level * 2
@exp_list_limit[i] = @exp_list_limit[i-1] + n
end
end
end
#--------------------------------------------------------------------------
# - Siguiente nivel de límite
#--------------------------------------------------------------------------
def next_exp_limit
return @exp_list_limit[@limit_level + 1] > 0 ? @exp_list_limit[@limit_level + 1].to_s : "nada"
end
#--------------------------------------------------------------------------
# - EXP para subir de nivel de límite
#--------------------------------------------------------------------------
def next_rest_exp_limit
return @exp_list_limit[@limit_level+1] > 0 ?
(@exp_list_limit[@limit_level+1] - @exp_limit).to_s : "Nada"
end
#--------------------------------------------------------------------------
# - Cambio de EXP
#--------------------------------------------------------------------------
def exp_limit=(exp_limit)
@exp_limit = [[exp_limit, @exp_list_limit[4]].min, 0].max
# Sube Nivel
while @exp_limit >= @exp_list_limit[@limit_level + 1] and @exp_list_limit[@limit_level + 1] > 0
@limit_level += 1
end
# Baja Nivel
while @exp_limit < @exp_list_limit[@limit_level]
@limit_level -= 1
end
end
#--------------------------------------------------------------------------
# - Nivel de Skill
#--------------------------------------------------------------------------
def skill_level(skill_id)
# Nivel automatico?
unless NIVEL
#-----------------------------------------------------------------------
# Límites Aprendidos desde la base de datos
#-----------------------------------------------------------------------
for i in $data_classes[@class_id].learnings
# Si la habilidad es un límite...
if i.skill_id == skill_id and $data_skills[skill_id].element_set.include?(ATRIBUTO)
# Establecemos el nivel de límite para la habilidad
return 1 if i.level >= 1 and i.level <= 24
return 2 if i.level >= 25 and i.level <= 49
return 3 if i.level >= 50 and i.level <= 74
return 4 if i.level >= 75 and i.level <= 99
end
end
else
return $data_skills[skill_id].level
end
#-----------------------------------------------------------------------
# Límites Aprendidos desde los eventos
#-----------------------------------------------------------------------
unless $data_classes[@class_id].learnings.include?(skill_id)
return $data_skills[skill_id].level
end
end
end

#=============================================================================
# ■ Window_Limit
#==============================================================================

class Window_Limit < Window_Selectable
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 128, 640, 288)
@actor = actor
@column_max = 2
refresh
self.index = 0
if $game_temp.in_battle
self.y = 64
self.height = 256
self.back_opacity = 160
end
end
#--------------------------------------------------------------------------
def skill
return @data[self.index]
end
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@limit1 = []
@limit2 = []
@limit3 = []
@limit4 = []
for i in [email protected]
skill = $data_skills[@actor.skills[i]]
if skill != nil && skill.element_set.include?(ATRIBUTO)
if @actor.skill_level(skill.id) == 1 && @actor.limit_level >= 1
@limit1.push(skill)
elsif @actor.skill_level(skill.id) == 2 && @actor.limit_level >= 2
@limit2.push(skill)
elsif @actor.skill_level(skill.id) == 3 && @actor.limit_level >= 3
@limit3.push(skill)
elsif @actor.skill_level(skill.id) == 4 && @actor.limit_level >= 4
@limit4.push(skill)
end
end
end
@data = []
for i in 1..4
limit = eval("@limit" + i.to_s)
for j in limit
@data.push(j)
end
end
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
for i in 0...@item_max
draw_item(i)
end
end
end
#--------------------------------------------------------------------------
def draw_item(index)
skill = @data[index]
if @actor.limit_level >= @actor.skill_level(skill.id)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
x = 4 + index % 2 * (288 + 32)
y = index / 2 * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(skill.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(x + 28, y, 204, 32, skill.name, 0)
self.contents.draw_text(x + 232, y, 48, 32, @actor.skill_level(skill.id).to_s, 2)
end
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.skill == nil ? "" : self.skill.description)
end
#--------------------------------------------------------------------------
def data
return @data
end
end

#==============================================================================
# ■ Window_Skill
#==============================================================================

class Window_Skill < Window_Selectable
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in [email protected]
skill = $data_skills[@actor.skills[i]]
if skill != nil
@data.push(skill) unless skill.element_set.include?(ATRIBUTO)
end
end
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
for i in 0...@item_max
draw_item(i)
end
end
end
end


#==============================================================================
# ■ Window_Command
#==============================================================================
class Window_Command < Window_Selectable
def change(commands = @original)
@original = @commands unless @original
@commands = commands ? commands : @original
refresh
end
def commands
return @commands
end
end

#==============================================================================
# Window Horizontal Command
#==============================================================================
class Window_HorizCommand < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(commands, width = 640, height = 64)
super(0, 0, width, height)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
@commands = commands
@item_max = @commands.size
@column_max = @commands.size
refresh
self.index = 0
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0...@item_max
draw_item(i, normal_color)
end
end
#--------------------------------------------------------------------------
# * Draw Item
# index : item number
#--------------------------------------------------------------------------
def draw_item(index, color)
self.contents.font.color = color
x = width / @item_max * index
off = width / @item_max - 32
self.contents.draw_text(x, 0, off, 32, @commands[index], 1)
end
#--------------------------------------------------------------------------
# * Disable Item
# index : item number
#--------------------------------------------------------------------------
def disable_item(index)
draw_item(index, disabled_color)
end
#--------------------------------------------------------------------------
def update_help
case self.index
when 0
@help_window.set_text('Selecciona una habilidad límite', 1)
when 1
@help_window.set_text('Visualiza una habilidad límite', 1)
end
end
end

#==============================================================================
# ** Window_Base
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# Draw Slant Bar
#--------------------------------------------------------------------------
def draw_slant_bar(actor, x, y, min, max, width = 152, height = 6, bar_color = Color.new(150, 0, 0, 255))
self.contents.font.size = $fontsize - 8
self.contents.draw_text(x + 10, y + height - 7, 128, 32, "Nv Límite: " + actor.limit_level.to_s)
# Draw Border
for i in 0..height
self.contents.fill_rect(x + i, y + height - i, width + 1, 1, Color.new(50, 50, 50, 255))
end
# Draw Background
for i in 1..(height - 1)
r = 100 * (height - i) / height + 0 * i / height
g = 100 * (height - i) / height + 0 * i / height
b = 100 * (height - i) / height + 0 * i / height
a = 255 * (height - i) / height + 255 * i / height
self.contents.fill_rect(x + i, y + height - i, width, 1, Color.new(r, b, g, a))
end
# Draws Bar
for i in 1..( (min / max) * width - 1)
for j in 1..(height - 1)
r = bar_color.red * (width - i) / width + 255 * i / width
g = bar_color.green * (width - i) / width + 255 * i / width
b = bar_color.blue * (width - i) / width + 60 * i / width
a = bar_color.alpha * (width - i) / width + 255 * i / width
self.contents.fill_rect(x + i + j, y + height - j, 1, 1, Color.new(r, g, b, a))
end
end
end
end

#==============================================================================
# ** Scene_Battle
#==============================================================================
class Scene_Battle
#---------------------------------------------------------------------------
# - Alias
#---------------------------------------------------------------------------
alias kot_battle_main main
alias kot_battle_end battle_end
alias kot_update_phase1 update_phase1
#--------------------------------------------------------------------------
# * Main
#--------------------------------------------------------------------------
def main
for actor in $game_party.actors
actor.limit_action = false
end
kot_battle_main
end
#----------------------------------------------------------------------------
# * Battle End Result
#----------------------------------------------------------------------------
def battle_end(result)
for actor in $game_party.actors
# Al ganar
if result == 0
actor.limit += 200 / DIFICULTAD
for enemy in $game_troop.enemies
actor.exp_limit += enemy.exp / (5 * DIFICULTAD)
end
end
end
kot_battle_end(result)
end
end
#==============================================================================
# ** Game_Battler
#==============================================================================
class Game_Battler
#--------------------------------------------------------------------------
# * Applying Normal Attack Effects
# attacker : battler
#--------------------------------------------------------------------------
def attack_effect(attacker)
# Clear critical flag
self.critical = false
# First hit detection
hit_result = (rand(100) < attacker.hit)
# If hit occurs
if hit_result == true
# Calculate basic damage
atk = [attacker.atk - self.pdef / 2, 0].max
self.damage = atk * (20 + attacker.str) / 20
# Element correction
self.damage *= elements_correct(attacker.element_set)
self.damage /= 100
# If damage value is strictly positive
if self.damage > 0
# Critical correction
if rand(100) < 4 * attacker.dex / self.agi
self.damage *= 2
self.critical = true
end
# Guard correction
if self.guarding?
self.damage /= 2
end
end
# Dispersion
if self.damage.abs > 0
amp = [self.damage.abs * 15 / 100, 1].max
self.damage += rand(amp+1) + rand(amp+1) - amp
end
# Second hit detection
eva = 8 * self.agi / attacker.dex + self.eva
hit = self.damage < 0 ? 100 : 100 - eva
hit = self.cant_evade? ? 100 : hit
hit_result = (rand(100) < hit)
end
# If hit occurs
if hit_result == true
# State Removed by Shock
remove_states_shock
# Loads Current States
current_states = self.states
# Substract damage from HP
self.hp -= self.damage
# State change
@state_changed = false
states_plus(attacker.plus_state_set)
states_minus(attacker.minus_state_set)
# Al golpear
unless self.is_a?(Game_Actor)
if MODO == 0 or MODO == 2
attacker.limit += [self.damage * 10, 160].min / DIFICULTAD
end
else
if MODO == 1 or MODO == 2
self.limit += [self.damage * 10, 160].min / DIFICULTAD
end
end
else
# Set damage to "Miss"
self.damage = "Miss"
# Clear critical flag
self.critical = false
end
# End Method
return true
end
#--------------------------------------------------------------------------
# * Apply Skill Effects
# user : the one using skills (battler)
# skill : skill
#--------------------------------------------------------------------------
def skill_effect(user, skill)
# Clear critical flag
self.critical = false
# If skill scope is for ally with 1 or more HP, and your own HP = 0,
# or skill scope is for ally with 0, and your own HP = 1 or more
if ((skill.scope == 3 or skill.scope == 4) and self.hp == 0) or
((skill.scope == 5 or skill.scope == 6) and self.hp >= 1)
# End Method
return false
end
# Clear effective flag
effective = false
# Set effective flag if common ID is effective
effective |= skill.common_event_id > 0
# First hit detection
hit = skill.hit
if skill.atk_f > 0
hit *= user.hit / 100
end
hit_result = (rand(100) < hit)
# Set effective flag if skill is uncertain
effective |= hit < 100
# If hit occurs
if hit_result == true
# Calculate power
power = skill.power + user.atk * skill.atk_f / 100
if power > 0
power -= self.pdef * skill.pdef_f / 200
power -= self.mdef * skill.mdef_f / 200
power = [power, 0].max
end
# Calculate rate
rate = 20
rate += (user.str * skill.str_f / 100)
rate += (user.dex * skill.dex_f / 100)
rate += (user.agi * skill.agi_f / 100)
rate += (user.int * skill.int_f / 100)
# Calculate basic damage
self.damage = power * rate / 20
# Element correction
self.damage *= elements_correct(skill.element_set)
self.damage /= 100
# If damage value is strictly positive
if self.damage > 0
# Guard correction
if self.guarding?
self.damage /= 2
end
end
# Dispersion
if skill.variance > 0 and self.damage.abs > 0
amp = [self.damage.abs * skill.variance / 100, 1].max
self.damage += rand(amp+1) + rand(amp+1) - amp
end
# Second hit detection
eva = 8 * self.agi / user.dex + self.eva
hit = self.damage < 0 ? 100 : 100 - eva * skill.eva_f / 100
hit = self.cant_evade? ? 100 : hit
hit_result = (rand(100) < hit)
# Set effective flag if skill is uncertain
effective |= hit < 100
end
# If hit occurs
if hit_result == true
# If physical attack has power other than 0
if skill.power != 0 and skill.atk_f > 0
# State Removed by Shock
remove_states_shock
# Set to effective flag
effective = true
end
# Loads Current States
current_states = self.states
# Substract damage from HP
last_hp = self.hp
self.hp -= self.damage
effective |= self.hp != last_hp
@state_changed = false
effective |= states_plus(skill.plus_state_set)
effective |= states_minus(skill.minus_state_set)
if user.is_a?(Game_Actor)
# Al Golpear
if MODO == 0 or MODO == 2
unless $data_skills[skill.id].element_set.include?(ATRIBUTO)
user.limit += [self.damage * 10, 160].min / DIFICULTAD if self.damage > 0
user.limit += [self.damage * -10, 160].min / DIFICULTAD if self.damage < 0
end
end
else
if MODO == 1 or MODO == 2
self.limit += [self.damage * 10, 160].min / DIFICULTAD if self.damage > 0
end
end
# If power is 0
if skill.power == 0
# Set damage to an empty string
self.damage = ""
# If state is unchanged
unless @state_changed
# Set damage to "Miss"
self.damage = "Miss"
end
end
# When missing
else
# Set damage to "Miss"
self.damage = "Miss"
# Clear critical flag
self.critical = false
end
# If not in battle
unless $game_temp.in_battle
# Set damage to nil
self.damage = nil
end
# End Method
return effective
end
end

#==============================================================================
# ■ Window_BattleStatus
#==============================================================================

class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.size = $fontsize
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
actor_x = i * 160 + 4
draw_actor_name(actor, actor_x, 0)
draw_actor_hp(actor, actor_x, 29, 120)
draw_actor_sp(actor, actor_x, 55, 120)
if @level_up_flags[i]
self.contents.font.color = normal_color
self.contents.draw_text(actor_x, 80, 120, 32, "LEVEL UP!")
else
draw_actor_state(actor, actor_x, 78)
draw_slant_bar(actor, actor_x, 100 + 7, actor.limit, 1000.0, 120)
self.contents.font.size = $fontsize
end
end
end
end

#==============================================================================
# ■ Window_BattleResult
#------------------------------------------------------------------------------

class Window_BattleResult < Window_Base

#--------------------------------------------------------------------------
def refresh
self.contents.clear
x = 4
self.contents.font.color = normal_color
cx = contents.text_size(@exp.to_s).width
self.contents.draw_text(x, 0, cx, 32, @exp.to_s)
x += cx + 4
self.contents.font.color = system_color
cx = contents.text_size("EXP").width
self.contents.draw_text(x, 0, 64, 32, "EXP")
x += cx + 16
self.contents.font.color = normal_color
cx = contents.text_size(@gold.to_s).width
self.contents.draw_text(x, 0, cx, 32, @gold.to_s)
x += cx + 4
self.contents.font.color = system_color
cx = contents.text_size($data_system.words.gold).width
self.contents.draw_text(x, 0, 128, 32, $data_system.words.gold)
x += cx + 16
self.contents.font.color = normal_color
cx = contents.text_size((@exp / (5 * DIFICULTAD)).to_s).width
self.contents.draw_text(x, 0, cx, 32, (@exp / (5 * DIFICULTAD)).to_s)
x += cx + 4
self.contents.font.color = system_color
self.contents.draw_text(x, 0, 128, 32, NOMBRE)
y = 32
for item in @treasures
draw_item_name(item, 4, y)
y += 32
end
end
end

#==============================================================================
# ■ Window_MenuStatus
#==============================================================================

class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = 64
y = i * 116
actor = $game_party.actors[i]
draw_actor_graphic(actor, x - 40, y + 80)
draw_actor_name(actor, x, y)
draw_actor_class(actor, x + 144, y)
draw_actor_level(actor, x, y + 32)
draw_actor_state(actor, x + 90, y + 32)
draw_actor_exp(actor, x, y + 64)
draw_actor_hp(actor, x + 236, y + 32)
draw_actor_sp(actor, x + 236, y + 64)
draw_slant_bar(actor, x + 230, y + 7, actor.limit, 1000.0, 120)
self.contents.draw_text(x + 215, y + 5, 160, 32, "Sig: " + actor.next_rest_exp_limit, 2)
self.contents.font.size = $fontsize
end
end
end
#==============================================================================
# ■ Window_Limit_Status
#==============================================================================

class Window_Limit_Status < Window_Base
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 416, 640, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
@actor = actor
refresh
end
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_name(@actor, 4, 0)
draw_slant_bar(@actor, 82, 7, @actor.limit, 1000.0, 120)
self.contents.font.size = $fontsize
self.contents.draw_text(230, 0, 160, 32, "Habilidad Límite: ")
if @actor.limit_skill != nil
text = self.contents.text_size(@actor.limit_skill.name).width
rect = Rect.new(440, 4, 24, 24)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(@actor.limit_skill.icon_name)
self.contents.blt(592 - (text + 32), 4, bitmap, Rect.new(0, 0, 24, 24), 255)
self.contents.draw_text(388, 0, 204, 32, @actor.limit_skill.name, 2)
else
self.contents.draw_text(388, 0, 204, 32, "Ninguna", 1)
end
end
end

#==============================================================================
# ■ Scene_Limit
#==============================================================================

class Scene_Limit
#--------------------------------------------------------------------------
def initialize(actor_index = 0, equip_index = 0)
@actor_index = actor_index
@ver = false
end
#--------------------------------------------------------------------------
def main
@actor = $game_party.actors[@actor_index]
@help_window = Window_Help.new
@command_window = Window_HorizCommand.new(['Seleccionar', 'Ver'])
@command_window.y = 64
@command_window.help_window = @help_window
@status_window = Window_Limit_Status.new(@actor)
@limit_window = Window_Limit.new(@actor)
@limit_window.active = false
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@help_window.dispose
@command_window.dispose
@status_window.dispose
@limit_window.dispose
end
#--------------------------------------------------------------------------
def update
@help_window.update
@status_window.update
@limit_window.update
@command_window.update
if @command_window.active
update_command
return
end
if @limit_window.active
unless @ver
update_skill
else
update_ver
end
return
end
end
#--------------------------------------------------------------------------
def update_command
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new(2)
return
end
if Input.trigger?(Input::C)
case @command_window.index
when 0 # Seleccionar
if @limit_window.data.size == 0
$game_system.se_play($data_system.buzzer_se)
@command_window.help_window = nil
@help_window.set_text('No has aprendido ninguna habilidad límite', 1)
else
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@limit_window.active = true
@ver = false
end
when 1 # Ver
if @limit_window.data.size == 0
$game_system.se_play($data_system.buzzer_se)
@command_window.help_window = nil
@help_window.set_text('No has aprendido ninguna habilidad límite', 1)
else
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@limit_window.active = true
@ver = true
end
end
end
if Input.trigger?(Input::R)
$game_system.se_play($data_system.cursor_se)
@actor_index += 1
@actor_index %= $game_party.actors.size
$scene = Scene_Limit.new(@actor_index)
return
end
if Input.trigger?(Input::L)
$game_system.se_play($data_system.cursor_se)
@actor_index += $game_party.actors.size - 1
@actor_index %= $game_party.actors.size
$scene = Scene_Limit.new(@actor_index)
return
end
if Input.trigger?(Input::UP) or Input.trigger?(Input::DOWN) or
Input.trigger?(Input::RIGHT) or Input.trigger?(Input::LEFT)
@command_window.help_window = @help_window
end
end
#--------------------------------------------------------------------------
def update_skill
old_limit_skill = @actor.limit_skill
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@command_window.active = true
@limit_window.active = false
return
end
if Input.trigger?(Input::C)
@skill = @limit_window.skill
unless @actor.limit_level >= @actor.skill_level(@skill.id)
$game_system.se_play($data_system.buzzer_se)
return
end
if @skill != old_limit_skill
$game_system.se_play($data_system.decision_se)
@actor.limit_skill = @skill
@actor.limit = 0
@status_window.refresh
@help_window.set_text("#{@actor.limit_skill.name} es ahora tu habilidad límite", 1)
else
$game_system.se_play($data_system.buzzer_se)
@help_window.set_text("#{@actor.limit_skill.name} ya es tu habilidad límite", 1)
end
return
end
if Input.trigger?(Input::R)
$game_system.se_play($data_system.cursor_se)
@actor_index += 1
@actor_index %= $game_party.actors.size
$scene = Scene_Limit.new(@actor_index)
return
end
if Input.trigger?(Input::L)
$game_system.se_play($data_system.cursor_se)
@actor_index %= $game_party.actors.size
$scene = Scene_Limit.new(@actor_index)
return
end
if Input.trigger?(Input::UP) or Input.trigger?(Input::DOWN) or
Input.trigger?(Input::RIGHT) or Input.trigger?(Input::LEFT)
@help_window.set_text("Selecciona una habilidad límite", 1)
end
end
#--------------------------------------------------------------------------
def update_ver
@limit_window.help_window = @help_window
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@command_window.active = true
@limit_window.active = false
@limit_window.help_window = nil
return
end
if Input.trigger?(Input::R)
$game_system.se_play($data_system.cursor_se)
@actor_index += 1
@actor_index %= $game_party.actors.size
$scene = Scene_Limit.new(@actor_index)
return
end
if Input.trigger?(Input::L)
$game_system.se_play($data_system.cursor_se)
@actor_index %= $game_party.actors.size
$scene = Scene_Limit.new(@actor_index)
return
end
end
end

#==============================================================================
# ■ Scene_Menu
#==============================================================================

class Scene_Menu
# --------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
@changer = 0
@where = 0
@checker = 0
end
# --------------------------------
def main
s1 = $data_system.words.item
s2 = $data_system.words.skill
s3 = "Límite"
s4 = $data_system.words.equip
s5 = "Estado"
s6 = "Guardar"
s7 = "Salir"
s8 = "Cambiar"
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7, s8])
@command_window.index = @menu_index
if $game_party.actors.size == 0
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
end
if $game_system.save_disabled
@command_window.disable_item(4)
end
if $game_party.actors.size == 1
@command_window.disable_item(6)
end
@playtime_window = Window_PlayTime.new
@playtime_window.x = 0
@playtime_window.y = 256
@steps_window = Window_Steps.new
@steps_window.x = 0
@steps_window.y = 320
@gold_window = Window_Gold.new
@gold_window.x = 0
@gold_window.y = 416
@status_window = Window_MenuStatus.new
@status_window.x = 160
@status_window.y = 0
# Execute Transition
Graphics.transition
# loop
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@command_window.dispose
@playtime_window.dispose
@steps_window.dispose
@gold_window.dispose
@status_window.dispose
end
# --------------------------------
def update
@command_window.update
@playtime_window.update
@gold_window.update
@status_window.update
if @command_window.active
update_command
return
end
if @status_window.active
update_status
return
end
end
# --------------------------------
def update_command
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
if Input.trigger?(Input::C)
if $game_party.actors.size == 0 and @command_window.index < 4
$game_system.se_play($data_system.buzzer_se)
return
end
if $game_party.actors.size == 1 and @command_window.index ==6
$game_system.se_play($data_system.buzzer_se)
return
end
case @command_window.index
when 0
$game_system.se_play($data_system.decision_se)
$scene = Scene_Item.new
when 1
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 2 # limite
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 3
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 4
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 5
if $game_system.save_disabled
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
$scene = Scene_Save.new
when 6
$game_system.se_play($data_system.decision_se)
$scene = Scene_End.new
when 7
$game_system.se_play($data_system.decision_se)
@checker = 0
@command_window.active = false
@status_window.active = true
@status_window.index = 0
end
return
end
end
# --------------------------------
def update_status
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@command_window.active = true
@status_window.active = false
@status_window.index = -1
return
end
if Input.trigger?(Input::C)
case @command_window.index
when 1
if $game_party.actors[@status_window.index].restriction >= 2
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
$scene = Scene_Skill.new(@status_window.index)
when 2 # limite
$game_system.se_play($data_system.decision_se)
$scene = Scene_Limit.new(@status_window.index)
when 3
$game_system.se_play($data_system.decision_se)
$scene = Scene_Equip.new(@status_window.index)
when 4
$game_system.se_play($data_system.decision_se)
$scene = Scene_Status.new(@status_window.index)
when 7
$game_system.se_play($data_system.decision_se)
if @checker == 0
@changer = $game_party.actors[@status_window.index]
@where = @status_window.index
@checker = 1
else
$game_party.actors[@where] = $game_party.actors[@status_window.index]
$game_party.actors[@status_window.index] = @changer
@checker = 0
@status_window.refresh
end
end
return
end
end
end

#==============================================================================
# ** Scene_Battle
#==============================================================================
class Scene_Battle

#-------------------------------------------------------------------------
# - Alias
#-------------------------------------------------------------------------
alias setup_command_cargar_kot phase3_setup_command_window
alias basic_command_cargar_kot update_phase3_basic_command
alias limit_action_kot make_skill_action_result
#-------------------------------------------------------------------------
# - phase3_setup_command_window
#-------------------------------------------------------------------------
def phase3_setup_command_window
if @active_battler.limit >= 1000 && @active_battler.limit_skill != nil
Audio.se_play("Audio/SE/" + SONIDO) if SONIDO != ""
if LIMITE.is_a? Array
@limite = LIMITE[@active_battler.id]
else
@limite = LIMITE
end
if FLECHA == true
@actor_command_window.change([$data_system.words.attack + " >>",
$data_system.words.skill, $data_system.words.guard, $data_system.words.item])
else
@actor_command_window.change([@limite, $data_system.words.skill,
$data_system.words.guard, $data_system.words.item])
end
else
@actor_command_window.change
end
@party_command_window.active = false
@party_command_window.visible = false
@actor_command_window.active = true
@actor_command_window.visible = true
@actor_command_window.x = @actor_index * 160
@actor_command_window.index = 0
setup_command_cargar_kot
end
#-------------------------------------------------------------------------
# - update_phase3_basic_command
#-------------------------------------------------------------------------
def update_phase3_basic_command
if Input.trigger?(Input::RIGHT) && @actor_command_window.commands[0] != @limite
if FLECHA == true && @actor_command_window.index == 0 &&
@active_battler.limit >= 1000 && @active_battler.limit_skill != nil
@actor_command_window.change([@limite, $data_system.words.skill,
$data_system.words.guard, $data_system.words.item])
end
return
end
if Input.trigger?(Input::LEFT) && @actor_command_window.commands[0] == @limite
if FLECHA == true && @actor_command_window.index == 0 &&
@active_battler.limit >= 1000 && @active_battler.limit_skill != nil
@actor_command_window.change([$data_system.words.attack + " >>",
$data_system.words.skill, $data_system.words.guard, $data_system.words.item])
end
return
end
if Input.trigger?(Input::C)
case @actor_command_window.index
when 0
if FLECHA == false
$game_system.se_play($data_system.decision_se)
if @active_battler.limit >= 1000 && @active_battler.limit_skill != nil
@active_battler.current_action.kind = 1
@active_battler.current_action.skill_id = @active_battler.limit_skill.id
@active_battler.limit_action = true
if @active_battler.limit_skill.scope == 1
start_enemy_select
elsif @active_battler.limit_skill.scope == 3 or @active_battler.limit_skill.scope == 5
start_actor_select
else
phase3_next_actor
end
else
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 0
start_enemy_select
end
else
if @actor_command_window.commands[0] == @limite
@active_battler.current_action.kind = 1
@active_battler.current_action.skill_id = @active_battler.limit_skill.id
@active_battler.limit_action = true
if @active_battler.limit_skill.scope == 1
start_enemy_select
elsif @active_battler.limit_skill.scope == 3 or @active_battler.limit_skill.scope == 5
start_actor_select
else
phase3_next_actor
end
else
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 0
start_enemy_select
end
end
when 1
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 1
start_skill_select
when 2
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 1
phase3_next_actor
when 3
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 2
start_item_select
end
return
end
basic_command_cargar_kot
end
#-------------------------------------------------------------------------
# - Reiniciar el límite
#-------------------------------------------------------------------------
def make_skill_action_result
@skill = $data_skills[@active_battler.current_action.skill_id]
unless @active_battler.current_action.forcing
unless @active_battler.skill_can_use?(@skill.id)
$game_temp.forcing_battler = nil
@phase4_step = 1
return
end
end
if @active_battler.is_a?(Game_Actor) && @active_battler.limit_action
@active_battler.limit = 0
@active_battler.limit_action = false
else
@active_battler.sp -= @skill.sp_cost
@status_window.refresh
end
@help_window.set_text(@skill.name, 1)
@animation1_id = @skill.animation1_id
@animation2_id = @skill.animation2_id
@common_event_id = @skill.common_event_id
set_target_battlers(@skill.scope)
for target in @target_battlers
target.skill_effect(@active_battler, @skill)
end
end
end[/SPOILER]

Tiene 2 errores xD.png

Este es uno:

user posted image

Y el otro sucede cuando se elige una opcion, por ejemplo, Guardar y salir estan juntas, elijo la opcion de "salir" pero me arrepiento y lo quito, y la seleccion en vez de estar en salir para seleccionarla nuevamente, se regresa a la opcion de "Guardar", eso no se por que sucede, ruego por que alguien me ayude por que hasta aqui me atore xD.png, gracias de antemano laugh.gif

Saludos laugh.gif

PD: Que dificil es poner posts tan largos O.O, pondre un link para el script por que el spoiler lo muestra mal, a ver si edito este post nuevamente

2do EDIT:

Ésta es la direccion para bajar el script, asi sera mejor:

Unión del Script de Límite de Kotfire con el de Cambiar Orden de RPG Advocate Edited by Goldknight
0

Share this post


Link to post
Share on other sites
yo estoy utilizando el menu en anillo que hay en este mismo foro, podrias agregarle la opcion de guardar y a de cambiar?? o como mucho la de cambiar
0

Share this post


Link to post
Share on other sites
hola
se puede quitar que el personaje a la cabesa salga en el mapa plz
esque en mi juego se puede correr y no tengo el grafico de correr de todos

chao
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0