查看: 3156|回复: 8

[已经解决] 汪汪大神,求在帮一下下

[复制链接]
梦石
0
星屑
90
在线时间
186 小时
注册时间
2010-6-24
回帖
85
发表于 2015-10-19 22:24:18 | 显示全部楼层 |阅读模式
悬赏10星屑已解决
本帖最后由 fjjghj1 于 2015-10-19 23:20 编辑

不好意思再次麻烦你,我只有10VIP了。。。
http://pan.baidu.com/s/1c0G12oC   

上次这个工程(按照您说的地方修改了,并且这个工程可以加点)。。  还是截图脚本的问题。。。

这次发现 截图脚本好像和加点脚本有点冲突?
角色加点的时候 没有保存进度可以正常加点。。
一点保存进度在读取进度的话,之前没有加的点会变得加不了了。。请问这个该怎么办啊。谢谢您的帮忙。。
@汪汪

最佳答案

查看完整内容

建一个新工程,把这个替换掉就可以.这样那个工程的脚本就变成我发的那个了. 当然也可以直接复制到你那个原工程里,不过保险起见不要这样....万一有错误大概无法恢复吧.

点评

好的麻烦您了  发表于 2015-10-20 11:26
晚上才有空。  发表于 2015-10-20 08:23
啊大神,我搜索了一下,,发现$开头的有好多。。比如 # 将角色的剩余点数带入 $point = $game_variables[@actor.id + LEVEL_UP_VARIABLE] 之类的。还有其他的..  发表于 2015-10-19 23:44
不不,总是麻烦你 真不好意思,,那个我今天喝多了,明天要出门,看不到呢,可以麻烦您帮我看看么?不行的话我明天自己看看有没有,谢谢您啊....  发表于 2015-10-19 23:42
话说能不能不要叫大神!_(:з」∠)_我只是初学者。  发表于 2015-10-19 23:30
梦石
0
星屑
1232
在线时间
1017 小时
注册时间
2011-4-30
回帖
1464
发表于 2015-10-19 22:24:19 | 显示全部楼层
本帖最后由 汪汪 于 2015-10-20 21:45 编辑

BaiduShurufa_2015-10-20_20-33-39.png BaiduShurufa_2015-10-20_20-34-0.png
建一个新工程,把这个替换掉就可以.这样那个工程的脚本就变成我发的那个了.
当然也可以直接复制到你那个原工程里,不过保险起见不要这样....万一有错误大概无法恢复吧.

Scripts.rxdata (511.09 KB, 下载次数: 80)
回复

使用道具 举报

梦石
0
星屑
1232
在线时间
1017 小时
注册时间
2011-4-30
回帖
1464
发表于 2015-10-20 17:20:23 | 显示全部楼层
本帖最后由 汪汪 于 2015-10-20 17:23 编辑

在★Game_Temp 里的

  1.     $db_point = {}
  2.     $db_point_old = {}
  3.     $db_point_enable = {}
  4.     for i in 1 ... $data_actors.size
  5.       $db_point[i] = [0,0,0,0,0,0]
  6.       $db_point_old[i] = [0,0,0,0,0]
  7.       $db_point_enable[i] = [true,true,true,true,true]
  8.     end
复制代码

删除

★Game_System下面
添加

  1.   attr_accessor :db_point_old
  2.   attr_accessor :db_point_enable     
  3.   attr_accessor :db_point
复制代码

def initialize 下添加

  1.     @db_point = {}
  2.     @db_point_old = {}
  3.     @db_point_enable = {}
  4.     for i in 1 ... $data_actors.size
  5.       @db_point[i] = [0,0,0,0,0,0]
  6.       @db_point_old[i] = [0,0,0,0,0]
  7.       @db_point_enable[i] = [true,true,true,true,true]
  8.     end
复制代码

