[XP]Advance GameOver Script[Para Zakata]

OP

Hαnderu.

Banneado
Mensajes
1.771
Reacciones
423
Puntos
0
Ubicación
8 bit videogame!
Hola amigos, hoy les traigo este script que es bastante avansado para XP!

El script está en Ingles, pero no es mucho problema.

Intro:

El script Avansado para Game-Overs te da la opción de añadir casi todos las posibles
opciones de los juegos más populares. Desde el Reaparecer en los Centros Pokemon hasta
mostrar un menú como en NWN donde se puede comprobar el Reaparecer, volver a cargar o reiniciar.

Características:

Fija ubicación Reaparecer / Ubicación desbloquea con Variable
Mapa id / Variable del mapa
Mapa x / Variable del mapa x
Mapa y / Variable del mapa y
Se pierde oro en la muerte (true / false)
¿Cuánto oro se pierde? (puede ser en % o en el número fijo)
Capáz de perder Exp cuando muerte (true / false)
Capaz de perder lvls sobre la muerte (true / falso)
¿Cuánta Exp se pierde? (puede ser en % o en el número fijo)
Auto-curarse por Reaparecer? (true / false)

Script:

Código:
#==============================================================================
# ■ Jackolas Advance GameOver Script
#==============================================================================
# script by:            Jackolas
# Version number:       V 1.1
# Last edit date:       17-12-09
#
# Thanks:               macht102 (for requesting)
#                       elementisland (asking for options)
#                       winkio (for example script)
#==============================================================================
# Introduction:
#   The Advance Game-Over Script gives you the option to add almost every possible 
#   game-over from popular games. from the respawn in pokemon centres till the
#   show menu where you can check to respawn, reload or restart in NWN.
# ====================
# Compatibility:
#   95% compatible with SDK v1.x. 80% compatible with SDK 2.x. 
#   Will not work with scripts that edit the Scene_Gameover 
# ====================
# Current Features:
#   - Fixed Spawn location / Variable spawn location
#   - Map id / Variable of map id
#   - Map x / Variable of map x
#   - Map y / Variable of map y
#   - Able to lose gold on death (true/false)
#   - How much gold to lose (can be in % or in fixed number)
#   - Able to lose exp on death (true/false)
#   - Able to lose lvls on death (true/false)
#   - how much exp to lose (can be in % or in fixed number)
#   - Auto-heal on respawn (true/false)
# ====================
# To be added in later versions:
#   - Better instructions
#   - Show Game Over screen with option to continue, load or main menu (true/false)
#   - Able to lose items in backpack (true/false)
#   - Likelihood you will lose item from backpack (in %)
#   - Able to lose equipped items (true/false)
#   - Likelihood you will lose item equipped (in %)
# ==================== 
# Instructions:
#   Place the script above Main and below any other custom scripts.
#   Edit the Configuration to your likings.
#   Play the game and die 
# ====================
# Notes:
#   - Do not edit anything else than the configuration. 
#   - If you find any bugs, please report them here:
#     http://forum.chaos-project.com
#==============================================================================
module Jackolas_GameOver
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration below
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  Fixed_Spawn = false     # true / false
  VarID = 1               # Var number for map id / fixed map ID location
  VarX = 2                # var number for map x / fixed map x location
  VarY = 3                # var number for map y / fixed map y location
#  Show_gameover = false  # true / false (not build in yet)
  LoseGold = false        # true / false
  GoldAmount = 0          # Above 1 = fixed amount / Below 1 = % of total
  LoseExp = false         # true / false
  LoseLvl = false         # true / false
  ExpAmount = 0           # Above 1 = fixed amount / Below 1 = % amount
  Autoheal = false        # true / false
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration above
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
end

class Game_Actor
  attr_accessor :exp_list
end

