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

Project1

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

[已经过期] 急需装备颜色描绘脚本高手请赐教!!!

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
114 小时
注册时间
2012-4-25
帖子
163
跳转到指定楼层
1
 楼主| 发表于 2013-2-9 14:58:02 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x

就是我这个装备名称颜色怎么自己设定呢,有没有决绝办法,急需!!!

Lv5.捕梦者 (版主)

梦石
20
星屑
1840
在线时间
6925 小时
注册时间
2012-12-14
帖子
11485

短篇十战斗者组别冠军开拓者贵宾短篇九勇士组亚军

2
发表于 2013-2-9 15:34:32 | 只看该作者
  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 * (288 + 32)
  120.     y = index / 2 * 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 = normal_color
  130.     self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
  131.     self.contents.draw_text(x + 130, y, 16, 32, ":", 2)
  132.     self.contents.draw_text(x + 150, 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. #==============================================================================

复制代码
大家好,这里是晨露的说。请多多指教。
刚入门RM软件制作,请大家多多帮助我哦。
落雪君的欢乐像素教程,欢迎查阅。

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
114 小时
注册时间
2012-4-25
帖子
163
3
 楼主| 发表于 2013-2-9 15:44:12 | 只看该作者
这个不行啊!!

点评

您的脚本冲突了吧  发表于 2013-2-9 16:49
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
114 小时
注册时间
2012-4-25
帖子
163
4
 楼主| 发表于 2013-2-9 17:58:38 | 只看该作者
加我QQ帮我看下 675482971

点评

人呢?  发表于 2013-2-9 18:18

评分

参与人数 1星屑 -20 收起 理由
hcm -20 QQ版费

查看全部评分

回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-2 08:06

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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