也就是这样
点击展开/收起
  1. #==============================================================================
  2. # ■ Game_System
  3. #------------------------------------------------------------------------------
  4. #  处理系统附属数据的类。也可执行诸如 BGM 管理之类的功能。本类的实例请参考
  5. # $game_system 。
  6. #==============================================================================

  7. class Game_System
  8.   #--------------------------------------------------------------------------
  9.   # ● 定义实例变量
  10.   #--------------------------------------------------------------------------
  11.   attr_reader   :map_interpreter          # 地图事件用解释程序
  12.   attr_reader   :battle_interpreter       # 战斗事件用解释程序
  13.   attr_accessor :timer                    # 计时器
  14.   attr_accessor :timer_working            # 计时器执行中的标志
  15.   attr_accessor :save_disabled            # 禁止存档
  16.   attr_accessor :menu_disabled            # 禁止菜单
  17.   attr_accessor :encounter_disabled       # 禁止遇敌
  18.   attr_accessor :message_position         # 文章选项 显示位置
  19.   attr_accessor :message_frame            # 文章选项 窗口外关
  20.   attr_accessor :save_count               # 存档次数
  21.   attr_accessor :magic_number             # 魔法编号
  22.   attr_accessor :got                      # 已获取的GET的ID
  23.         
  24.         attr_accessor :db_point_old
  25.   attr_accessor :db_point_enable     
  26.   attr_accessor :db_point
  27.   #--------------------------------------------------------------------------
  28.   # ● 初始化对像
  29.   #--------------------------------------------------------------------------
  30.   def initialize
  31.     @map_interpreter = Interpreter.new(0, true)
  32.     @battle_interpreter = Interpreter.new(0, false)
  33.     @timer = 0
  34.     @timer_working = false
  35.     @save_disabled = false
  36.     @menu_disabled = false
  37.     @encounter_disabled = false
  38.     @message_position = 2
  39.     @message_frame = 0
  40.     @save_count = 0
  41.     @magic_number = 0
  42.     @got = []
  43.                
  44.     @db_point = {}
  45.     @db_point_old = {}
  46.     @db_point_enable = {}
  47.     for i in 1 ... $data_actors.size
  48.       @db_point[i] = [0,0,0,0,0,0]
  49.       @db_point_old[i] = [0,0,0,0,0]
  50.       @db_point_enable[i] = [true,true,true,true,true]
  51.     end
  52.   end
  53.   #--------------------------------------------------------------------------
  54.   # ● 演奏 BGM
  55.   #     bgm : 演奏的 BGM
  56.   #--------------------------------------------------------------------------
  57.   def bgm_play(bgm)
  58.     @playing_bgm = bgm
  59.     if bgm != nil and bgm.name != ""
  60.       Audio.bgm_play("Audio/BGM/" + bgm.name, bgm.volume, bgm.pitch)
  61.     else
  62.       Audio.bgm_stop
  63.     end
  64.     Graphics.frame_reset
  65.   end
  66.   #--------------------------------------------------------------------------
  67.   # ● 停止 BGM
  68.   #--------------------------------------------------------------------------
  69.   def bgm_stop
  70.     Audio.bgm_stop
  71.   end
  72.   #--------------------------------------------------------------------------
  73.   # ● BGM 的淡出
  74.   #     time : 淡出时间 (秒)
  75.   #--------------------------------------------------------------------------
  76.   def bgm_fade(time)
  77.     @playing_bgm = nil
  78.     Audio.bgm_fade(time * 1000)
  79.   end
  80.   #--------------------------------------------------------------------------
  81.   # ● 记忆 BGM
  82.   #--------------------------------------------------------------------------
  83.   def bgm_memorize
  84.     @memorized_bgm = @playing_bgm
  85.   end
  86.   #--------------------------------------------------------------------------
  87.   # ● 还原 BGM
  88.   #--------------------------------------------------------------------------
  89.   def bgm_restore
  90.     bgm_play(@memorized_bgm)
  91.   end
  92.   #--------------------------------------------------------------------------
  93.   # ● 演奏 BGS
  94.   #     bgs : 演奏的 BGS
  95.   #--------------------------------------------------------------------------
  96.   def bgs_play(bgs)
  97.     @playing_bgs = bgs
  98.     if bgs != nil and bgs.name != ""
  99.       Audio.bgs_play("Audio/BGS/" + bgs.name, bgs.volume, bgs.pitch)
  100.     else
  101.       Audio.bgs_stop
  102.     end
  103.     Graphics.frame_reset
  104.   end
  105.   #--------------------------------------------------------------------------
  106.   # ● 停止 BGM
  107.   #--------------------------------------------------------------------------
  108.   def bgs_stop
  109.     Audio.bgs_stop
  110.   end
  111.   #--------------------------------------------------------------------------
  112.   # ● BGS 的淡出
  113.   #     time : 淡出时间 (秒)
  114.   #--------------------------------------------------------------------------
  115.   def bgs_fade(time)
  116.     @playing_bgs = nil
  117.     Audio.bgs_fade(time * 1000)
  118.   end
  119.   #--------------------------------------------------------------------------
  120.   # ● 记忆 BGS
  121.   #--------------------------------------------------------------------------
  122.   def bgs_memorize
  123.     @memorized_bgs = @playing_bgs
  124.   end
  125.   #--------------------------------------------------------------------------
  126.   # ● 还原 BGS
  127.   #--------------------------------------------------------------------------
  128.   def bgs_restore
  129.     bgs_play(@memorized_bgs)
  130.   end
  131.   #--------------------------------------------------------------------------
  132.   # ● ME 的演奏
  133.   #     me : 演奏的 ME
  134.   #--------------------------------------------------------------------------
  135.   def me_play(me)
  136.     if me != nil and me.name != ""
  137.       Audio.me_play("Audio/ME/" + me.name, me.volume, me.pitch)
  138.     else
  139.       Audio.me_stop
  140.     end
  141.     Graphics.frame_reset
  142.   end
  143.   #--------------------------------------------------------------------------
  144.   # ● SE 的演奏
  145.   #     se : 演奏的 SE
  146.   #--------------------------------------------------------------------------
  147.   def se_play(se)
  148.     if se != nil and se.name != ""
  149.       Audio.se_play("Audio/SE/" + se.name, se.volume, se.pitch)
  150.     end
  151.   end
  152.   #--------------------------------------------------------------------------
  153.   # ● 停止 SE
  154.   #--------------------------------------------------------------------------
  155.   def se_stop
  156.     Audio.se_stop
  157.   end
  158.   #--------------------------------------------------------------------------
  159.   # ● 获取演奏中 BGM
  160.   #--------------------------------------------------------------------------
  161.   def playing_bgm
  162.     return @playing_bgm
  163.   end
  164.   #--------------------------------------------------------------------------
  165.   # ● 获取演奏中 BGS
  166.   #--------------------------------------------------------------------------
  167.   def playing_bgs
  168.     return @playing_bgs
  169.   end
  170.   #--------------------------------------------------------------------------
  171.   # ● 获取窗口外观的文件名
  172.   #--------------------------------------------------------------------------
  173.   def windowskin_name
  174.     if @windowskin_name == nil
  175.       return $data_system.windowskin_name
  176.     else
  177.       return @windowskin_name
  178.     end
  179.   end
  180.   #--------------------------------------------------------------------------
  181.   # ● 设置窗口外观的文件名
  182.   #     windowskin_name : 新的窗口外观文件名
  183.   #--------------------------------------------------------------------------
  184.   def windowskin_name=(windowskin_name)
  185.     @windowskin_name = windowskin_name
  186.   end
  187.   #--------------------------------------------------------------------------
  188.   # ● 获取战斗 BGM
  189.   #--------------------------------------------------------------------------
  190.   def battle_bgm
  191.     if @battle_bgm == nil
  192.       return $data_system.battle_bgm
  193.     else
  194.       return @battle_bgm
  195.     end
  196.   end
  197.   #--------------------------------------------------------------------------
  198.   # ● 设置战斗 BGM
  199.   #     battle_bgm : 新的战斗 BGM
  200.   #--------------------------------------------------------------------------
  201.   def battle_bgm=(battle_bgm)
  202.     @battle_bgm = battle_bgm
  203.   end
  204.   #--------------------------------------------------------------------------
  205.   # ● 获取战斗结束的 BGM
  206.   #--------------------------------------------------------------------------
  207.   def battle_end_me
  208.     if @battle_end_me == nil
  209.       return $data_system.battle_end_me
  210.     else
  211.       return @battle_end_me
  212.     end
  213.   end
  214.   #--------------------------------------------------------------------------
  215.   # ● 设置战斗结束的 BGM
  216.   #     battle_end_me : 新的战斗结束 BGM
  217.   #--------------------------------------------------------------------------
  218.   def battle_end_me=(battle_end_me)
  219.     @battle_end_me = battle_end_me
  220.   end
  221.   #--------------------------------------------------------------------------
  222.   # ● 刷新画面
  223.   #--------------------------------------------------------------------------
  224.   def update
  225.     # 计时器减 1
  226.     if @timer_working and @timer > 0
  227.       @timer -= 1
  228.     end
  229.   end
  230. end
