Project1

标题: 得物品提示提示,颜色问题 [打印本页]

作者: zhli667    时间: 2009-6-2 02:08
标题: 得物品提示提示,颜色问题
因为我的提示窗口底是白色的,所以"获得金钱:"  "获得防具:"  "获得物品:"等等……这些字也是白色的,希望高手们给改成黑色或红色的字……
  1. # ————————————————————————————————————
  2. # 本脚本来自www.66rpg.com,转载请保留此信息
  3. # ————————————————————————————————————
  4.   
  5. # 注意!!!在对话后得到物品,请在对话后先用事件等待3帧,否则对话框来不及消失。

  6. # 开关定义:

  7. $不显示金钱窗口 = 43

  8. $不显示物品窗口 = 43

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

  10. $不显示防具窗口 = 43

  11. $不显示特技窗口 = 43

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

  13. # ————————————————————————————————————

  14. class Interpreter  
  15.   #--------------------------------------------------------------------------
  16.   # ● 增减金钱
  17.   #--------------------------------------------------------------------------
  18.   def command_125
  19.     value = operate_value(@parameters[0], @parameters[1], @parameters[2])
  20.     $game_party.gain_gold(value)
  21.     if $game_switches[$不显示金钱窗口]==false
  22.       
  23.       carol3_66RPG = Window_Base.new((640-160)/2,128,180,120)
  24.       carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
  25.      
  26.       carol3_66RPG.contents.font.size = 18
  27.       if value >= 0
  28.         carol3_66RPG.contents.draw_text(0,0,240,32,"获得金钱:")
  29.         #——声效,可以自己改
  30.         
  31.         Audio.se_play("Audio/SE/"+"006-System06",80,100)
  32.         
  33.       else
  34.         carol3_66RPG.contents.draw_text(0,0,240,32,"失去金钱:")
  35.         #——声效,可以自己改
  36.         Audio.se_play("Audio/SE/"+"005-System05",80,100)
  37.       end   
  38.       carol3_66RPG.contents.draw_text(0,62,240,32,value.abs.to_s)
  39.       carol3_66RPG.contents.draw_text(0,62,140,32, $data_system.words.gold,2)
  40.       carol3_66RPG.opacity = 160
  41.       for i in 0..30
  42.         Graphics.update
  43.       end
  44.       for i in 0..10
  45.         carol3_66RPG.opacity -= 30
  46.         carol3_66RPG.contents_opacity -= 30
  47.         Graphics.update
  48.       end
  49.       carol3_66RPG.dispose
  50.     end
  51.     return true
  52.   end
  53.   #--------------------------------------------------------------------------
  54.   # ● 增减物品
  55.   #--------------------------------------------------------------------------
  56.   def command_126
  57.     value = operate_value(@parameters[1], @parameters[2], @parameters[3])
  58.     $game_party.gain_item(@parameters[0], value)
  59.     if $game_switches[$不显示物品窗口]==false
  60.       
  61.       carol3_66RPG_item = $data_items[@parameters[0]]
  62.       carol3_66RPG = Window_Base.new((640-300)/2,128,300,120)
  63.       carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
  64.      
  65.       carol3_66RPG.contents.font.size = 18
  66.       if value >= 0
  67.         carol3_66RPG.contents.draw_text(0,0,240,32,"获得物品:")   
  68.         #——声效,可以自己改
  69.         Audio.se_play("Audio/SE/"+"006-System06",80,100)
  70.       else
  71.         carol3_66RPG.contents.draw_text(0,0,240,32,"失去物品:")   
  72.         #——声效,可以自己改
  73.         Audio.se_play("Audio/SE/"+"005-System05",80,100)
  74.       end
  75.       carol3_66RPG_bitmap = RPG::Cache.icon(carol3_66RPG_item.icon_name)
  76.       carol3_66RPG.contents.blt(0, 32, carol3_66RPG_bitmap, Rect.new(0, 0,80, 80), 255)
  77.       carol3_66RPG.contents.draw_text(0 + 58, 32, 212, 32, carol3_66RPG_item.name, 0)
  78.       carol3_66RPG.contents.draw_text(0, 62, 268, 32, "×"+value.abs.to_s, 2)
  79.       carol3_66RPG.opacity = 160
  80.       for i in 0..30
  81.         Graphics.update
  82.       end
  83.       for i in 0..10
  84.         carol3_66RPG.opacity -= 30
  85.         carol3_66RPG.contents_opacity -= 30
  86.         Graphics.update
  87.       end
  88.       carol3_66RPG.dispose
  89.     end
  90.     return true
  91.   end
  92.   #--------------------------------------------------------------------------
  93.   # ● 增减武器
  94.   #--------------------------------------------------------------------------
  95.   def command_127
  96.     value = operate_value(@parameters[1], @parameters[2], @parameters[3])
  97.     $game_party.gain_weapon(@parameters[0], value)
  98.    
  99.     if $game_switches[$不显示武器窗口]==false
  100.      
  101.       carol3_66RPG_item = $data_weapons[@parameters[0]]
  102.       carol3_66RPG = Window_Base.new((640-300)/2,128,300,120)
  103.       carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
  104.      
  105.        carol3_66RPG.contents.font.size = 18
  106.        if value >= 0
  107.         carol3_66RPG.contents.draw_text(0,0,240,32,"获得武器:")   
  108.         #——声效,可以自己改
  109.         Audio.se_play("Audio/SE/"+"006-System06",80,100)
  110.       else
  111.         carol3_66RPG.contents.draw_text(0,0,240,32,"失去武器:")   
  112.         #——声效,可以自己改
  113.         Audio.se_play("Audio/SE/"+"005-System05",80,100)
  114.       end
  115.       carol3_66RPG_bitmap = RPG::Cache.icon(carol3_66RPG_item.icon_name)
  116.       carol3_66RPG.contents.blt(0, 32, carol3_66RPG_bitmap, Rect.new(0, 0, 80, 80), 255)
  117.       carol3_66RPG.contents.draw_text(0 + 58, 32, 212, 32, carol3_66RPG_item.name, 0)
  118.       carol3_66RPG.contents.draw_text(0, 62, 268, 32, "×"+value.abs.to_s, 2)
  119.       carol3_66RPG.opacity = 160
  120.       for i in 0..30
  121.         Graphics.update
  122.       end
  123.       for i in 0..10
  124.         carol3_66RPG.opacity -= 30
  125.         carol3_66RPG.contents_opacity -= 30
  126.         Graphics.update
  127.       end
  128.       carol3_66RPG.dispose
  129.     end
  130.     return true
  131.   end
  132.   
  133.   #--------------------------------------------------------------------------
  134.   # ● 增减特技
  135.   #--------------------------------------------------------------------------
  136.   def command_318
  137.    #  value = operate_value(@parameters[1], @parameters[2], @parameters[3])
  138.    
  139.     # 获取角色
  140.     actor = $game_actors[@parameters[0]]
  141.     # 增减特技
  142.    
  143.     # 继续
  144.    if $game_switches[$不显示特技窗口]==false
  145.    
  146.       
  147.       redant_66RPG_skill =  $data_skills[@parameters[2]]
  148.       redant_66RPG = Window_Base.new((640-300)/2,128,300,120)
  149.       redant_66RPG.contents = Bitmap.new(redant_66RPG.width - 32, redant_66RPG.height - 32)
  150.      
  151.       redant_66RPG.contents.font.size = 18
  152.      if actor != nil
  153.       if @parameters[1] == 0
  154.         actor.learn_skill(@parameters[2])
  155.         redant_66RPG.contents.draw_text(0,0,240,32,"【"+actor.name+"】" + "习得特技:")   
  156.         #——声效,可以自己改
  157.         Audio.se_play("Audio/SE/"+"006-System06",80,100)
  158.       else
  159.         actor.forget_skill(@parameters[2])
  160.         redant_66RPG.contents.draw_text(0,0,240,32,"【"+actor.name+"】" + "遗忘特技:")   
  161.         #——声效,可以自己改
  162.         Audio.se_play("Audio/SE/"+"005-System05",80,100)
  163.       end
  164.     end
  165.    
  166.       redant_66RPG_bitmap = RPG::Cache.icon(redant_66RPG_skill.icon_name)
  167.       redant_66RPG.contents.blt(0, 32, redant_66RPG_bitmap, Rect.new(0, 0,80, 80), 255)
  168.       redant_66RPG.contents.draw_text(0 + 58, 32, 212, 32, redant_66RPG_skill.name, 0)
  169. #      carol3_66RPG.contents.draw_text(0, 62, 268, 32, "×"+value.abs.to_s, 2)
  170.       redant_66RPG.opacity = 160
  171.       for i in 0..30
  172.         Graphics.update
  173.       end
  174.       for i in 0..10
  175.         redant_66RPG.opacity -= 30
  176.         redant_66RPG.contents_opacity -= 30
  177.         Graphics.update
  178.       end
  179.       redant_66RPG.dispose
  180.     end
  181.    
  182.     return true
  183.   end
  184.   #--------------------------------------------------------------------------
  185.   # ● 增减防具
  186.   #--------------------------------------------------------------------------
  187.   def command_128
  188.     value = operate_value(@parameters[1], @parameters[2], @parameters[3])
  189.     $game_party.gain_armor(@parameters[0], value)
  190.     if $game_switches[$不显示防具窗口]==false
  191.      
  192.       carol3_66RPG_item = $data_armors[@parameters[0]]
  193.       carol3_66RPG = Window_Base.new((640-300)/2,128,300,120)
  194.       carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
  195.       carol3_66RPG.contents.font.size = 18
  196.       if value >= 0
  197.         carol3_66RPG.contents.draw_text(0,0,240,32,"获得防具:")   
  198.         #——声效,可以自己改
  199.         Audio.se_play("Audio/SE/"+"006-System06",80,100)
  200.       else
  201.         carol3_66RPG.contents.draw_text(0,0,240,32,"失去防具:")   
  202.         #——声效,可以自己改
  203.         Audio.se_play("Audio/SE/"+"005-System05",80,100)
  204.       end
  205.       carol3_66RPG_bitmap = RPG::Cache.icon(carol3_66RPG_item.icon_name)
  206.       carol3_66RPG.contents.blt(0, 32, carol3_66RPG_bitmap, Rect.new(0, 0,80, 80), 255)
  207.       carol3_66RPG.contents.draw_text(0 + 58, 32, 212, 32, carol3_66RPG_item.name, 0)
  208.       carol3_66RPG.contents.draw_text(0, 62, 268, 32, "×"+value.abs.to_s, 2)
  209.       carol3_66RPG.opacity = 160
  210.       for i in 0..30
  211.         Graphics.update
  212.       end
  213.       for i in 0..10
  214.         carol3_66RPG.opacity -= 30
  215.         carol3_66RPG.contents_opacity -= 30
  216.         Graphics.update
  217.       end
  218.       carol3_66RPG.dispose
  219.     end
  220.     return true
  221.   end
  222. end
