赞 | 1 |
VIP | 255 |
好人卡 | 52 |
积分 | 1 |
经验 | 77416 |
最后登录 | 2016-1-18 |
在线时间 | 1269 小时 |
Lv1.梦旅人 薄凉看客
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 1269 小时
- 注册时间
- 2010-6-20
- 帖子
- 1316
|
本帖最后由 恐惧剑刃 于 2014-8-29 18:56 编辑
- # ————————————————————————————————————
- # 本脚本来自www.66rpg.com,转载请保留此信息
- # ————————————————————————————————————
-
- # 注意!!!在对话后得到物品,请在对话后先用事件等待3帧,否则对话框来不及消失。
- # 开关定义:
- $不显示金钱窗口 = 4
- $不显示物品窗口 = 4
- $不显示武器窗口 = 4
- $不显示防具窗口 = 4
- $不显示角色窗口 = 4
- # 以上开关,当打开的时候,获得物品将不会提示,比如默认打开5号开关,获得金钱不再提示
- # ————————————————————————————————————
- class Interpreter
- #--------------------------------------------------------------------------
- # ● 角色的替换
- #--------------------------------------------------------------------------
- def command_129
- # 获取角色
- actor = $game_actors[@parameters[0]]
- # 角色有效的情况下
- if actor != nil
- # 操作分支
- if @parameters[1] == 0
- if @parameters[2] == 1
- $game_actors[@parameters[0]].setup(@parameters[0])
- end
- $game_party.add_actor(@parameters[0])
- else
- $game_party.remove_actor(@parameters[0])
- end
- end
-
- if @parameters[0] > 50
- return true
- end
- #修正一个小BUG 应该+而不能<<
- #<<会修改原字符串并添加到尾部。
- if not $game_switches[$不显示角色窗口]
- carol3_66RPG = Window_Base.new((640-310)/2-5,432/2,310,48)
- carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
- if @parameters[1] == 0
- carol3_66RPG.contents.font.name = (["宋体","黑体"])
- carol3_66RPG.contents.font.size = 16
- carol3_66RPG.contents.draw_text(0,-8,240,32,$game_actors[@parameters[0]].name+"加入了队伍")
- #——声效,可以自己改
- #Audio.se_play("Audio/SE/"+"系统-获得物品",80,100)
- else
- carol3_66RPG.contents.font.name = (["宋体","黑体"])
- carol3_66RPG.contents.font.size = 15
- carol3_66RPG.contents.draw_text(0,-8,240,32,$game_actors[@parameters[0]].name+"离开了队伍")
- #——声效,可以自己改
- #Audio.se_play("Audio/SE/"+"系统-失去物品",80,100)
- end
- 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
- # 继续
- return true
- end
- #--------------------------------------------------------------------------
- # ● 增减金钱
- #--------------------------------------------------------------------------
- def command_125
- value = operate_value(@parameters[0], @parameters[1], @parameters[2])
- $game_party.gain_gold(value)
- if $game_switches[$不显示金钱窗口]==false
- carol3_66RPG = Window_Base.new((640-310)/2-5,432/2,310,48)
- carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
- if value >= 0
- carol3_66RPG.contents.font.name = (["宋体","黑体"])
- carol3_66RPG.contents.font.size = 16
- carol3_66RPG.contents.draw_text(0,-8,240,32,"你得到了")
- #——声效,可以自己改
- Audio.se_play("Audio/SE/"+"系统-获得物品",80,100)
- else
- carol3_66RPG.contents.font.name = (["宋体","黑体"])
- carol3_66RPG.contents.font.size = 15
- carol3_66RPG.contents.draw_text(0,-8,240,32,"你失去了")
- #——声效,可以自己改
- Audio.se_play("Audio/SE/"+"系统-失去物品",80,100)
- end
- carol3_66RPG.contents.font.name = (["宋体","黑体"])
- carol3_66RPG.contents.font.size = 16
- carol3_66RPG.contents.draw_text(64,-8,240,32,value.abs.to_s + "两银子。")
- carol3_66RPG.opacity = 255
-
- 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
- return true
- end
- #--------------------------------------------------------------------------
- # ● 增减物品
- #--------------------------------------------------------------------------
- def command_126
- value = operate_value(@parameters[1], @parameters[2], @parameters[3])
- $game_party.gain_item(@parameters[0], value)
- if $game_switches[$不显示物品窗口]==false
- carol3_66RPG_item = $data_items[@parameters[0]]
- carol3_66RPG = Window_Base.new((640-310)/2-5,432/2,310,48)
- carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
- if value >= 0
- carol3_66RPG.contents.font.name = (["宋体","黑体"])
- carol3_66RPG.contents.font.size = 16
- carol3_66RPG.contents.draw_text(0,-8,240,32,"你获得了")
- #——声效,可以自己改
- Audio.se_play("Audio/SE/"+"系统-获得物品",80,100)
- else
- carol3_66RPG.contents.font.name = (["宋体","黑体"])
- carol3_66RPG.contents.font.size = 16
- carol3_66RPG.contents.draw_text(0,-8,240,32,"你遗失了")
- #——声效,可以自己改
- Audio.se_play("Audio/SE/"+"系统-失去物品",80,100)
- end
-
- carol3_66RPG.contents.font.name = (["宋体","黑体"])
- carol3_66RPG.contents.font.size = 16
- carol3_66RPG.contents.font.color = Color.new(255, 18, 0, 255)
- carol3_66RPG.contents.draw_text(64,-8,carol3_66RPG.contents.text_size(carol3_66RPG_item.name).width,32,carol3_66RPG_item.name)
- carol3_66RPG.contents.font.color = Color.new(255, 255, 255, 255)
- carol3_66RPG.contents.draw_text(55,-8,carol3_66RPG.contents.text_size(carol3_66RPG_item.name).width + 24,32,"。", 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
- return true
- end
- #--------------------------------------------------------------------------
- # ● 增减武器
- #--------------------------------------------------------------------------
- def command_127
- value = operate_value(@parameters[1], @parameters[2], @parameters[3])
- $game_party.gain_weapon(@parameters[0], value)
- if $game_switches[$不显示武器窗口]==false
- carol3_66RPG_item = $data_weapons[@parameters[0]]
- carol3_66RPG = Window_Base.new((640-310)/2-5,432/2,310,48)
- carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
- if value >= 0
- carol3_66RPG.contents.font.name = (["宋体","黑体"])
- carol3_66RPG.contents.font.size = 16
- carol3_66RPG.contents.draw_text(0,-8,240,32,"你获得了")
- #——声效,可以自己改
- Audio.se_play("Audio/SE/"+"系统-获得物品",80,100)
- else
- carol3_66RPG.contents.font.name = (["宋体","黑体"])
- carol3_66RPG.contents.font.size = 16
- carol3_66RPG.contents.draw_text(0,-8,240,32,"你遗失了")
- #——声效,可以自己改
- Audio.se_play("Audio/SE/"+"系统-失去物品",80,100)
- end
-
- carol3_66RPG.contents.font.name = (["宋体","黑体"])
- carol3_66RPG.contents.font.size = 16
- carol3_66RPG.contents.font.color = Color.new(255, 18, 0, 255)
- carol3_66RPG.contents.draw_text(64,-8,carol3_66RPG.contents.text_size(carol3_66RPG_item.name).width,32,carol3_66RPG_item.name)
- carol3_66RPG.contents.font.color = Color.new(255, 255, 255, 255)
- carol3_66RPG.contents.draw_text(55,-8,carol3_66RPG.contents.text_size(carol3_66RPG_item.name).width + 24,32,"。", 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
- return true
- end
- #--------------------------------------------------------------------------
- # ● 增减防具
- #--------------------------------------------------------------------------
- def command_128
- value = operate_value(@parameters[1], @parameters[2], @parameters[3])
- $game_party.gain_armor(@parameters[0], value)
- if $game_switches[$不显示防具窗口]==false
- carol3_66RPG_item = $data_armors[@parameters[0]]
- carol3_66RPG = Window_Base.new((640-310)/2-5,432/2,310,48)
- carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
- if value >= 0
- carol3_66RPG.contents.font.name = (["宋体","黑体"])
- carol3_66RPG.contents.font.size = 16
- carol3_66RPG.contents.draw_text(0,-8,240,32,"你获得了")
- #——声效,可以自己改
- Audio.se_play("Audio/SE/"+"系统-获得物品",80,100)
- else
- carol3_66RPG.contents.font.name = (["宋体","黑体"])
- carol3_66RPG.contents.font.size = 16
- carol3_66RPG.contents.draw_text(0,-8,240,32,"你遗失了")
- #——声效,可以自己改
- Audio.se_play("Audio/SE/"+"系统-失去物品",80,100)
- end
-
- carol3_66RPG.contents.font.name = (["宋体","黑体"])
- carol3_66RPG.contents.font.size = 16
- carol3_66RPG.contents.font.color = Color.new(255, 18, 0, 255)
- carol3_66RPG.contents.draw_text(64,-8,carol3_66RPG.contents.text_size(carol3_66RPG_item.name).width,32,carol3_66RPG_item.name)
- carol3_66RPG.contents.font.color = Color.new(255, 255, 255, 255)
- carol3_66RPG.contents.draw_text(55,-8,carol3_66RPG.contents.text_size(carol3_66RPG_item.name).width + 24,32,"。", 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
- return true
- end
- end
复制代码 |
评分
-
查看全部评分
|