复制代码


然后搜素所有的  $db_point  替换为 $game_system.db_point
回复

使用道具 举报

梦石
0
星屑
90
在线时间
186 小时
注册时间
2010-6-24
回帖
85
 楼主| 发表于 2015-10-20 18:11:35 | 显示全部楼层
汪汪 发表于 2015-10-20 17:20
在★Game_Temp 里的

    $db_point = {}

按照大大说的改了,Scene_Lvup里面很多db_point,改了之后就报错了。
QQ图片20151020181108.png

  1. #==============================================================================
  2. # ■ Scene_lvup
  3. #------------------------------------------------------------------------------
  4. #  处理升级画面的类。
  5. #==============================================================================
  6. class Scene_Lvup
  7.   #--------------------------------------------------------------------------
  8.   # ● 初始化对像
  9.   #     actor_index : 角色索引
  10.   #     menu_index : 选项起始位置
  11.   #--------------------------------------------------------------------------
  12.   def initialize(actor_index = 0 , menu_index = 0)
  13.     @actor_index = actor_index
  14.     @menu_index = menu_index
  15.   end
  16.   #--------------------------------------------------------------------------
  17.   # ● 主处理
  18.   #--------------------------------------------------------------------------
  19.   def main
  20.     @系统菜单 = Sprite.new
  21.     @系统菜单.bitmap = RPG::Cache.picture("系统菜单整体")
  22.     @系统菜单.visible = true
  23.     @系统菜单.x = 0
  24.     @系统菜单.y = 453
  25.     @系统菜单.z = 1
  26.     @a = Sprite.new
  27.     @a.bitmap = Bitmap.new("Graphics/Pictures/菜单类/加点菜单.png")
  28.     @a.opacity=255
  29.     s1 = ""
  30.     s2 = ""
  31.     s3 = ""
  32.     s4 = ""
  33.     s5 = ""
  34.     s6 = ""
  35.     s7 = ""
  36.     @command_window = Window_Commandjd.new(128, [s1, s2, s3, s4, s5, s6, s7])
  37.     @command_window.index = @menu_index
  38.     @command_window.x = 185
  39.     @command_window.y = 94#416
  40.     # 获取角色
  41.     @actor = $game_party.actors[@actor_index]
  42.     # 将角色的剩余点数带入
  43.     $point = $game_variables[@actor.id + LEVEL_UP_VARIABLE]
  44.     # 初始化临时量
  45.     $temp_str = 0
  46.     $temp_dex = 0
  47.     $temp_agi = 0
  48.     $temp_int = 0
  49.     $temp_hp = 0
  50.     $temp_sp = 0
  51.     #=========================================================================
  52.     # 特别提示:这些设置也可以使用小数,但是可能出现0值意外错误
  53.     #  (各种编程语言都有这种意外),建议还是使用整数,正负不限
  54.     #=========================================================================
  55.     # 每提升一次力量,提升多少附加能力
  56.     #=========================================================================
  57.     @str_hp = 0     # 每提升一次力量附加提升多少HP
  58.     @str_sp = 0     # 每提升一次力量附加提升多少SP
  59.     @str_dex = 0    # 每提升一次力量附加提升多少灵巧
  60.     @str_agi = 0.1    # 每提升一次力量附加提升多少速度
  61.     @str_int = 0      # 每提升一次力量附加提升多少魔力
  62.     @str_str = 2    # 每提升一次力量附加提升多少力量
  63.     #=========================================================================
  64.     # 每提升一次灵巧,提升多少附加能力
  65.     #=========================================================================
  66.     @dex_hp = 10     # 每提升一次速度附加提升多少HP
  67.     @dex_sp = 0     # 每提升一次速度附加提升多少SP
  68.     @dex_str = 0    # 每提升一次速度附加提升多少力量
  69.     @dex_dex = 2    # 每提升一次速度附加提升多少灵巧
  70.     @dex_int = 0    # 每提升一次速度附加提升多少魔力
  71.     @dex_agi = 0    # 每提升一次速度附加提升多少速度
  72.     #=========================================================================
  73.     # 每提升一次速度,提升多少附加能力
  74.     #=========================================================================
  75.     @agi_hp = 0     # 每提升一次速度附加提升多少HP
  76.     @agi_sp = 0     # 每提升一次速度附加提升多少SP
  77.     @agi_str = 0    # 每提升一次速度附加提升多少力量
  78.     @agi_dex = 0  # 每提升一次速度附加提升多少灵巧
  79.     @agi_int = 0.1    # 每提升一次速度附加提升多少魔力
  80.     @agi_agi = 2    # 每提升一次速度附加提升多少速度
  81.     #=========================================================================
  82.     # 每提升一次魔力,提升多少附加能力
  83.     #=========================================================================
  84.     @int_hp = 0     # 每提升一次魔力附加提升多少HP
  85.     @int_sp = 60    # 每提升一次魔力附加提升多少SP
  86.     @int_str = 0   # 每提升一次魔力附加提升多少力量
  87.     @int_dex = 0   # 每提升一次魔力附加提升多少灵巧
  88.     @int_agi = 0   # 每提升一次魔力附加提升多少速度
  89.     @int_int = 2   # 每提升一次魔力附加提升多少魔力
  90.     #=========================================================================
  91.     # 每提升一次体力,提升多少附加能力
  92.     #=========================================================================
  93.     @hp = 60       # 每提升一次体力提升多少HP
  94.     @sp = 10       # 每提升一次体力提升多少SP
  95.     @hp_str = 0   # 每提升一次体力提升多少力量
  96.     @hp_dex = 0   # 每提升一次体力提升多少速度
  97.     @hp_agi = 0   # 每提升一次体力提升多少灵巧
  98.     @hp_int = 0   # 每提升一次体力提升多少魔力   
  99.     # 定义说明文字
  100.     @text_hp_sc = "体力可以增加生存的能力,可以延长生存的时间!"
  101.     @text_str_sc = $data_system.words.str + "可以增加物理攻击和物理技能的威力!"
  102.     @text_dex_sc = $data_system.words.dex + "可以提高攻击的命中率和必杀!和普通防御"
  103.     @text_agi_sc = $data_system.words.agi + "可以提高回避、命中、逃跑成功率!"
  104.     @text_int_sc = $data_system.words.int + "可以提高魔法的效果,可以增加1点魔法!和魔法防御"
  105.     @text_save = "保存分配情况并返回游戏"
  106.     @text_reset= "重新分配能力点数"
  107.     @text_2 = "每增加一次此项能力值,可以提升能力值"
  108.     @text_hp = "最大" + $data_system.words.hp + "值"
  109.     @text_sp = "最大" + $data_system.words.sp + "值"
  110.     @text_str = "最大" + $data_system.words.str + "值"
  111.     @text_dex = "最大" + $data_system.words.dex + "值"
  112.     @text_agi = "最大" + $data_system.words.agi + "值"
  113.     @text_int = "最大" + $data_system.words.int + "值"
  114.     s_disable
  115.     # 生成状态窗口
  116.     @lvup_window = Window_Lvup.new(@actor)
  117.     @lvup_window.x = 0
  118.     @lvup_window.y = 0     
  119.     # 执行过渡
  120.     Graphics.transition
  121.     # 主循环
  122.     loop do
  123.       # 刷新游戏画面
  124.       Graphics.update
  125.       # 刷新输入信息
  126.       Input.update
  127.       # 刷新画面
  128.       update
  129.       # 如果切换画面就中断循环
  130.       if $scene != self
  131.         break
  132.       end
  133.     end
  134.     # 准备过渡
  135.     Graphics.freeze
  136.     # 释放窗口
  137.     @command_window.dispose
  138.     @lvup_window.dispose
  139.     @a.dispose
  140.     @系统菜单.dispose
  141.   end
  142.   #--------------------------------------------------------------------------
  143.   # ● 刷新画面
  144.   #--------------------------------------------------------------------------
  145.   def update
  146.    
  147.    
  148. lcy = []
  149. m = 0
  150. for i in 0...$game_party.actors.size
  151. actor = $game_party.actors[i]
  152. if actor.id <= 22
  153. lcy[m] = i
  154. m += 1
  155. end
  156. end

  157.    
  158.     # 刷新窗口
  159.     @command_window.update
  160.     # 选项明暗判断(因为太消耗资源,所以屏蔽掉了)
  161.     s_disable
  162.     @lvup_window.update
  163.     #=============================================================
  164.     # 按下 B 键的情况下
  165.     #=============================================================
  166.     if Input.trigger?(Input::B)
  167.         for i in 0..4 #加的3行
  168.           ($game_system.db_point[@actor.id])[i] = ($game_system.db_point_old[@actor.id])[i]
  169.         end
  170.         for i in 0..4 #加的3行
  171.           ($game_system.db_point_old[@actor.id])[i] = ($game_system.db_point[@actor.id])[i]
  172.         end
  173.       # 演奏取消 SE
  174.       $game_system.se_play($data_system.cancel_se)
  175.       # 切换到地图画面
  176.       $scene = Scene_Atactor1.new
  177.       return
  178.     end
  179.     #=============================================================
  180.     # 按下 C 键的情况下
  181.     #=============================================================
  182.     if Input.trigger?(Input::C)      
  183.       if @command_window.index == 6
  184.         for i in 0..4 #加的3行
  185.           ($game_system.db_point_old[@actor.id])[i] = ($game_system.db_point[@actor.id])[i]
  186.         end
  187.         for i in 0..4 #加的3行
  188.           ($game_system.db_point[@actor.id])[i] = ($game_system.db_point_old[@actor.id])[i]
  189.         end
  190.           # 演奏确定 SE
  191.         $game_system.se_play($data_system.decision_se)
  192.         # 将角色的剩余点数带回
  193.         $game_variables[@actor.id + LEVEL_UP_VARIABLE] = $point
  194.         # 将角色点数实际加上
  195.         @actor.str += $temp_str
  196.         @actor.dex += $temp_dex
  197.         @actor.agi += $temp_agi
  198.         @actor.int += $temp_int
  199.         @actor.maxhp += $temp_hp
  200.         @actor.maxsp += $temp_sp
  201.         
  202.         # 演奏光标 SE
  203.         $game_system.se_play($data_system.cursor_se)
  204.         # 移至下一位角色
  205.         @actor_index += 1
  206.         @actor_index %= lcy.size#$game_party.actors.size
  207. #        p lcy.size
  208.         # 切换到别的状态画面
  209.         $scene = Scene_Lvup.new(@actor_index , @command_window.index)
  210. #        $scene = Scene_Menu.new(0)
  211.         
  212.         return
  213.       end
  214.       if @command_window.index == 5
  215.         for i in 0..4 #加的3行
  216.           ($game_system.db_point[@actor.id])[i] = ($game_system.db_point_old[@actor.id])[i]
  217.         end
  218.         for i in 0..4 #加的3行
  219.           ($game_system.db_point_old[@actor.id])[i] = ($game_system.db_point[@actor.id])[i]
  220.         end
  221.           # 演奏确定 SE
  222.         $game_system.se_play($data_system.cancel_se)
  223.           # 将角色的剩余点数带入
  224.         $point = $game_variables[@actor.id + LEVEL_UP_VARIABLE]   
  225.           # 初始化临时量
  226.         $temp_str = 0
  227.         $temp_dex = 0
  228.         $temp_agi = 0
  229.         $temp_int = 0
  230.         $temp_hp = 0
  231.         $temp_sp = 0
  232.         @lvup_window.refresh
  233.         return
  234.       end
  235.       if $point == 0
  236.         # 演奏冻结 SE
  237.         $game_system.se_play($data_system.buzzer_se)
  238.         return
  239.       end
  240.       case @command_window.index
  241.       when 0
  242.         if !($game_system.db_point_enable[@actor.id])[0] #加的判断
  243.           # 演奏冻结 SE
  244.           $game_system.se_play($data_system.buzzer_se)
  245.           return
  246.         else
  247.         # 演奏确定 SE
  248.         $game_system.se_play($data_system.decision_se)
  249.         $temp_hp += @hp
  250.         $temp_sp += @sp
  251.         $temp_str += @hp_str
  252.         $temp_dex += @hp_dex
  253.         $temp_agi += @hp_agi
  254.         $temp_int += @hp_int
  255.         $point -= 1
  256.         @lvup_window.refresh
  257.         ($game_system.db_point[@actor.id])[0] += 1
  258.         s_disable
  259.         return
  260.       end
  261.       when 1
  262.         if !($game_system.db_point_enable[@actor.id])[1]#加的判断
  263.           # 演奏冻结 SE
  264.           $game_system.se_play($data_system.buzzer_se)
  265.           return
  266.         else
  267.         # 演奏确定 SE
  268.         $game_system.se_play($data_system.decision_se)
  269.         $temp_str += @str_str
  270.         $temp_hp += @str_hp
  271.         $temp_sp += @str_sp
  272.         $temp_dex += @str_dex
  273.         $temp_agi += @str_agi
  274.         $temp_int += @str_int
  275.         $point -= 1
  276.         @lvup_window.refresh
  277.         ($game_system.db_point[@actor.id])[1] += 1
  278.         s_disable
  279.         return
  280.       end
  281.       when 2
  282.         if !($game_system.db_point_enable[@actor.id])[2]#加的判断
  283.           # 演奏冻结 SE
  284.           $game_system.se_play($data_system.buzzer_se)
  285.           return
  286.         else
  287.         # 演奏确定 SE
  288.         $game_system.se_play($data_system.decision_se)
  289.         $temp_dex += @dex_dex
  290.         $temp_hp += @dex_hp
  291.         $temp_sp += @dex_sp
  292.         $temp_str += @dex_str
  293.         $temp_agi += @dex_agi
  294.         $temp_int += @dex_int
  295.         $point -= 1
  296.         @lvup_window.refresh
  297.         ($game_system.db_point[@actor.id])[2] += 1
  298.         s_disable
  299.         return
  300.       end
  301.       when 3
  302.         if !($game_system.db_point_enable[@actor.id])[3]#加的判断
  303.           # 演奏冻结 SE
  304.           $game_system.se_play($data_system.buzzer_se)
  305.           return
  306.         else
  307.         # 演奏确定 SE
  308.         $game_system.se_play($data_system.decision_se)
  309.         $temp_agi += @agi_agi
  310.         $temp_hp += @agi_hp
  311.         $temp_sp += @agi_sp
  312.         $temp_str += @agi_str
  313.         $temp_dex += @agi_dex
  314.         $temp_int += @agi_int
  315.         $point -= 1
  316.         @lvup_window.refresh
  317.         ($game_system.db_point[@actor.id])[3] += 1
  318.         s_disable
  319.         return
  320.       end
  321.       when 4
  322.         if !($game_system.db_point_enable[@actor.id])[4]#加的判断
  323.           # 演奏冻结 SE
  324.           $game_system.se_play($data_system.buzzer_se)
  325.           return
  326.         else
  327.         # 演奏确定 SE
  328.         $game_system.se_play($data_system.decision_se)
  329.         $temp_int += @int_int
  330.         $temp_hp += @int_hp
  331.         $temp_sp += @int_sp
  332.         $temp_str += @int_str
  333.         $temp_dex += @int_dex
  334.         $temp_agi += @int_agi
  335.         $point -= 1
  336.         @lvup_window.refresh
  337.         ($game_system.db_point[@actor.id])[4] += 1
  338.         s_disable
  339.         return
  340.       end
  341.     end
  342.   end
  343.     #=============================================================
  344.     # 什么都没有按下的情况
  345.     #=============================================================
  346.     case @command_window.index   
  347.     when 0  # 增加体力
  348.       temptext1 = @text_hp + @hp.to_s + "点   " + @text_str + @hp_str.to_s + "点   " + @text_dex + @hp_dex.to_s + "点"
  349.       temptext2 = @text_sp + @sp.to_s + "点   " + @text_agi + @hp_agi.to_s + "点   " + @text_int + @hp_int.to_s + "点"

  350.     when 1  # 增加力量
  351.       temptext1 = @text_hp + @str_hp.to_s + "点   " + @text_str + @str_str.to_s + "点   " + @text_dex + @str_dex.to_s + "点"
  352.       temptext2 = @text_sp + @str_sp.to_s + "点   " + @text_agi + @str_agi.to_s + "点   " + @text_int + @str_int.to_s + "点"

  353.     when 2  # 增加灵巧
  354.       temptext1 = @text_hp + @dex_hp.to_s + "点   " + @text_str + @dex_agi.to_s + "点   " + @text_dex + @dex_dex.to_s + "点"
  355.       temptext2 = @text_sp + @dex_sp.to_s + "点   " + @text_agi + @dex_agi.to_s + "点   " + @text_int + @dex_int.to_s + "点"

  356.     when 3  # 增加速度
  357.       temptext1 = @text_hp + @agi_hp.to_s + "点   " + @text_str + @agi_str.to_s + "点   " + @text_dex + @agi_dex.to_s + "点"
  358.       temptext2 = @text_sp + @agi_sp.to_s + "点   " + @text_agi + @agi_agi.to_s + "点   " + @text_int + @agi_int.to_s + "点"

  359.     when 4  # 增加魔力
  360.       temptext1 = @text_hp + @int_hp.to_s + "点   " + @text_str + @int_str.to_s + "点   " + @text_dex + @int_dex.to_s + "点"
  361.       temptext2 = @text_sp + @int_sp.to_s + "点   " + @text_agi + @int_agi.to_s + "点   " + @text_int + @int_int.to_s + "点"

  362.     when 6 # 保存设定
  363. #      @help_window.lvup_text(@text_save)
  364.     when 5 # 点数重置
  365. #      @help_window.lvup_text(@text_reset)     
  366.    
  367.   end

  368.     #=============================================================
  369.     # 按下R与L换人的情况
  370.     #=============================================================      
  371.     if Input.trigger?(Input::R)
  372.       # 演奏光标 SE
  373.       $game_system.se_play($data_system.cursor_se)
  374.       # 移至下一位角色
  375.       @actor_index += 1
  376.       @actor_index %= lcy.size#$game_party.actors.size
  377.       # 切换到别的状态画面
  378.       $scene = Scene_Lvup.new(@actor_index , @command_window.index)
  379.       return
  380.     end
  381.     # 按下 L 键的情况下
  382.     if Input.trigger?(Input::L)
  383.       # 演奏光标 SE
  384.       $game_system.se_play($data_system.cursor_se)
  385.       # 移至上一位角色
  386.       @actor_index += lcy.size - 1#$game_party.actors.size - 1
  387.       @actor_index %= lcy.size#$game_party.actors.size
  388.       # 切换到别的状态画面
  389.       $scene = Scene_Lvup.new(@actor_index , @command_window.index)
  390.       return
  391.     end

  392.   end  
  393.   #--------------------------------------------------------------------------
  394.   # ● 选项明暗判断
  395.   #--------------------------------------------------------------------------
  396.   def s_disable
  397.     # 判断剩余点数是否为0,如果为0,那么增加选项表示为暗色
  398.     if $point == 0
  399.       @command_window.contents.font.color = Color.new(255, 255, 255, 128)
  400.       @command_window.disable_item(0)
  401.       @command_window.disable_item(1)
  402.       @command_window.disable_item(2)
  403.       @command_window.disable_item(3)
  404.       @command_window.disable_item(4)
  405.     else
  406.       @command_window.contents.font.color = Color.new(255, 255, 255, 255)
  407.       @command_window.able_item(0)
  408.       @command_window.able_item(1)      
  409.       @command_window.able_item(2)
  410.       @command_window.able_item(3)
  411.       @command_window.able_item(4)
  412.       for i in 0 ..4 #加的判断
  413.         if !($game_system.db_point_enable[@actor.id])[i] = ($game_system.db_point[@actor.id])[i] < (($game_system.db_point[@actor.id])[5] / 2)
  414.           @command_window.contents.font.color = Color.new(255, 255, 255, 128)
  415.           @command_window.disable_item(i)         
  416.         end
  417.       end
  418.     end
  419.   end
  420. end
