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

Project1

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

[已经解决] 增减东西提示脚本,但是获得经验不提示而且升级就出错。

[复制链接]

Lv3.寻梦者

梦石
0
星屑
3176
在线时间
1442 小时
注册时间
2009-7-27
帖子
1454
跳转到指定楼层
1
发表于 2013-9-18 21:42:11 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 爆焰 于 2013-9-21 13:06 编辑

在地图上获得经验不显示出来,而且升级的话Game_Switches的20行就出错。不知道为什么。
请高手帮帮忙。
  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #==============================================================================

  4. $不显示金钱窗口 = 41

  5. $不显示物品窗口 = 42

  6. $不显示武器窗口 = 43

  7. $不显示防具窗口 = 44

  8. $不显示升级窗口 = 45

  9. # 以上开关,当打开的时候,获得物品将不会提示,比如默认打开41号开关,获得金钱不再提示

  10. # ————————————————————————————————————

  11. class Interpreter  
  12. attr_accessor :parameters
  13. #--------------------------------------------------------------------------
  14. # ● 增减金钱
  15. #--------------------------------------------------------------------------
  16. def command_125
  17.   value = operate_value(@parameters[0], @parameters[1], @parameters[2])
  18.   $game_party.gain_gold(value)
  19.   if $game_switches[$不显示金钱窗口]==false
  20.     carol3_66RPG = Window_Base.new((640-160)/2,128,180,100)
  21.     carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
  22.     if value >= 0
  23.       carol3_66RPG.contents.draw_text(0,0,240,32,"获得金钱:")
  24.       #——声效,可以自己改
  25.       Audio.se_play("Audio/SE/"+"006-System06",80,100)
  26.     else
  27.       carol3_66RPG.contents.draw_text(0,0,240,32,"失去金钱:")
  28.       #——声效,可以自己改
  29.       Audio.se_play("Audio/SE/"+"005-System05",80,100)
  30.     end   
  31.     carol3_66RPG.contents.draw_text(0,32,240,32,value.abs.to_s)
  32.     carol3_66RPG.contents.draw_text(0,32,140,32, $data_system.words.gold,2)
  33.     carol3_66RPG.opacity = 160
  34.     for i in 0..30
  35.       Graphics.update
  36.     end
  37.     for i in 0..10
  38.       carol3_66RPG.opacity -= 30
  39.       carol3_66RPG.contents_opacity -= 30
  40.       Graphics.update
  41.     end
  42.     carol3_66RPG.dispose
  43.   end
  44.   return true
  45. end
  46. #--------------------------------------------------------------------------
  47. # ● 增减物品
  48. #--------------------------------------------------------------------------
  49. def command_126
  50.   value = operate_value(@parameters[1], @parameters[2], @parameters[3])
  51.   $game_party.gain_item(@parameters[0], value)
  52.   if $game_switches[$不显示物品窗口]==false
  53.     carol3_66RPG_item = $data_items[@parameters[0]]
  54.     carol3_66RPG = Window_Base.new((640-300)/2,128,300,100)
  55.     carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
  56.     if value >= 0
  57.       carol3_66RPG.contents.draw_text(0,0,240,32,"获得物品:")   
  58.       #——声效,可以自己改
  59.       Audio.se_play("Audio/SE/"+"006-System06",80,100)
  60.     else
  61.       carol3_66RPG.contents.draw_text(0,0,240,32,"失去物品:")   
  62.       #——声效,可以自己改
  63.       Audio.se_play("Audio/SE/"+"005-System05",80,100)
  64.     end
  65.     carol3_66RPG_bitmap = RPG::Cache.icon(carol3_66RPG_item.icon_name)
  66.     carol3_66RPG.contents.blt(0, 32, carol3_66RPG_bitmap, Rect.new(0, 0, 24, 24), 255)
  67.     carol3_66RPG.contents.draw_text(0 + 28, 32, 212, 32, carol3_66RPG_item.name, 0)
  68.     carol3_66RPG.contents.draw_text(0, 32, 268, 32, "×"+value.abs.to_s, 2)
  69.     carol3_66RPG.opacity = 160
  70.     for i in 0..30
  71.       Graphics.update
  72.     end
  73.     for i in 0..10
  74.       carol3_66RPG.opacity -= 30
  75.       carol3_66RPG.contents_opacity -= 30
  76.       Graphics.update
  77.     end
  78.     carol3_66RPG.dispose
  79.   end
  80.   return true
  81. end
  82. #--------------------------------------------------------------------------
  83. # ● 增减武器
  84. #--------------------------------------------------------------------------
  85. def command_127
  86.   value = operate_value(@parameters[1], @parameters[2], @parameters[3])
  87.   $game_party.gain_weapon(@parameters[0], value)
  88.   if $game_switches[$不显示武器窗口]==false
  89.     carol3_66RPG_item = $data_weapons[@parameters[0]]
  90.     carol3_66RPG = Window_Base.new((640-300)/2,128,300,100)
  91.     carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
  92.     if value >= 0
  93.       carol3_66RPG.contents.draw_text(0,0,240,32,"获得武器:")   
  94.       #——声效,可以自己改
  95.       Audio.se_play("Audio/SE/"+"006-System06",80,100)
  96.     else
  97.       carol3_66RPG.contents.draw_text(0,0,240,32,"失去武器:")   
  98.       #——声效,可以自己改
  99.       Audio.se_play("Audio/SE/"+"005-System05",80,100)
  100.     end
  101.     carol3_66RPG_bitmap = RPG::Cache.icon(carol3_66RPG_item.icon_name)
  102.     carol3_66RPG.contents.blt(0, 32, carol3_66RPG_bitmap, Rect.new(0, 0, 24, 24), 255)
  103.     carol3_66RPG.contents.draw_text(0 + 28, 32, 212, 32, carol3_66RPG_item.name, 0)
  104.     carol3_66RPG.contents.draw_text(0, 32, 268, 32, "×"+value.abs.to_s, 2)
  105.     carol3_66RPG.opacity = 160
  106.     for i in 0..30
  107.       Graphics.update
  108.     end
  109.     for i in 0..10
  110.       carol3_66RPG.opacity -= 30
  111.       carol3_66RPG.contents_opacity -= 30
  112.       Graphics.update
  113.     end
  114.     carol3_66RPG.dispose
  115.   end
  116.   return true
  117. end
  118. #--------------------------------------------------------------------------
  119. # ● 增减防具
  120. #--------------------------------------------------------------------------
  121. def command_128
  122.   value = operate_value(@parameters[1], @parameters[2], @parameters[3])
  123.   $game_party.gain_armor(@parameters[0], value)
  124.   if $game_switches[$不显示防具窗口]==false
  125.     carol3_66RPG_item = $data_armors[@parameters[0]]
  126.     carol3_66RPG = Window_Base.new((640-300)/2,128,300,100)
  127.     carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
  128.     if value >= 0
  129.       carol3_66RPG.contents.draw_text(0,0,240,32,"获得防具:")   
  130.       #——声效,可以自己改
  131.       Audio.se_play("Audio/SE/"+"006-System06",80,100)
  132.     else
  133.       carol3_66RPG.contents.draw_text(0,0,240,32,"失去防具:")   
  134.       #——声效,可以自己改
  135.       Audio.se_play("Audio/SE/"+"005-System05",80,100)
  136.     end
  137.     carol3_66RPG_bitmap = RPG::Cache.icon(carol3_66RPG_item.icon_name)
  138.     carol3_66RPG.contents.blt(0, 32, carol3_66RPG_bitmap, Rect.new(0, 0, 24, 24), 255)
  139.     carol3_66RPG.contents.draw_text(0 + 28, 32, 212, 32, carol3_66RPG_item.name, 0)
  140.     carol3_66RPG.contents.draw_text(0, 32, 268, 32, "×"+value.abs.to_s, 2)
  141.     carol3_66RPG.opacity = 160
  142.     for i in 0..30
  143.       Graphics.update
  144.     end
  145.     for i in 0..10
  146.       carol3_66RPG.opacity -= 30
  147.       carol3_66RPG.contents_opacity -= 30
  148.       Graphics.update
  149.     end
  150.     carol3_66RPG.dispose
  151.   end
  152.   return true
  153. end
  154. #--------------------------------------------------------------------------
  155. # ● 增减 EXP
  156. #--------------------------------------------------------------------------
  157. def command_315
  158.   # 获取操作值
  159.   value = operate_value(@parameters[1], @parameters[2], @parameters[3])
  160.   # 处理重复
  161.   iterate_actor(@parameters[0]) do |actor|
  162.     # 记录等级
  163.     last_level = actor.level
  164.     # 更改角色 EXP
  165.     actor.exp += value
  166.     # 如果角色升级了的话,显示升级窗口
  167.     if actor.level > last_level and $game_switches[$显示升级窗口] == false
  168.       show_level_up_result(actor, last_level)
  169. #############降级、减经验修正    By    OCTSJimmy##########################
  170.     elsif actor.level < last_level and $game_switches[$显示升级窗口] == false
  171.       show_level_up_result(actor, last_level)
  172. #############降级、减经验修正    By    OCTSJimmy##########################
  173.     end
  174.   end
  175.   # 继续
  176.   return true
  177. end
  178. #--------------------------------------------------------------------------
  179. # ● 增减等级
  180. #--------------------------------------------------------------------------
  181. def command_316
  182.   # 获取操作值
  183.   value = operate_value(@parameters[1], @parameters[2], @parameters[3])
  184.   # 处理重复
  185.   iterate_actor(@parameters[0]) do |actor|
  186.     # 记录等级
  187.     last_level = actor.level
  188.     # 更改角色的等级
  189.     actor.level += value
  190.     # 如果角色升级了的话,显示升级窗口
  191.     if actor.level > last_level and $game_switches[$显示升级窗口] == false
  192.       show_level_up_result(actor, last_level)
  193. #############降级、减经验修正    By    OCTSJimmy##########################
  194.     elsif actor.level < last_level and $game_switches[$显示升级窗口] == false
  195.       show_level_up_result(actor, last_level)
  196. #############降级、减经验修正    By    OCTSJimmy##########################
  197.     end
  198.   end
  199.   # 继续
  200.   return true
  201. end
  202. #--------------------------------------------------------------------------
  203. # ● 升级显示处理
  204. #--------------------------------------------------------------------------
  205. def show_level_up_result(actor,last_level)
  206.   actor_parameters = actor.last_parameters(last_level)
  207.   last_maxhp = actor_parameters[0]
  208.   last_maxsp = actor_parameters[1]
  209.   last_str = actor_parameters[2]
  210.   last_dex = actor_parameters[3]
  211.   last_agi = actor_parameters[4]
  212.   last_int = actor_parameters[5]
  213.   level_up_window = Window_LevelUpWindow.new actor,last_level,last_maxhp,
  214.   last_maxsp,last_str,last_dex,last_agi,last_int
  215.   level_up_window.visible = true
  216. #############降级、减经验修正    By    OCTSJimmy##########################
  217.   if actor.level > last_level
  218.     skill_learning_window = Window_SkillLearning.new(actor.class_id, last_level, actor.level)
  219.   elsif actor.level < last_level
  220.     skill_learning_window = Window_ForgetLearning.new(actor.class_id, last_level, actor.level)
  221.   end
  222. #############降级、减经验修正    By    OCTSJimmy##########################
  223.   #——声效,可以自己改
  224.   Audio.me_play("Audio/ME/"+"007-Fanfare01")
  225.   # 循环
  226.   loop do
  227.     # 刷新游戏画面
  228.     Graphics.update
  229.     # 刷新输入信息
  230.     Input.update
  231.     # 按下C就关闭窗口
  232.     if Input.trigger?(Input::C) or Input.trigger?(Input::B)
  233.       unless skill_learning_window.refresh
  234.         level_up_window.dispose
  235.         skill_learning_window.dispose
  236.         return true
  237.       end
  238.     end
  239.   end
  240. end
  241. end


  242. class Game_Battler
  243. #--------------------------------------------------------------------------
  244. # ● 一次取得全部旧属性
  245. #--------------------------------------------------------------------------
  246. def last_parameters(level)
  247.   #---------------------------
  248.   # maxhp
  249.   #---------------------------
  250.   n = [[$data_actors[@actor_id].parameters[0, level] + @maxhp_plus, 1].max, 9999].min
  251.   for i in @states
  252.     n *= $data_states[i].maxhp_rate / 100.0
  253.   end
  254.   n = [[Integer(n), 1].max, 9999].min
  255.   maxhp = n
  256.   #---------------------------
  257.   # maxsp
  258.   #---------------------------
  259.   n = [[$data_actors[@actor_id].parameters[1, level] + @maxsp_plus, 0].max, 9999].min
  260.   for i in @states
  261.     n *= $data_states[i].maxsp_rate / 100.0
  262.   end
  263.   n = [[Integer(n), 0].max, 9999].min
  264.   maxsp = n
  265.   #---------------------------
  266.   # str
  267.   #---------------------------
  268.   n = $data_actors[@actor_id].parameters[2, level]
  269.   weapon = $data_weapons[@weapon_id]
  270.   armor1 = $data_armors[@armor1_id]
  271.   armor2 = $data_armors[@armor2_id]
  272.   armor3 = $data_armors[@armor3_id]
  273.   armor4 = $data_armors[@armor4_id]
  274.   n += weapon != nil ? weapon.str_plus : 0
  275.   n += armor1 != nil ? armor1.str_plus : 0
  276.   n += armor2 != nil ? armor2.str_plus : 0
  277.   n += armor3 != nil ? armor3.str_plus : 0
  278.   n += armor4 != nil ? armor4.str_plus : 0
  279.   n = [[n + @str_plus, 1].max, 999].min
  280.   for i in @states
  281.     n *= $data_states[i].str_rate / 100.0
  282.   end
  283.   n = [[Integer(n), 1].max, 999].min
  284.   str = n
  285.   #---------------------------
  286.   # dex
  287.   #---------------------------
  288.   n = $data_actors[@actor_id].parameters[3, level]
  289.   weapon = $data_weapons[@weapon_id]
  290.   armor1 = $data_armors[@armor1_id]
  291.   armor2 = $data_armors[@armor2_id]
  292.   armor3 = $data_armors[@armor3_id]
  293.   armor4 = $data_armors[@armor4_id]
  294.   n += weapon != nil ? weapon.dex_plus : 0
  295.   n += armor1 != nil ? armor1.dex_plus : 0
  296.   n += armor2 != nil ? armor2.dex_plus : 0
  297.   n += armor3 != nil ? armor3.dex_plus : 0
  298.   n += armor4 != nil ? armor4.dex_plus : 0
  299.   n = [[n + @dex_plus, 1].max, 999].min
  300.   for i in @states
  301.     n *= $data_states[i].dex_rate / 100.0
  302.   end
  303.   n = [[Integer(n), 1].max, 999].min
  304.   dex = n
  305.   #---------------------------
  306.   # agi
  307.   #---------------------------
  308.   n = $data_actors[@actor_id].parameters[4, level]
  309.   weapon = $data_weapons[@weapon_id]
  310.   armor1 = $data_armors[@armor1_id]
  311.   armor2 = $data_armors[@armor2_id]
  312.   armor3 = $data_armors[@armor3_id]
  313.   armor4 = $data_armors[@armor4_id]
  314.   n += weapon != nil ? weapon.agi_plus : 0
  315.   n += armor1 != nil ? armor1.agi_plus : 0
  316.   n += armor2 != nil ? armor2.agi_plus : 0
  317.   n += armor3 != nil ? armor3.agi_plus : 0
  318.   n += armor4 != nil ? armor4.agi_plus : 0
  319.   n = [[n + @agi_plus, 1].max, 999].min
  320.   for i in @states
  321.     n *= $data_states[i].agi_rate / 100.0
  322.   end
  323.   n = [[Integer(n), 1].max, 999].min
  324.   agi = n
  325.   #---------------------------
  326.   # int
  327.   #---------------------------
  328.   n = $data_actors[@actor_id].parameters[5, level]
  329.   weapon = $data_weapons[@weapon_id]
  330.   armor1 = $data_armors[@armor1_id]
  331.   armor2 = $data_armors[@armor2_id]
  332.   armor3 = $data_armors[@armor3_id]
  333.   armor4 = $data_armors[@armor4_id]
  334.   n += weapon != nil ? weapon.int_plus : 0
  335.   n += armor1 != nil ? armor1.int_plus : 0
  336.   n += armor2 != nil ? armor2.int_plus : 0
  337.   n += armor3 != nil ? armor3.int_plus : 0
  338.   n += armor4 != nil ? armor4.int_plus : 0
  339.   n = [[n + @int_plus, 1].max, 999].min
  340.   for i in @states
  341.     n *= $data_states[i].int_rate / 100.0
  342.   end
  343.   n = [[Integer(n), 1].max, 999].min
  344.   int = n
  345.   return [maxhp, maxsp, str, dex, agi, int]
  346. end
  347. end


  348. #==============================================================================
  349. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  350. #==============================================================================

  351. # ————————————————————————————————————

  352. # ▼▲▼ XRXS_BP10. LEVEL UP!能力上昇表示ウィンドウ plus ▼▲▼
  353. # by 桜雅 在土

  354. #——以下3个如果需要修改,直接输入文件名即可
  355. $data_system_level_up_se = "009-Fanfare01" #升级时的音效设置
  356. $data_system_level_up_me = "Audio/ME/007-Fanfare01" # 升级时播放的ME
  357. $data_system_skilllearn_se = "" # 学会特技时播放的声效。

  358. #==============================================================================
  359. # ■ Window_LevelUpWindow
  360. #------------------------------------------------------------------------------
  361. #  バトル終了時、レベルアップした場合にステータスを表示するウィンドウです。
  362. #==============================================================================
  363. class Window_LevelUpWindow < Window_Base
  364. #--------------------------------------------------------------------------
  365. # ● オブジェクト初期化
  366. #--------------------------------------------------------------------------
  367. def initialize(actor, last_lv, up_hp, up_sp, up_str, up_dex, up_agi, up_int)
  368.   super(210, 100, 220, 222)
  369.   self.contents = Bitmap.new(width - 32, height - 32)
  370.   self.visible = false
  371.   self.back_opacity = 160
  372.   refresh(actor, last_lv, up_hp, up_sp, up_str, up_dex, up_agi, up_int)
  373.   # SEの再生
  374.   if $data_system_level_up_se != ""
  375.     Audio.se_play($data_system_level_up_se)
  376.   end
  377.   # MEの再生
  378.   if $data_system_level_up_me != ""
  379.     Audio.me_stop
  380.     Audio.me_play($data_system_level_up_me)
  381.   end
  382. end
  383. #--------------------------------------------------------------------------
  384. # ● リフレッシュ
  385. #--------------------------------------------------------------------------
  386. def refresh(actor, last_lv, up_hp, up_sp, up_str, up_dex, up_agi, up_int)
  387.   self.contents.clear
  388.   self.contents.font.color = text_color(6)
  389.   self.contents.font.size = 20
  390.   self.contents.draw_text(0, 0, 160, 24, actor.name.to_s)
  391.   self.contents.font.color = system_color
  392.   self.contents.font.size = 18
  393.   self.contents.draw_text( 0, 26, 160, 24, "等级")
  394.   self.contents.font.size = 18
  395.   self.contents.draw_text( 0, 48, 80, 24, $data_system.words.hp)
  396.   self.contents.draw_text( 0, 70, 80, 24, $data_system.words.sp)
  397.   self.contents.draw_text( 0, 92, 80, 24, $data_system.words.str)
  398.   self.contents.draw_text( 0, 114, 80, 24, $data_system.words.dex)
  399.   self.contents.draw_text( 0, 136, 80, 24, $data_system.words.agi)
  400.   self.contents.draw_text( 0, 158, 80, 24, $data_system.words.int)
  401.   self.contents.draw_text(110, 26, 128, 24, "→")
  402.   self.contents.draw_text(110, 48, 128, 24, "→")
  403.   self.contents.draw_text(110, 70, 128, 24, "→")
  404.   self.contents.draw_text(110, 92, 128, 24, "→")
  405.   self.contents.draw_text(110, 114, 128, 24, "→")
  406.   self.contents.draw_text(110, 136, 128, 24, "→")
  407.   self.contents.draw_text(110, 158, 128, 24, "→")
  408.   self.contents.font.color = normal_color
  409.   self.contents.draw_text( 60, 26, 88, 24, last_lv.to_s)
  410.   self.contents.draw_text( 60, 48, 72, 24, up_hp.to_s)
  411.   self.contents.draw_text( 60, 70, 72, 24, up_sp.to_s)
  412.   self.contents.draw_text( 60, 92, 72, 24, up_str.to_s)
  413.   self.contents.draw_text( 60, 114, 72, 24, up_dex.to_s)
  414.   self.contents.draw_text( 60, 136, 72, 24, up_agi.to_s)
  415.   self.contents.draw_text( 60, 158, 72, 24, up_int.to_s)
  416.   self.contents.draw_text( 145, 26, 128, 24, actor.level.to_s)
  417.   self.contents.draw_text( 145, 48, 128, 24, actor.maxhp.to_s)
  418.   self.contents.draw_text( 145, 70, 128, 24, actor.maxsp.to_s)
  419.   self.contents.draw_text( 145, 92, 128, 24, actor.str.to_s)
  420.   self.contents.draw_text( 145, 114, 128, 24, actor.dex.to_s)
  421.   self.contents.draw_text( 145, 136, 128, 24, actor.agi.to_s)
  422.   self.contents.draw_text( 145, 158, 128, 24, actor.int.to_s)
  423. end
  424. end
  425. #==============================================================================
  426. # ■ Window_SkillLearning
  427. #------------------------------------------------------------------------------
  428. #  レベルアップ時などにスキルを習得した場合にそれを表示するウィンドウです。
  429. #==============================================================================
  430. class Window_SkillLearning < Window_Base
  431. #--------------------------------------------------------------------------
  432. # ● オブジェクト初期化
  433. #--------------------------------------------------------------------------
  434. def initialize(class_id, last_lv, now_lv)
  435.   super(210, 322, 220, 56)
  436.   self.contents = Bitmap.new(width - 32, height - 16) # わざと▽を表示
  437.   self.visible = false
  438.   self.back_opacity = 160
  439.   @learn_skills = []
  440.   for i in 0...$data_classes[class_id].learnings.size
  441.     learn_lv = $data_classes[class_id].learnings[i].level
  442.     # 今回のレベルアップ範囲で習得するスキルの場合
  443.     if learn_lv > last_lv and learn_lv <= now_lv
  444.       @learn_skills.push $data_skills[
  445.       $data_classes[class_id].learnings[i].skill_id].name
  446.     end
  447.   end
  448.   refresh
  449. end
  450. #--------------------------------------------------------------------------
  451. # ● リフレッシュ
  452. #--------------------------------------------------------------------------
  453. def refresh
  454.   # 各描写
  455.   skill_name = @learn_skills.shift
  456.   if skill_name == nil
  457.     return false
  458.   end
  459.   # SEの再生
  460.   if $data_system_skilllearn_se != ""
  461.     Audio.se_play($data_system_skilllearn_se, 100, 70)
  462.   end
  463.   self.contents.clear
  464.   self.contents.font.size = 18
  465.   self.contents.font.color = text_color(0)
  466.   self.contents.draw_text(0,0,156,24, "学会特技:"+skill_name)
  467.   self.contents.font.color = text_color(6)
  468.   self.contents.draw_text(0,0,156,24, "          "+skill_name)
  469.   self.contents.font.color = text_color(0)
  470.   self.visible = true
  471.   return true
  472. end
  473. end
  474. #==============================================================================
  475. # ■ Window_ForgetLearning
  476. #------------------------------------------------------------------------------
  477. #  遗忘特技,用SkillLearning改的    By OCTSJimmy
  478. #==============================================================================
  479. class Window_ForgetLearning < Window_Base
  480. #--------------------------------------------------------------------------
  481. # ● オブジェクト初期化
  482. #--------------------------------------------------------------------------
  483. def initialize(class_id, last_lv, now_lv)
  484.   super(210, 322, 220, 56)
  485.   self.contents = Bitmap.new(width - 32, height - 16) # わざと▽を表示
  486.   self.visible = false
  487.   self.back_opacity = 160
  488.   @learn_skills = []
  489.   #for i in 0...$data_classes[class_id].learnings.size
  490.   for i in $data_classes[class_id].learnings
  491.     #learn_lv = $data_classes[class_id].learnings[i].level
  492.     learn_lv = i.level
  493.     # 今回のレベルアップ範囲で習得するスキルの場合
  494.     if learn_lv < last_lv and learn_lv > now_lv
  495.       @learn_skills.push $data_skills[i.skill_id].name
  496.       #$data_classes[class_id].learnings[i].skill_id].name
  497.     end
  498.   end
  499.   refresh
  500. end
  501. #--------------------------------------------------------------------------
  502. # ● リフレッシュ
  503. #--------------------------------------------------------------------------
  504. def refresh
  505.   # 各描写
  506.   skill_name = @learn_skills.shift
  507.   if skill_name == nil
  508.     return false
  509.   end
  510.   # SEの再生
  511.   if $data_system_skilllearn_se != ""
  512.     Audio.se_play($data_system_skilllearn_se, 100, 70)
  513.   end
  514.   self.contents.clear
  515.   self.contents.font.size = 18
  516.   self.contents.font.color = text_color(0)
  517.   self.contents.draw_text(0,0,156,24, "遗忘特技:"+skill_name)
  518.   self.contents.font.color = text_color(6)
  519.   self.contents.draw_text(0,0,156,24, "          "+skill_name)
  520.   self.contents.font.color = text_color(0)
  521.   self.visible = true
  522.   return true
  523. end
  524. end


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

