Project1

标题: 显示获得物品的脚本...我想将失去的物品提示消除 [打印本页]

作者: qqp987987    时间: 2009-4-8 16:22
提示: 作者被禁止或删除 内容自动屏蔽
作者: 迅雷進    时间: 2009-4-8 17:29
在失去物品的时候打开相对的开关不就可以了吗?
作者: tommay    时间: 2009-4-8 17:31
如下,当45号开关打开时,失去物品不提示
  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #==============================================================================

  4. # 注意!!!在对话后得到物品,请在对话后先用事件等待3帧,否则对话框来不及消失。

  5. # 开关定义:

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

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

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

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

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

  11. $失去物品不提示 = 45

  12. # ————————————————————————————————————

  13. class Interpreter  
  14.   #--------------------------------------------------------------------------
  15.   # ● 增减金钱
  16.   #--------------------------------------------------------------------------
  17.   def command_125
  18.     value = operate_value(@parameters[0], @parameters[1], @parameters[2])
  19.     $game_party.gain_gold(value)
  20.     if $game_switches[$不显示金钱窗口]==false
  21.       carol3_66RPG = Window_Base.new((640-160)/2,128,180,100)
  22.       carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
  23.       if value >= 0
  24.         carol3_66RPG.contents.draw_text(0,0,240,32,"获得金钱:")
  25.         #——声效,可以自己改
  26.         Audio.se_play("Audio/SE/"+"006-System06",80,100)
  27.       else
  28.         carol3_66RPG.contents.draw_text(0,0,240,32,"失去金钱:")
  29.         #——声效,可以自己改
  30.         Audio.se_play("Audio/SE/"+"005-System05",80,100)
  31.       end   
  32.       carol3_66RPG.contents.draw_text(0,32,240,32,value.abs.to_s)
  33.       carol3_66RPG.contents.draw_text(0,32,140,32, $data_system.words.gold,2)
  34.       carol3_66RPG.opacity = 160
  35.       for i in 0..30
  36.         Graphics.update
  37.       end
  38.       for i in 0..10
  39.         carol3_66RPG.opacity -= 30
  40.         carol3_66RPG.contents_opacity -= 30
  41.         Graphics.update
  42.       end
  43.       carol3_66RPG.dispose
  44.     end
  45.     return true
  46.   end
  47.   #--------------------------------------------------------------------------
  48.   # ● 增减物品
  49.   #--------------------------------------------------------------------------
  50.   def command_126
  51.     value = operate_value(@parameters[1], @parameters[2], @parameters[3])
  52.     $game_party.gain_item(@parameters[0], value)
  53.     if $game_switches[$不显示物品窗口]==false
  54.       if $game_switches[$失去物品不提示] and value < 0
  55.       
  56.       else
  57.         carol3_66RPG_item = $data_items[@parameters[0]]
  58.         carol3_66RPG = Window_Base.new((640-300)/2,128,300,100)
  59.         carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
  60.         if value >= 0
  61.           carol3_66RPG.contents.draw_text(0,0,240,32,"获得物品:")   
  62.           #——声效,可以自己改
  63.           Audio.se_play("Audio/SE/"+"006-System06",80,100)
  64.         else
  65.           carol3_66RPG.contents.draw_text(0,0,240,32,"失去物品:")   
  66.           #——声效,可以自己改
  67.           Audio.se_play("Audio/SE/"+"005-System05",80,100)
  68.         end
  69.         carol3_66RPG_bitmap = RPG::Cache.icon(carol3_66RPG_item.icon_name)
  70.         carol3_66RPG.contents.blt(0, 32, carol3_66RPG_bitmap, Rect.new(0, 0, 24, 24), 255)
  71.         carol3_66RPG.contents.draw_text(0 + 28, 32, 212, 32, carol3_66RPG_item.name, 0)
  72.         carol3_66RPG.contents.draw_text(0, 32, 268, 32, "×"+value.abs.to_s, 2)
  73.         carol3_66RPG.opacity = 160
  74.         for i in 0..30
  75.           Graphics.update
  76.         end
  77.         for i in 0..10
  78.           carol3_66RPG.opacity -= 30
  79.           carol3_66RPG.contents_opacity -= 30
  80.           Graphics.update
  81.         end
  82.         carol3_66RPG.dispose
  83.       end
  84.     end
  85.     return true
  86.   end
  87.   #--------------------------------------------------------------------------
  88.   # ● 增减武器
  89.   #--------------------------------------------------------------------------
  90.   def command_127
  91.     value = operate_value(@parameters[1], @parameters[2], @parameters[3])
  92.     $game_party.gain_weapon(@parameters[0], value)
  93.     if $game_switches[$不显示武器窗口]==false
  94.       carol3_66RPG_item = $data_weapons[@parameters[0]]
  95.       carol3_66RPG = Window_Base.new((640-300)/2,128,300,100)
  96.       carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
  97.       if value >= 0
  98.         carol3_66RPG.contents.draw_text(0,0,240,32,"获得武器:")   
  99.         #——声效,可以自己改
  100.         Audio.se_play("Audio/SE/"+"006-System06",80,100)
  101.       else
  102.         carol3_66RPG.contents.draw_text(0,0,240,32,"失去武器:")   
  103.         #——声效,可以自己改
  104.         Audio.se_play("Audio/SE/"+"005-System05",80,100)
  105.       end
  106.       carol3_66RPG_bitmap = RPG::Cache.icon(carol3_66RPG_item.icon_name)
  107.       carol3_66RPG.contents.blt(0, 32, carol3_66RPG_bitmap, Rect.new(0, 0, 24, 24), 255)
  108.       carol3_66RPG.contents.draw_text(0 + 28, 32, 212, 32, carol3_66RPG_item.name, 0)
  109.       carol3_66RPG.contents.draw_text(0, 32, 268, 32, "×"+value.abs.to_s, 2)
  110.       carol3_66RPG.opacity = 160
  111.       for i in 0..30
  112.         Graphics.update
  113.       end
  114.       for i in 0..10
  115.         carol3_66RPG.opacity -= 30
  116.         carol3_66RPG.contents_opacity -= 30
  117.         Graphics.update
  118.       end
  119.       carol3_66RPG.dispose
  120.     end
  121.     return true
  122.   end
  123.   #--------------------------------------------------------------------------
  124.   # ● 增减防具
  125.   #--------------------------------------------------------------------------
  126.   def command_128
  127.     value = operate_value(@parameters[1], @parameters[2], @parameters[3])
  128.     $game_party.gain_armor(@parameters[0], value)
  129.     if $game_switches[$不显示防具窗口]==false
  130.       carol3_66RPG_item = $data_armors[@parameters[0]]
  131.       carol3_66RPG = Window_Base.new((640-300)/2,128,300,100)
  132.       carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
  133.       if value >= 0
  134.         carol3_66RPG.contents.draw_text(0,0,240,32,"获得防具:")   
  135.         #——声效,可以自己改
  136.         Audio.se_play("Audio/SE/"+"006-System06",80,100)
  137.       else
  138.         carol3_66RPG.contents.draw_text(0,0,240,32,"失去防具:")   
  139.         #——声效,可以自己改
  140.         Audio.se_play("Audio/SE/"+"005-System05",80,100)
  141.       end
  142.       carol3_66RPG_bitmap = RPG::Cache.icon(carol3_66RPG_item.icon_name)
  143.       carol3_66RPG.contents.blt(0, 32, carol3_66RPG_bitmap, Rect.new(0, 0, 24, 24), 255)
  144.       carol3_66RPG.contents.draw_text(0 + 28, 32, 212, 32, carol3_66RPG_item.name, 0)
  145.       carol3_66RPG.contents.draw_text(0, 32, 268, 32, "×"+value.abs.to_s, 2)
  146.       carol3_66RPG.opacity = 160
  147.       for i in 0..30
  148.         Graphics.update
  149.       end
  150.       for i in 0..10
  151.         carol3_66RPG.opacity -= 30
  152.         carol3_66RPG.contents_opacity -= 30
  153.         Graphics.update
  154.       end
  155.       carol3_66RPG.dispose
  156.     end
  157.     return true
  158.   end
  159. end



  160. #==============================================================================
  161. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  162. #==============================================================================
复制代码
[LINE]1,#dddddd[/LINE]系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~




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