复制代码

点评

前面改了吗?  发表于 2015-10-20 19:20
回复

使用道具 举报

梦石
0
星屑
1232
在线时间
1017 小时
注册时间
2011-4-30
回帖
1464
发表于 2015-10-20 19:25:45 | 显示全部楼层
本帖最后由 汪汪 于 2015-10-20 20:26 编辑

Scripts.rxdata (473.61 KB, 下载次数: 88)
额,创建一个新工程,移过去(data文件夹,),然后打开新工程就行....(当然也可以替换原工程的,不过做好保存.)

点评

★Game_Actor 人物加点脚本 Scene_Lvup  发表于 2015-10-20 19:31
回复

使用道具 举报

梦石
0
星屑
90
在线时间
186 小时
注册时间
2010-6-24
回帖
85
 楼主| 发表于 2015-10-20 19:46:44 | 显示全部楼层
汪汪 发表于 2015-10-20 19:25
[fold]
#==============================================================================
# ■ Scene_lv ...

恩恩,谢谢大人。。但是然后把这三个脚本替换之后  进游戏的时候出现了以下的错误。
123.png

点评

额,直接把脚本的文件发过去好了....  发表于 2015-10-20 20:27
回复

使用道具 举报

梦石
0
星屑
90
在线时间
186 小时
注册时间
2010-6-24
回帖
85
 楼主| 发表于 2015-10-20 20:29:04 | 显示全部楼层