博客:我的博客

Lv1.梦旅人

梦石
0
星屑
52
在线时间
586 小时
注册时间
2012-5-31
帖子
768
2
发表于 2013-9-18 21:55:05 | 只看该作者
能看下报错的图吗?、、、这个脚本好像没看出哪不对呀

点评

好吧、、、我问错了、、、、  发表于 2013-9-18 22:08
你试一下不是更清楚?看不出并不代表没问题呀  发表于 2013-9-18 22:02
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
9280
在线时间
2504 小时
注册时间
2011-5-20
帖子
15389

开拓者

3
发表于 2013-9-19 13:27:51 | 只看该作者
脚本没问题→→是不是和你放的其他脚本冲突了?

点评

获得经验没问题,可是升级就出错  发表于 2013-9-19 13:51
直接新建一个工程测试过了,还是有问题。在地图上获得经验或者升级时就会出错  发表于 2013-9-19 13:49
[img]http://service.t.sina.com.cn/widget/qmd/5339802982/c02e16bd/7.png
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
3176
在线时间
1442 小时
注册时间
2009-7-27
帖子
1454
4
 楼主| 发表于 2013-9-20 20:15:01 | 只看该作者
有木有搞错?没人帮我?

博客:我的博客
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
3176
在线时间
1442 小时
注册时间
2009-7-27
帖子
1454
5
 楼主| 发表于 2013-9-21 13:06:33 | 只看该作者
