赞 | 0 |
VIP | 10 |
好人卡 | 49 |
积分 | 10 |
经验 | 22958 |
最后登录 | 2020-8-1 |
在线时间 | 2161 小时 |
Lv3.寻梦者 酱油的
- 梦石
- 0
- 星屑
- 1035
- 在线时间
- 2161 小时
- 注册时间
- 2007-12-22
- 帖子
- 3271
|
「物品得失提示脚本」是寫在事件解釋器裏面的一個腳本。原本只監視事件當中「增加金錢」「增加物品」,「增加武器」,「增加防具」四個選項,并不監視「脚本」……所以,理所當然地沒有提示。如果需要用到腳本的话,就在把相對應的語句寫在事件的腳本當中。具體可以參照
- carol3_66RPG_item = # 這裏需要填入你的物品的數據。最好把上面的生成的數據記錄在一個全局變量當中。
- carol3_66RPG = Window_Base.new((640-300)/2,128,300,100)
- carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
- if value >= 0
- carol3_66RPG.contents.draw_text(0,0,240,32,"获得防具:")
- #——声效,可以自己改
- Audio.se_play("Audio/SE/"+"006-System06",80,100)
- else
- carol3_66RPG.contents.draw_text(0,0,240,32,"失去防具:")
- #——声效,可以自己改
- Audio.se_play("Audio/SE/"+"005-System05",80,100)
- end
- carol3_66RPG_bitmap = RPG::Cache.icon(carol3_66RPG_item.icon_name)
- carol3_66RPG.contents.blt(0, 32, carol3_66RPG_bitmap, Rect.new(0, 0, 24, 24), 255)
- carol3_66RPG.contents.draw_text(0 + 28, 32, 212, 32, carol3_66RPG_item.name, 0)
- carol3_66RPG.contents.draw_text(0, 32, 268, 32, "×"+value.abs.to_s, 2)
- carol3_66RPG.opacity = 160
- for i in 0..30
- Graphics.update
- end
- for i in 0..10
- carol3_66RPG.opacity -= 30
- carol3_66RPG.contents_opacity -= 30
- Graphics.update
- end
- carol3_66RPG.dispose
复制代码
當中的文字可以用分歧改變,但是具體差不多。如果不够寫的话,可以寫成一個方法,然後在腳本當中調用。比如這樣:
- def auto_reminding(item, value)
- carol3_66RPG_item = item
- carol3_66RPG = Window_Base.new((640-300)/2,128,300,100)
- carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
- if value >= 0
- case item
- when RPG::Item
- carol3_66RPG.contents.draw_text(0,0,240,32,"获得物品:")
- when RPG::Weapon
- carol3_66RPG.contents.draw_text(0,0,240,32,"获得武器:")
- when RPG::Armor
- carol3_66RPG.contents.draw_text(0,0,240,32,"获得防具:")
- end
- #——声效,可以自己改
- Audio.se_play("Audio/SE/"+"006-System06",80,100)
- else
- case item
- when RPG::Item
- carol3_66RPG.contents.draw_text(0,0,240,32,"失去物品:")
- when RPG::Weapon
- carol3_66RPG.contents.draw_text(0,0,240,32,"失去武器:")
- when RPG::Armor
- carol3_66RPG.contents.draw_text(0,0,240,32,"失去防具:")
- end
- #——声效,可以自己改
- Audio.se_play("Audio/SE/"+"005-System05",80,100)
- end
- carol3_66RPG_bitmap = RPG::Cache.icon(carol3_66RPG_item.icon_name)
- carol3_66RPG.contents.blt(0, 32, carol3_66RPG_bitmap, Rect.new(0, 0, 24, 24), 255)
- carol3_66RPG.contents.draw_text(0 + 28, 32, 212, 32, carol3_66RPG_item.name, 0)
- carol3_66RPG.contents.draw_text(0, 32, 268, 32, "×"+value.abs.to_s, 2)
- carol3_66RPG.opacity = 160
- for i in 0..30
- Graphics.update
- end
- for i in 0..10
- carol3_66RPG.opacity -= 30
- carol3_66RPG.contents_opacity -= 30
- Graphics.update
- end
- carol3_66RPG.dispose
- end
复制代码
使用的時候調用
auto_reminding($data_×××)就好了
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~ |
|