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

Project1

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

想让“手动加点” 不同的职业加点可以单独设置……

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
4 小时
注册时间
2007-6-22
帖子
137
跳转到指定楼层
1
发表于 2007-7-4 19:27:23 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
请教……

研究了论坛很多关于这方面的问题,还不是太明白……

比如我想让某职业升级获得5点,某职业升级获得6点

另一种想法:

想让某职业加1点力量得到2点力量附加能力值而某些职业加1点力量得到5点力量附加能力值

这样来突出职业与职业间的不同

我用的是这样的加点脚本
  1. if KKME::MENU_TYPE.include?(10)
  2. #==============================================================================
  3. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  4. #==============================================================================


  5. # 脚本使用设定:

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

  12. # 每增加一次点数,各项能力值的变化:70行开始
  13.                         
  14. # 使用方法介绍:

  15. # 本脚本不会取代默认
  16. # 也就是说,默认的升级还在,但可以用这个功能手动追加点数。
  17. # 如果你想纯粹使用手动加点(而升级不提升能力),只要把数据库中角色升级能力,
  18. # 1-99级全部等于一个相同数值就行了。

  19. # 加点场景中,page up,page down换人

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



  21. #==============================================================================
  22. # ■ Scene_lvup
  23. #------------------------------------------------------------------------------
  24. #  处理升级画面的类。
  25. #==============================================================================
  26. class Scene_Lvup
  27.   #--------------------------------------------------------------------------
  28.   # ● 初始化对像
  29.   #     actor_index : 角色索引
  30.   #     menu_index : 选项起始位置
  31.   #--------------------------------------------------------------------------
  32.   def initialize(index, actor_index = 0)
  33.     @actor_index = actor_index
  34.     @menu_index = 0
  35.     @cmd_index = index
  36.   end
  37.   #--------------------------------------------------------------------------
  38.   # ● 主处理
  39.   #--------------------------------------------------------------------------
  40.   def main
  41.     s1 = "增加体力"
  42.     s2 = "增加"+$data_system.words.str
  43.     s3 = "增加"+$data_system.words.dex
  44.     s4 = "增加"+$data_system.words.agi
  45.     s5 = "增加"+$data_system.words.int
  46.     s6 = "确认加点"
  47.     s7 = "点数重置"
  48.     @command_window = Window_Command.new(128, [s1, s2, s3, s4, s5, s6, s7])
  49.     @command_window.index = @menu_index
  50.     # 获取角色
  51.     @actor = $game_party.actors[@actor_index]
  52.     # 将角色的剩余点数带入
  53.     $point = $game_variables[@actor.id + LEVEL_UP_VARIABLE]   
  54.     # 初始化临时量
  55.     $temp_str = 0
  56.     $temp_dex = 0
  57.     $temp_agi = 0
  58.     $temp_int = 0
  59.     $temp_hp = 0
  60.     $temp_sp = 0
  61.     #=========================================================================
  62.     # 特别提示:这些设置也可以使用小数,但是可能出现0值意外错误
  63.     #  (各种编程语言都有这种意外),建议还是使用整数,正负不限
  64.     #=========================================================================
  65.     # 每提升一次力量,提升多少附加能力
  66.     #=========================================================================
  67.     @str_hp = 0     # 每提升一次力量附加提升多少HP
  68.     @str_sp = 0     # 每提升一次力量附加提升多少SP
  69.     @str_dex = 0    # 每提升一次力量附加提升多少灵巧
  70.     @str_agi = 0    # 每提升一次力量附加提升多少速度
  71.     @str_int = 0    # 每提升一次力量附加提升多少魔力
  72.     @str_str = 1    # 每提升一次力量附加提升多少力量
  73.     #=========================================================================
  74.     # 每提升一次灵巧,提升多少附加能力
  75.     #=========================================================================
  76.     @dex_hp = 0     # 每提升一次灵巧附加提升多少HP
  77.     @dex_sp = 0     # 每提升一次灵巧附加提升多少SP
  78.     @dex_str = 1    # 每提升一次灵巧附加提升多少力量
  79.     @dex_agi = 0    # 每提升一次灵巧附加提升多少速度
  80.     @dex_int = 0    # 每提升一次灵巧附加提升多少魔力
  81.     @dex_dex = 0    # 每提升一次灵巧附加提升多少灵巧
  82.     #=========================================================================
  83.     # 每提升一次速度,提升多少附加能力
  84.     #=========================================================================
  85.     @agi_hp = 0     # 每提升一次速度附加提升多少HP
  86.     @agi_sp = 0     # 每提升一次速度附加提升多少SP
  87.     @agi_str = 0    # 每提升一次速度附加提升多少力量
  88.     @agi_dex = 0    # 每提升一次速度附加提升多少灵巧
  89.     @agi_int = 0    # 每提升一次速度附加提升多少魔力
  90.     @agi_agi = 1    # 每提升一次速度附加提升多少速度
  91.     #=========================================================================
  92.     # 每提升一次魔力,提升多少附加能力
  93.     #=========================================================================
  94.     @int_hp = 0     # 每提升一次魔力附加提升多少HP
  95.     @int_sp = 5    # 每提升一次魔力附加提升多少SP
  96.     @int_str = 0   # 每提升一次魔力附加提升多少力量
  97.     @int_dex = 0   # 每提升一次魔力附加提升多少灵巧
  98.     @int_agi = 0   # 每提升一次魔力附加提升多少速度
  99.     @int_int = 1   # 每提升一次魔力附加提升多少魔力
  100.     #=========================================================================
  101.     # 每提升一次体力,提升多少附加能力
  102.     #=========================================================================
  103.     @hp = 50       # 每提升一次体力提升多少HP
  104.     @sp = 0       # 每提升一次体力提升多少SP
  105.     @hp_str = 0   # 每提升一次体力提升多少力量
  106.     @hp_dex = 0   # 每提升一次体力提升多少速度
  107.     @hp_agi = 0   # 每提升一次体力提升多少灵巧
  108.     @hp_int = 0   # 每提升一次体力提升多少魔力   
  109.     # 定义说明文字
  110.     @text_hp_sc = "体力可以增加生存的能力,可以延长生存的时间!"
  111.     @text_str_sc = $data_system.words.str + "可以增加物理攻击和物理技能的威力!"
  112.     @text_dex_sc = $data_system.words.dex + "可以提高攻击的命中率和必杀!"
  113.     @text_agi_sc = $data_system.words.agi + "可以提高回避、命中、逃跑成功率!"
  114.     @text_int_sc = $data_system.words.int + "可以提高魔法的效果,可以增加1点魔法!"
  115.     @text_save = "保存分配情况并返回游戏"
  116.     @text_reset= "重新分配能力点数"
  117.     @text_2 = "每增加一次此项能力值,可以提升能力值"
  118.     @text_hp = "最大" + $data_system.words.hp + "值"
  119.     @text_sp = "最大" + $data_system.words.sp + "值"
  120.     @text_str = "最大" + $data_system.words.str + "值"
  121.     @text_dex = "最大" + $data_system.words.dex + "值"
  122.     @text_agi = "最大" + $data_system.words.agi + "值"
  123.     @text_int = "最大" + $data_system.words.int + "值"
  124.     s_disable
  125.     # 生成状态窗口
  126.     @lvup_window = Window_Lvup.new(@actor)
  127.     @lvup_window.x = 128
  128.     @lvup_window.y = 0   
  129.     # 生成帮助窗口并初始化帮助文本
  130.     @help_window = Window_Lvup_Help.new   
  131.     # 执行过渡
  132.     Graphics.transition(40, "Graphics/Transitions/" + $data_system.battle_transition)
  133.     # 主循环
  134.     loop do
  135.       # 刷新游戏画面
  136.       Graphics.update
  137.       # 刷新输入信息
  138.       Input.update
  139.       # 刷新画面
  140.       update
  141.       # 如果切换画面就中断循环
  142.       if $scene != self
  143.         break
  144.       end
  145.     end
  146.     # 准备过渡
  147.     Graphics.freeze
  148.     # 释放窗口
  149.     @command_window.dispose
  150.     @lvup_window.dispose
  151.     @help_window.dispose
  152.   end
  153.   #--------------------------------------------------------------------------
  154.   # ● 刷新画面
  155.   #--------------------------------------------------------------------------
  156.   def update
  157.     # 刷新窗口
  158.     @command_window.update
  159.     # 选项明暗判断(因为太消耗资源,所以屏蔽掉了)
  160.     s_disable
  161.     @lvup_window.update
  162.     #=============================================================
  163.     # 按下 B 键的情况下
  164.     #=============================================================
  165.     if Input.trigger?(Input::B)
  166.       # 演奏取消 SE
  167.       $game_system.se_play($data_system.cancel_se)
  168.       # 切换到地图画面
  169.       $scene = Scene_Menu.new(@cmd_index)
  170.       return
  171.     end
  172.     #=============================================================
  173.     # 按下 C 键的情况下
  174.     #=============================================================
  175.     if Input.trigger?(Input::C)      
  176.       if @command_window.index == 5
  177.           # 演奏确定 SE
  178.         $game_system.se_play($data_system.decision_se)
  179.         # 将角色的剩余点数带回
  180.         $game_variables[@actor.id + LEVEL_UP_VARIABLE] = $point
  181.         # 将角色点数实际加上
  182.         @actor.str += $temp_str
  183.         @actor.dex += $temp_dex
  184.         @actor.agi += $temp_agi
  185.         @actor.int += $temp_int
  186.         @actor.maxhp += $temp_hp
  187.         @actor.maxsp += $temp_sp
  188.         # 切换到地图画面
  189.         $scene = Scene_Menu.new(@cmd_index)
  190.         return
  191.       end
  192.       if @command_window.index == 6
  193.           # 演奏确定 SE
  194.         $game_system.se_play($data_system.cancel_se)
  195.           # 将角色的剩余点数带入
  196.         $point = $game_variables[@actor.id + LEVEL_UP_VARIABLE]   
  197.           # 初始化临时量
  198.         $temp_str = 0
  199.         $temp_dex = 0
  200.         $temp_agi = 0
  201.         $temp_int = 0
  202.         $temp_hp = 0
  203.         $temp_sp = 0
  204.         @lvup_window.refresh
  205.         return
  206.       end
  207.       if $point == 0
  208.         # 演奏冻结 SE
  209.         $game_system.se_play($data_system.buzzer_se)
  210.         return
  211.       end
  212.       case @command_window.index
  213.       when 0
  214.         # 演奏确定 SE
  215.         $game_system.se_play($data_system.decision_se)
  216.         $temp_hp += @hp
  217.         $temp_sp += @sp
  218.         $temp_str += @hp_str
  219.         $temp_dex += @hp_dex
  220.         $temp_agi += @hp_agi
  221.         $temp_int += @hp_int
  222.         $point -= 1
  223.         @lvup_window.refresh
  224.         s_disable
  225.         return
  226.       when 1
  227.         # 演奏确定 SE
  228.         $game_system.se_play($data_system.decision_se)
  229.         $temp_str += @str_str
  230.         $temp_hp += @str_hp
  231.         $temp_sp += @str_sp
  232.         $temp_dex += @str_dex
  233.         $temp_agi += @str_agi
  234.         $temp_int += @str_int
  235.         $point -= 1
  236.         @lvup_window.refresh
  237.         s_disable
  238.         return
  239.       when 2
  240.         # 演奏确定 SE
  241.         $game_system.se_play($data_system.decision_se)
  242.         $temp_dex += @dex_dex
  243.         $temp_hp += @dex_hp
  244.         $temp_sp += @dex_sp
  245.         $temp_str += @dex_str
  246.         $temp_agi += @dex_agi
  247.         $temp_int += @dex_int
  248.         $point -= 1
  249.         @lvup_window.refresh
  250.         s_disable
  251.         return
  252.       when 3
  253.         # 演奏确定 SE
  254.         $game_system.se_play($data_system.decision_se)
  255.         $temp_agi += @agi_agi
  256.         $temp_hp += @agi_hp
  257.         $temp_sp += @agi_sp
  258.         $temp_str += @agi_str
  259.         $temp_dex += @agi_dex
  260.         $temp_int += @agi_int
  261.         $point -= 1
  262.         @lvup_window.refresh
  263.         s_disable
  264.         return
  265.       when 4
  266.         # 演奏确定 SE
  267.         $game_system.se_play($data_system.decision_se)
  268.         $temp_int += @int_int
  269.         $temp_hp += @int_hp
  270.         $temp_sp += @int_sp
  271.         $temp_str += @int_str
  272.         $temp_dex += @int_dex
  273.         $temp_agi += @int_agi
  274.         $point -= 1
  275.         @lvup_window.refresh
  276.         s_disable
  277.         return
  278.       end
  279.     end
  280.     #=============================================================
  281.     # 什么都没有按下的情况
  282.     #=============================================================
  283.     case @command_window.index   
  284.     when 0  # 增加体力
  285.       temptext1 = @text_hp + @hp.to_s + "点   " + @text_str + @hp_str.to_s + "点   " + @text_dex + @hp_dex.to_s + "点"
  286.       temptext2 = @text_sp + @sp.to_s + "点   " + @text_agi + @hp_agi.to_s + "点   " + @text_int + @hp_int.to_s + "点"
  287.       @help_window.lvup_text(@text_hp_sc , @text_2 , temptext1 , temptext2)
  288.     when 1  # 增加力量
  289.       temptext1 = @text_hp + @str_hp.to_s + "点   " + @text_str + @str_str.to_s + "点   " + @text_dex + @str_dex.to_s + "点"
  290.       temptext2 = @text_sp + @str_sp.to_s + "点   " + @text_agi + @str_agi.to_s + "点   " + @text_int + @str_int.to_s + "点"
  291.       @help_window.lvup_text(@text_str_sc , @text_2 , temptext1 , temptext2)
  292.     when 2  # 增加灵巧
  293.       temptext1 = @text_hp + @dex_hp.to_s + "点   " + @text_str + @dex_agi.to_s + "点   " + @text_dex + @dex_dex.to_s + "点"
  294.       temptext2 = @text_sp + @dex_sp.to_s + "点   " + @text_agi + @dex_agi.to_s + "点   " + @text_int + @dex_int.to_s + "点"
  295.       @help_window.lvup_text(@text_dex_sc , @text_2 , temptext1 , temptext2)
  296.     when 3  # 增加速度
  297.       temptext1 = @text_hp + @agi_hp.to_s + "点   " + @text_str + @agi_str.to_s + "点   " + @text_dex + @agi_dex.to_s + "点"
  298.       temptext2 = @text_sp + @agi_sp.to_s + "点   " + @text_agi + @agi_agi.to_s + "点   " + @text_int + @agi_int.to_s + "点"
  299.       @help_window.lvup_text(@text_agi_sc , @text_2 , temptext1 , temptext2)
  300.     when 4  # 增加魔力
  301.       temptext1 = @text_hp + @int_hp.to_s + "点   " + @text_str + @int_str.to_s + "点   " + @text_dex + @int_dex.to_s + "点"
  302.       temptext2 = @text_sp + @int_sp.to_s + "点   " + @text_agi + @int_agi.to_s + "点   " + @text_int + @int_int.to_s + "点"
  303.       @help_window.lvup_text(@text_int_sc , @text_2 , temptext1 , temptext2)
  304.     when 5 # 保存设定
  305.       @help_window.lvup_text(@text_save)
  306.     when 6 # 点数重置
  307.       @help_window.lvup_text(@text_reset)     
  308.     end
  309.     #=============================================================
  310.     # 按下R与L换人的情况
  311.     #=============================================================      
  312.     if Input.trigger?(Input::R)
  313.       # 演奏光标 SE
  314.       $game_system.se_play($data_system.cursor_se)
  315.       # 移至下一位角色
  316.       @actor_index += 1
  317.       @actor_index %= $game_party.actors.size
  318.       # 切换到别的状态画面
  319.       $scene = Scene_Lvup.new(@cmd_index, @actor_index)
  320.       return
  321.     end
  322.     # 按下 L 键的情况下
  323.     if Input.trigger?(Input::L)
  324.       # 演奏光标 SE
  325.       $game_system.se_play($data_system.cursor_se)
  326.       # 移至上一位角色
  327.       @actor_index += $game_party.actors.size - 1
  328.       @actor_index %= $game_party.actors.size
  329.       # 切换到别的状态画面
  330.       $scene = Scene_Lvup.new(@cmd_index, @actor_index)
  331.       return
  332.     end
  333.   end  
  334.   #--------------------------------------------------------------------------
  335.   # ● 选项明暗判断
  336.   #--------------------------------------------------------------------------
  337.   def s_disable
  338.     # 判断剩余点数是否为0,如果为0,那么增加选项表示为暗色
  339.     if $point == 0
  340.       @command_window.disable_item(0)
  341.       @command_window.disable_item(1)
  342.       @command_window.disable_item(2)
  343.       @command_window.disable_item(3)
  344.       @command_window.disable_item(4)
  345.     else
  346.       @command_window.able_item(0)
  347.       @command_window.able_item(1)      
  348.       @command_window.able_item(2)
  349.       @command_window.able_item(3)
  350.       @command_window.able_item(4)
  351.     end
  352.   end
  353. end

  354. #==============================================================================
  355. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  356. #==============================================================================
  357. end
