RPG OTAKU
¡Hola! te invitamos a que te unas a RPG-OTAKU,
foro de desarrollo de videojuego con RPG MAKER y ademas de que tenemos del infaltable ocio.

Si deseas disfrutar del foro al 100%,
registrate, en poco minutos, sin confirmación de e-mail y totalmente gratis, si ya estas registrado, solamente conectate, y si lo que quieres es observar el foro como invitado, solo ignora este mensaje.
¡Eres libre de escoger lo que tu quieras!

Battle Result Window

Ir abajo

Battle Result Window

Mensaje por Neozero el Vie Dic 23, 2011 5:46 pm

Estos son unos scripts que crean una ventana como resultado de batalla

Para esta ventana
Spoiler:



Usar este script
Código:

#===============================================================
# ��€”� [VX] ��€”� Battle Result Window ��€”� ��€“�
#--------------------------------------------------------------
# ��€”� by Woratana [woratana@hotmail.com]
# ��€”� Thaiware RPG Maker Community
# ��€”� Released on: 03/08/2008
# ��€”� Version: 1.0
#--------------------------------------------------------------
module Vocab

# Status Screen
ExpFull = "Level Up"
ExpMax = "Level Max"
ExpGot = "to Next Lv:"
ExpTotal = "Exp Now:"
end

class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Get Experience String
#--------------------------------------------------------------------------
def exp_s
return @exp_list[@level+1] > 0 ? @exp : "Master"
end
#--------------------------------------------------------------------------
# * Get String for Next Level Experience
#--------------------------------------------------------------------------
def next_exp_s
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] : "Master"
end
#--------------------------------------------------------------------------
# * Get String for Experience to Next Level
#--------------------------------------------------------------------------
def next_rest_exp_s
return @exp_list[@level+1] > 0 ?
(@exp_list[@level+1] - @exp) : "Master"
end
end



class Window_Battle_Result < Window_Base
def initialize(result_data)
super(0, 0, 544, 290)
self.z = 10001
$game_party.members.each_index do |i|
actor = $game_party.members[i]
tx = actor.index * 125 + WLH / 2
ty = WLH * (i + 2)
draw_actor_face (actor, tx, 0)
actor_face_opacity = 10
draw_actor_name(actor, tx, 90)
draw_actor_hp(actor, tx, 110)
draw_actor_mp(actor, tx, 130)
contents.font.color = system_color
text = sprintf(Vocab::status, Vocab::level )
tw = contents.text_size(text).width
contents.draw_text(tx, 150, contents.width, WLH, text)
contents.font.color = normal_color
contents.draw_text(tx, 170, contents.width, WLH, Vocab::ExpTotal )
contents.font.color = normal_color
contents.draw_text(tx, 210, contents.width, WLH, Vocab::ExpGot )
contents.font.color = normal_color
contents.draw_text(tx + 70, 150, contents.width, WLH, actor.level )
if actor.next_rest_exp_s == "Master"
contents.draw_text(tx, 230, contents.width, WLH, Vocab::ExpMax )
contents.draw_text(tx, 190, contents.width, WLH, Vocab::ExpMax )
elsif actor.next_rest_exp_s - $game_troop.exp_total <= 0
contents.draw_text(tx, 230, contents.width, WLH, Vocab::ExpFull )
else
contents.draw_text(tx, 230, contents.width, WLH, (actor.next_rest_exp_s - $game_troop.exp_total) )
contents.draw_text(tx, 190, contents.width, WLH, (actor.next_exp_s - (actor.next_rest_exp_s - $game_troop.exp_total) ) )
end
end
end
end

class Scene_Battle < Scene_Base
alias wora_batreswin_scebat_batend battle_end
alias wora_batreswin_scebat_disexpgold display_exp_and_gold

def battle_end(result)
@result_window.dispose if result == 0
wora_batreswin_scebat_batend(result)
end

