赞 | 23 |
VIP | 123 |
好人卡 | 86 |
积分 | 109 |
经验 | 151880 |
最后登录 | 2024-12-2 |
在线时间 | 3545 小时 |
Lv4.逐梦者 素材区好人
- 梦石
- 3
- 星屑
- 7854
- 在线时间
- 3545 小时
- 注册时间
- 2011-7-21
- 帖子
- 2285
|
让特殊物品不在商店显示
#============================================================================== # 本脚本来自[url]www.66rpg.com[/url],转载和使用请保留此声明 #============================================================================== # ■ Window_ShopSell #------------------------------------------------------------------------------ # 商店画面、浏览显示可以卖掉的商品的窗口。 #============================================================================== class Window_ShopSell < Window_Selectable #-------------------------------------------------------------------------- # ● 初始化对像 #-------------------------------------------------------------------------- def initialize @not_for_sell_item = [40,41,42,43,44,45,46,47,48,49,50,51,66,67,68,69,70,71,72,80] @not_for_sell_weapon = [12,13] @not_for_sell_armor = [26,29,30] super(0, 128, 640, 352) @column_max = 2 refresh self.index = 0 end #-------------------------------------------------------------------------- # ● 刷新 #-------------------------------------------------------------------------- def refresh if self.contents != nil self.contents.dispose self.contents = nil end @data = [] for i in 1...$data_items.size if $game_party.item_number(i) > 0 @data.push($data_items[i]) unless @not_for_sell_item.include?(i) end end for i in 1...$data_weapons.size if $game_party.weapon_number(i) > 0 @data.push($data_weapons[i]) unless @not_for_sell_weapon.include?(i) end end for i in 1...$data_armors.size if $game_party.armor_number(i) > 0 @data.push($data_armors[i]) unless @not_for_sell_armor.include?(i) end end # 如果项目数不是 0 就生成位图、描绘全部项目 @item_max = @data.size if @item_max > 0 self.contents = Bitmap.new(width - 32, row_max * 32) for i in 0...@item_max draw_item(i) end end end end #======================================================================= # 本脚本来自[url]www.66rpg.com[/url],转载和使用请保留此声明 #=======================================================================
#==============================================================================
# 本脚本来自[url]www.66rpg.com[/url],转载和使用请保留此声明
#==============================================================================
# ■ Window_ShopSell
#------------------------------------------------------------------------------
# 商店画面、浏览显示可以卖掉的商品的窗口。
#==============================================================================
class Window_ShopSell < Window_Selectable
#--------------------------------------------------------------------------
# ● 初始化对像
#--------------------------------------------------------------------------
def initialize
@not_for_sell_item = [40,41,42,43,44,45,46,47,48,49,50,51,66,67,68,69,70,71,72,80]
@not_for_sell_weapon = [12,13]
@not_for_sell_armor = [26,29,30]
super(0, 128, 640, 352)
@column_max = 2
refresh
self.index = 0
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in 1...$data_items.size
if $game_party.item_number(i) > 0
@data.push($data_items[i]) unless @not_for_sell_item.include?(i)
end
end
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0
@data.push($data_weapons[i]) unless @not_for_sell_weapon.include?(i)
end
end
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0
@data.push($data_armors[i]) unless @not_for_sell_armor.include?(i)
end
end
# 如果项目数不是 0 就生成位图、描绘全部项目
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
for i in 0...@item_max
draw_item(i)
end
end
end
end
#=======================================================================
# 本脚本来自[url]www.66rpg.com[/url],转载和使用请保留此声明
#=======================================================================
|
评分
-
查看全部评分
|