复制代码

另外下面脚本的“经验值”“金钱值”“得到物品名称”也是白的,也麻烦给改一下{/tp}
  1. #==============================================================================
  2. # ■ Window_BattleResult
  3. #------------------------------------------------------------------------------
  4. #  战斗结束时、显示获得的 EXP 及金钱的窗口。
  5. #==============================================================================

  6. class Window_BattleResult < Window_Base
  7.   #--------------------------------------------------------------------------
  8.   # ● 初始化对像
  9.   #     exp       : EXP
  10.   #     gold      : 金钱
  11.   #     treasures : 宝物
  12.   #--------------------------------------------------------------------------
  13.   def initialize(exp, gold, treasures)
  14.     @exp = exp
  15.     @gold = gold
  16.     @treasures = treasures
  17.     super(180, 0, 320, 150)# @treasures.size * 75 + 64)
  18.     self.contents = Bitmap.new(width - 32, height - 32)
  19.     self.y = 160 - height / 2
  20.     self.back_opacity = 160
  21.     self.visible = false
  22.     refresh
  23.   end
  24.   #--------------------------------------------------------------------------
  25.   # ● 刷新
  26.   #--------------------------------------------------------------------------
  27.   def refresh
  28.     self.contents.clear
  29.     x = 4
  30.     self.contents.font.color = normal_color
  31.     cx = contents.text_size(@exp.to_s).width
  32.     self.contents.draw_text(x, 0, cx, 32, @exp.to_s)
  33.     x += cx + 4
  34.     self.contents.font.color = system_color
  35.     cx = contents.text_size("EXP").width
  36.     self.contents.draw_text(x, 0, 64, 32, "EXP")
  37.     x += cx + 16
  38.     self.contents.font.color = normal_color
  39.     cx = contents.text_size(@gold.to_s).width
  40.     self.contents.draw_text(x, 0, cx, 32, @gold.to_s)
  41.     x += cx + 4
  42.     self.contents.font.color = system_color
  43.     self.contents.draw_text(x, 0, 128, 32, $data_system.words.gold)
  44.     #y = 32
  45.     x = 5 #定义战斗结束图标的位置
  46.     for item in @treasures
  47.      
  48.       draw_item_name(item, x, 30)
  49.       
  50.       x += 75
  51.     end
  52.   end
  53. end
