本帖最后由 crow2006 于 2014-9-18 13:41 编辑 脚本包含两个部分: 第一部分: RUBY 代码复制class Game_Interpreter #------------------------------------------------ ...
#======================================================= #★显示物品提示窗口 #======================================================= class Window_fuye<Window_Base #==================================== #●初始化 #====================================#--------------------------------------------------------------------------# ● 初始化对像# x : 窗口 X 座标# y : 窗口 Y 座标# width : 窗口宽度# height : 窗口高度#-------------------------------------------------------------------------- def initialize(item) @item=item @item_name = {} n=0 m=0 if @item != nil for itn in @item if @item_name[itn.name]==nil @item_name[itn.name]=[0,""] @item_name[itn.name][1]=itn.icon_index m+=1 end @item_name[itn.name][0] += 1 end end super(200,15, 180,25*m+75 ) self.opacity = 150 refresh end #-------------------------------------------------------------------------- # ● 刷新 #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.size=16 if @item_name.size != 0 self.contents.font.size = 16 self.contents.font.color = Color.new(255,255,0) self.contents.draw_text(10,0,64,32,"获得物品:") i=0 i=0 self.contents.font.size = 14 self.contents.font.color = Color.new(255,255,255,255) for itn in @item_name#################################颜色自定if itn[0].include?("多彩晶矿") or itn[0].include?("紫色夜魇草") or itn[0].include?("黄金果实") or itn[0].include?("蓝魔鱼") or itn[0].include?("魔力果") self.contents.font.color = text_color(44) #颜色请自定义 draw_icon(itn[1][1] ,6 ,32+i*25 , true) self.contents.draw_text(30,32+i*25,160,32,itn[0] + " × "+ itn[1][0].to_s) i+=1 else self.contents.font.color = Color.new(255,255,255,255) draw_icon(itn[1][1] ,6 ,32+i*25 , true) self.contents.draw_text(30,32+i*25,160,32,itn[0] + " × "+ itn[1][0].to_s) i+=1end ################################ end end end end
#======================================================= #★显示物品提示窗口 #======================================================= class Window_fuye<Window_Base #==================================== #●初始化 #==================================== #-------------------------------------------------------------------------- # ● 初始化对像 # x : 窗口 X 座标 # y : 窗口 Y 座标 # width : 窗口宽度 # height : 窗口高度 #-------------------------------------------------------------------------- def initialize(item) @item=item @item_name = {} n=0 m=0 if @item != nil for itn in @item if @item_name[itn.name]==nil @item_name[itn.name]=[0,""] @item_name[itn.name][1]=itn.icon_index m+=1 end @item_name[itn.name][0] += 1 end end super(200,15, 180,25*m+75 ) self.opacity = 150 refresh end #-------------------------------------------------------------------------- # ● 刷新 #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.size=16 if @item_name.size != 0 self.contents.font.size = 16 self.contents.font.color = Color.new(255,255,0) self.contents.draw_text(10,0,64,32,"获得物品:") i=0 i=0 self.contents.font.size = 14 self.contents.font.color = Color.new(255,255,255,255) for itn in @item_name ################################ #颜色自定 if itn[0].include?("多彩晶矿") or itn[0].include?("紫色夜魇草") or itn[0].include?("黄金果实") or itn[0].include?("蓝魔鱼") or itn[0].include?("魔力果") self.contents.font.color = text_color(44) #颜色请自定义 draw_icon(itn[1][1] ,6 ,32+i*25 , true) self.contents.draw_text(30,32+i*25,160,32,itn[0] + " × "+ itn[1][0].to_s) i+=1 else self.contents.font.color = Color.new(255,255,255,255) draw_icon(itn[1][1] ,6 ,32+i*25 , true) self.contents.draw_text(30,32+i*25,160,32,itn[0] + " × "+ itn[1][0].to_s) i+=1 end ################################ end end end end
折叠内容标题(非必须)
折叠内容
站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作
GMT+8, 2025-5-3 03:02
Powered by Discuz! X3.1
© 2001-2013 Comsenz Inc.