def display_exp_and_gold
result_data = [sprintf(Vocab::ObtainExp, $game_troop.exp_total),
sprintf(Vocab::ObtainGold, $game_troop.gold_total, Vocab::gold)]
@result_window = Window_Battle_Result.new(result_data)
wora_batreswin_scebat_disexpgold
end
end

Y para esta otra ventana

Spoiler:

Usar este otro script
Código:

#===============================================================
# �—� [VX] �—� Battle Result Window �—� �–�
#--------------------------------------------------------------
# �—� by Woratana [woratana@hotmail.com]
# �—� Thaiware RPG Maker Community
# �—� Released on: 03/08/2008
# �—� Version: 1.0
#--------------------------------------------------------------
module Vocab

# Status Screen
ExpFull = "Level Up"
ExpMax = "Level Max"
ExpGot = "to Next Lv:"
ExpTotal = "Exp Now:"
end

class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Get Experience String
#--------------------------------------------------------------------------
def exp_s
return @exp_list[@level+1] > 0 ? @exp : "Master"
end
#--------------------------------------------------------------------------
# * Get String for Next Level Experience
#--------------------------------------------------------------------------
def next_exp_s
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] : "Master"
end
#--------------------------------------------------------------------------
# * Get String for Experience to Next Level
#--------------------------------------------------------------------------
def next_rest_exp_s
return @exp_list[@level+1] > 0 ?
(@exp_list[@level+1] - @exp) : "Master"
end
end

class Window_Battle_Result < Window_Base