复制代码

版务信息:本贴由楼主自主结贴~
KOFIA CHAOS-MAX 混沌之战-极限 剧情2% 系统10% 卡片制作 - -刚出模版 自开了个BLOG报告进度……[http://blog.sina.com.cn/zhanghaozing]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
4 小时
注册时间
2007-6-22
帖子
137
2
 楼主| 发表于 2007-7-4 19:27:23 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
请教……

研究了论坛很多关于这方面的问题,还不是太明白……

比如我想让某职业升级获得5点,某职业升级获得6点

另一种想法:

想让某职业加1点力量得到2点力量附加能力值而某些职业加1点力量得到5点力量附加能力值

这样来突出职业与职业间的不同

我用的是这样的加点脚本
  1. if KKME::MENU_TYPE.include?(10)
  2. #==============================================================================
  3. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  4. #==============================================================================


  5. # 脚本使用设定:

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

  12. # 每增加一次点数,各项能力值的变化:70行开始
  13.                         
  14. # 使用方法介绍:

  15. # 本脚本不会取代默认
  16. # 也就是说,默认的升级还在,但可以用这个功能手动追加点数。
  17. # 如果你想纯粹使用手动加点(而升级不提升能力),只要把数据库中角色升级能力,
  18. # 1-99级全部等于一个相同数值就行了。

  19. # 加点场景中,page up,page down换人

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



  21. #==============================================================================
  22. # ■ Scene_lvup
  23. #------------------------------------------------------------------------------
  24. #  处理升级画面的类。
  25. #==============================================================================
  26. class Scene_Lvup
  27.   #--------------------------------------------------------------------------
  28.   # ● 初始化对像
  29.   #     actor_index : 角色索引
  30.   #     menu_index : 选项起始位置
  31.   #--------------------------------------------------------------------------
  32.   def initialize(index, actor_index = 0)
  33.     @actor_index = actor_index
  34.     @menu_index = 0
  35.     @cmd_index = index
  36.   end
  37.   #--------------------------------------------------------------------------
  38.   # ● 主处理
  39.   #--------------------------------------------------------------------------
  40.   def main
  41.     s1 = "增加体力"
  42.     s2 = "增加"+$data_system.words.str
  43.     s3 = "增加"+$data_system.words.dex
  44.     s4 = "增加"+$data_system.words.agi
  45.     s5 = "增加"+$data_system.words.int
  46.     s6 = "确认加点"
  47.     s7 = "点数重置"
  48.     @command_window = Window_Command.new(128, [s1, s2, s3, s4, s5, s6, s7])
  49.     @command_window.index = @menu_index
  50.     # 获取角色
  51.     @actor = $game_party.actors[@actor_index]
  52.     # 将角色的剩余点数带入
  53.     $point = $game_variables[@actor.id + LEVEL_UP_VARIABLE]   
  54.     # 初始化临时量
  55.     $temp_str = 0
  56.     $temp_dex = 0
  57.     $temp_agi = 0
  58.     $temp_int = 0
  59.     $temp_hp = 0
  60.     $temp_sp = 0
  61.     #=========================================================================
  62.     # 特别提示:这些设置也可以使用小数,但是可能出现0值意外错误
  63.     #  (各种编程语言都有这种意外),建议还是使用整数,正负不限
  64.     #=========================================================================
  65.     # 每提升一次力量,提升多少附加能力
  66.     #=========================================================================
  67.     @str_hp = 0     # 每提升一次力量附加提升多少HP
  68.     @str_sp = 0     # 每提升一次力量附加提升多少SP
  69.     @str_dex = 0    # 每提升一次力量附加提升多少灵巧
  70.     @str_agi = 0    # 每提升一次力量附加提升多少速度
  71.     @str_int = 0    # 每提升一次力量附加提升多少魔力
  72.     @str_str = 1    # 每提升一次力量附加提升多少力量
  73.     #=========================================================================
  74.     # 每提升一次灵巧,提升多少附加能力
  75.     #=========================================================================
  76.     @dex_hp = 0     # 每提升一次灵巧附加提升多少HP
  77.     @dex_sp = 0     # 每提升一次灵巧附加提升多少SP
  78.     @dex_str = 1    # 每提升一次灵巧附加提升多少力量
  79.     @dex_agi = 0    # 每提升一次灵巧附加提升多少速度
  80.     @dex_int = 0    # 每提升一次灵巧附加提升多少魔力
  81.     @dex_dex = 0    # 每提升一次灵巧附加提升多少灵巧
  82.     #=========================================================================
  83.     # 每提升一次速度,提升多少附加能力
  84.     #=========================================================================
  85.     @agi_hp = 0     # 每提升一次速度附加提升多少HP
  86.     @agi_sp = 0     # 每提升一次速度附加提升多少SP
  87.     @agi_str = 0    # 每提升一次速度附加提升多少力量
  88.     @agi_dex = 0    # 每提升一次速度附加提升多少灵巧
  89.     @agi_int = 0    # 每提升一次速度附加提升多少魔力
  90.     @agi_agi = 1    # 每提升一次速度附加提升多少速度
  91.     #=========================================================================
  92.     # 每提升一次魔力,提升多少附加能力
  93.     #=========================================================================
  94.     @int_hp = 0     # 每提升一次魔力附加提升多少HP
  95.     @int_sp = 5    # 每提升一次魔力附加提升多少SP
  96.     @int_str = 0   # 每提升一次魔力附加提升多少力量
  97.     @int_dex = 0   # 每提升一次魔力附加提升多少灵巧
  98.     @int_agi = 0   # 每提升一次魔力附加提升多少速度
  99.     @int_int = 1   # 每提升一次魔力附加提升多少魔力
  100.     #=========================================================================
  101.     # 每提升一次体力,提升多少附加能力
  102.     #=========================================================================
  103.     @hp = 50       # 每提升一次体力提升多少HP
  104.     @sp = 0       # 每提升一次体力提升多少SP
  105.     @hp_str = 0   # 每提升一次体力提升多少力量
  106.     @hp_dex = 0   # 每提升一次体力提升多少速度
  107.     @hp_agi = 0   # 每提升一次体力提升多少灵巧
  108.     @hp_int = 0   # 每提升一次体力提升多少魔力   
  109.     # 定义说明文字
  110.     @text_hp_sc = "体力可以增加生存的能力,可以延长生存的时间!"
  111.     @text_str_sc = $data_system.words.str + "可以增加物理攻击和物理技能的威力!"
  112.     @text_dex_sc = $data_system.words.dex + "可以提高攻击的命中率和必杀!"
  113.     @text_agi_sc = $data_system.words.agi + "可以提高回避、命中、逃跑成功率!"
  114.     @text_int_sc = $data_system.words.int + "可以提高魔法的效果,可以增加1点魔法!"
  115.     @text_save = "保存分配情况并返回游戏"
  116.     @text_reset= "重新分配能力点数"
  117.     @text_2 = "每增加一次此项能力值,可以提升能力值"
  118.     @text_hp = "最大" + $data_system.words.hp + "值"
  119.     @text_sp = "最大" + $data_system.words.sp + "值"
  120.     @text_str = "最大" + $data_system.words.str + "值"
  121.     @text_dex = "最大" + $data_system.words.dex + "值"
  122.     @text_agi = "最大" + $data_system.words.agi + "值"
  123.     @text_int = "最大" + $data_system.words.int + "值"
  124.     s_disable
  125.     # 生成状态窗口
  126.     @lvup_window = Window_Lvup.new(@actor)
  127.     @lvup_window.x = 128
  128.     @lvup_window.y = 0   
  129.     # 生成帮助窗口并初始化帮助文本
  130.     @help_window = Window_Lvup_Help.new   
  131.     # 执行过渡
  132.     Graphics.transition(40, "Graphics/Transitions/" + $data_system.battle_transition)
  133.     # 主循环
  134.     loop do
  135.       # 刷新游戏画面
  136.       Graphics.update
  137.       # 刷新输入信息
  138.       Input.update
  139.       # 刷新画面
  140.       update
  141.       # 如果切换画面就中断循环
  142.       if $scene != self
  143.         break
  144.       end
  145.     end
  146.     # 准备过渡
  147.     Graphics.freeze
  148.     # 释放窗口
  149.     @command_window.dispose
  150.     @lvup_window.dispose
  151.     @help_window.dispose
  152.   end
  153.   #--------------------------------------------------------------------------
  154.   # ● 刷新画面
  155.   #--------------------------------------------------------------------------
  156.   def update
  157.     # 刷新窗口
  158.     @command_window.update
  159.     # 选项明暗判断(因为太消耗资源,所以屏蔽掉了)
  160.     s_disable
  161.     @lvup_window.update
  162.     #=============================================================
  163.     # 按下 B 键的情况下
  164.     #=============================================================
  165.     if Input.trigger?(Input::B)
  166.       # 演奏取消 SE
  167.       $game_system.se_play($data_system.cancel_se)
  168.       # 切换到地图画面
  169.       $scene = Scene_Menu.new(@cmd_index)
  170.       return
  171.     end
  172.     #=============================================================
  173.     # 按下 C 键的情况下
  174.     #=============================================================
  175.     if Input.trigger?(Input::C)      
  176.       if @command_window.index == 5
  177.           # 演奏确定 SE
  178.         $game_system.se_play($data_system.decision_se)
  179.         # 将角色的剩余点数带回
  180.         $game_variables[@actor.id + LEVEL_UP_VARIABLE] = $point
  181.         # 将角色点数实际加上
  182.         @actor.str += $temp_str
  183.         @actor.dex += $temp_dex
  184.         @actor.agi += $temp_agi
  185.         @actor.int += $temp_int
  186.         @actor.maxhp += $temp_hp
  187.         @actor.maxsp += $temp_sp
  188.         # 切换到地图画面
  189.         $scene = Scene_Menu.new(@cmd_index)
  190.         return
  191.       end
  192.       if @command_window.index == 6
  193.           # 演奏确定 SE
  194.         $game_system.se_play($data_system.cancel_se)
  195.           # 将角色的剩余点数带入
  196.         $point = $game_variables[@actor.id + LEVEL_UP_VARIABLE]   
  197.           # 初始化临时量
  198.         $temp_str = 0
  199.         $temp_dex = 0
  200.         $temp_agi = 0
  201.         $temp_int = 0
  202.         $temp_hp = 0
  203.         $temp_sp = 0
  204.         @lvup_window.refresh
  205.         return
  206.       end
  207.       if $point == 0
  208.         # 演奏冻结 SE
  209.         $game_system.se_play($data_system.buzzer_se)
  210.         return
  211.       end
  212.       case @command_window.index
  213.       when 0
  214.         # 演奏确定 SE
  215.         $game_system.se_play($data_system.decision_se)
  216.         $temp_hp += @hp
  217.         $temp_sp += @sp
  218.         $temp_str += @hp_str
  219.         $temp_dex += @hp_dex
  220.         $temp_agi += @hp_agi
  221.         $temp_int += @hp_int
  222.         $point -= 1
  223.         @lvup_window.refresh
  224.         s_disable
  225.         return
  226.       when 1
  227.         # 演奏确定 SE
  228.         $game_system.se_play($data_system.decision_se)
  229.         $temp_str += @str_str
  230.         $temp_hp += @str_hp
  231.         $temp_sp += @str_sp
  232.         $temp_dex += @str_dex
  233.         $temp_agi += @str_agi
  234.         $temp_int += @str_int
  235.         $point -= 1
  236.         @lvup_window.refresh
  237.         s_disable
  238.         return
  239.       when 2
  240.         # 演奏确定 SE
  241.         $game_system.se_play($data_system.decision_se)
  242.         $temp_dex += @dex_dex
  243.         $temp_hp += @dex_hp
  244.         $temp_sp += @dex_sp
  245.         $temp_str += @dex_str
  246.         $temp_agi += @dex_agi
  247.         $temp_int += @dex_int
  248.         $point -= 1
  249.         @lvup_window.refresh
  250.         s_disable
  251.         return
  252.       when 3
  253.         # 演奏确定 SE
  254.         $game_system.se_play($data_system.decision_se)
  255.         $temp_agi += @agi_agi
  256.         $temp_hp += @agi_hp
  257.         $temp_sp += @agi_sp
  258.         $temp_str += @agi_str
  259.         $temp_dex += @agi_dex
  260.         $temp_int += @agi_int
  261.         $point -= 1
  262.         @lvup_window.refresh
  263.         s_disable
  264.         return
  265.       when 4
  266.         # 演奏确定 SE
  267.         $game_system.se_play($data_system.decision_se)
  268.         $temp_int += @int_int
  269.         $temp_hp += @int_hp
  270.         $temp_sp += @int_sp
  271.         $temp_str += @int_str
  272.         $temp_dex += @int_dex
  273.         $temp_agi += @int_agi
  274.         $point -= 1
  275.         @lvup_window.refresh
  276.         s_disable
  277.         return
  278.       end
  279.     end
  280.     #=============================================================
  281.     # 什么都没有按下的情况
  282.     #=============================================================
  283.     case @command_window.index   
  284.     when 0  # 增加体力
  285.       temptext1 = @text_hp + @hp.to_s + "点   " + @text_str + @hp_str.to_s + "点   " + @text_dex + @hp_dex.to_s + "点"
  286.       temptext2 = @text_sp + @sp.to_s + "点   " + @text_agi + @hp_agi.to_s + "点   " + @text_int + @hp_int.to_s + "点"
  287.       @help_window.lvup_text(@text_hp_sc , @text_2 , temptext1 , temptext2)
  288.     when 1  # 增加力量
  289.       temptext1 = @text_hp + @str_hp.to_s + "点   " + @text_str + @str_str.to_s + "点   " + @text_dex + @str_dex.to_s + "点"
  290.       temptext2 = @text_sp + @str_sp.to_s + "点   " + @text_agi + @str_agi.to_s + "点   " + @text_int + @str_int.to_s + "点"
  291.       @help_window.lvup_text(@text_str_sc , @text_2 , temptext1 , temptext2)
  292.     when 2  # 增加灵巧
  293.       temptext1 = @text_hp + @dex_hp.to_s + "点   " + @text_str + @dex_agi.to_s + "点   " + @text_dex + @dex_dex.to_s + "点"
  294.       temptext2 = @text_sp + @dex_sp.to_s + "点   " + @text_agi + @dex_agi.to_s + "点   " + @text_int + @dex_int.to_s + "点"
  295.       @help_window.lvup_text(@text_dex_sc , @text_2 , temptext1 , temptext2)
  296.     when 3  # 增加速度
  297.       temptext1 = @text_hp + @agi_hp.to_s + "点   " + @text_str + @agi_str.to_s + "点   " + @text_dex + @agi_dex.to_s + "点"
  298.       temptext2 = @text_sp + @agi_sp.to_s + "点   " + @text_agi + @agi_agi.to_s + "点   " + @text_int + @agi_int.to_s + "点"
  299.       @help_window.lvup_text(@text_agi_sc , @text_2 , temptext1 , temptext2)
  300.     when 4  # 增加魔力
  301.       temptext1 = @text_hp + @int_hp.to_s + "点   " + @text_str + @int_str.to_s + "点   " + @text_dex + @int_dex.to_s + "点"
  302.       temptext2 = @text_sp + @int_sp.to_s + "点   " + @text_agi + @int_agi.to_s + "点   " + @text_int + @int_int.to_s + "点"
  303.       @help_window.lvup_text(@text_int_sc , @text_2 , temptext1 , temptext2)
  304.     when 5 # 保存设定
  305.       @help_window.lvup_text(@text_save)
  306.     when 6 # 点数重置
  307.       @help_window.lvup_text(@text_reset)     
  308.     end
  309.     #=============================================================
  310.     # 按下R与L换人的情况
  311.     #=============================================================      
  312.     if Input.trigger?(Input::R)
  313.       # 演奏光标 SE
  314.       $game_system.se_play($data_system.cursor_se)
  315.       # 移至下一位角色
  316.       @actor_index += 1
  317.       @actor_index %= $game_party.actors.size
  318.       # 切换到别的状态画面
  319.       $scene = Scene_Lvup.new(@cmd_index, @actor_index)
  320.       return
  321.     end
  322.     # 按下 L 键的情况下
  323.     if Input.trigger?(Input::L)
  324.       # 演奏光标 SE
  325.       $game_system.se_play($data_system.cursor_se)
  326.       # 移至上一位角色
  327.       @actor_index += $game_party.actors.size - 1
  328.       @actor_index %= $game_party.actors.size
  329.       # 切换到别的状态画面
  330.       $scene = Scene_Lvup.new(@cmd_index, @actor_index)
  331.       return
  332.     end
  333.   end  
  334.   #--------------------------------------------------------------------------
  335.   # ● 选项明暗判断
  336.   #--------------------------------------------------------------------------
  337.   def s_disable
  338.     # 判断剩余点数是否为0,如果为0,那么增加选项表示为暗色
  339.     if $point == 0
  340.       @command_window.disable_item(0)
  341.       @command_window.disable_item(1)
  342.       @command_window.disable_item(2)
  343.       @command_window.disable_item(3)
  344.       @command_window.disable_item(4)
  345.     else
  346.       @command_window.able_item(0)
  347.       @command_window.able_item(1)      
  348.       @command_window.able_item(2)
  349.       @command_window.able_item(3)
  350.       @command_window.able_item(4)
  351.     end
  352.   end
  353. end

  354. #==============================================================================
  355. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  356. #==============================================================================
  357. end
复制代码

版务信息:本贴由楼主自主结贴~
KOFIA CHAOS-MAX 混沌之战-极限 剧情2% 系统10% 卡片制作 - -刚出模版 自开了个BLOG报告进度……[http://blog.sina.com.cn/zhanghaozing]

Lv3.寻梦者 (暗夜天使)

精灵族の天使

梦石
0
星屑
1707
在线时间
3039 小时
注册时间
2007-3-16
帖子
33731

开拓者贵宾

3
发表于 2007-7-5 00:33:13 | 只看该作者
应该是这个部分附加条件分歧吧?
#=========================================================================
    # 每提升一次力量,提升多少附加能力
    #=========================================================================
    @str_hp = 0     # 每提升一次力量附加提升多少HP
    @str_sp = 0     # 每提升一次力量附加提升多少SP
    @str_dex = 0    # 每提升一次力量附加提升多少灵巧
    @str_agi = 0    # 每提升一次力量附加提升多少速度
    @str_int = 0    # 每提升一次力量附加提升多少魔力
    @str_str = 1    # 每提升一次力量附加提升多少力量
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
15 小时
注册时间
2007-2-18
帖子
2464
4
发表于 2007-7-5 01:05:56 | 只看该作者
精灵回来啦,怪早的
LZ用条件分歧再按LS的方法就好
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
4 小时
注册时间
2007-6-22
帖子
137
5
 楼主| 发表于 2007-7-5 01:22:18 | 只看该作者
出现了NAME ERROR呢,我写的是

if class_id == xx
else
end
KOFIA CHAOS-MAX 混沌之战-极限 剧情2% 系统10% 卡片制作 - -刚出模版 自开了个BLOG报告进度……[http://blog.sina.com.cn/zhanghaozing]
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
15 小时
注册时间
2007-2-18
帖子
2464
6
发表于 2007-7-5 01:23:01 | 只看该作者
class.id
开始没看出来啊
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
4 小时
注册时间
2007-6-22
帖子
137
7
 楼主| 发表于 2007-7-5 01:26:50 | 只看该作者
这个错误SyntaxError……

我改成了
if class.id == 50
  LEVEL_UP_POINT = 5       # 每升一级所增加的点数
else
  LEVEL_UP_POINT = 6       # 每升一级所增加的点数
end
KOFIA CHAOS-MAX 混沌之战-极限 剧情2% 系统10% 卡片制作 - -刚出模版 自开了个BLOG报告进度……[http://blog.sina.com.cn/zhanghaozing]
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
15 小时
注册时间
2007-2-18
帖子
2464
8
发表于 2007-7-5 01:29:50 | 只看该作者
那脚本我没怎么看
但感觉应该是
LEVEL_UP_POINT += 5

个人感觉而已
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
4 小时
注册时间
2007-6-22
帖子
137
9
 楼主| 发表于 2007-7-5 01:34:09 | 只看该作者
不过他显示的语法错误应该是
if class.id == 50
这一行呢~?
KOFIA CHAOS-MAX 混沌之战-极限 剧情2% 系统10% 卡片制作 - -刚出模版 自开了个BLOG报告进度……[http://blog.sina.com.cn/zhanghaozing]
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
15 小时
注册时间
2007-2-18
帖子
2464
10
发表于 2007-7-5 01:40:11 | 只看该作者

最好有个高人来回答啊
应该是
for i in $Actor(表示队伍中的人)
if $Actor.class_id ==50

不过好象又不对的
这个我不清楚
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2025-9-21 19:41

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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