复制代码

[LINE]1,#dddddd[/LINE]版务信息:本贴由楼主自主结贴~
作者: 后知后觉    时间: 2009-6-2 02:21
增加的是
      carol3_66RPG.contents.font.color = Color.new(0,0,0,255)
想要什么颜色可以自己改后面的3个0 范围0~255
  1. # ————————————————————————————————————
  2. # 本脚本来自www.66rpg.com,转载请保留此信息
  3. # ————————————————————————————————————
  4.   
  5. # 注意!!!在对话后得到物品,请在对话后先用事件等待3帧,否则对话框来不及消失。

  6. # 开关定义:

  7. $不显示金钱窗口 = 43

  8. $不显示物品窗口 = 43

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

  10. $不显示防具窗口 = 43

  11. $不显示特技窗口 = 43

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

  13. # ————————————————————————————————————

  14. class Interpreter  
  15.   #--------------------------------------------------------------------------
  16.   # ● 增减金钱
  17.   #--------------------------------------------------------------------------
  18.   def command_125
  19.     value = operate_value(@parameters[0], @parameters[1], @parameters[2])
  20.     $game_party.gain_gold(value)
  21.     if $game_switches[$不显示金钱窗口]==false
  22.       
  23.       carol3_66RPG = Window_Base.new((640-160)/2,128,180,120)
  24.       carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
  25.      
  26.       carol3_66RPG.contents.font.color = Color.new(0,0,0,255)
  27.       carol3_66RPG.contents.font.size = 18
  28.       if value >= 0
  29.         carol3_66RPG.contents.draw_text(0,0,240,32,"获得金钱:")
  30.         #——声效,可以自己改
  31.         
  32.         Audio.se_play("Audio/SE/"+"006-System06",80,100)
  33.         
  34.       else
  35.         carol3_66RPG.contents.draw_text(0,0,240,32,"失去金钱:")
  36.         #——声效,可以自己改
  37.         Audio.se_play("Audio/SE/"+"005-System05",80,100)
  38.       end   
  39.       carol3_66RPG.contents.draw_text(0,62,240,32,value.abs.to_s)
  40.       carol3_66RPG.contents.draw_text(0,62,140,32, $data_system.words.gold,2)
  41.       carol3_66RPG.opacity = 160
  42.       for i in 0..30
  43.         Graphics.update
  44.       end
  45.       for i in 0..10
  46.         carol3_66RPG.opacity -= 30
  47.         carol3_66RPG.contents_opacity -= 30
  48.         Graphics.update
  49.       end
  50.       carol3_66RPG.dispose
  51.     end
  52.     return true
  53.   end
  54.   #--------------------------------------------------------------------------
  55.   # ● 增减物品
  56.   #--------------------------------------------------------------------------
  57.   def command_126
  58.     value = operate_value(@parameters[1], @parameters[2], @parameters[3])
  59.     $game_party.gain_item(@parameters[0], value)
  60.     if $game_switches[$不显示物品窗口]==false
  61.       
  62.       carol3_66RPG_item = $data_items[@parameters[0]]
  63.       carol3_66RPG = Window_Base.new((640-300)/2,128,300,120)
  64.       carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
  65.      
  66.       carol3_66RPG.contents.font.color = Color.new(0,0,0,255)
  67.       carol3_66RPG.contents.font.size = 18
  68.       if value >= 0
  69.         carol3_66RPG.contents.draw_text(0,0,240,32,"获得物品:")   
  70.         #——声效,可以自己改
  71.         Audio.se_play("Audio/SE/"+"006-System06",80,100)
  72.       else
  73.         carol3_66RPG.contents.draw_text(0,0,240,32,"失去物品:")   
  74.         #——声效,可以自己改
  75.         Audio.se_play("Audio/SE/"+"005-System05",80,100)
  76.       end
  77.       carol3_66RPG_bitmap = RPG::Cache.icon(carol3_66RPG_item.icon_name)
  78.       carol3_66RPG.contents.blt(0, 32, carol3_66RPG_bitmap, Rect.new(0, 0,80, 80), 255)
  79.       carol3_66RPG.contents.draw_text(0 + 58, 32, 212, 32, carol3_66RPG_item.name, 0)
  80.       carol3_66RPG.contents.draw_text(0, 62, 268, 32, "×"+value.abs.to_s, 2)
  81.       carol3_66RPG.opacity = 160
  82.       for i in 0..30
  83.         Graphics.update
  84.       end
  85.       for i in 0..10
  86.         carol3_66RPG.opacity -= 30
  87.         carol3_66RPG.contents_opacity -= 30
  88.         Graphics.update
  89.       end
  90.       carol3_66RPG.dispose
  91.     end
  92.     return true
  93.   end
  94.   #--------------------------------------------------------------------------
  95.   # ● 增减武器
  96.   #--------------------------------------------------------------------------
  97.   def command_127
  98.     value = operate_value(@parameters[1], @parameters[2], @parameters[3])
  99.     $game_party.gain_weapon(@parameters[0], value)
  100.    
  101.     if $game_switches[$不显示武器窗口]==false
  102.      
  103.       carol3_66RPG_item = $data_weapons[@parameters[0]]
  104.       carol3_66RPG = Window_Base.new((640-300)/2,128,300,120)
  105.       carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
  106.       carol3_66RPG.contents.font.color = Color.new(0,0,0,255)
  107.        carol3_66RPG.contents.font.size = 18
  108.        if value >= 0
  109.         carol3_66RPG.contents.draw_text(0,0,240,32,"获得武器:")   
  110.         #——声效,可以自己改
  111.         Audio.se_play("Audio/SE/"+"006-System06",80,100)
  112.       else
  113.         carol3_66RPG.contents.draw_text(0,0,240,32,"失去武器:")   
  114.         #——声效,可以自己改
  115.         Audio.se_play("Audio/SE/"+"005-System05",80,100)
  116.       end
  117.       carol3_66RPG_bitmap = RPG::Cache.icon(carol3_66RPG_item.icon_name)
  118.       carol3_66RPG.contents.blt(0, 32, carol3_66RPG_bitmap, Rect.new(0, 0, 80, 80), 255)
  119.       carol3_66RPG.contents.draw_text(0 + 58, 32, 212, 32, carol3_66RPG_item.name, 0)
  120.       carol3_66RPG.contents.draw_text(0, 62, 268, 32, "×"+value.abs.to_s, 2)
  121.       carol3_66RPG.opacity = 160
  122.       for i in 0..30
  123.         Graphics.update
  124.       end
  125.       for i in 0..10
  126.         carol3_66RPG.opacity -= 30
  127.         carol3_66RPG.contents_opacity -= 30
  128.         Graphics.update
  129.       end
  130.       carol3_66RPG.dispose
  131.     end
  132.     return true
  133.   end
  134.   
  135.   #--------------------------------------------------------------------------
  136.   # ● 增减特技
  137.   #--------------------------------------------------------------------------
  138.   def command_318
  139.    #  value = operate_value(@parameters[1], @parameters[2], @parameters[3])
  140.    
  141.     # 获取角色
  142.     actor = $game_actors[@parameters[0]]
  143.     # 增减特技
  144.    
  145.     # 继续
  146.    if $game_switches[$不显示特技窗口]==false
  147.    
  148.       
  149.       redant_66RPG_skill =  $data_skills[@parameters[2]]
  150.       redant_66RPG = Window_Base.new((640-300)/2,128,300,120)
  151.       redant_66RPG.contents = Bitmap.new(redant_66RPG.width - 32, redant_66RPG.height - 32)
  152.       carol3_66RPG.contents.font.color = Color.new(0,0,0,255)
  153.       redant_66RPG.contents.font.size = 18
  154.      if actor != nil
  155.       if @parameters[1] == 0
  156.         actor.learn_skill(@parameters[2])
  157.         redant_66RPG.contents.draw_text(0,0,240,32,"【"+actor.name+"】" + "习得特技:")   
  158.         #——声效,可以自己改
  159.         Audio.se_play("Audio/SE/"+"006-System06",80,100)
  160.       else
  161.         actor.forget_skill(@parameters[2])
  162.         redant_66RPG.contents.draw_text(0,0,240,32,"【"+actor.name+"】" + "遗忘特技:")   
  163.         #——声效,可以自己改
  164.         Audio.se_play("Audio/SE/"+"005-System05",80,100)
  165.       end
  166.     end
  167.    
  168.       redant_66RPG_bitmap = RPG::Cache.icon(redant_66RPG_skill.icon_name)
  169.       redant_66RPG.contents.blt(0, 32, redant_66RPG_bitmap, Rect.new(0, 0,80, 80), 255)
  170.       redant_66RPG.contents.draw_text(0 + 58, 32, 212, 32, redant_66RPG_skill.name, 0)
  171. #      carol3_66RPG.contents.draw_text(0, 62, 268, 32, "×"+value.abs.to_s, 2)
  172.       redant_66RPG.opacity = 160
  173.       for i in 0..30
  174.         Graphics.update
  175.       end
  176.       for i in 0..10
  177.         redant_66RPG.opacity -= 30
  178.         redant_66RPG.contents_opacity -= 30
  179.         Graphics.update
  180.       end
  181.       redant_66RPG.dispose
  182.     end
  183.    
  184.     return true
  185.   end
  186.   #--------------------------------------------------------------------------
  187.   # ● 增减防具
  188.   #--------------------------------------------------------------------------
  189.   def command_128
  190.     value = operate_value(@parameters[1], @parameters[2], @parameters[3])
  191.     $game_party.gain_armor(@parameters[0], value)
  192.     if $game_switches[$不显示防具窗口]==false
  193.      
  194.       carol3_66RPG_item = $data_armors[@parameters[0]]
  195.       carol3_66RPG = Window_Base.new((640-300)/2,128,300,120)
  196.       carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
  197.       carol3_66RPG.contents.font.color = Color.new(0,0,0,255)
  198.       carol3_66RPG.contents.font.size = 18
  199.       if value >= 0
  200.         carol3_66RPG.contents.draw_text(0,0,240,32,"获得防具:")   
  201.         #——声效,可以自己改
  202.         Audio.se_play("Audio/SE/"+"006-System06",80,100)
  203.       else
  204.         carol3_66RPG.contents.draw_text(0,0,240,32,"失去防具:")   
  205.         #——声效,可以自己改
  206.         Audio.se_play("Audio/SE/"+"005-System05",80,100)
  207.       end
  208.       carol3_66RPG_bitmap = RPG::Cache.icon(carol3_66RPG_item.icon_name)
  209.       carol3_66RPG.contents.blt(0, 32, carol3_66RPG_bitmap, Rect.new(0, 0,80, 80), 255)
  210.       carol3_66RPG.contents.draw_text(0 + 58, 32, 212, 32, carol3_66RPG_item.name, 0)
  211.       carol3_66RPG.contents.draw_text(0, 62, 268, 32, "×"+value.abs.to_s, 2)
  212.       carol3_66RPG.opacity = 160
  213.       for i in 0..30
  214.         Graphics.update
  215.       end
  216.       for i in 0..10
  217.         carol3_66RPG.opacity -= 30
  218.         carol3_66RPG.contents_opacity -= 30
  219.         Graphics.update
  220.       end
  221.       carol3_66RPG.dispose
  222.     end
  223.     return true
  224.   end
  225. end
