设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1856|回复: 6
打印 上一主题 下一主题

[已经解决] 加点功能无法实现,求改脚本

[复制链接]
头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
7 小时
注册时间
2010-7-24
帖子
19
跳转到指定楼层
1
发表于 2010-8-15 14:03:17 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽

Lv1.梦旅人

谁知我迷茫

梦石
0
星屑
67
在线时间
287 小时
注册时间
2009-7-3
帖子
677

贵宾

2
发表于 2010-8-15 14:49:16 | 只看该作者
你的那个脚本有残缺,已修复。用下面这个就行或者直接下载我帮你修复好的 魔幻之塔.rar (1022.8 KB, 下载次数: 66)
  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #==============================================================================


  4. # 脚本使用设定:

  5. LEVEL_UP_POINT = 5  # 每升一级所增加的点数
  6. LEVEL_UP_VARIABLE = 100  # 储存角色点数的变量编号与角色id编号的差值
  7.                          # 默认情况 = 100,
  8.                          # 则是数据库里1号角色的加点数存于101号变量
  9.                          # 3号角色的加点数存于103号变量。
  10.                          # 你可以直接操作变量赠与角色可分配点数

  11. # 每增加一次点数,各项能力值的变化:357-410行
  12.                         
  13. # 使用方法介绍:

  14. # 本脚本不会取代原猩豆δ埽皇且桓龈郊庸δ堋?BR># 也就是说,默认的升级还在,但可以用这个功能手动追加点数。
  15. # 如果你想纯粹使用手动加点(而升级不提升能力),只要把数据库中角色升级能力,
  16. # 1-99级全部等于一个相同数值就行了。

  17. # 呼唤加点场景的方法:$scene = Scene_Lvup.new(角色编号,返回菜单编号)。
  18. # 默认都是0号

  19. # 加点场景中,page up,page down换人,如果想加点完毕后返回地图,
  20. # 464行$scene = Scene_Menu.new(0)改为$scene = Scene_Map.new

  21. # 推荐脚本搭配:魔法商店脚本,两者结合,制作自由型RPG

  22. #==============================================================================
  23. # ■ Window_Command
  24. #------------------------------------------------------------------------------
  25. #  一般的命令选择行窗口。(追加定义)
  26. #==============================================================================
  27. class Window_Command < Window_Selectable
  28.   #--------------------------------------------------------------------------
  29.   # ● 项目有效化
  30.   #     index : 项目编号
  31.   #--------------------------------------------------------------------------
  32.   def able_item(index)
  33.     draw_item(index, normal_color)
  34.   end
  35. end
  36. #==============================================================================
  37. # ■ Game_Actor
  38. #------------------------------------------------------------------------------
  39. #  处理角色的类。(再定义)
  40. #==============================================================================
  41. class Game_Actor < Game_Battler
  42.   #--------------------------------------------------------------------------
  43.   # ● 更改 EXP
  44.   #     exp : 新的 EXP
  45.   #--------------------------------------------------------------------------
  46.   def exp=(exp)
  47.     @exp = [[exp, 9999999].min, 0].max
  48.     # 升级
  49.     while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
  50.       @level += 1
  51.       # 增加4点可自由分配的点数
  52.       $game_variables[self.id + LEVEL_UP_VARIABLE] += LEVEL_UP_POINT
  53.       # 学会特技
  54.       for j in $data_classes[@class_id].learnings
  55.         if j.level == @level
  56.           learn_skill(j.skill_id)
  57.         end
  58.       end
  59.     end
  60.     # 降级
  61.     while @exp < @exp_list[@level]
  62.       @level -= 1
  63.     end
  64.     # 修正当前的 HP 与 SP 超过最大值
  65.     @hp = [@hp, self.maxhp].min
  66.     @sp = [@sp, self.maxsp].min
  67.   end
  68. end
  69. #==============================================================================
  70. # ■ Window_Base
  71. #------------------------------------------------------------------------------
  72. #  游戏中全部窗口的超级类(追加定义)
  73. #==============================================================================
  74. class Window_Base < Window
  75.   #--------------------------------------------------------------------------
  76.   # ● 描绘 HP
  77.   #     actor : 角色
  78.   #     x     : 描画目标 X 坐标
  79.   #     y     : 描画目标 Y 坐标
  80.   #     width : 描画目标的宽
  81.   #--------------------------------------------------------------------------
  82.   def draw_actor_hp_lvup(actor, x, y)
  83.     self.contents.font.color = system_color
  84.     self.contents.draw_text(x , y, 96, 32, "最大" + $data_system.words.hp)
  85.     if $temp_hp == 0
  86.       self.contents.font.color = normal_color
  87.       self.contents.draw_text(x + 120 , y, 48, 32, actor.maxhp.to_s, 2)
  88.     else
  89.       maxhp = actor.maxhp + $temp_hp
  90.       self.contents.font.color = Color.new(255, 128, 128, 255)
  91.       self.contents.draw_text(x + 120 , y, 48, 32, maxhp.to_s ,2)
  92.       self.contents.font.color = normal_color      
  93.       self.contents.draw_text(x + 155, y, 36, 32, "( ", 2)
  94.       if $temp_hp >=0
  95.         self.contents.font.color = Color.new(255, 128, 128, 255)
  96.         self.contents.draw_text(x + 155, y, 36, 32, " +",2)
  97.       else
  98.         self.contents.font.color = Color.new(255,255,0,255)
  99.         self.contents.draw_text(x + 155, y, 36, 32, " -",2)
  100.       end
  101.       self.contents.draw_text(x + 200, y, 36, 32, $temp_hp.to_s, 2)
  102.       self.contents.font.color = normal_color
  103.       self.contents.draw_text(x + 215, y, 36, 32, ")", 2)
  104.     end
  105.   end
  106.   #--------------------------------------------------------------------------
  107.   # ● 描绘 SP
  108.   #     actor : 角色
  109.   #     x     : 描画目标 X 坐标
  110.   #     y     : 描画目标 Y 坐标
  111.   #     width : 描画目标的宽
  112.   #--------------------------------------------------------------------------
  113.   def draw_actor_sp_lvup(actor, x, y)
  114.     self.contents.font.color = system_color
  115.     self.contents.draw_text(x , y, 96, 32, "最大" + $data_system.words.sp)
  116.     if $temp_sp == 0
  117.       self.contents.font.color = normal_color
  118.       self.contents.draw_text(x + 120 , y, 48, 32, actor.maxsp.to_s, 2)
  119.     else
  120.       maxsp = actor.maxsp + $temp_sp
  121.       self.contents.font.color = Color.new(255, 128, 128, 255)
  122.       self.contents.draw_text(x + 120 , y, 48, 32, maxsp.to_s ,2)
  123.       self.contents.font.color = normal_color      
  124.       self.contents.draw_text(x + 155, y, 36, 32, "( ", 2)
  125.       if $temp_sp >=0
  126.         self.contents.font.color = Color.new(255, 128, 128, 255)
  127.         self.contents.draw_text(x + 155, y, 36, 32, " +",2)
  128.       else
  129.         self.contents.font.color = Color.new(255,255,0,255)
  130.         self.contents.draw_text(x + 155, y, 36, 32, " -",2)
  131.       end
  132.       self.contents.draw_text(x + 200, y, 36, 32, $temp_sp.to_s, 2)
  133.       self.contents.font.color = normal_color
  134.       self.contents.draw_text(x + 215, y, 36, 32, ")", 2)
  135.     end
  136.   end
  137.   #--------------------------------------------------------------------------
  138.   # ● 描绘能力值
  139.   #     actor : 角色
  140.   #     x     : 描画目标 X 坐标
  141.   #     y     : 描画目标 Y 坐标
  142.   #     type  : 能力值种类 (0~4)
  143.   #--------------------------------------------------------------------------
  144.   def draw_actor_lvup(actor, x, y, type)   
  145.     # 定义数字颜色
  146.     lvup = normal_color
  147.     upcolor = Color.new(255, 128, 128, 255)
  148.     self.contents.font.color = normal_color   
  149.     case type
  150.     when 0
  151.       parameter_name = $data_system.words.str
  152.       parameter_value = actor.str
  153.       parameter_value_temp = parameter_value + $temp_str
  154.       if $temp_str != 0
  155.         lvup = upcolor
  156.         self.contents.draw_text(x + 256, y, 16, 32, "(")
  157.         if $temp_str >= 0
  158.           self.contents.font.color = lvup
  159.           self.contents.draw_text(x + 272, y, 80, 32, "+",0)
  160.         else
  161.           self.contents.font.color = Color.new(255,255,0,255)
  162.           self.contents.draw_text(x + 272, y, 80, 32, "-",0)
  163.         end        
  164.         self.contents.draw_text(x + 272, y, 80, 32, $temp_str.abs.to_s,1)
  165.         self.contents.font.color = normal_color
  166.         self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
  167.       end
  168.     when 1
  169.       parameter_name = $data_system.words.dex
  170.       parameter_value = actor.dex
  171.       parameter_value_temp = parameter_value + $temp_dex
  172.       if $temp_dex != 0
  173.         lvup = upcolor
  174.         self.contents.draw_text(x + 256, y, 16, 32, "(")
  175.         if $temp_dex >= 0
  176.           self.contents.font.color = lvup
  177.           self.contents.draw_text(x + 272, y, 80, 32, "+",0)
  178.         else
  179.           self.contents.font.color = Color.new(255,255,0,255)
  180.           self.contents.draw_text(x + 272, y, 80, 32, "-",0)
  181.         end        
  182.         self.contents.draw_text(x + 272, y, 80, 32, $temp_dex.abs.to_s,1)
  183.         self.contents.font.color = normal_color
  184.         self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
  185.       end
  186.     when 2
  187.       parameter_name = $data_system.words.agi
  188.       parameter_value = actor.agi
  189.       parameter_value_temp = parameter_value + $temp_agi
  190.       if $temp_agi != 0
  191.         lvup = upcolor
  192.         self.contents.draw_text(x + 256, y, 16, 32, "(")
  193.         if $temp_agi >= 0
  194.           self.contents.font.color = lvup
  195.           self.contents.draw_text(x + 272, y, 80, 32, "+",0)
  196.         else
  197.           self.contents.font.color = Color.new(255,255,0,255)
  198.           self.contents.draw_text(x + 272, y, 80, 32, "-",0)
  199.         end        
  200.         self.contents.draw_text(x + 272, y, 80, 32, $temp_agi.abs.to_s,1)
  201.         self.contents.font.color = normal_color
  202.         self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
  203.       end
  204.     when 3
  205.       parameter_name = $data_system.words.int
  206.       parameter_value = actor.int
  207.       parameter_value_temp = parameter_value + $temp_int
  208.       if $temp_int != 0
  209.         lvup = upcolor
  210.         self.contents.draw_text(x + 256, y, 16, 32, "(")
  211.         if $temp_int >= 0
  212.           self.contents.font.color = lvup
  213.           self.contents.draw_text(x + 272, y, 80, 32, "+",0)
  214.         else
  215.           self.contents.font.color = Color.new(255,255,0,255)
  216.           self.contents.draw_text(x + 272, y, 80, 32, "-",0)
  217.         end        
  218.         self.contents.draw_text(x + 272, y, 80, 32, $temp_int.abs.to_s,1)
  219.         self.contents.font.color = normal_color
  220.         self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
  221.       end
  222.     when 4
  223.       parameter_name = "剩余点数"
  224.       parameter_value = $point
  225.       if $point != 0
  226.         lvup = upcolor
  227.       end
  228.     end   
  229.     self.contents.font.color = system_color
  230.     self.contents.draw_text(x, y, 120, 32, parameter_name)
  231.     self.contents.font.color = normal_color
  232.     self.contents.draw_text(x + 120, y, 36, 32, parameter_value.to_s)   
  233.     if type != 4
  234.       self.contents.draw_text(x + 150, y, 36, 32, "→")
  235.     end  
  236.     self.contents.font.color = lvup
  237.     self.contents.draw_text(x + 180, y, 60, 32, parameter_value_temp.to_s)
  238.     self.contents.font.color = normal_color        
  239.   end
  240. end
  241. #==============================================================================
  242. # ■ Window_lvup
  243. #------------------------------------------------------------------------------
  244. #  显示升级状态窗口。
  245. #==============================================================================
  246. class Window_Lvup < Window_Base
  247.   #--------------------------------------------------------------------------
  248.   # ● 初始化对像
  249.   #     actor : 角色
  250.   #--------------------------------------------------------------------------
  251.   def initialize(actor)
  252.     super(0, 0, 512, 320)
  253.     self.contents = Bitmap.new(width - 32, height - 32)
  254.     @actor = actor
  255.     refresh
  256.   end  
  257.   #--------------------------------------------------------------------------
  258.   # ● 刷新
  259.   #--------------------------------------------------------------------------
  260.   def refresh
  261.     self.contents.clear
  262.     draw_actor_graphic(@actor, 40, 112)
  263.     draw_actor_name(@actor, 4, 0)
  264.     draw_actor_class(@actor, 4 + 144, 0)
  265.     draw_actor_level(@actor, 96, 32)
  266.     draw_actor_state(@actor, 96, 64)   
  267.     draw_actor_hp_lvup(@actor, 96+128, 32)
  268.     draw_actor_sp_lvup(@actor, 96+128, 64)
  269.     draw_actor_lvup(@actor, 96, 128, 0)
  270.     draw_actor_lvup(@actor, 96, 160, 1)
  271.     draw_actor_lvup(@actor, 96, 192, 2)
  272.     draw_actor_lvup(@actor, 96, 224, 3)
  273.     draw_actor_lvup(@actor, 96, 256, 4)
  274.   end
  275. end
  276. #==============================================================================
  277. # ■ Window_Help
  278. #------------------------------------------------------------------------------
  279. #  特技及物品的说明、角色的状态显示的窗口。
  280. #==============================================================================
  281. class Window_Lvup_Help < Window_Base
  282.   #--------------------------------------------------------------------------
  283.   # ● 初始化对像
  284.   #--------------------------------------------------------------------------
  285.   def initialize
  286.     super(0, 320, 640, 160)
  287.     self.contents = Bitmap.new(width - 32, height - 32)
  288.     @test = "" #——这个东西用来检测,节约内存专用
  289.   end  
  290.   #--------------------------------------------------------------------------
  291.   # ● 设置文本
  292.   #--------------------------------------------------------------------------
  293.   def lvup_text(text1, text2 = nil, text3 = nil, text4 = nil)
  294.     if @test != text1
  295.       @test = text1
  296.     else
  297.       return
  298.     end   
  299.     self.contents.clear
  300.     self.contents.font.color = normal_color
  301.     self.contents.draw_text(4, 0, self.width - 40, 32, text1)
  302.     if text2 != nil
  303.       self.contents.draw_text(4 , 32, self.width - 40, 32, text2)
  304.     end
  305.     self.contents.font.size -= 4
  306.     if text3 != nil
  307.       self.contents.draw_text(4 , 64, self.width - 40, 32, text3)
  308.     end
  309.     if text4 != nil
  310.       self.contents.draw_text(4 , 96, self.width - 40, 32, text4)
  311.     end
  312.     self.contents.font.size += 4
  313.   end
  314. end
  315. #==============================================================================
  316. # ■ Scene_lvup
  317. #------------------------------------------------------------------------------
  318. #  处理升级画面的类。
  319. #==============================================================================
  320. class Scene_Lvup
  321.   #--------------------------------------------------------------------------
  322.   # ● 初始化对像
  323.   #     actor_index : 角色索引
  324.   #     menu_index : 选项起始位置
  325.   #--------------------------------------------------------------------------
  326.   def initialize(actor_index = 0 , menu_index = 0)
  327.     @actor_index = actor_index
  328.     @menu_index = menu_index
  329.   end
  330.   #--------------------------------------------------------------------------
  331.   # ● 主处理
  332.   #--------------------------------------------------------------------------
  333.   def main
  334.     s1 = "增加体力"
  335.     s2 = "增加"+$data_system.words.str
  336.     s3 = "增加"+$data_system.words.dex
  337.     s4 = "增加"+$data_system.words.agi
  338.     s5 = "增加"+$data_system.words.int
  339.     s6 = "确认加点"
  340.     s7 = "点数重置"
  341.     @command_window = Window_Command.new(128, [s1, s2, s3, s4, s5, s6, s7])
  342.     @command_window.index = @menu_index
  343.     # 获取角色
  344.     @actor = $game_party.actors[@actor_index]
  345.     # 将角色的剩余点数带入
  346.     $point = $game_variables[@actor.id + LEVEL_UP_VARIABLE]   
  347.     # 初始化临时量
  348.     $temp_str = 0
  349.     $temp_dex = 0
  350.     $temp_agi = 0
  351.     $temp_int = 0
  352.     $temp_hp = 0
  353.     $temp_sp = 0
  354.     #=========================================================================
  355.     # 特别提示:这些设置也可以使用小数,但是可能出现0值意外错误
  356.     #  (各种编程语言都有这种意外),建议还是使用整数,正负不限
  357.     #=========================================================================
  358.     # 每提升一次力量,提升多少附加能力
  359.     #=========================================================================
  360.     @str_hp = 2     # 每提升一次力量附加提升多少HP
  361.     @str_sp = 2     # 每提升一次力量附加提升多少SP
  362.     @str_dex = 1    # 每提升一次力量附加提升多少灵巧
  363.     @str_agi = 1    # 每提升一次力量附加提升多少速度
  364.     @str_int = 0    # 每提升一次力量附加提升多少魔力
  365.     @str_str = 5    # 每提升一次力量附加提升多少力量
  366.     #=========================================================================
  367.     # 每提升一次灵巧,提升多少附加能力
  368.     #=========================================================================
  369.     @dex_hp = 3     # 每提升一次灵巧附加提升多少HP
  370.     @dex_sp = 2     # 每提升一次灵巧附加提升多少SP
  371.     @dex_str = 1    # 每提升一次灵巧附加提升多少力量
  372.     @dex_agi = 1    # 每提升一次灵巧附加提升多少速度
  373.     @dex_int = 0    # 每提升一次灵巧附加提升多少魔力
  374.     @dex_dex = 5    # 每提升一次灵巧附加提升多少灵巧
  375.     #=========================================================================
  376.     # 每提升一次速度,提升多少附加能力
  377.     #=========================================================================
  378.     @agi_hp = 3     # 每提升一次速度附加提升多少HP
  379.     @agi_sp = 2     # 每提升一次速度附加提升多少SP
  380.     @agi_str = 1    # 每提升一次速度附加提升多少力量
  381.     @agi_dex = 1    # 每提升一次速度附加提升多少灵巧
  382.     @agi_int = 0    # 每提升一次速度附加提升多少魔力
  383.     @agi_agi = 5    # 每提升一次速度附加提升多少速度
  384.     #=========================================================================
  385.     # 每提升一次魔力,提升多少附加能力
  386.     #=========================================================================
  387.     @int_hp = 1     # 每提升一次魔力附加提升多少HP
  388.     @int_sp = 10    # 每提升一次魔力附加提升多少SP
  389.     @int_str = -1   # 每提升一次魔力附加提升多少力量
  390.     @int_dex = -1   # 每提升一次魔力附加提升多少灵巧
  391.     @int_agi = -1   # 每提升一次魔力附加提升多少速度
  392.     @int_int = 10   # 每提升一次魔力附加提升多少魔力
  393.     #=========================================================================
  394.     # 每提升一次体力,提升多少附加能力
  395.     #=========================================================================
  396.     @hp = 15       # 每提升一次体力提升多少HP
  397.     @sp = 10       # 每提升一次体力提升多少SP
  398.     @hp_str = -1   # 每提升一次体力提升多少力量
  399.     @hp_dex = -1   # 每提升一次体力提升多少速度
  400.     @hp_agi = -1   # 每提升一次体力提升多少灵巧
  401.     @hp_int = -1   # 每提升一次体力提升多少魔力   
  402.     # 定义说明文字
  403.     @text_hp_sc = "体力可以增加生存的能力,可以延长生存的时间!"
  404.     @text_str_sc = $data_system.words.str + "可以增加物理攻击和物理技能的威力!"
  405.     @text_dex_sc = $data_system.words.dex + "可以提高攻击的命中率和必杀!"
  406.     @text_agi_sc = $data_system.words.agi + "可以提高回避、命中、逃跑成功率!"
  407.     @text_int_sc = $data_system.words.int + "可以提高魔法的效果,可以增加1点魔法!"
  408.     @text_save = "保存分配情况并返回游戏"
  409.     @text_reset= "重新分配能力点数"
  410.     @text_2 = "每增加一次此项能力值,可以提升能力值"
  411.     @text_hp = "最大" + $data_system.words.hp + "值"
  412.     @text_sp = "最大" + $data_system.words.sp + "值"
  413.     @text_str = "最大" + $data_system.words.str + "值"
  414.     @text_dex = "最大" + $data_system.words.dex + "值"
  415.     @text_agi = "最大" + $data_system.words.agi + "值"
  416.     @text_int = "最大" + $data_system.words.int + "值"
  417.     s_disable
  418.     # 生成状态窗口
  419.     @lvup_window = Window_Lvup.new(@actor)
  420.     @lvup_window.x = 128
  421.     @lvup_window.y = 0   
  422.     # 生成帮助窗口并初始化帮助文本
  423.     @help_window = Window_Lvup_Help.new   
  424.     # 执行过渡
  425.     Graphics.transition(40, "Graphics/Transitions/" + $data_system.battle_transition)
  426.     # 主循环
  427.     loop do
  428.       # 刷新游戏画面
  429.       Graphics.update
  430.       # 刷新输入信息
  431.       Input.update
  432.       # 刷新画面
  433.       update
  434.       # 如果切换画面就中断循环
  435.       if $scene != self
  436.         break
  437.       end
  438.     end
  439.     # 准备过渡
  440.     Graphics.freeze
  441.     # 释放窗口
  442.     @command_window.dispose
  443.     @lvup_window.dispose
  444.     @help_window.dispose
  445.   end
  446.   #--------------------------------------------------------------------------
  447.   # ● 刷新画面
  448.   #--------------------------------------------------------------------------
  449.   def update
  450.     # 刷新窗口
  451.     @command_window.update
  452.     # 选项明暗判断(因为太消耗资源,所以屏蔽掉了)
  453.     s_disable
  454.     @lvup_window.update
  455.     #=============================================================
  456.     # 按下 B 键的情况下
  457.     #=============================================================
  458.     if Input.trigger?(Input::B)
  459.       # 演奏取消 SE
  460.       $game_system.se_play($data_system.cancel_se)
  461.       # 切换到地图画面
  462.       $scene = Scene_Map.new
  463.       return
  464.     end
  465.     #=============================================================
  466.     # 按下 C 键的情况下
  467.     #=============================================================
  468.     if Input.trigger?(Input::C)      
  469.       if @command_window.index == 5
  470.           # 演奏确定 SE
  471.         $game_system.se_play($data_system.decision_se)
  472.         # 将角色的剩余点数带回
  473.         $game_variables[@actor.id + LEVEL_UP_VARIABLE] = $point
  474.         # 将角色点数实际加上
  475.         @actor.str += $temp_str
  476.         @actor.dex += $temp_dex
  477.         @actor.agi += $temp_agi
  478.         @actor.int += $temp_int
  479.         @actor.maxhp += $temp_hp
  480.         @actor.maxsp += $temp_sp
  481.         # 切换到地图画面
  482.         $scene = Scene_Map.new
  483.         return
  484.       end
  485.       if @command_window.index == 6
  486.           # 演奏确定 SE
  487.         $game_system.se_play($data_system.cancel_se)
  488.           # 将角色的剩余点数带入
  489.         $point = $game_variables[@actor.id + LEVEL_UP_VARIABLE]   
  490.           # 初始化临时量
  491.         $temp_str = 0
  492.         $temp_dex = 0
  493.         $temp_agi = 0
  494.         $temp_int = 0
  495.         $temp_hp = 0
  496.         $temp_sp = 0
  497.         @lvup_window.refresh
  498.         return
  499.       end
  500.       if $point == 0
  501.         # 演奏冻结 SE
  502.         $game_system.se_play($data_system.buzzer_se)
  503.         return
  504.       end
  505.       case @command_window.index
  506.       when 0
  507.         # 演奏确定 SE
  508.         $game_system.se_play($data_system.decision_se)
  509.         $temp_hp += @hp
  510.         $temp_sp += @sp
  511.         $temp_str += @hp_str
  512.         $temp_dex += @hp_dex
  513.         $temp_agi += @hp_agi
  514.         $temp_int += @hp_int
  515.         $point -= 1
  516.         @lvup_window.refresh
  517.         s_disable
  518.         return
  519.       when 1
  520.         # 演奏确定 SE
  521.         $game_system.se_play($data_system.decision_se)
  522.         $temp_str += @str_str
  523.         $temp_hp += @str_hp
  524.         $temp_sp += @str_sp
  525.         $temp_dex += @str_dex
  526.         $temp_agi += @str_agi
  527.         $temp_int += @str_int
  528.         $point -= 1
  529.         @lvup_window.refresh
  530.         s_disable
  531.         return
  532.       when 2
  533.         # 演奏确定 SE
  534.         $game_system.se_play($data_system.decision_se)
  535.         $temp_dex += @dex_dex
  536.         $temp_hp += @dex_hp
  537.         $temp_sp += @dex_sp
  538.         $temp_str += @dex_str
  539.         $temp_agi += @dex_agi
  540.         $temp_int += @dex_int
  541.         $point -= 1
  542.         @lvup_window.refresh
  543.         s_disable
  544.         return
  545.       when 3
  546.         # 演奏确定 SE
  547.         $game_system.se_play($data_system.decision_se)
  548.         $temp_agi += @agi_agi
  549.         $temp_hp += @agi_hp
  550.         $temp_sp += @agi_sp
  551.         $temp_str += @agi_str
  552.         $temp_dex += @agi_dex
  553.         $temp_int += @agi_int
  554.         $point -= 1
  555.         @lvup_window.refresh
  556.         s_disable
  557.         return
  558.       when 4
  559.         # 演奏确定 SE
  560.         $game_system.se_play($data_system.decision_se)
  561.         $temp_int += @int_int
  562.         $temp_hp += @int_hp
  563.         $temp_sp += @int_sp
  564.         $temp_str += @int_str
  565.         $temp_dex += @int_dex
  566.         $temp_agi += @int_agi
  567.         $point -= 1
  568.         @lvup_window.refresh
  569.         s_disable
  570.         return
  571.       end
  572.     end
  573.     #=============================================================
  574.     # 什么都没有按下的情况
  575.     #=============================================================
  576.     case @command_window.index   
  577.     when 0  # 增加体力
  578.       temptext1 = @text_hp + @hp.to_s + "点   " + @text_str + @hp_str.to_s + "点   " + @text_dex + @hp_dex.to_s + "点"
  579.       temptext2 = @text_sp + @sp.to_s + "点   " + @text_agi + @hp_agi.to_s + "点   " + @text_int + @hp_int.to_s + "点"
  580.       @help_window.lvup_text(@text_hp_sc , @text_2 , temptext1 , temptext2)
  581.     when 1  # 增加力量
  582.       temptext1 = @text_hp + @str_hp.to_s + "点   " + @text_str + @str_str.to_s + "点   " + @text_dex + @str_dex.to_s + "点"
  583.       temptext2 = @text_sp + @str_sp.to_s + "点   " + @text_agi + @str_agi.to_s + "点   " + @text_int + @str_int.to_s + "点"
  584.       @help_window.lvup_text(@text_str_sc , @text_2 , temptext1 , temptext2)
  585.     when 2  # 增加灵巧
  586.       temptext1 = @text_hp + @dex_hp.to_s + "点   " + @text_str + @dex_agi.to_s + "点   " + @text_dex + @dex_dex.to_s + "点"
  587.       temptext2 = @text_sp + @dex_sp.to_s + "点   " + @text_agi + @dex_agi.to_s + "点   " + @text_int + @dex_int.to_s + "点"
  588.       @help_window.lvup_text(@text_dex_sc , @text_2 , temptext1 , temptext2)
  589.     when 3  # 增加速度
  590.       temptext1 = @text_hp + @agi_hp.to_s + "点   " + @text_str + @agi_str.to_s + "点   " + @text_dex + @agi_dex.to_s + "点"
  591.       temptext2 = @text_sp + @agi_sp.to_s + "点   " + @text_agi + @agi_agi.to_s + "点   " + @text_int + @agi_int.to_s + "点"
  592.       @help_window.lvup_text(@text_agi_sc , @text_2 , temptext1 , temptext2)
  593.     when 4  # 增加魔力
  594.       temptext1 = @text_hp + @int_hp.to_s + "点   " + @text_str + @int_str.to_s + "点   " + @text_dex + @int_dex.to_s + "点"
  595.       temptext2 = @text_sp + @int_sp.to_s + "点   " + @text_agi + @int_agi.to_s + "点   " + @text_int + @int_int.to_s + "点"
  596.       @help_window.lvup_text(@text_int_sc , @text_2 , temptext1 , temptext2)
  597.     when 5 # 保存设定
  598.       @help_window.lvup_text(@text_save)
  599.     when 6 # 点数重置
  600.       @help_window.lvup_text(@text_reset)     
  601.     end
  602.     #=============================================================
  603.     # 按下R与L换人的情况
  604.     #=============================================================      
  605.     if Input.trigger?(Input::R)
  606.       # 演奏光标 SE
  607.       $game_system.se_play($data_system.cursor_se)
  608.       # 移至下一位角色
  609.       @actor_index += 1
  610.       @actor_index %= $game_party.actors.size
  611.       # 切换到别的状态画面
  612.       $scene = Scene_Lvup.new(@actor_index , @command_window.index)
  613.       return
  614.     end
  615.     # 按下 L 键的情况下
  616.     if Input.trigger?(Input::L)
  617.       # 演奏光标 SE
  618.       $game_system.se_play($data_system.cursor_se)
  619.       # 移至上一位角色
  620.       @actor_index += $game_party.actors.size - 1
  621.       @actor_index %= $game_party.actors.size
  622.       # 切换到别的状态画面
  623.       $scene = Scene_Lvup.new(@actor_index , @command_window.index)
  624.       return
  625.     end
  626.   end  
  627.   #--------------------------------------------------------------------------
  628.   # ● 选项明暗判断
  629.   #--------------------------------------------------------------------------
  630.   def s_disable
  631.     # 判断剩余点数是否为0,如果为0,那么增加选项表示为暗色
  632.     if $point == 0
  633.       @command_window.disable_item(0)
  634.       @command_window.disable_item(1)
  635.       @command_window.disable_item(2)
  636.       @command_window.disable_item(3)
  637.       @command_window.disable_item(4)
  638.     else
  639.       @command_window.able_item(0)
  640.       @command_window.able_item(1)      
  641.       @command_window.able_item(2)
  642.       @command_window.able_item(3)
  643.       @command_window.able_item(4)
  644.     end
  645.   end
  646. end

  647. #==============================================================================
  648. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  649. #==============================================================================
