Project1

标题: 版务临时占用 [打印本页]

作者: 禾西    时间: 2008-4-20 14:03
标题: 版务临时占用
1.腳本
  1.   def auto_reminding(item, value)
  2.       carol3_66RPG_item = item
  3.       carol3_66RPG = Window_Base.new((640-300)/2,128,300,100)
  4.       carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
  5.       if value >= 0
  6.         case item
  7.         when RPG::Item
  8.           carol3_66RPG.contents.draw_text(0,0,240,32,"获得物品:")  
  9.         when RPG::Weapon
  10.           carol3_66RPG.contents.draw_text(0,0,240,32,"获得武器:")  
  11.         when RPG::Armor
  12.           carol3_66RPG.contents.draw_text(0,0,240,32,"获得防具:")  
  13.         end  
  14.         #——声效,可以自己改
  15.         Audio.se_play("Audio/SE/"+"006-System06",80,100)
  16.       else
  17.         case item
  18.         when RPG::Item
  19.           carol3_66RPG.contents.draw_text(0,0,240,32,"失去物品:")  
  20.         when RPG::Weapon
  21.           carol3_66RPG.contents.draw_text(0,0,240,32,"失去武器:")  
  22.         when RPG::Armor
  23.           carol3_66RPG.contents.draw_text(0,0,240,32,"失去防具:")  
  24.         end   
  25.         #——声效,可以自己改
  26.         Audio.se_play("Audio/SE/"+"005-System05",80,100)
  27.       end
  28.       carol3_66RPG_bitmap = RPG::Cache.icon(carol3_66RPG_item.icon_name)
  29.       carol3_66RPG.contents.blt(0, 32, carol3_66RPG_bitmap, Rect.new(0, 0, 24, 24), 255)
  30.       carol3_66RPG.contents.draw_text(0 + 28, 32, 212, 32, carol3_66RPG_item.name, 0)
  31.       carol3_66RPG.contents.draw_text(0, 32, 268, 32, "×"+value.abs.to_s, 2)
  32.       carol3_66RPG.opacity = 160
  33.       for i in 0..30
  34.         Graphics.update
  35.       end
  36.       for i in 0..10
  37.         carol3_66RPG.opacity -= 30
  38.         carol3_66RPG.contents_opacity -= 30
  39.         Graphics.update
  40.       end
  41.       carol3_66RPG.dispose
  42.   end
复制代码

2.適當時候調用
auto_reminding($data_items[ ], 數目)




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