Project1
标题:
一个脚本的修改出问题了 求解
[打印本页]
作者:
负零
时间:
2010-7-12 06:12
标题:
一个脚本的修改出问题了 求解
本帖最后由 负零 于 2010-7-12 07:13 编辑
这脚本大家应该熟悉了...我尝试修改多加个选项,多加个选项,测试... 别看数值谢谢
#=========================================================================
# 每提升一次魔力值,提升多少附加能力
#=========================================================================
@mp_spi = +5000 # 每提升一次体力提升多少HP
@mp_atk = 500 # 每提升一次体力提升多少力量
@mp_def = 500 # 每提升一次体力提升多少速度
@mp_agi = 500 # 每提升一次体力提升多少灵巧
@mp_hp = 500# 每提升一次体力提升多少魔力
@mp_mp = +5000
复制代码
问题来了 当我这样表达的时候 选择【 每提升一次魔力值,提升多少附加能力】这项时 不是加点 而是回到了地图 似乎执行了 $scene = Scene_Map.new 误了 求解...需要病工程吗?
#=============================================================
# 按下 B 键的情况下
#=============================================================
if Input.trigger?(Input::B)
# 演奏取消 SE
Sound.play_cancel
# 切换到地图画面
$scene = Scene_Map.new
return
end
#=============================================================
# 按下 C 键的情况下
#=============================================================
if Input.trigger?(Input::C)
if @command_window.index == 5
# 演奏确定 SE
Sound.play_decision
# 将角色的剩余点数带回
$game_variables[@actor.id + LEVEL_UP_VARIABLE] = $point
# 将角色点数实际加上
@actor.atk += $temp_atk
@actor.def += $temp_def
@actor.agi += $temp_agi
@actor.spi += $temp_spi
@actor.maxhp += $temp_hp
@actor.maxmp += $temp_mp
# 切换到地图画面
$scene = Scene_Map.new
return
end
if @command_window.index == 6
# 演奏确定 SE
Sound.play_decision
# 将角色的剩余点数带入
$point = $game_variables[@actor.id + LEVEL_UP_VARIABLE]
# 初始化临时量
$temp_atk = 0
$temp_def = 0
$temp_agi = 0
$temp_spi = 0
$temp_hp = 0
$temp_mp = 0
@lvup_window.refresh
@lvpoint_window.refresh
return
end
if $point == 0
# 演奏冻结 SE
Sound.play_buzzer
return
end
case @command_window.index
when 0
# 演奏确定 SE
Sound.play_decision
$temp_hp += @hp
$temp_mp += @mp
$temp_atk += @hp_atk
$temp_def += @hp_def
$temp_agi += @hp_agi
$temp_spi += @hp_spi
$point -= 1
@lvup_window.refresh
@lvpoint_window.refresh
s_disable
return
when 1
# 演奏确定 SE
Sound.play_decision
$temp_atk += @atk_atk
$temp_hp += @atk_hp
$temp_mp += @atk_mp
$temp_def += @atk_def
$temp_agi += @atk_agi
$temp_spi += @atk_spi
$point -= 1
@lvup_window.refresh
@lvpoint_window.refresh
s_disable
return
when 2
# 演奏确定 SE
Sound.play_decision
$temp_def += @def_def
$temp_hp += @def_hp
$temp_mp += @def_mp
$temp_atk += @def_atk
$temp_agi += @def_agi
$temp_spi += @def_spi
$point -= 1
@lvup_window.refresh
@lvpoint_window.refresh
s_disable
return
when 3
# 演奏确定 SE
Sound.play_decision
$temp_agi += @agi_agi
$temp_hp += @agi_hp
$temp_mp += @agi_mp
$temp_atk += @agi_atk
$temp_def += @agi_def
$temp_spi += @agi_spi
$point -= 1
@lvup_window.refresh
@lvpoint_window.refresh
s_disable
return
when 4
# 演奏确定 SE
Sound.play_decision
$temp_spi += @spi_spi
$temp_hp += @spi_hp
$temp_mp += @spi_mp
$temp_atk += @spi_atk
$temp_def += @spi_def
$temp_agi += @spi_agi
$point -= 1
@lvup_window.refresh
@lvpoint_window.refresh
s_disable
return
when 5
# 演奏确定 SE
Sound.play_decision
$temp_mp += @mp_mp
$temp_spi += @mp_spi
$temp_atk += @mp_atk
$temp_def += @mp_def
$temp_agi += @mp_agi
$temp_hp += @mp_hp
$point -= 1
@lvup_window.refresh
@lvpoint_window.refresh
s_disable
return
end
end
复制代码
以下是完整脚本 修改后的
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
# 脚本使用设定:
LEVEL_UP_POINT = 100 # 每升一级所增加的点数
LEVEL_UP_VARIABLE = 202 # 储存角色点数的变量编号与角色id编号的差值
# 默认情况 = 100,
# 则是数据库里1号角色的加点数存于101号变量
# 3号角色的加点数存于103号变量。
# 你可以直接操作变量赠与角色可分配点数
# 每增加一次点数,各项能力值的变化:357-410行
# 使用方法介绍:
# 本脚本不会取代原来的升级自动加点 也就是说,默认的升级还在,但可以用这个功能手动追加点数。
# 如果你想纯粹使用手动加点(而升级不提升能力),只要把数据库中角色升级能力,
# 1-99级全部等于一个相同数值就行了。
# 呼唤加点场景的方法:$scene = Scene_Lvup.new(角色编号,返回菜单编号)。
# 默认都是0号
# 加点场景中,page up,page down换人,如果想加点完毕后返回地图,
# 464行$scene = Scene_Menu.new(0)改为$scene = Scene_Map.new
# 推荐脚本搭配:魔法商店脚本,两者结合,制作自由型RPG
#==============================================================================
# ■ Window_Command
#------------------------------------------------------------------------------
# 一般的命令选择行窗口。(追加定义)
#==============================================================================
class Window_Command < Window_Selectable
#--------------------------------------------------------------------------
# ● 项目有效化
# index : 项目编号
#--------------------------------------------------------------------------
def able_item(index)
draw_item(index, normal_color)
end
end
#==============================================================================
# ■ Game_Actor
#------------------------------------------------------------------------------
# 处理角色的类。(再定义)
#==============================================================================
class Game_Actor < Game_Battler
def level_up
@level += 1
$game_variables[self.id + LEVEL_UP_VARIABLE] += LEVEL_UP_POINT
for learning in self.class.learnings
learn_skill(learning.skill_id) if learning.level == @level
end
end
end
#==============================================================================
# ■ Window_Base
#------------------------------------------------------------------------------
# 游戏中全部窗口的超级类(追加定义)
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# ● 描绘 HP
# actor : 角色
# x : 描画目标 X 坐标
# y : 描画目标 Y 坐标
# width : 描画目标的宽
#--------------------------------------------------------------------------
def draw_actor_hp_lvup(actor, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x , y, 96, 32, "最大" + Vocab::hp)
if $temp_hp == 0
self.contents.font.color = normal_color
self.contents.draw_text(x + 120 , y, 48, 32, actor.maxhp.to_s, 2)
else
maxhp = actor.maxhp + $temp_hp
self.contents.font.color = Color.new(255, 128, 128, 255)
self.contents.draw_text(x + 120 , y, 48, 32, maxhp.to_s ,2)
self.contents.font.color = normal_color
self.contents.draw_text(x + 155, y, 36, 32, "( ", 2)
if $temp_hp >=0
self.contents.font.color = Color.new(255, 128, 128, 255)
self.contents.draw_text(x + 155, y, 36, 32, " +",2)
else
self.contents.font.color = Color.new(255,255,0,255)
self.contents.draw_text(x + 155, y, 36, 32, " -",2)
end
self.contents.draw_text(x + 200, y, 36, 32, $temp_hp.to_s, 2)
self.contents.font.color = normal_color
self.contents.draw_text(x + 215, y, 36, 32, ")", 2)
end
end
#--------------------------------------------------------------------------
# ● 描绘 MP
# actor : 角色
# x : 描画目标 X 坐标
# y : 描画目标 Y 坐标
# width : 描画目标的宽
#--------------------------------------------------------------------------
def draw_actor_mp_lvup(actor, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x , y, 96, 32, "最大" + Vocab::mp)
if $temp_mp == 0
self.contents.font.color = normal_color
self.contents.draw_text(x + 120 , y, 48, 32, actor.maxmp.to_s, 2)
else
maxmp = actor.maxmp + $temp_mp
self.contents.font.color = Color.new(255, 128, 128, 255)
self.contents.draw_text(x + 120 , y, 48, 32, maxmp.to_s ,2)
self.contents.font.color = normal_color
self.contents.draw_text(x + 155, y, 36, 32, "( ", 2)
if $temp_mp >=0
self.contents.font.color = Color.new(255, 128, 128, 255)
self.contents.draw_text(x + 155, y, 36, 32, " +",2)
else
self.contents.font.color = Color.new(255,255,0,255)
self.contents.draw_text(x + 155, y, 36, 32, " -",2)
end
self.contents.draw_text(x + 200, y, 36, 32, $temp_mp.to_s, 2)
self.contents.font.color = normal_color
self.contents.draw_text(x + 215, y, 36, 32, ")", 2)
end
end
#--------------------------------------------------------------------------
# ● 描绘能力值
# actor : 角色
# x : 描画目标 X 坐标
# y : 描画目标 Y 坐标
# type : 能力值种类 (0~4)
#--------------------------------------------------------------------------
def draw_actor_lvup(actor, x, y, type)
# 定义数字颜色
lvup = normal_color
upcolor = Color.new(255, 128, 128, 255)
self.contents.font.color = normal_color
case type
when 0
parameter_name = Vocab::atk
parameter_value = actor.atk
parameter_value_temp = parameter_value + $temp_atk
if $temp_atk != 0
lvup = upcolor
self.contents.draw_text(x + 256, y, 16, 32, "(")
if $temp_atk >= 0
self.contents.font.color = lvup
self.contents.draw_text(x + 272, y, 80, 32, "+",0)
else
self.contents.font.color = Color.new(255,255,0,255)
self.contents.draw_text(x + 272, y, 80, 32, "-",0)
end
self.contents.draw_text(x + 272, y, 80, 32, $temp_atk.abs.to_s,1)
self.contents.font.color = normal_color
self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
end
when 1
parameter_name = Vocab::def
parameter_value = actor.def
parameter_value_temp = parameter_value + $temp_def
if $temp_def != 0
lvup = upcolor
self.contents.draw_text(x + 256, y, 16, 32, "(")
if $temp_def >= 0
self.contents.font.color = lvup
self.contents.draw_text(x + 272, y, 80, 32, "+",0)
else
self.contents.font.color = Color.new(255,255,0,255)
self.contents.draw_text(x + 272, y, 80, 32, "-",0)
end
self.contents.draw_text(x + 272, y, 80, 32, $temp_def.abs.to_s,1)
self.contents.font.color = normal_color
self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
end
when 2
parameter_name = Vocab::agi
parameter_value = actor.agi
parameter_value_temp = parameter_value + $temp_agi
if $temp_agi != 0
lvup = upcolor
self.contents.draw_text(x + 256, y, 16, 32, "(")
if $temp_agi >= 0
self.contents.font.color = lvup
self.contents.draw_text(x + 272, y, 80, 32, "+",0)
else
self.contents.font.color = Color.new(255,255,0,255)
self.contents.draw_text(x + 272, y, 80, 32, "-",0)
end
self.contents.draw_text(x + 272, y, 80, 32, $temp_agi.abs.to_s,1)
self.contents.font.color = normal_color
self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
end
when 3
parameter_name = Vocab::spi
parameter_value = actor.spi
parameter_value_temp = parameter_value + $temp_spi
if $temp_spi != 0
lvup = upcolor
self.contents.draw_text(x + 256, y, 16, 32, "(")
if $temp_spi >= 0
self.contents.font.color = lvup
self.contents.draw_text(x + 272, y, 80, 32, "+",0)
else
self.contents.font.color = Color.new(255,255,0,255)
self.contents.draw_text(x + 272, y, 80, 32, "-",0)
end
self.contents.draw_text(x + 272, y, 80, 32, $temp_spi.abs.to_s,1)
self.contents.font.color = normal_color
self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
end
when 4
parameter_name = "剩余训练点数"
parameter_value = $point
if $point != 0
lvup = upcolor
end
end
self.contents.font.size = 16 if type == 4
self.contents.font.color = system_color
if type != 4 then
self.contents.draw_text(x, y, 120, 32, parameter_name)
else
self.contents.draw_text(x, y, 120, 24, parameter_name)
end
self.contents.font.color = normal_color
if type != 4
self.contents.draw_text(x + 120, y, 36, 32, parameter_value.to_s)
else
self.contents.draw_text(x + 100, y, 36, 24, parameter_value.to_s)#剩余点数窗口
end
if type != 4
self.contents.draw_text(x + 150, y, 36, 32, "→")
end
self.contents.font.color = lvup
self.contents.draw_text(x + 180, y, 60, 32, parameter_value_temp.to_s)
self.contents.font.color = normal_color
end
end
class Window_Lvpoint < Window_Base
def initialize
super(0,198,153,58)#super(0,198,128,58)#加点状态窗口
refresh
end
def refresh
self.contents.clear
draw_actor_lvup(@actor, 0, 0, 4)
end
end
#==============================================================================
# ■ Window_lvup
#------------------------------------------------------------------------------
# 显示升级状态窗口。
#==============================================================================
class Window_Lvup < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
# actor : 角色
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 394, 256)#(0, 0, 416, 256)
self.contents = Bitmap.new(width - 32, height - 32)
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_graphic(@actor, 30, 80)
draw_actor_name(@actor, 4, 0)
draw_actor_class(@actor, 96, 0)
draw_actor_level(@actor, 224, 0)
draw_actor_state(@actor, 96, 32)
draw_actor_hp_lvup(@actor, 96, 32)
draw_actor_mp_lvup(@actor, 96, 64)
draw_actor_lvup(@actor, 4, 96, 0)
draw_actor_lvup(@actor, 4, 128, 1)
draw_actor_lvup(@actor, 4, 160, 2)
draw_actor_lvup(@actor, 4, 192, 3)
end
end
#==============================================================================
# ■ Window_Help
#------------------------------------------------------------------------------
# 特技及物品的说明、角色的状态显示的窗口。
#==============================================================================
class Window_Lvup_Help < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
#--------------------------------------------------------------------------
def initialize
super(0, 256, 544, 160)#(0, 256, 544, 160)
self.contents = Bitmap.new(width - 32, height - 32)
@test = "" #——这个东西用来检测,节约内存专用
end
#--------------------------------------------------------------------------
# ● 设置文本
#--------------------------------------------------------------------------
def lvup_text(text1, text2 = nil, text3 = nil, text4 = nil)
if @test != text1
@test = text1
else
return
end
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, self.width - 40, 32, text1)
if text2 != nil
self.contents.draw_text(4 , 32, self.width - 40, 32, text2)
end
self.contents.font.size -= 4
if text3 != nil
self.contents.draw_text(4 , 64, self.width - 40, 32, text3)
end
if text4 != nil
self.contents.draw_text(4 , 96, self.width - 40, 32, text4)
end
self.contents.font.size += 4
end
end
#==============================================================================
# ■ Scene_lvup
#------------------------------------------------------------------------------
# 处理升级画面的类。
#==============================================================================
class Scene_Lvup
#--------------------------------------------------------------------------
# ● 初始化对像
# actor_index : 角色索引
# menu_index : 选项起始位置
#--------------------------------------------------------------------------
def initialize(actor_index = 0 , menu_index = 0)
@actor_index = actor_index
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# ● 主处理
#--------------------------------------------------------------------------
def main
s1 = "生命力强化训练"
s2 = "攻击力强化训练"
s3 = "防御力强化训练"
s4 = "敏捷度强化训练"
s5 = "魔法力强化训练"
s6 = "魔力值强化训练"
s7 = "确认增加训练点"
s8 = "训练点重新分配"
@command_window = Window_Command.new(153, [s1, s2, s3, s4, s5, s6, s7, s8])#选择窗口
@command_window.index = @menu_index
# 获取角色
@actor = $game_party.members[@actor_index]
# 将角色的剩余点数带入
$point = $game_variables[@actor.id + LEVEL_UP_VARIABLE]
# 初始化临时量
$temp_atk = 0
$temp_def = 0
$temp_agi = 0
$temp_spi = 0
$temp_hp = 0
$temp_mp = 0
#=========================================================================
# 特别提示:这些设置也可以使用小数,但是可能出现0值意外错误
# (各种编程语言都有这种意外),建议还是使用整数,正负不限
#=========================================================================
# 每提升一次攻击力,提升多少附加能力
#=========================================================================
@atk_hp = 300 # 每提升一次力量附加提升多少HP
@atk_mp = 2 # 每提升一次力量附加提升多少MP
@atk_def = 1 # 每提升一次力量附加提升多少灵巧
@atk_agi = 1 # 每提升一次力量附加提升多少速度
@atk_spi = 0 # 每提升一次力量附加提升多少魔力
@atk_atk = 5 # 每提升一次力量附加提升多少力量
#=========================================================================
# 每提升一次防御力,提升多少附加能力
#=========================================================================
@def_hp = 3 # 每提升一次灵巧附加提升多少HP
@def_mp = 2 # 每提升一次灵巧附加提升多少MP
@def_atk = 1 # 每提升一次灵巧附加提升多少力量
@def_agi = 1 # 每提升一次灵巧附加提升多少速度
@def_spi = 0 # 每提升一次灵巧附加提升多少魔力
@def_def = 5 # 每提升一次灵巧附加提升多少灵巧
#=========================================================================
# 每提升一次敏捷度,提升多少附加能力
#=========================================================================
@agi_hp = 3 # 每提升一次速度附加提升多少HP
@agi_mp = 2 # 每提升一次速度附加提升多少MP
@agi_atk = 1 # 每提升一次速度附加提升多少力量
@agi_def = 1 # 每提升一次速度附加提升多少灵巧
@agi_spi = 0 # 每提升一次速度附加提升多少魔力
@agi_agi = 5 # 每提升一次速度附加提升多少速度
#=========================================================================
# 每提升一次精神力,提升多少附加能力
#=========================================================================
@spi_hp = +1 # 每提升一次魔力附加提升多少HP
@spi_mp = +10 # 每提升一次魔力附加提升多少MP
@spi_atk = -1 # 每提升一次魔力附加提升多少力量
@spi_def = -1 # 每提升一次魔力附加提升多少灵巧
@spi_agi = -1 # 每提升一次魔力附加提升多少速度
@spi_spi = +10 # 每提升一次魔力附加提升多少魔力
#=========================================================================
# 每提升一次魔力值,提升多少附加能力
#=========================================================================
@mp_spi = +5000 # 每提升一次体力提升多少HP
@mp_atk = 500 # 每提升一次体力提升多少力量
@mp_def = 500 # 每提升一次体力提升多少速度
@mp_agi = 500 # 每提升一次体力提升多少灵巧
@mp_hp = 500# 每提升一次体力提升多少魔力
@mp_mp = +5000
#=========================================================================
# 每提升一次生命力,提升多少附加能力
#=========================================================================
@hp = +20 # 每提升一次体力提升多少HP
@mp = +10 # 每提升一次体力提升多少MP
@hp_atk = -1 # 每提升一次体力提升多少力量
@hp_def = -1 # 每提升一次体力提升多少速度
@hp_agi = -1 # 每提升一次体力提升多少灵巧
@hp_spi = -1 # 每提升一次体力提升多少魔力
# 定义说明文字
@text_hp_sc = "通过对体能和肉体的强化训练,延长战场上自身生存的时间。"
@text_atk_sc ="训练格斗技能与剑术,让自己的攻击更富杀伤力"
@text_def_sc ="练习格挡技能和强化抗击能力,使自己在战斗中可以承受更多的伤害"
@text_agi_sc ="时刻注意观察周围环境和敌人动向,能更轻易地击中敌人,躲避敌人攻击"
@text_spi_sc ="放弃对物质的追求,而对精神意识进行强化,让增加自己施放魔法的次数且使魔法更具破坏性"
@text_save = "确认以上所有训练点数的分配"
@text_reset= "重新分配训练点数"
@text_cnb_sc="进行提升魔力值的强化训练,能有更多的魔力用于施放魔法技能"
@text_2 = "每进行一次此项能力训练,可以改变能力值"
@text_hp = "最大生命值【HP】"
@text_mp = "最大魔力值【MP】"
@text_atk = "攻击力【ATK】"
@text_def = "防御力【DEF】"
@text_agi = "敏捷性【AGI】"
@text_spi = "精神力【SPI】"
s_disable
# 生成状态窗口
@lvup_window = Window_Lvup.new(@actor)
@lvup_window.x = 150
@lvup_window.y = 0
@lvpoint_window = Window_Lvpoint.new
# 生成帮助窗口并初始化帮助文本
@help_window = Window_Lvup_Help.new
# 执行过渡
Graphics.transition
# 主循环
loop do
# 刷新游戏画面
Graphics.update
# 刷新输入信息
Input.update
# 刷新画面
update
# 如果切换画面就中断循环
if $scene != self
break
end
end
# 准备过渡
Graphics.freeze
# 释放窗口
@lvpoint_window.dispose
@command_window.dispose
@lvup_window.dispose
@help_window.dispose
end
#--------------------------------------------------------------------------
# ● 刷新画面
#--------------------------------------------------------------------------
def update
# 刷新窗口
@command_window.update
# 选项明暗判断(因为太消耗资源,所以屏蔽掉了)
s_disable
@lvup_window.update
#=============================================================
# 按下 B 键的情况下
#=============================================================
if Input.trigger?(Input::B)
# 演奏取消 SE
Sound.play_cancel
# 切换到地图画面
$scene = Scene_Map.new
return
end
#=============================================================
# 按下 C 键的情况下
#=============================================================
if Input.trigger?(Input::C)
if @command_window.index == 5
# 演奏确定 SE
Sound.play_decision
# 将角色的剩余点数带回
$game_variables[@actor.id + LEVEL_UP_VARIABLE] = $point
# 将角色点数实际加上
@actor.atk += $temp_atk
@actor.def += $temp_def
@actor.agi += $temp_agi
@actor.spi += $temp_spi
@actor.maxhp += $temp_hp
@actor.maxmp += $temp_mp
# 切换到地图画面
$scene = Scene_Map.new
return
end
if @command_window.index == 6
# 演奏确定 SE
Sound.play_decision
# 将角色的剩余点数带入
$point = $game_variables[@actor.id + LEVEL_UP_VARIABLE]
# 初始化临时量
$temp_atk = 0
$temp_def = 0
$temp_agi = 0
$temp_spi = 0
$temp_hp = 0
$temp_mp = 0
@lvup_window.refresh
@lvpoint_window.refresh
return
end
if $point == 0
# 演奏冻结 SE
Sound.play_buzzer
return
end
case @command_window.index
when 0
# 演奏确定 SE
Sound.play_decision
$temp_hp += @hp
$temp_mp += @mp
$temp_atk += @hp_atk
$temp_def += @hp_def
$temp_agi += @hp_agi
$temp_spi += @hp_spi
$point -= 1
@lvup_window.refresh
@lvpoint_window.refresh
s_disable
return
when 1
# 演奏确定 SE
Sound.play_decision
$temp_atk += @atk_atk
$temp_hp += @atk_hp
$temp_mp += @atk_mp
$temp_def += @atk_def
$temp_agi += @atk_agi
$temp_spi += @atk_spi
$point -= 1
@lvup_window.refresh
@lvpoint_window.refresh
s_disable
return
when 2
# 演奏确定 SE
Sound.play_decision
$temp_def += @def_def
$temp_hp += @def_hp
$temp_mp += @def_mp
$temp_atk += @def_atk
$temp_agi += @def_agi
$temp_spi += @def_spi
$point -= 1
@lvup_window.refresh
@lvpoint_window.refresh
s_disable
return
when 3
# 演奏确定 SE
Sound.play_decision
$temp_agi += @agi_agi
$temp_hp += @agi_hp
$temp_mp += @agi_mp
$temp_atk += @agi_atk
$temp_def += @agi_def
$temp_spi += @agi_spi
$point -= 1
@lvup_window.refresh
@lvpoint_window.refresh
s_disable
return
when 4
# 演奏确定 SE
Sound.play_decision
$temp_spi += @spi_spi
$temp_hp += @spi_hp
$temp_mp += @spi_mp
$temp_atk += @spi_atk
$temp_def += @spi_def
$temp_agi += @spi_agi
$point -= 1
@lvup_window.refresh
@lvpoint_window.refresh
s_disable
return
when 5
# 演奏确定 SE
Sound.play_decision
$temp_mp += @mp_mp
$temp_spi += @mp_spi
$temp_atk += @mp_atk
$temp_def += @mp_def
$temp_agi += @mp_agi
$temp_hp += @mp_hp
$point -= 1
@lvup_window.refresh
@lvpoint_window.refresh
s_disable
return
end
end
#=============================================================
# 什么都没有按下的情况
#=============================================================
case @command_window.index
when 0 # 增加体力
temptext1 = @text_hp + @hp.to_s + "点 " + @text_atk + @hp_atk.to_s + "点 " + @text_def + @hp_def.to_s + "点"
temptext2 = @text_mp + @mp.to_s + "点 " + @text_agi + @hp_agi.to_s + "点 " + @text_spi + @hp_spi.to_s + "点"
@help_window.lvup_text(@text_hp_sc , @text_2 , temptext1 , temptext2)
when 1 # 增加力量
temptext1 = @text_hp + @atk_hp.to_s + "点 " + @text_atk + @atk_atk.to_s + "点 " + @text_def + @atk_def.to_s + "点"
temptext2 = @text_mp + @atk_mp.to_s + "点 " + @text_agi + @atk_agi.to_s + "点 " + @text_spi + @atk_spi.to_s + "点"
@help_window.lvup_text(@text_atk_sc , @text_2 , temptext1 , temptext2)
when 2 # 增加防御
temptext1 = @text_hp + @def_hp.to_s + "点 " + @text_atk + @def_agi.to_s + "点 " + @text_def + @def_def.to_s + "点"
temptext2 = @text_mp + @def_mp.to_s + "点 " + @text_agi + @def_agi.to_s + "点 " + @text_spi + @def_spi.to_s + "点"
@help_window.lvup_text(@text_def_sc , @text_2 , temptext1 , temptext2)
when 3 # 增加速度
temptext1 = @text_hp + @agi_hp.to_s + "点 " + @text_atk + @agi_atk.to_s + "点 " + @text_def + @agi_def.to_s + "点"
temptext2 = @text_mp + @agi_mp.to_s + "点 " + @text_agi + @agi_agi.to_s + "点 " + @text_spi + @agi_spi.to_s + "点"
@help_window.lvup_text(@text_agi_sc , @text_2 , temptext1 , temptext2)
when 4 # 增加魔力
temptext1 = @text_hp + @spi_hp.to_s + "点 " + @text_atk + @spi_atk.to_s + "点 " + @text_def + @spi_def.to_s + "点"
temptext2 = @text_mp + @spi_mp.to_s + "点 " + @text_agi + @spi_agi.to_s + "点 " + @text_spi + @spi_spi.to_s + "点"
@help_window.lvup_text(@text_spi_sc , @text_2 , temptext1 , temptext2)
when 5 # 增加魔力值
temptext1 = @text_hp + @mp_hp.to_s + "点 " + @text_atk + @mp_atk.to_s + "点 " + @text_def + @mp_def.to_s + "点"
temptext2 = @text_mp + @mp_mp.to_s + "点 " + @text_agi + @mp_agi.to_s + "点 " + @text_spi + @mp_spi.to_s + "点"
@help_window.lvup_text(@text_cnb_sc , @text_2 , temptext1 , temptext2)
when 6 # 保存设定
@help_window.lvup_text(@text_save)
when 7 # 点数重置
@help_window.lvup_text(@text_reset)
end
#=============================================================
# 按下R与L换人的情况
#=============================================================
if Input.trigger?(Input::R)
# 演奏光标 SE
Sound.play_cursor
# 移至下一位角色
@actor_index += 1
@actor_index %= $game_party.members.size
# 切换到别的状态画面
$scene = Scene_Lvup.new(@actor_index , @command_window.index)
return
end
# 按下 L 键的情况下
if Input.trigger?(Input::L)
# 演奏光标 SE
Sound.play_cursor
# 移至上一位角色
@actor_index += $game_party.members.size - 1
@actor_index %= $game_party.members.size
# 切换到别的状态画面
$scene = Scene_Lvup.new(@actor_index , @command_window.index)
return
end
end
#--------------------------------------------------------------------------
# ● 选项明暗判断
#--------------------------------------------------------------------------
def s_disable
# 判断剩余点数是否为0,如果为0,那么增加选项表示为暗色
if $point == 0
enabled = false
else
enabled = true
end
@command_window.draw_item(0,enabled)
@command_window.draw_item(1,enabled)
@command_window.draw_item(2,enabled)
@command_window.draw_item(3,enabled)
@command_window.draw_item(4,enabled)
@command_window.draw_item(5,enabled)
end
end
复制代码
作者:
moy
时间:
2010-7-12 06:29
首先按照你的脚本不管你是确认还是取消...他都会回到地图的...区别仅仅在于点数有没有变.
其次,我完全没用过这个脚本于是完全不知道你改了什么......o(╯□╰)o
作者:
负零
时间:
2010-7-12 07:12
我已经放弃这个想法了 改这东西竟然掉帧...谢谢
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1