赞 | 0 |
VIP | 1 |
好人卡 | 1 |
积分 | 1 |
经验 | 1826 |
最后登录 | 2012-6-25 |
在线时间 | 25 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 25 小时
- 注册时间
- 2008-11-8
- 帖子
- 145
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
升级后对话框显示得太久无法消除!等了很久才消失!高手改一下!
脚本:#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
#==============================================================================
# 泛用型升级提示 v1.1
#
# 核心部分 By 叶子
# 窗口部分 原作者:桜雅 在土 修改:叶子
#
# Date: 2-12-2006 -v1.0
# 3-2-2006 -v1.1
#==============================================================================
#
# 在对话时,调用“增加EXP”或“增减等级”指令前,请等待3帧以上,否则对话框来不及消失。
#
# 当打开此号数的开关的时候,等级上升将不会提示,比如默认打开45号开关,等级上升不再提示
$不显示升级窗口 = 24
#==============================================================================
class Game_Actor
#--------------------------------------------------------------------------
# ● 更改 EXP
# exp : 新的 EXP
#--------------------------------------------------------------------------
def exp=(exp)
# 记录旧等级
last_level = @level
@exp = [[exp, 9999999].min, 0].max
# 升级
while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
@level += 1
@hp = maxhp
@sp = maxsp
# 学会特技
for j in $data_classes[@class_id].learnings
if j.level == @level
learn_skill(j.skill_id)
end
end
end
# 降级
while @exp < @exp_list[@level]
@level -= 1
end
# 修正当前的 HP 与 SP 超过最大值
@hp = [@hp, self.maxhp].min
@sp = [@sp, self.maxsp].min
# 升级了的话,升级显示处理
if @level > last_level and $game_switches[$不显示升级窗口] == false and
not $BTEST
show_level_up_result(last_level)
end
end
#--------------------------------------------------------------------------
# ● 升级显示处理
#--------------------------------------------------------------------------
def show_level_up_result(last_level)
actor_parameters = self.last_parameters(last_level)
last_maxhp = actor_parameters[0]
last_maxsp = actor_parameters[1]
last_str = actor_parameters[2]
last_dex = actor_parameters[3]
last_agi = actor_parameters[4]
last_int = actor_parameters[5]
last_pdef = actor_parameters[6]
level_up_window = Window_LevelUpWindow_A.new self,last_level,last_maxhp,
last_maxsp,last_str,last_dex,last_agi,last_int,last_pdef
level_up_window.visible = true
skill_learning_window = Window_SkillLearning_A.new(@class_id,
last_level, @level)
# 循环
loop do
# 刷新游戏画面
Graphics.update
# 刷新输入信息
Input.update
# 按下C就关闭窗口
if Input.trigger?(Input::C)
unless skill_learning_window.refresh
level_up_window.dispose
skill_learning_window.dispose
return true
end
end
end
end
#--------------------------------------------------------------------------
# ● 一次取得全部旧属性
#--------------------------------------------------------------------------
def last_parameters(level)
#---------------------------
# maxhp
#---------------------------
n = [[$data_actors[@actor_id].parameters[0, level] + @maxhp_plus, 1].max, 9999].min
for i in @states
n *= $data_states.maxhp_rate / 100.0
end
n = [[Integer(n), 1].max, 9999].min
maxhp = n
#---------------------------
# maxsp
#---------------------------
n = [[$data_actors[@actor_id].parameters[1, level] + @maxsp_plus, 0].max, 9999].min
for i in @states
n *= $data_states.maxsp_rate / 100.0
end
n = [[Integer(n), 0].max, 9999].min
maxsp = n
#---------------------------
# str
#---------------------------
n = $data_actors[@actor_id].parameters[2, level]
weapon = $data_weapons[@weapon_id]
armor1 = $data_armors[@armor1_id]
armor2 = $data_armors[@armor2_id]
armor3 = $data_armors[@armor3_id]
armor4 = $data_armors[@armor4_id]
n += weapon != nil ? weapon.str_plus : 0
n += armor1 != nil ? armor1.str_plus : 0
n += armor2 != nil ? armor2.str_plus : 0
n += armor3 != nil ? armor3.str_plus : 0
n += armor4 != nil ? armor4.str_plus : 0
n = [[n + @str_plus, 1].max, 999].min
for i in @states
n *= $data_states.str_rate / 100.0
end
n = [[Integer(n), 1].max, 999].min
str = n
#---------------------------
# dex
#---------------------------
n = $data_actors[@actor_id].parameters[3, level]
weapon = $data_weapons[@weapon_id]
armor1 = $data_armors[@armor1_id]
armor2 = $data_armors[@armor2_id]
armor3 = $data_armors[@armor3_id]
armor4 = $data_armors[@armor4_id]
n += weapon != nil ? weapon.dex_plus : 0
n += armor1 != nil ? armor1.dex_plus : 0
n += armor2 != nil ? armor2.dex_plus : 0
n += armor3 != nil ? armor3.dex_plus : 0
n += armor4 != nil ? armor4.dex_plus : 0
n = [[n + @dex_plus, 1].max, 999].min
for i in @states
n *= $data_states.dex_rate / 100.0
end
n = [[Integer(n), 1].max, 999].min
dex = n
#---------------------------
# agi
#---------------------------
n = $data_actors[@actor_id].parameters[4, level]
weapon = $data_weapons[@weapon_id]
armor1 = $data_armors[@armor1_id]
armor2 = $data_armors[@armor2_id]
armor3 = $data_armors[@armor3_id]
armor4 = $data_armors[@armor4_id]
n += weapon != nil ? weapon.agi_plus : 0
n += armor1 != nil ? armor1.agi_plus : 0
n += armor2 != nil ? armor2.agi_plus : 0
n += armor3 != nil ? armor3.agi_plus : 0
n += armor4 != nil ? armor4.agi_plus : 0
n = [[n + @agi_plus, 1].max, 999].min
for i in @states
n *= $data_states.agi_rate / 100.0
end
n = [[Integer(n), 1].max, 999].min
agi = n
#---------------------------
# int
#---------------------------
n = $data_actors[@actor_id].parameters[5, level]
weapon = $data_weapons[@weapon_id]
armor1 = $data_armors[@armor1_id]
armor2 = $data_armors[@armor2_id]
armor3 = $data_armors[@armor3_id]
armor4 = $data_armors[@armor4_id]
n += weapon != nil ? weapon.int_plus : 0
n += armor1 != nil ? armor1.int_plus : 0
n += armor2 != nil ? armor2.int_plus : 0
n += armor3 != nil ? armor3.int_plus : 0
n += armor4 != nil ? armor4.int_plus : 0
n = [[n + @int_plus, 1].max, 999].min
for i in @states
n *= $data_states.int_rate / 100.0
end
n = [[Integer(n), 1].max, 999].min
int = n
return [maxhp, maxsp, str, dex, agi, int]
end
end
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
# ————————————————————————————————————
# ▼▲▼ XRXS_BP10. LEVEL UP!能力上昇表示ウィンドウ plus ▼▲▼
# by 桜雅 在土
#——以下3个如果需要修改,直接输入文件名即可
$data_system_level_up_se = "" #升级时的音效设置
$data_system_level_up_me = "Audio/ME/升级" # 升级时播放的ME
$data_system_skilllearn_se = "" # 学会特技时播放的声效。
#==============================================================================
# ■ Window_LevelUpWindow
#------------------------------------------------------------------------------
# バトル終了時、レベルアップした場合にステータスを表示するウィンドウです。
#==============================================================================
class Window_LevelUpWindow_A < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize(actor, last_lv, up_hp, up_sp, up_str, up_dex, up_agi, up_int,last_pdef)
super(140, 20, 400, 350)
self.contents = Bitmap.new(width - 32, height - 32)
self.visible = false
self.opacity = 0
# 防止被对话框遮住
self.z = 9999
@backsp2 = Sprite.new
@backsp2.bitmap = Bitmap.new("Graphics/Pictures/升级.png")
@backsp2.x = 180
@backsp2.y = 30
@backsp2.z = 500
refresh(actor, last_lv, up_hp, up_sp, up_str, up_dex, up_agi, up_int,last_pdef)
# SEの再生
if $data_system_level_up_se != ""
Audio.se_play($data_system_level_up_se)
end
# MEの再生
if $data_system_level_up_me != ""
Audio.me_stop
Audio.me_play($data_system_level_up_me)
end
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh(actor, last_lv, up_hp, up_sp, up_str, up_dex, up_agi, up_int,last_pdef)
self.contents.clear
self.contents.font.color = Color.new(64,70,124,255)
self.contents.font.size = 18
bitmap = RPG::Cache.icon("加.png")
self.contents.blt(170,30 ,bitmap, Rect.new(0, 0, 48, 36))
bitmap = RPG::Cache.icon("加.png")
self.contents.blt(170,62 ,bitmap, Rect.new(0, 0, 48, 36))
bitmap = RPG::Cache.icon("加.png")
self.contents.blt(170,94 ,bitmap, Rect.new(0, 0, 48, 36))
bitmap = RPG::Cache.icon("加.png")
self.contents.blt(170,126 ,bitmap, Rect.new(0, 0, 48, 36))
bitmap = RPG::Cache.icon("加.png")
self.contents.blt(170,158 ,bitmap, Rect.new(0, 0, 48, 36))
bitmap = RPG::Cache.icon("加.png")
self.contents.blt(170,192 ,bitmap, Rect.new(0, 0, 48, 36))
bitmap = RPG::Cache.icon("加.png")
self.contents.blt(170,222 ,bitmap, Rect.new(0, 0, 48, 36))
bitmap = RPG::Cache.icon("加.png")
self.contents.blt(170,254 ,bitmap, Rect.new(0, 0, 48, 36))
self.contents.font.color = Color.new(64,70,124,255)
self.contents.draw_text( 130, 30, 88, 24, last_lv.to_s)
self.contents.draw_text( 130, 62, 72, 24, up_hp.to_s)
self.contents.draw_text( 130, 94, 72, 24, up_sp.to_s)
self.contents.draw_text( 130, 126, 72, 24, up_str.to_s)
self.contents.draw_text( 130, 256, 72, 24, up_dex.to_s)
self.contents.draw_text( 130, 224, 72, 24, up_agi.to_s)
self.contents.draw_text( 130, 158, 72, 24, up_int.to_s)
self.contents.draw_text( 130, 192, 72, 24, actor.pdef.to_s)
self.contents.draw_text( 235, 30, 128, 24, actor.level.to_s)
self.contents.draw_text( 235, 62, 128, 24, actor.maxhp.to_s)
self.contents.draw_text( 235, 94, 128, 24, actor.maxsp.to_s)
self.contents.draw_text( 235, 126, 128, 24, actor.str.to_s)
self.contents.draw_text( 235, 256, 128, 24, actor.dex.to_s)
self.contents.draw_text( 235, 224, 128, 24, actor.agi.to_s)
self.contents.draw_text( 235, 158, 128, 24, actor.int.to_s)
self.contents.draw_text( 235, 192, 128, 24, actor.pdef.to_s)
end
def dispose
@backsp2.dispose
super
end
end
#==============================================================================
# ■ Window_SkillLearning
#------------------------------------------------------------------------------
# レベルアップ時などにスキルを習得した場合にそれを表示するウィンドウです。
#==============================================================================
class Window_SkillLearning_A < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize(class_id, last_lv, now_lv)
super(210, 322, 220, 56)
self.contents = Bitmap.new(width - 32, height - 16) # わざと▽を表示
self.visible = false
self.opacity = 0
# 防止被对话框遮住
self.z = 9999
@learn_skills = []
for i in 0...$data_classes[class_id].learnings.size
learn_lv = $data_classes[class_id].learnings.level
# 今回のレベルアップ範囲で習得するスキルの場合
if learn_lv > last_lv and learn_lv <= now_lv
@learn_skills.push $data_skills[
$data_classes[class_id].learnings.skill_id].name
else
@backsp3 = Sprite.new
@backsp3.bitmap = Bitmap.new("Graphics/Windowskins/nil.png")
end
end
refresh
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
# 各描写
skill_name = @learn_skills.shift
if skill_name == nil
return false
end
# SEの再生
if $data_system_skilllearn_se != ""
Audio.se_play($data_system_skilllearn_se, 100, 70)
end
#======================================
@backsp3 = Sprite.new
@backsp3.bitmap = Bitmap.new("Graphics/Pictures/存档 (1)_1.png")
@backsp3.x = 175
@backsp3.y = 320
@backsp3.z = 502
#========================================
self.contents.clear
self.contents.font.size = 18
self.contents.font.color = text_color(7)
self.contents.font.bold = true
self.contents.draw_text(0,0,156,24, "学会特技:"+skill_name)
self.contents.font.color = text_color(7)
self.visible = true
return true
end
def dispose
@backsp3.dispose
super
end
end
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#============================================================================== |
|