复制代码

点评

好牛X啊,怎么改的我怎么看不出来=3=,我还想把随机装备整合进去,行不  发表于 2010-8-15 15:02

评分

参与人数 1星屑 +300 收起 理由
「旅」 + 300 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

Lv1.梦旅人

谁知我迷茫

梦石
0
星屑
67
在线时间
287 小时
注册时间
2009-7-3
帖子
677

贵宾

3
发表于 2010-8-15 15:03:43 | 只看该作者
回复 逍遥仙君 的帖子


   
回复 支持 反对

使用道具 举报

Lv1.梦旅人

水土火风重逢处

梦石
0
星屑
234
在线时间
691 小时
注册时间
2010-7-17
帖子
3042
4
发表于 2010-8-15 15:07:09 | 只看该作者
LS空帖,不怕别扣分?(其实我知道LS是卡了)
独坐望城,望断天涯
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
7 小时
注册时间
2010-7-24
帖子
19
5
 楼主| 发表于 2010-8-15 15:08:17 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
7 小时
注册时间
2010-7-24
帖子
19
6
 楼主| 发表于 2010-8-15 15:15:38 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
7 小时
注册时间
2010-7-24
帖子
19
7
 楼主| 发表于 2010-8-15 15:42:35 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-9-20 20:36

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表