……
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
3176
在线时间
1442 小时
注册时间
2009-7-27
帖子
1454
6
 楼主| 发表于 2013-9-26 17:00:03 | 只看该作者
没人……

点评

没人回答,我有办法吗  发表于 2013-9-26 21:48
三连贴  发表于 2013-9-26 17:25
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
3176
在线时间
1442 小时
注册时间
2009-7-27
帖子
1454
7
 楼主| 发表于 2013-10-3 14:11:30 | 只看该作者
。。。。。。。。。。

点评

↓ 这不是很明显的么?把13行:$不显示XX的“不”删掉,或者把199和202行的 $显示XX 前面加上“不”  发表于 2013-10-4 12:16

评分

参与人数 1星屑 -30 收起 理由
myownroc -30 四连帖…

查看全部评分


博客:我的博客
回复 支持 反对

使用道具 举报

Lv1.梦旅人

◇无限的妄想者◇

梦石
0
星屑
55
在线时间
1441 小时
注册时间
2012-7-14
帖子
2339
8
发表于 2013-10-3 23:37:07 | 只看该作者
不报错才见鬼了orz
13行:$不显示升级窗口 = 45
底下却是这样。

TM用根本不存在的变量去指定switch编号怎么可能不报错。这种错都能出,这脚本写的也太水了吧?(还有,这么明显的问题居然没人回答)

