赞 | 2 |
VIP | 0 |
好人卡 | 1 |
积分 | 41 |
经验 | 11248 |
最后登录 | 2024-11-12 |
在线时间 | 767 小时 |
Lv3.寻梦者
- 梦石
- 0
- 星屑
- 4117
- 在线时间
- 767 小时
- 注册时间
- 2015-6-27
- 帖子
- 80
|
5楼
楼主 |
发表于 2017-12-8 19:01:23
|
只看该作者
我改的脚本,加的部分只有用横线隔起来的部分和下面那块
- #==============================================================================# 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
- #==============================================================================
- # 注意!!!在对话后得到物品,请在对话后先用事件等待3帧,否则对话框来不及消失。
- # 开关定义:
- $不显示金钱窗口 = 41
- $不显示物品窗口 = 41
- $不显示武器窗口 = 41
- $不显示防具窗口 = 41
- # 以上开关,当打开的时候,获得物品将不会提示,比如默认打开41号开关,获得金钱不再提示
- #显示物品图片的功能,名字后加@图片名
- # ————————————————————————————————————
- class Interpreter
- #--------------------------------------------------------------------------
- # ● 增减金钱
- #--------------------------------------------------------------------------
- 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-160)/2,128,180,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.contents.draw_text(0,32,240,32,value.abs.to_s)
- carol3_66RPG.contents.draw_text(0,32,140,32, $data_system.words.gold,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_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(250,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
- #========================================================
- @item_window_pic2 = Window_Item_Pic2.new
- @item_window_pic2.set_item(carol3_66RPG_item)
- #===========================================================
- 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, " ",2)#+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
- #==========================================
- @item_window_pic2.opacity -= 30
- @item_window_pic2.contents_opacity -= 30
- #===========================================
- Graphics.update
- end
- carol3_66RPG.dispose
- #=====================================
- @item_window_pic2.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(250,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.me_play("Audio/ME/"+"001-Victory01",80,100)
- else
- carol3_66RPG.contents.draw_text(0,0,240,32,"失去武器:")
- #——声效,可以自己改
- Audio.se_play("Audio/SE/"+"005-System05",80,100)
- end
- #========================================================
- @item_window_pic2 = Window_Item_Pic2.new
- @item_window_pic2.set_item(carol3_66RPG_item)
- #===========================================================
- 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
- #==========================================
- @item_window_pic2.opacity -= 30
- @item_window_pic2.contents_opacity -= 30
- #===========================================
- Graphics.update
- end
- carol3_66RPG.dispose
- #=====================================
- @item_window_pic2.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(250,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
- #========================================================
- @item_window_pic2 = Window_Item_Pic2.new
- @item_window_pic2.set_item(carol3_66RPG_item)
- #===========================================================
- 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
- #==========================================
- @item_window_pic2.opacity -= 30
- @item_window_pic2.contents_opacity -= 30
- #===========================================
- Graphics.update
- end
- carol3_66RPG.dispose
- #=====================================
- @item_window_pic2.dispose
- #========================================
- end
- return true
- end
- end
- #===========================================================================
- module RPG
- class Weapon
- def name
- name = @name.split(/@/)[0]
- return name != nil ? name : ''
- end
- def pic_name
- pic_name = @name.split(/@/)[1]
- return pic_name != nil ? pic_name : ""
- end
- end
- class Armor
- def name
- name = @name.split(/@/)[0]
- return name != nil ? name : ''
- end
- def pic_name
- pic_name = @name.split(/@/)[1]
- return pic_name != nil ? pic_name : ""
- end
- end
- class Item
- def name
- name = @name.split(/@/)[0]
- return name != nil ? name : ''
- end
- def pic_name
- pic_name = @name.split(/@/)[1]
- return pic_name != nil ? pic_name.to_s : ""
- end
- end
- end
- class Window_Item_Pic2 < Window_Base
- #--------------------------------------------------------------------------
- # ● 初始化对像
- #--------------------------------------------------------------------------
- def initialize
- super(30, 110, 220, 220)
- @item = nil
- self.back_opacity = 160
- self.contents = Bitmap.new(width - 32, height - 32)
- self.opacity = 255
- #bearrpg
- #refresh去掉了
- end
- #--------------------------------------------------------------------------
- # ● 获取物品
- #--------------------------------------------------------------------------
- def item
- return @data[self.index]
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def set_item(item)
- self.contents.clear
- @item = item
- if item != nil
- bitmap = RPG::Cache.picture(@item.pic_name)
- pic_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
- self.contents.blt(0, 0, bitmap, pic_rect)
- end
- end
- end
- #==============================================================================
- # ■ Window_Equip
- #------------------------------------------------------------------------------
- # 装备物品大图标显示。
- #==============================================================================
- class Window_Equip < Window_Base
- #--------------------------------------------------------------------------
- # ● 初始化对像
- #--------------------------------------------------------------------------
- def initialize
- super(0, 0, 640, 480)
- @item = nil
- self.contents = Bitmap.new(width - 32, height - 32)
- self.opacity = 0
- refresh
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- if @item != nil
- bitmap = RPG::Cache.picture(@item.pic_name)
- pic_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
- self.contents.blt(0, 0, bitmap, pic_rect)
- end
- end
- def set_item(carol3_66RPG_item)
- @item = carol3_66RPG_item
- end
- end
- #==============================================================================
- # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
- #==============================================================================
复制代码
|
|