class Scene_Gameover
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
    def main
    # Set game over flag
    $game_temp.gameover = false
    # Return to BGM before battle starts
    $game_system.bgm_play($game_temp.map_bgm)
    # Clear in battle flag
    $game_temp.in_battle = false
    # Clear entire party actions flag
    $game_party.clear_actions
    # Clear enemies
    $game_troop.enemies.clear
    # Call battle callback
    if $game_temp.battle_proc != nil
      $game_temp.battle_proc.call(2)
      $game_temp.battle_proc = nil
    end
    # Execute transition
    Graphics.transition(120)
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Start special options
      auto_heal
      remove_gold
      remove_exp
      remove_item
      # start transport
      start_transport
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # Execute transition
    Graphics.transition(120)
    # Prepare for transition
    Graphics.freeze
    # If battle test
    if $BTEST
      $scene = nil
    end
  end
  #--------------------------------------------------------------------------
  # * Auto heal Processing
  #--------------------------------------------------------------------------
  def auto_heal
    for actor in $game_party.actors
      actor.remove_states_battle
    end
    if Jackolas_GameOver::Autoheal
      for actor in $game_party.actors
        actor.recover_all
      end
    else 
      for actor in $game_party.actors
        actor.hp = 1
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Remove Gold Processing
  #--------------------------------------------------------------------------
  def remove_gold
    if Jackolas_GameOver::LoseGold
      if Jackolas_GameOver::GoldAmount >=1
        if Jackolas_GameOver::GoldAmount >= $game_party.gold
          goldlose = $game_party.gold
        else
          goldlose = Jackolas_GameOver::GoldAmount
        end
        else
        goldlose = $game_party.gold * Jackolas_GameOver::GoldAmount
      end
      $game_party.gain_gold(-goldlose.to_i)
    else
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Remove EXP Processing
  #--------------------------------------------------------------------------
  #This works, Do never touch any of these or the script WILL crash!!!
  #The reason for the many "if" is to make sure you won't get -exp
  def remove_exp
    if Jackolas_GameOver::LoseExp
      if Jackolas_GameOver::ExpAmount >= 1
        for actor in $game_party.actors
          if Jackolas_GameOver::LoseLvl
            if Jackolas_GameOver::ExpAmount >= actor.exp
              explose = Jackolas_GameOver::ExpAmount
            else 
              explose = actor.exp
            end
          else
            if (actor.exp - actor.exp_list[actor.level]) >= Jackolas_GameOver::ExpAmount
              explose = Jackolas_GameOver::ExpAmount
            else 
              explose = actor.exp - actor.exp_list[actor.level]
            end            
          end
          actor.exp -= explose
          actor.exp = actor.exp.to_i
        end
      else
        for actor in $game_party.actors
          if Jackolas_GameOver::LoseLvl
            explose = actor.exp * Jackolas_GameOver::ExpAmount
          else
            explose = (actor.exp - actor.exp_list[actor.level]) * Jackolas_GameOver::ExpAmount
          end
          actor.exp -= explose
          actor.exp = actor.exp.to_i
        end
      end
    else
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Remove item Processing
  #--------------------------------------------------------------------------
  def remove_item
    return
  end
  #--------------------------------------------------------------------------
  # * start_transport
  #--------------------------------------------------------------------------
  def start_transport
    # Set variables
    if Jackolas_GameOver::Fixed_Spawn
      @MapID = Jackolas_GameOver::VarID
      @MapX = Jackolas_GameOver::VarX
      @MapY = Jackolas_GameOver::VarY
    else
      @MapID = $game_variables[Jackolas_GameOver::VarID]
      @MapX = $game_variables[Jackolas_GameOver::VarX]
      @MapY = $game_variables[Jackolas_GameOver::VarY]
    end
    # Transport player
    $game_map.setup(@MapID)
    $game_player.moveto(@MapX, @MapY)
    # Refresh map
    $game_player.refresh
    $game_map.autoplay
    $game_map.update
    $scene = Scene_Map.new  
  end
end

Créditos: Todos los créditos para el creador de este asombroso Script.

Atención: Este script no lo he probado, pero estoy seguro de que sirve a la perfección.
Si hay problemas Reportadmelo por MP o en el tema.
 
Última edición:

Uchiha Flash

LUCҞҰ SŦRIҞE
Mensajes
1.597
Reacciones
424
Puntos
0
Ubicación
Mexico
iPerfecto! Ahora si!, nos ayudara enserio..
Nos sera de mucha utilidad! para nuestro proyecto..
Gracias por compartirlo!.
 
Última edición:
Mensajes
147
Reacciones
16
Puntos
0
Ubicación
Costa Rica
Gracias amigo nos será muy util y no solo a nosotros si
no a todos los del foro que quieran crear un juego.

Gracias por aplicar lo de los creditos...
Te dije lo de los creditos porque cuesta crear algo y que usen mucho y no valorarlo.
 

~Night Shade

Prime Member
Mensajes
4.388
Reacciones
2.126
Puntos
1.198
Ubicación
RPG'S Universe
Muy buen script gracias por el aporte!.

Añadido al indice de scripts ;)
 
Arriba Pie