Últimos temas
» Script de menupor maxi Jue 04 Dic 2014, 1:44 pm
» Ayuda intro animado!!!
por maxi Miér 03 Dic 2014, 9:41 pm
» ayuda con este engin
por maxi Miér 03 Dic 2014, 8:42 am
» Hud de Vida 100% Personalizable - Engine Sencillo! Sin Scripts :)
por davidaikago Jue 20 Nov 2014, 10:58 am
» Ultimate parallax control by:GDS [ace]
por arellano Miér 08 Oct 2014, 8:28 pm
» Script Touhou (animated) Map name (v1.4)
por davidaikago Miér 08 Oct 2014, 2:09 pm
» tutorial puerta nueva
por davidaikago Miér 08 Oct 2014, 9:08 am
» cámara de fotos
por davidaikago Miér 08 Oct 2014, 9:05 am
» Imperial Action System II Demo
por davidaikago Miér 08 Oct 2014, 8:47 am
» VE Batalla animada [ACE]
por FhierusIV Jue 18 Sep 2014, 10:57 am
» Nuevo Reglamento del Foro [Vigente desde Septiembre 2014]
por maxi Miér 17 Sep 2014, 8:37 am
» MOG|Animated Title
por Souta21 Mar 09 Sep 2014, 7:24 pm
» Tutorial Engine - Cambiar Character al Equipar Objeto
por maxi Lun 21 Jul 2014, 10:19 am
» Script de climas
por gambasoxd Sáb 19 Jul 2014, 8:58 am
» Script de contraseña(codigo) para abrir un cofre
por rpgame Jue 03 Jul 2014, 6:03 pm
¿Quién está en línea?
En total hay 1 usuario en línea: 0 Registrados, 0 Ocultos y 1 Invitado Ninguno
El record de usuarios en línea fue de 117 durante el Mar 09 Ago 2011, 3:39 pm
Batlestadisticas
3 participantes
RPG maker VX :: Scripts ::
Página 1 de 1.
Batlestadisticas
Descripcion: Les muestra los datos de las batallas en el menú principal o en las batallas por defecto del juego.
Total Batallas
Victorias
Derrotas
Escapes
Instrucciones: pegar encima del main XD
Autor:Kyonides
Total Batallas
Victorias
Derrotas
Escapes
Instrucciones: pegar encima del main XD
Autor:Kyonides
- Código:
#===============================
# Window_BattleStatistics VX
# by Kyonides-Arkanthos alias Kyonides, Shadowball
# v 1.0.3 - 20.02.2011
# v 1.0.2 - 03.25.2010
# v 1.0.1 - 12.27.2009
# v 1.0.0 - 02.06.2008
#===============================
module KyoBattleStats
@@kyon_stats = [0,0,0,0] # Battles Total, Won, Lost, Escaped
@@kyon_show = [true, true, true, true]
def self.stats; @@kyon_stats end
def self.stats=(value) @@kyon_stats = value end
end
class Window_BattleStatistics < Window_Base
include KyoBattleStats
def initialize(x=0, y=244)
@show = []
@@kyon_stats.each_index {|i| @show << i if @@kyon_show[i]}
super(x, y, 160, @show.size * 21 + 32)
self.contents = Bitmap.new(width - 32, height - 32)
self.z = 104
refresh
end
def refresh
y, h = [0, 14, 36, 58], [18, 32, 32, 32]
legends = ['Total Battles','Battles Won','Battles Lost','Escaped']
self.contents.clear
self.contents.font.size = 16
self.contents.font.bold = true
self.contents.font.color = system_color
@show.size.times do |n|
self.contents.draw_text(0, y[n], 120, h[n], legends[@show[n]])
end
self.contents.font.size = 18
self.contents.font.color = normal_color
y[0], h[0] = -4, 24
@show.size.times do |n|
self.contents.draw_text(4,y[n],124,h[n],@@kyon_stats[@show[n]].to_s,2)
end
end
def show_stats(value);
@@kyon_stats[0] += 1
@@kyon_stats[value] += 1
refresh
self.visible = true
end
end
# * Scene_Menu Mod
class Scene_Menu
include KyoBattleStats
alias :kyon_battle_stats_scene_menu_main :main
alias :kyon_battle_stats_scene_menu_up :update
def main
@battle_stats = Window_BattleStatistics.new
kyon_battle_stats_scene_menu_main
@battle_stats.dispose
end
def update
kyon_battle_stats_scene_menu_up
# Press Q or PageUp key to make the window appear / disappear
if Input.trigger?(Input::L)
@battle_stats.visible = @battle_stats.visible ? false : true
end
end
end
# * Scene_File Mod
class Scene_File
include KyoBattleStats
alias :kyon_battle_stats_scene_file_write_save_data :write_save_data
alias :kyon_battle_stats_scene_file_read_save_data :read_save_data
def write_save_data(file)
kyon_battle_stats_scene_file_write_save_data(file)
Marshal.dump(@@kyon_stats, file) # You'll need to save these variable
end
def read_save_data(file)
kyon_battle_stats_scene_file_read_save_data(file)
# You'll need to load this variable if you'd like to continue playing...
@@kyon_stats = [0,0,0,0] if file.eof?
@@kyon_stats = Marshal.load(file) if !file.eof?
end
end
# * Scene_Battle Mod
class Scene_Battle
include KyoBattleStats
alias :kyon_battle_stats_scene_battle_c_info_view :create_info_viewport
alias :kyon_battle_stats_scene_battle_d_info_view :dispose_info_viewport
alias :kyon_battle_stats_scene_battle_process_defeat :process_defeat
def create_info_viewport
kyon_battle_stats_scene_battle_c_info_view
@battle_stats = Window_BattleStatistics.new(192,24)
@battle_stats.visible = false
end
def dispose_info_viewport
kyon_battle_stats_scene_battle_d_info_view
@battle_stats.dispose
end
def process_escape
@info_viewport.visible = false
@message_window.visible = true
text = sprintf(Vocab::EscapeStart, $game_party.name)
$game_message.texts.push(text)
if $game_troop.preemptive
success = true
else
success = (rand(100) < @escape_ratio)
end
Sound.play_escape
if success
@battle_stats.show_stats(3) # Escape
wait_for_message
battle_end(1)
else
@escape_ratio += 10
$game_message.texts.push('\.' + Vocab::EscapeFailure)
wait_for_message
$game_party.clear_actions
start_main
end
end
def process_victory
@info_viewport.visible = false
@message_window.visible = true
RPG::BGM.stop
$game_system.battle_end_me.play
unless $BTEST
$game_temp.map_bgm.play
$game_temp.map_bgs.play
end
@battle_stats.show_stats(1) # Victory
display_exp_and_gold
display_drop_items
display_level_up
battle_end(0)
end
def process_defeat
@battle_stats.show_stats(2) # Defeat
kyon_battle_stats_scene_battle_process_defeat
end
end
Vanjoss- 300
-
33
390
602
50
Extras
Sobre mí::
Re: Batlestadisticas
Exelente aporte amigo, que bueno que lo traes aqui, muy util para mi juego
Mr.Magneto- 220
-
37
299
105
11
RPG maker VX :: Scripts ::
Página 1 de 1.
Permisos de este foro:
No puedes responder a temas en este foro.