def initialize(result_data)
super(0, 0, 544, 290)
self.z = 10001
$game_party.members.each_index do |i|
actor = $game_party.members[i]
tx = actor.index * 125 + WLH / 2
ty = actor.index * 50 + WLH / 2
if actor.index == 1
draw_actor_face(actor, 270, 0)
draw_actor_name(actor, 380, - 5)
contents.font.color = system_color
text = sprintf(Vocab::status, Vocab::level )
tw = contents.text_size(text).width
contents.draw_text(380, 10, contents.width, WLH, text)
contents.font.color = normal_color
contents.draw_text(380, 25, contents.width, WLH, Vocab::ExpTotal )
contents.draw_text(380, 55, contents.width, WLH, Vocab::ExpGot )
contents.draw_text(380 + 70, 10, contents.width, WLH, actor.level )
if actor.next_rest_exp_s == "Master"
contents.draw_text(380, 40, contents.width, WLH, Vocab::ExpMax )
contents.draw_text(380, 70, contents.width, WLH, Vocab::ExpMax )
elsif actor.next_rest_exp_s - $game_troop.exp_total <= 0
contents.draw_text(380, 70, contents.width, WLH, Vocab::ExpFull )
else
contents.draw_text(380 + 20, 70, contents.width, WLH, (actor.next_rest_exp_s - $game_troop.exp_total) )
contents.draw_text(380 + 20, 40, contents.width, WLH, (actor.next_exp_s - (actor.next_rest_exp_s - $game_troop.exp_total) ) )
end
elsif actor.index == 2
draw_actor_face(actor, 0, 130)
draw_actor_name(actor, 110, 125)
contents.font.color = system_color
text = sprintf(Vocab::status, Vocab::level )
tw = contents.text_size(text).width
contents.draw_text(110, 140, contents.width, WLH, text)
contents.font.color = normal_color
contents.draw_text(110, 155, contents.width, WLH, Vocab::ExpTotal )
contents.draw_text(110, 185, contents.width, WLH, Vocab::ExpGot )
contents.draw_text(110 + 70, 140, contents.width, WLH, actor.level )
if actor.next_rest_exp_s == "Master"
contents.draw_text(110, 170, contents.width, WLH, Vocab::ExpMax )
contents.draw_text(110, 200, contents.width, WLH, Vocab::ExpMax )
elsif actor.next_rest_exp_s - $game_troop.exp_total <= 0
contents.draw_text(110, 200, contents.width, WLH, Vocab::ExpFull )
else
contents.draw_text(110 + 20, 200, contents.width, WLH, (actor.next_rest_exp_s - $game_troop.exp_total) )
contents.draw_text(110 + 20, 170, contents.width, WLH, (actor.next_exp_s - (actor.next_rest_exp_s - $game_troop.exp_total) ) )
end
elsif actor.index == 3
draw_actor_face(actor, 270, 130)
draw_actor_name(actor, 380, 125)
contents.font.color = system_color
text = sprintf(Vocab::status, Vocab::level )
tw = contents.text_size(text).width
contents.draw_text(380, 140, contents.width, WLH, text)
contents.font.color = normal_color
contents.draw_text(380, 155, contents.width, WLH, Vocab::ExpTotal )
contents.draw_text(380, 185, contents.width, WLH, Vocab::ExpGot )
contents.draw_text(380 + 70, 140, contents.width, WLH, actor.level )
if actor.next_rest_exp_s == "Master"
contents.draw_text(380, 170, contents.width, WLH, Vocab::ExpMax )
contents.draw_text(380, 200, contents.width, WLH, Vocab::ExpMax )
elsif actor.next_rest_exp_s - $game_troop.exp_total <= 0
contents.draw_text(380, 200, contents.width, WLH, Vocab::ExpFull )
else
contents.draw_text(380 + 20, 200, contents.width, WLH, (actor.next_rest_exp_s - $game_troop.exp_total) )
contents.draw_text(380 + 20, 170, contents.width, WLH, (actor.next_exp_s - (actor.next_rest_exp_s - $game_troop.exp_total) ) )
end
else actor.index == 4
draw_actor_face(actor, 0, 0)
draw_actor_name(actor, 110, - 5)
contents.font.color = system_color
text = sprintf(Vocab::status, Vocab::level )
tw = contents.text_size(text).width
contents.draw_text(110, 10, contents.width, WLH, text)
contents.font.color = normal_color
contents.draw_text(110, 25, contents.width, WLH, Vocab::ExpTotal )
contents.draw_text(110, 55, contents.width, WLH, Vocab::ExpGot )
contents.draw_text(110 + 70, 10, contents.width, WLH, actor.level )
if actor.next_rest_exp_s == "Master"
contents.draw_text(110, 40, contents.width, WLH, Vocab::ExpMax )
contents.draw_text(110, 70, contents.width, WLH, Vocab::ExpMax )
elsif actor.next_rest_exp_s - $game_troop.exp_total <= 0
contents.draw_text(110, 70, contents.width, WLH, Vocab::ExpFull )
else
contents.draw_text(110 + 20, 70, contents.width, WLH, (actor.next_rest_exp_s - $game_troop.exp_total) )
contents.draw_text(110 + 20, 40, contents.width, WLH, (actor.next_exp_s - (actor.next_rest_exp_s - $game_troop.exp_total) ) )
end
end
end
end
end

class Scene_Battle < Scene_Base
alias wora_batreswin_scebat_batend battle_end
alias wora_batreswin_scebat_disexpgold display_exp_and_gold

def battle_end(result)
@result_window.dispose if result == 0
wora_batreswin_scebat_batend(result)
end

def display_exp_and_gold
result_data = [sprintf(Vocab::ObtainExp, $game_troop.exp_total),
sprintf(Vocab::ObtainGold, $game_troop.gold_total, Vocab::gold)]
@result_window = Window_Battle_Result.new(result_data)
wora_batreswin_scebat_disexpgold
end
end

Creditos: Woratana y Jabbar Blackcat

[Tienes que estar registrado y conectado para ver este vínculo]


[Tienes que estar registrado y conectado para ver este vínculo]
avatar
Neozero
Moderador
Moderador

Mensajes : 366
Fecha de inscripción : 07/09/2011
Creditos : 644

Ver perfil de usuario

Volver arriba Ir abajo

Volver arriba

- Temas similares

 
Permisos de este foro:
No puedes responder a temas en este foro.