汪汪 发表于 2015-10-20 19:25
额,创建一个新工程,移过去(data文件夹,),然后打开新工程就行....(当然也可以替换原工程的,不过做好保存.) ...

呃呃?什么意思呀大大我没看懂,您的意思是弄个新工程复制老工程的data,其他东西不复制吗?包括您刚说的修改脚本的东西都不弄了么
回复

使用道具 举报

梦石
0
星屑
90
在线时间
186 小时
注册时间
2010-6-24
回帖
85
 楼主| 发表于 2015-10-20 21:29:27 | 显示全部楼层
本帖最后由 fjjghj1 于 2015-10-20 21:31 编辑
汪汪 发表于 2015-10-20 20:37
建一个新工程,把这个替换掉就可以.这样那个工程的脚本就变成我发的那个了.
当然也可以直接复制到你那个原 ...


恩恩。大大。复制进去之后还是提示的Scene_Lunp的421发生错误饿。。我把我的Scripsts发出来您看看


这个好像是没有修改的时候的状态。。

Scripts.rxdata

511.05 KB, 下载次数: 66

点评

大概明白了。明天给你看看。  发表于 2015-10-20 23:09
额额,大神我觉得我还是起来在试一下,我现在喝多了,脑子是矿的,,抱歉啊,明天白天试了在跟您说。  发表于 2015-10-20 22:51
额外增加100点可加的点数的话, 1级 本来又10点属性点可以加5点力量加上额外增加的点数可以加55力量,但是变得只能加20了。。。  发表于 2015-10-20 22:49
比如本来没用变量,正常加点的话 一个角色 本来有10点属性点,可以增加力量5点。如此增加的话到100级可以增加力量500点,但是如果用变量给角色额...  发表于 2015-10-20 22:49
如果用变量增加了属性,就不能1级这么加了。。。饿,,可能我的叙述有问题,您可以试一下,就是变量增加角色加点,然后就不正常了。。  发表于 2015-10-20 22:47
回复

使用道具 举报

梦石
0
星屑
1232
在线时间
1017 小时
注册时间
2011-4-30
回帖
1464
发表于 2015-10-21 08:27:09 | 显示全部楼层
Scene_Lvup
   $point = $game_variables[@actor.id + LEVEL_UP_VARIABLE]
下面添加上
   $game_system.db_point[@actor.id][5] = $point
    for i in 0..4 #加的3行
       $game_system.db_point[@actor.id][5] += ($game_system.db_point[@actor.id])[i]
    end

点评

大神非常抱歉,昨天果然喝多了,其实没有问题了… 毕竟等级没有提升的话是只能加那么多点,,脑子喝矿了,抱歉啊,谢谢了  发表于 2015-10-21 13:16
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部