点评

carol3_66rpg..  发表于 2013-10-4 17:04
居然一直没留意到,改这脚本的人也太没节操了……  发表于 2013-10-4 14:58
那要怎么改?  发表于 2013-10-4 12:10
也许脚本转过N次手,被别人修改过。  发表于 2013-10-4 08:21

评分

参与人数 2星屑 +115 收起 理由
myownroc + 75 认可答案
芯☆淡茹水 + 40 我很赞同

查看全部评分


————————————————————————————————————
新坑Dreamoon酝酿中,预计短篇⑨完工发布。
————————————————————————————————————
如何调戏橙光文字的 高级UI 系列教程:  鉴赏页制作篇背包系统制作篇
回复 支持 反对

使用道具 举报

Lv3.寻梦者

○赛

梦石
0
星屑
1249
在线时间
1276 小时
注册时间
2013-1-22
帖子
2246

贵宾

9
发表于 2013-10-4 07:45:08 | 只看该作者
幻想中的鸡蛋 发表于 2013-10-3 23:37
不报错才见鬼了orz
13行:$不显示升级窗口 = 45
底下却是这样。

哼哼,通过注释可以发现,这个神奇的脚本是柳大写的。。。

点评

从哪里看出是柳大写的了= =,中间注释写改动者是:OCTSJimmy,脚本后一半是日文注释。  发表于 2013-10-4 15:24
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-9-30 04:27

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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