赞 | 93 |
VIP | 0 |
好人卡 | 13 |
积分 | 80 |
经验 | 53314 |
最后登录 | 2024-12-18 |
在线时间 | 1184 小时 |
Lv4.逐梦者
- 梦石
- 0
- 星屑
- 7986
- 在线时间
- 1184 小时
- 注册时间
- 2007-7-29
- 帖子
- 2055
|
以下引用花の终章于2007-12-21 19:45:30的发言:
精灵老爹..你耍偶哦````我这边已经问了,你你们死不过来看
我说楼主,我比较有种被耍的感觉。{/hx}
本来想完全解决问题的,谁知道脚本被拆散就算了,结果加点脚本还没放完。{/lh}
没有办法帮你完全解决了,现在的解决方法将就一下。{/hx}
用这个脚本代替你给出的第一个脚本,然后这个脚本放在加点脚本的下面就OK了。{/hx}
- #==============================================================================
- # 本脚本来自www.66RPG.com,使用和转载请保留此信息
- #==============================================================================
- # 泛用型升级提示 v1.1
- #
- # 核心部分 By 叶子
- # 窗口部分 原作者:桜雅 在土 修改:叶子
- #
- # Date: 2-12-2006 -v1.0
- # 3-2-2006 -v1.1
- #==============================================================================
- #
- # 在对话时,调用“增加EXP”或“增减等级”指令前,请等待3帧以上,否则对话框来不及消失。
- #
- # 当打开此号数的开关的时候,等级上升将不会提示,比如默认打开45号开关,等级上升不再提示
- $不显示升级窗口 = 45
- #==============================================================================
- 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
- # 增加4点可自由分配的点数
- $game_variables[self.id + LEVEL_UP_VARIABLE] += LEVEL_UP_POINT
- # 学会特技
- 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]
- level_up_window = Window_LevelUpWindow_A.new self,last_level,last_maxhp,
- last_maxsp,last_str,last_dex,last_agi,last_int
- 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[i].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[i].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[i].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[i].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[i].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[i].int_rate / 100.0
- end
- n = [[Integer(n), 1].max, 999].min
- int = n
- return [maxhp, maxsp, str, dex, agi, int]
- end
- end
复制代码 |
|