仙剑之十里坡

标题: 得失物品提示 [打印本页]

作者: BlackFeather    时间: 2010-4-11 12:01
标题: 得失物品提示
  1. # ————————————————————————————————————
  2. # 本脚本来自www.66rpg.com,转载请保留此信息
  3. # ————————————————————————————————————
  4.   
  5. # 注意!!!在对话后得到物品,请在对话后先用事件等待3帧,否则对话框来不及消失。

  6. # 开关定义:

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

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

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

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

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

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

作者: 最爱南宫煌    时间: 2010-4-11 15:56
这个你也抢了???!!!!我鄙视你!!!
作者: BlackFeather    时间: 2010-4-11 16:01
抢了???
作者: 最爱南宫煌    时间: 2010-4-11 16:26
你看我在你“自动全屏”处回的贴。
作者: BlackFeather    时间: 2010-4-11 16:43
哦看见了……
作者: 最爱南宫煌    时间: 2010-4-11 22:37
就是,你是不是抢了???




欢迎光临 仙剑之十里坡 (http://palslp.com/bbs/) Powered by Discuz! X2.5