复制代码
[LINE]1,#dddddd[/LINE]系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
作者: zhli667    时间: 2009-6-2 02:34
哦了~~~太感谢了~~~~~~
这个脚本的“经验值”“金钱值”“得到物品名称”也是白的,能改吗???{/hx}
  1. #==============================================================================
  2. # ■ Window_BattleResult
  3. #------------------------------------------------------------------------------
  4. #  战斗结束时、显示获得的 EXP 及金钱的窗口。
  5. #==============================================================================

  6. class Window_BattleResult < Window_Base
  7.   #--------------------------------------------------------------------------
  8.   # ● 初始化对像
  9.   #     exp       : EXP
  10.   #     gold      : 金钱
  11.   #     treasures : 宝物
  12.   #--------------------------------------------------------------------------
  13.   def initialize(exp, gold, treasures)
  14.     @exp = exp
  15.     @gold = gold
  16.     @treasures = treasures
  17.     super(180, 0, 320, 150)# @treasures.size * 75 + 64)
  18.     self.contents = Bitmap.new(width - 32, height - 32)
  19.     self.y = 160 - height / 2
  20.     self.back_opacity = 160
  21.     self.visible = false
  22.     refresh
  23.   end
  24.   #--------------------------------------------------------------------------
  25.   # ● 刷新
  26.   #--------------------------------------------------------------------------
  27.   def refresh
  28.     self.contents.clear
  29.     x = 4
  30.     self.contents.font.color = normal_color
  31.     cx = contents.text_size(@exp.to_s).width
  32.     self.contents.draw_text(x, 0, cx, 32, @exp.to_s)
  33.     x += cx + 4
  34.     self.contents.font.color = system_color
  35.     cx = contents.text_size("EXP").width
  36.     self.contents.draw_text(x, 0, 64, 32, "EXP")
  37.     x += cx + 16
  38.     self.contents.font.color = normal_color
  39.     cx = contents.text_size(@gold.to_s).width
  40.     self.contents.draw_text(x, 0, cx, 32, @gold.to_s)
  41.     x += cx + 4
  42.     self.contents.font.color = system_color
  43.     self.contents.draw_text(x, 0, 128, 32, $data_system.words.gold)
  44.     #y = 32
  45.     x = 5 #定义战斗结束图标的位置
  46.     for item in @treasures
  47.      
  48.       draw_item_name(item, x, 30)
  49.       
  50.       x += 75
  51.     end
  52.   end
  53. end
复制代码

作者: tommay    时间: 2009-6-2 02:37
以下引用后知后觉于2009-6-1 18:21:57的发言:

增加的是
     carol3_66RPG.contents.font.color = Color.new(0,0,0,255)
想要什么颜色可以自己改后面的3个0 范围0~255

我觉得这句就够了,否则 就会出现LZ上面的回帖了,后知后觉兄辛苦了,继续送鱼吧~
作者: 霜冻之狼    时间: 2009-6-2 02:39
以下引用tommay于2009-6-1 18:37:31的发言:
我觉得这句就够了,否则 就会出现LZ上面的回帖了,后知后觉兄辛苦了,继续送鱼吧~

好了好了,你们两个都是自己人就别那么客气了.
我似乎是来迟了一步...

作者: 后知后觉    时间: 2009-6-2 02:39
搜索 normal_color
改成 Color.new(0,0,0,255)
作者: zhli667    时间: 2009-6-2 02:47
OK,解决了~~~~本人脚本盲~~~~~{/ll}
麻烦大家了~~~~~~~~
再次表示深深的感谢~~~~~
{/mg}{/mg}{/mg}




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1