设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 2206|回复: 5
打印 上一主题 下一主题

[已经解决] 如何能在装备介绍里显示变量?

[复制链接]

Lv3.寻梦者

梦石
0
星屑
1288
在线时间
354 小时
注册时间
2009-9-14
帖子
328
跳转到指定楼层
1
发表于 2014-11-26 22:17:34 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
密斯利尔剑
最高级的剑。战士可以装备。(变量1的值,5)

评分

参与人数 1星屑 +35 收起 理由
︶ㄣ牛排ぶ + 35 手动认可奖励

查看全部评分

Lv4.逐梦者 (版主)

梦石
0
星屑
9532
在线时间
5073 小时
注册时间
2013-6-21
帖子
3580

开拓者贵宾剧作品鉴家

2
发表于 2014-11-27 08:52:42 | 只看该作者
脚本功能:在1号武器介绍后面追加1号变量的数值,2号武器介绍后面追加2号变量的数值,以此类推。
RUBY 代码复制
  1. module RPG
  2.   class Weapon
  3.     alias rb_description_20141127 description
  4.     def description
  5.       return rb_description_20141127 + $game_variables[self.id].to_s
  6.     end
  7.   end
  8. end

点评

貌似和楼主的要求不一样呢···为啥不直接放一个转字符加强的?读取介绍里面的\V[X]就是变量X···显示文章和装备介绍和谐了···  发表于 2014-11-28 22:11
前两天还说禁止Ctrl+C/V呢,这么做不是打脸么233  发表于 2014-11-27 13:11
应该不会比ULDS难吧?反正VA脚本都在那里了,大概Ctrl+c,Ctrl+v抄一抄就好了(噗)  发表于 2014-11-27 13:09
移植这个和移植ULDS哪个难?如果这个比ULDS还难我就不做了(噗)  发表于 2014-11-27 13:05
果然还是VA好啊,(泥萌谁来个draw_text_ex移植XP好了2333  发表于 2014-11-27 12:58
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1288
在线时间
354 小时
注册时间
2009-9-14
帖子
328
3
 楼主| 发表于 2014-11-29 21:19:39 | 只看该作者
其实我是想要在装备介绍显示套装的集齐数量。。
密斯利尔套装,一共5件,变量1的值是角色身上穿的该套装的数量。
最高级的剑。战士可以装备。(变量1的值,5)
回复 支持 反对

使用道具 举报

Lv5.捕梦者

梦石
0
星屑
33070
在线时间
5103 小时
注册时间
2012-11-19
帖子
4878

开拓者

4
发表于 2014-11-29 21:43:49 | 只看该作者
本帖最后由 芯☆淡茹水 于 2014-11-29 21:52 编辑

RyanBern.each do | chd114 |
  1. module RPG
  2.   class Weapon
  3.     def description
  4.       @description.gsub!(/\\[Vv]\[([0-9]+)\]/){$game_variables[$1.to_i]}
  5.       return @description
  6.     end
  7.   end
  8.   class Armor
  9.     def description
  10.       @description.gsub!(/\\[Vv]\[([0-9]+)\]/){$game_variables[$1.to_i]}
  11.       return @description
  12.     end
  13.   end
  14. end
复制代码
end


最高级的剑。战士可以装备。(\v[1],5)

点评

↓ NameError: undefined local variable or method 'each' for #<RyanBern:0x32e9432>  发表于 2014-11-29 22:05
233  发表于 2014-11-29 21:54

评分

参与人数 1星屑 +200 收起 理由
RyanBern + 200 认可答案

查看全部评分

xp vx va mv  va mz 各类型脚本/插件定制
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1288
在线时间
354 小时
注册时间
2009-9-14
帖子
328
5
 楼主| 发表于 2014-11-30 14:34:56 | 只看该作者
芯☆淡茹水 发表于 2014-11-29 21:43
RyanBern.each do | chd114 |end

跟装备颜色有冲突,,,怎么把他们俩整合在一起。。?
  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #==============================================================================
  4. #


  5. # 脚本功能:给不同物品显示不同颜色,类似暗黑破坏神,比如套装为绿色,超级为金色
  6. #           可以更改的种类包括物品、防具、特技、武器。
  7. #
  8. # 使用方法:对于不想为白色表示的物品,在描述中最后添加@6,@4一类的即可。
  9. #           数字为颜色编号,和对话框中的一样。
  10. # ——————————————————————————————————————
  11. module RPG
  12.   class Skill
  13.     def description
  14.       description = @description.split(/@/)[0]
  15.       return description != nil ? description : ''
  16.     end
  17.     def name_color_66RPG
  18.       name_color = @description.split(/@/)[1]
  19.       return name_color != nil ? name_color.to_i : 0
  20.     end
  21.   end
  22.   class Weapon
  23.     def description
  24.       description = @description.split(/@/)[0]
  25.       return description != nil ? description : ''
  26.     end
  27.     def name_color_66RPG
  28.       name_color = @description.split(/@/)[1]
  29.       return name_color != nil ? name_color.to_i : 0
  30.     end
  31.   end
  32.   class Item
  33.     def description
  34.       description = @description.split(/@/)[0]
  35.       return description != nil ? description : ''
  36.     end
  37.     def name_color_66RPG
  38.       name_color = @description.split(/@/)[1]
  39.       return name_color != nil ? name_color.to_i : 0
  40.     end
  41.   end
  42.   class Armor
  43.     def description
  44.       description = @description.split(/@/)[0]
  45.       return description != nil ? description : ''
  46.     end
  47.     def name_color_66RPG
  48.       name_color = @description.split(/@/)[1]
  49.       return name != nil ? name_color.to_i : 0
  50.     end
  51.   end
  52. end
  53. # ——————————————————————————————————————
  54. # 本脚本原创自www.66rpg.com,转载请保留此信息
  55. # ——————————————————————————————————————
  56. class Window_Base < Window
  57.   #--------------------------------------------------------------------------
  58.   # ● 描绘物品名
  59.   #     item : 物品
  60.   #     x    : 描画目标 X 坐标
  61.   #     y    : 描画目标 Y 坐标
  62.   #--------------------------------------------------------------------------
  63.   def draw_item_name(item, x, y)
  64.     if item == nil
  65.       return
  66.     end
  67.     bitmap = RPG::Cache.icon(item.icon_name)
  68.     self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
  69.     self.contents.font.color = text_color(item.name_color_66RPG)
  70.     self.contents.draw_text(x + 28, y, 212, 32, item.name.to_s)
  71.   end
  72. end
  73. # ——————————————————————————————————————
  74. # 本脚本原创自www.66rpg.com,转载请保留此信息
  75. # ——————————————————————————————————————
  76. class Window_Item
  77.   #--------------------------------------------------------------------------
  78.   # ● 描绘项目
  79.   #     index : 项目编号
  80.   #--------------------------------------------------------------------------
  81.   def draw_item(index)
  82.     item = @data[index]
  83.     case item
  84.     when RPG::Item
  85.       number = $game_party.item_number(item.id)
  86.     when RPG::Weapon
  87.       number = $game_party.weapon_number(item.id)
  88.     when RPG::Armor
  89.       number = $game_party.armor_number(item.id)
  90.     end
  91.     if item.is_a?(RPG::Item) and
  92.        $game_party.item_can_use?(item.id)
  93.       self.contents.font.color = text_color(item.name_color_66RPG)
  94.     else
  95.       self.contents.font.color = disabled_color
  96.     end
  97.     x = 4 + index % 2 * (288 + 32)
  98.     y = index / 2 * 32
  99.     rect = Rect.new(x, y, self.width / @column_max - 32, 32)
  100.     self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
  101.     bitmap = RPG::Cache.icon(item.icon_name)
  102.     opacity = self.contents.font.color == disabled_color ? 128 : 255
  103.     self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
  104.     self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
  105.     self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
  106.     self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
  107.   end
  108. end
  109. # ——————————————————————————————————————
  110. # 本脚本原创自www.66rpg.com,转载请保留此信息
  111. # ——————————————————————————————————————
  112. class Window_EquipItem < Window_Selectable
  113.   #--------------------------------------------------------------------------
  114.   # ● 项目的描绘
  115.   #     index : 项目符号
  116.   #--------------------------------------------------------------------------
  117.   def draw_item(index)
  118.     item = @data[index]
  119.     x = 4 + index % 2 * (0)
  120.     y = index / 1 * 32
  121.     case item
  122.     when RPG::Weapon
  123.       number = $game_party.weapon_number(item.id)
  124.     when RPG::Armor
  125.       number = $game_party.armor_number(item.id)
  126.     end
  127.     bitmap = RPG::Cache.icon(item.icon_name)
  128.     self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
  129.     self.contents.font.color = text_color(item.name_color_66RPG)
  130.     self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
  131.     self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
  132.     self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
  133.   end
  134. end
  135. # ——————————————————————————————————————
  136. # 本脚本原创自www.66rpg.com,转载请保留此信息
  137. # ——————————————————————————————————————
  138. class Window_ShopBuy < Window_Selectable
  139.   #--------------------------------------------------------------------------
  140.   # ● 描绘羡慕
  141.   #     index : 项目编号
  142.   #--------------------------------------------------------------------------
  143.   def draw_item(index)
  144.     item = @data[index]
  145.     # 获取物品所持数
  146.     case item
  147.     when RPG::Item
  148.       number = $game_party.item_number(item.id)
  149.     when RPG::Weapon
  150.       number = $game_party.weapon_number(item.id)
  151.     when RPG::Armor
  152.       number = $game_party.armor_number(item.id)
  153.     end
  154.     # 价格在所持金以下、并且所持数不是 99 的情况下为普通颜色
  155.     # 除此之外的情况设置为无效文字色
  156.     if item.price <= $game_party.gold and number < 99
  157.       self.contents.font.color = text_color(item.name_color_66RPG)
  158.     else
  159.       self.contents.font.color = disabled_color
  160.     end
  161.     x = 4
  162.     y = index * 32
  163.     rect = Rect.new(x, y, self.width - 32, 32)
  164.     self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
  165.     bitmap = RPG::Cache.icon(item.icon_name)
  166.     opacity = self.contents.font.color == disabled_color ? 128 : 255
  167.     self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
  168.     self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
  169.     self.contents.draw_text(x + 240, y, 88, 32, item.price.to_s, 2)
  170.   end
  171. end
  172. # ——————————————————————————————————————
  173. # 本脚本原创自www.66rpg.com,转载请保留此信息
  174. # ——————————————————————————————————————
  175. class Window_ShopSell < Window_Selectable
  176.   #--------------------------------------------------------------------------
  177.   # ● 描绘项目
  178.   #     index : 项目标号
  179.   #--------------------------------------------------------------------------
  180.   def draw_item(index)
  181.     item = @data[index]
  182.     case item
  183.     when RPG::Item
  184.       number = $game_party.item_number(item.id)
  185.     when RPG::Weapon
  186.       number = $game_party.weapon_number(item.id)
  187.     when RPG::Armor
  188.       number = $game_party.armor_number(item.id)
  189.     end
  190.     # 可以卖掉的显示为普通颜色、除此之外设置成无效文字颜色
  191.     if item.price > 0
  192.       self.contents.font.color = text_color(item.name_color_66RPG)
  193.     else
  194.       self.contents.font.color = disabled_color
  195.     end
  196.     x = 4 + index % 2 * (288 + 32)
  197.     y = index / 2 * 32
  198.     rect = Rect.new(x, y, self.width / @column_max - 32, 32)
  199.     self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
  200.     bitmap = RPG::Cache.icon(item.icon_name)
  201.     opacity = self.contents.font.color == disabled_color ? 128 : 255
  202.     self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
  203.     self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
  204.     self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
  205.     self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
  206.   end
  207. end
  208.    
  209. # ——————————————————————————————————————
  210. # 本脚本原创自www.66rpg.com,转载请保留此信息
  211. # ——————————————————————————————————————
  212. class Window_Skill
  213.   #--------------------------------------------------------------------------
  214.   # ● 描绘项目
  215.   #     index : 项目编号
  216.   #--------------------------------------------------------------------------
  217.   def draw_item(index)
  218.     skill = @data[index]
  219.     if @actor.skill_can_use?(skill.id)
  220.       self.contents.font.color = text_color(skill.name_color_66RPG)
  221.     else
  222.       self.contents.font.color = disabled_color
  223.     end
  224.     x = 4 + index % 2 * (288 + 32)
  225.     y = index / 2 * 32
  226.     rect = Rect.new(x, y, self.width / @column_max - 32, 32)
  227.     self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
  228.     bitmap = RPG::Cache.icon(skill.icon_name)
  229.     opacity = self.contents.font.color == disabled_color ? 128 : 255
  230.     self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
  231.     self.contents.draw_text(x + 28, y, 204, 32, skill.name, 0)
  232.     self.contents.draw_text(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
  233.   end
  234. end
  235. #==============================================================================
  236. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  237. #==============================================================================
复制代码
回复 支持 反对

使用道具 举报

Lv5.捕梦者

梦石
0
星屑
33070
在线时间
5103 小时
注册时间
2012-11-19
帖子
4878

开拓者

6
发表于 2014-11-30 16:23:12 | 只看该作者
  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #==============================================================================
  4. #


  5. # 脚本功能:给不同物品显示不同颜色,类似暗黑破坏神,比如套装为绿色,超级为金色
  6. #           可以更改的种类包括物品、防具、特技、武器。
  7. #
  8. # 使用方法:对于不想为白色表示的物品,在描述中最后添加@6,@4一类的即可。
  9. #           数字为颜色编号,和对话框中的一样。
  10. # ——————————————————————————————————————
  11. module RPG
  12.   class Skill
  13.     def description
  14.       description = @description.split(/@/)[0]
  15.       return description != nil ? description : ''
  16.     end
  17.     def name_color_66RPG
  18.       name_color = @description.split(/@/)[1]
  19.       return name_color != nil ? name_color.to_i : 0
  20.     end
  21.   end
  22.   class Weapon
  23.     def description
  24.       description = @description.split(/@/)[0]
  25.       description = description != nil ? description : ''
  26.       description.gsub!(/\\[Vv]\[([0-9]+)\]/){$game_variables[$1.to_i]}
  27.       return description
  28.     end
  29.     def name_color_66RPG
  30.       name_color = @description.split(/@/)[1]
  31.       return name_color != nil ? name_color.to_i : 0
  32.     end
  33.   end
  34.   class Item
  35.     def description
  36.       description = @description.split(/@/)[0]
  37.       return description != nil ? description : ''
  38.     end
  39.     def name_color_66RPG
  40.       name_color = @description.split(/@/)[1]
  41.       return name_color != nil ? name_color.to_i : 0
  42.     end
  43.   end
  44.   class Armor
  45.     def description
  46.       description = @description.split(/@/)[0]
  47.       description = description != nil ? description : ''
  48.       description.gsub!(/\\[Vv]\[([0-9]+)\]/){$game_variables[$1.to_i]}
  49.       return description
  50.     end
  51.     def name_color_66RPG
  52.       name_color = @description.split(/@/)[1]
  53.       return name != nil ? name_color.to_i : 0
  54.     end
  55.   end
  56. end
  57. # ——————————————————————————————————————
  58. # 本脚本原创自www.66rpg.com,转载请保留此信息
  59. # ——————————————————————————————————————
  60. class Window_Base < Window
  61.   #--------------------------------------------------------------------------
  62.   # ● 描绘物品名
  63.   #     item : 物品
  64.   #     x    : 描画目标 X 坐标
  65.   #     y    : 描画目标 Y 坐标
  66.   #--------------------------------------------------------------------------
  67.   def draw_item_name(item, x, y)
  68.     if item == nil
  69.       return
  70.     end
  71.     bitmap = RPG::Cache.icon(item.icon_name)
  72.     self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
  73.     self.contents.font.color = text_color(item.name_color_66RPG)
  74.     self.contents.draw_text(x + 28, y, 212, 32, item.name.to_s)
  75.   end
  76. end
  77. # ——————————————————————————————————————
  78. # 本脚本原创自www.66rpg.com,转载请保留此信息
  79. # ——————————————————————————————————————
  80. class Window_Item
  81.   #--------------------------------------------------------------------------
  82.   # ● 描绘项目
  83.   #     index : 项目编号
  84.   #--------------------------------------------------------------------------
  85.   def draw_item(index)
  86.     item = @data[index]
  87.     case item
  88.     when RPG::Item
  89.       number = $game_party.item_number(item.id)
  90.     when RPG::Weapon
  91.       number = $game_party.weapon_number(item.id)
  92.     when RPG::Armor
  93.       number = $game_party.armor_number(item.id)
  94.     end
  95.     if item.is_a?(RPG::Item) and
  96.        $game_party.item_can_use?(item.id)
  97.       self.contents.font.color = text_color(item.name_color_66RPG)
  98.     else
  99.       self.contents.font.color = disabled_color
  100.     end
  101.     x = 4 + index % 2 * (288 + 32)
  102.     y = index / 2 * 32
  103.     rect = Rect.new(x, y, self.width / @column_max - 32, 32)
  104.     self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
  105.     bitmap = RPG::Cache.icon(item.icon_name)
  106.     opacity = self.contents.font.color == disabled_color ? 128 : 255
  107.     self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
  108.     self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
  109.     self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
  110.     self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
  111.   end
  112. end
  113. # ——————————————————————————————————————
  114. # 本脚本原创自www.66rpg.com,转载请保留此信息
  115. # ——————————————————————————————————————
  116. class Window_EquipItem < Window_Selectable
  117.   #--------------------------------------------------------------------------
  118.   # ● 项目的描绘
  119.   #     index : 项目符号
  120.   #--------------------------------------------------------------------------
  121.   def draw_item(index)
  122.     item = @data[index]
  123.     x = 4 + index % 2 * (0)
  124.     y = index / 1 * 32
  125.     case item
  126.     when RPG::Weapon
  127.       number = $game_party.weapon_number(item.id)
  128.     when RPG::Armor
  129.       number = $game_party.armor_number(item.id)
  130.     end
  131.     bitmap = RPG::Cache.icon(item.icon_name)
  132.     self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
  133.     self.contents.font.color = text_color(item.name_color_66RPG)
  134.     self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
  135.     self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
  136.     self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
  137.   end
  138. end
  139. # ——————————————————————————————————————
  140. # 本脚本原创自www.66rpg.com,转载请保留此信息
  141. # ——————————————————————————————————————
  142. class Window_ShopBuy < Window_Selectable
  143.   #--------------------------------------------------------------------------
  144.   # ● 描绘羡慕
  145.   #     index : 项目编号
  146.   #--------------------------------------------------------------------------
  147.   def draw_item(index)
  148.     item = @data[index]
  149.     # 获取物品所持数
  150.     case item
  151.     when RPG::Item
  152.       number = $game_party.item_number(item.id)
  153.     when RPG::Weapon
  154.       number = $game_party.weapon_number(item.id)
  155.     when RPG::Armor
  156.       number = $game_party.armor_number(item.id)
  157.     end
  158.     # 价格在所持金以下、并且所持数不是 99 的情况下为普通颜色
  159.     # 除此之外的情况设置为无效文字色
  160.     if item.price <= $game_party.gold and number < 99
  161.       self.contents.font.color = text_color(item.name_color_66RPG)
  162.     else
  163.       self.contents.font.color = disabled_color
  164.     end
  165.     x = 4
  166.     y = index * 32
  167.     rect = Rect.new(x, y, self.width - 32, 32)
  168.     self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
  169.     bitmap = RPG::Cache.icon(item.icon_name)
  170.     opacity = self.contents.font.color == disabled_color ? 128 : 255
  171.     self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
  172.     self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
  173.     self.contents.draw_text(x + 240, y, 88, 32, item.price.to_s, 2)
  174.   end
  175. end
  176. # ——————————————————————————————————————
  177. # 本脚本原创自www.66rpg.com,转载请保留此信息
  178. # ——————————————————————————————————————
  179. class Window_ShopSell < Window_Selectable
  180.   #--------------------------------------------------------------------------
  181.   # ● 描绘项目
  182.   #     index : 项目标号
  183.   #--------------------------------------------------------------------------
  184.   def draw_item(index)
  185.     item = @data[index]
  186.     case item
  187.     when RPG::Item
  188.       number = $game_party.item_number(item.id)
  189.     when RPG::Weapon
  190.       number = $game_party.weapon_number(item.id)
  191.     when RPG::Armor
  192.       number = $game_party.armor_number(item.id)
  193.     end
  194.     # 可以卖掉的显示为普通颜色、除此之外设置成无效文字颜色
  195.     if item.price > 0
  196.       self.contents.font.color = text_color(item.name_color_66RPG)
  197.     else
  198.       self.contents.font.color = disabled_color
  199.     end
  200.     x = 4 + index % 2 * (288 + 32)
  201.     y = index / 2 * 32
  202.     rect = Rect.new(x, y, self.width / @column_max - 32, 32)
  203.     self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
  204.     bitmap = RPG::Cache.icon(item.icon_name)
  205.     opacity = self.contents.font.color == disabled_color ? 128 : 255
  206.     self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
  207.     self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
  208.     self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
  209.     self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
  210.   end
  211. end
  212.    
  213. # ——————————————————————————————————————
  214. # 本脚本原创自www.66rpg.com,转载请保留此信息
  215. # ——————————————————————————————————————
  216. class Window_Skill
  217.   #--------------------------------------------------------------------------
  218.   # ● 描绘项目
  219.   #     index : 项目编号
  220.   #--------------------------------------------------------------------------
  221.   def draw_item(index)
  222.     skill = @data[index]
  223.     if @actor.skill_can_use?(skill.id)
  224.       self.contents.font.color = text_color(skill.name_color_66RPG)
  225.     else
  226.       self.contents.font.color = disabled_color
  227.     end
  228.     x = 4 + index % 2 * (288 + 32)
  229.     y = index / 2 * 32
  230.     rect = Rect.new(x, y, self.width / @column_max - 32, 32)
  231.     self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
  232.     bitmap = RPG::Cache.icon(skill.icon_name)
  233.     opacity = self.contents.font.color == disabled_color ? 128 : 255
  234.     self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
  235.     self.contents.draw_text(x + 28, y, 204, 32, skill.name, 0)
  236.     self.contents.draw_text(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
  237.   end
  238. end
  239. #==============================================================================
  240. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  241. #==============================================================================
复制代码

点评

CR~
十分感谢!!!  发表于 2014-11-30 22:40

评分

参与人数 1梦石 +1 收起 理由
︶ㄣ牛排ぶ + 1 认可答案

查看全部评分

xp vx va mv  va mz 各类型脚本/插件定制
回复 支持 反对

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-9-21 14:33

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表