查看: 2396|回复: 3

[已经解决] 谁能帮我写个让VX能显示大图标的脚本!

[复制链接]
头像被屏蔽
梦石
0
星屑
50
在线时间
0 小时
注册时间
2010-6-17
回帖
4
发表于 2010-9-23 09:23:31 | 显示全部楼层 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽
头像被屏蔽
梦石
0
星屑
50
在线时间
0 小时
注册时间
2010-6-17
回帖
4
 楼主| 发表于 2010-9-23 13:03:42 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

天空之神

梦石
0
星屑
156
在线时间
173 小时
注册时间
2009-5-3
回帖
552
发表于 2010-9-23 14:44:20 | 显示全部楼层
  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #==============================================================================

  4. class Window_Base
  5.   def draw_icon2(icon_file, x, y, enabled = true)
  6.     bitmap = Cache.load_bitmap("Graphics/Icons/", icon_file)
  7.     rect = Rect.new(0, 0, 24, 24)
  8.     self.contents.blt(x, y, bitmap, rect, enabled ? 255 : 128)
  9.   end
  10.   
  11.   def draw_item_name(item, x, y, enabled = true)
  12.     if item != nil
  13.       if item.get_icon
  14.         draw_icon2(item.get_icon.to_s, x, y, enabled)
  15.       else
  16.         draw_icon(item.icon_index, x, y, enabled)
  17.       end
  18.       self.contents.font.color = normal_color
  19.       self.contents.font.color.alpha = enabled ? 255 : 128
  20.       self.contents.draw_text(x + 24, y, 172, WLH, item.name)
  21.     end
  22.   end
  23. end

  24. module Item
  25.   ICON = /<ICON*(.*)>/i
  26. end

  27. class RPG::BaseItem
  28.   def get_icon
  29.     self.note.split(/[ ]+/).each { |line|
  30.       if line =~ Item::ICON
  31.         a = line.split(/ /)[1]
  32.         d = ""
  33.         while ((c = a.slice!(/./m)) != nil)
  34.           d += c if c != ">"
  35.         end
  36.         return d
  37.       end
  38.     }
  39.     return nil
  40.   end
  41. end
  42. class RPG::BaseSkill
  43.   def get_icon
  44.     self.note.split(/[ ]+/).each { |line|
  45.       if line =~ Item::ICON
  46.         a = line.split(/ /)[1]
  47.         d = ""
  48.         while ((c = a.slice!(/./m)) != nil)
  49.           d += c if c != ">"
  50.         end
  51.         return d
  52.       end
  53.     }
  54.     return nil
  55.   end
  56. end
复制代码

评分

参与人数 1星屑 +1000 收起 理由
夕阳武士 + 1000 认可答案+中秋贺礼

查看全部评分

回复

使用道具 举报

头像被屏蔽
梦石
0
星屑
50
在线时间
0 小时
注册时间
2010-6-17
回帖
4
 楼主| 发表于 2010-9-23 15:09:51 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部