赞 | 0 |
VIP | 37 |
好人卡 | 0 |
积分 | 1 |
经验 | 48662 |
最后登录 | 2012-11-14 |
在线时间 | 3 小时 |
Lv1.梦旅人 SB們大家好<
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 3 小时
- 注册时间
- 2008-1-7
- 帖子
- 457
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
轩三风格的得失物品金钱提示脚本。
把皮肤图片 和 银币图片 去掉数字后 放到 Graphics\System 文件夹下
当然你也可以替换成同名的其他图片。
- class Game_Interpreter
- UnShowSwitch = 5 #禁止显示提示开关
- GainSe = "Audio/SE/Recovery.ogg"
- LoseSe = "Audio/SE/Raise2.ogg"
- #--------------------------------------------------------------------------
- # ● 增减金钱
- #--------------------------------------------------------------------------
- def command_125
- value = operate_value(@params[0], @params[1], @params[2])
- $game_party.gain_gold(value)
- show_window(0,value) unless $game_switches[UnShowSwitch]
- return true
- end
- #--------------------------------------------------------------------------
- # ● 增减物品
- #--------------------------------------------------------------------------
- def command_126
- value = operate_value(@params[1], @params[2], @params[3])
- $game_party.gain_item($data_items[@params[0]], value)
- $game_map.need_refresh = true
- show_window(1,value,@params[0]) unless $game_switches[UnShowSwitch]
- return true
- end
- #--------------------------------------------------------------------------
- # ● 增减武器
- #--------------------------------------------------------------------------
- def command_127
- value = operate_value(@params[1], @params[2], @params[3])
- $game_party.gain_item($data_weapons[@params[0]], value, @params[4])
- show_window(2,value,@params[0]) unless $game_switches[UnShowSwitch]
- return true
- end
- #--------------------------------------------------------------------------
- # ● 增减防具
- #--------------------------------------------------------------------------
- def command_128
- value = operate_value(@params[1], @params[2], @params[3])
- $game_party.gain_item($data_armors[@params[0]], value, @params[4])
- show_window(3,value,@params[0]) unless $game_switches[UnShowSwitch]
- return true
- end
- def show_window(type,value,id = 0)
- if type == 0
- item = "gold"
- else #物品,武器,防具
- if type == 1
- item = $data_items[id]
- elsif type == 2
- item = $data_weapons[id]
- else
- item = $data_armors[id]
- end
- end
- width = 150 + (type == 0 ? value.to_s.size * 7 - 16 : item.name.size * 7)
- w = Window_Base.new((640-width)/2 - 30 ,208,width,64)
- w.windowskin = Cache.system("Window2")
- w.contents = Bitmap.new(w.width - 32, w.height - 32)
- w.contents.font.color = w.text_color(1)
- w.contents.fill_rect(w.contents.rect,w.text_color(0))
- w.opacity = w.contents_opacity =0
- for i in 0..10
- w.opacity += 26
- w.contents_opacity += 26
- w.x += 3
- Graphics.update
- end
- if value >= 0
- w.contents.draw_text(0,4,48,24,"得到")
- Audio.se_play(GainSe)
- else
- w.contents.draw_text(0,4,48,24,"失去")
- Audio.se_play(LoseSe)
- end
- if type != 0
- w.draw_item_name_c(item,50, 4 ,type + 23)
- w.opacity = w.back_opacity = 255
- w.contents.font.color = w.text_color(14)
- w.contents.draw_text(width - 72 , 4, 40, 24, "× " + value.abs.to_s ,2)
- else
- bitmap = Cache.system("gold")
- w.contents.blt(50, 4 ,bitmap , bitmap.rect)
- w.contents.font.color = w.text_color(14)
- w.contents.draw_text(width - 112 , 4, 72, 24, " " + value.abs.to_s ,2)
- end
- for i in 0..30
- Graphics.update
- end
- for i in 0..20
- w.opacity -= 13
- w.contents_opacity -= 13
- w.x += 2
- Graphics.update
- end
- w.dispose
- end
- end
- class Window_Base
- def draw_item_name_c(item, x, y , color)
- if item != nil
- draw_icon(item.icon_index, x, y, true)
- self.contents.font.color = self.text_color(color)
- self.contents.draw_text(x + 24, y, 172, WLH, item.name)
- end
- end
- end
复制代码
皮肤图片
银币图片
|
|