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

Project1

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

[已经解决] 已解决~~装备品质1.0,如何让技能栏的技能不受到此脚本....

[复制链接]

Lv3.寻梦者

梦石
0
星屑
1229
在线时间
129 小时
注册时间
2015-6-4
帖子
11
跳转到指定楼层
1
发表于 2023-8-13 11:39:45 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
50星屑
本帖最后由 恋雨清风喵 于 2023-8-13 14:09 编辑

=,= 脚本盲请教大佬们!这个脚本内说明是美化装备和物品的,但技能栏里的技能也受到了该脚本影响....选择技能时明显偏移了。
如何不让技能栏中的技能受到此脚本的影响,让他恢复以前的样子?或者让此技能栏的技能图标显示到正确的位置也可以(就像物品栏的物品那样)



以下是脚本
(忘了附件工程了,其实就是论坛里的那个~) 狂晓霸道 - 装备品质.rar (1.43 MB, 下载次数: 1)

#==============================================================================
# ■ 装备品质1.0   By 狂晓霸道丶 QQ1711044261  2016/11/10
#------------------------------------------------------------------------------
# ★ 使用说明
#  - 在物品/武器/护甲的注释处,写入:品质[颜色]  例如:品质[橙]
#  - 颜色分别有:白、绿、蓝、紫、橙、红
#  - 素材放在(Graphics/System)的文件夹里,名字为:品质颜色 
#==============================================================================
class RPG::BaseItem
  attr_accessor :quality
  def quality
    a = ["白","绿","蓝","紫","橙","红"]
    note =~ /品质\[(.+?)\]/
    return a.index($1) if $1 != nil
    return 0 if @Quality == nil
    @quality
  end
end
#==============================================================================
# ■ Window_Base
#------------------------------------------------------------------------------
#  游戏中所有窗口的父类
#==============================================================================
class Window_Base
  #--------------------------------------------------------------------------
  # ● 绘制物品名称
  #     enabled : 有效的标志。false 的时候使用半透明效果绘制
  #--------------------------------------------------------------------------
  def draw_item_name(item, x, y, enabled = false, width = 172)
    return unless item
    bitmap = Cache.system("品质颜色")
    rect = Rect.new(32*item.quality,0, 32, 32)
    contents.blt(x, y, bitmap, rect)
    draw_icon(item.icon_index, x+4, y+4)
    change_color(normal_color, enabled)
    draw_text(x + 24+10, y+4, width, line_height, item.name)
  end
end
#==============================================================================
# ■ Window_ItemList
#------------------------------------------------------------------------------
#  物品画面中,显示持有物品的窗口。
#==============================================================================
class Window_ItemList
  #--------------------------------------------------------------------------
  # ● 获取项目的高度
  #--------------------------------------------------------------------------
  def item_height
    line_height + 10
  end
  #--------------------------------------------------------------------------
  # ● 绘制项目
  #--------------------------------------------------------------------------
  def draw_item(index)
    item = @data[index]
    if item
      rect = item_rect(index)
      rect.width -= 4
      draw_item_name(item, rect.x+2, rect.y+2, enable?(item))
      draw_item_number(rect, item)
    end
  end
end

########################################

#class Window_SkillCommand
  
  #--------------------------------------------------------------------------
  # ● 获取项目的高度
  #--------------------------------------------------------------------------
#  def item_height
#    line_height + 10
#  end
  
  #● 绘制项目
  
#  def draw_item(index)
#    skill = @data[index]
#    if skill
#      rect = item_rect(index)
#      rect.width -= 4
#      draw_item_name(skill, rect.x+2, rect.y+2, enable?(skill))
#      draw_skill_cost(rect, skill)
#    end
#  end
#  end
#==============================================================================
# ■ Window_ShopBuy
#------------------------------------------------------------------------------
#  商店画面中,买入时显示所有商品的窗口。
#==============================================================================
class Window_ShopBuy
  #--------------------------------------------------------------------------
  # ● 获取项目的高度
  #--------------------------------------------------------------------------
  def item_height
    line_height + 12
  end
  #--------------------------------------------------------------------------
  # ● 绘制项目
  #--------------------------------------------------------------------------
  def draw_item(index)
    item = @data[index]
    rect = item_rect(index)
    draw_item_name(item, rect.x+2, rect.y+2, enable?(item))
    rect.width -= 4
    draw_text(rect, price(item), 2)
  end
end
#==============================================================================
# ■ Window_EquipSlot
#------------------------------------------------------------------------------
#  装备画面中,显示角色当前装备的窗口。
#==============================================================================
class Window_EquipSlot
  #--------------------------------------------------------------------------
  # ● 获取项目的高度
  #--------------------------------------------------------------------------
  def item_height
    line_height + 10
  end
  #--------------------------------------------------------------------------
  # ● 绘制项目
  #--------------------------------------------------------------------------
  def draw_item(index)
    return unless @actor
    rect = item_rect(index)
    change_color(system_color, enable?(index))
    draw_text(rect.x+2, rect.y+6, 92, line_height, slot_name(index))
    draw_item_name(@actor.equips[index], rect.x + 92+2, rect.y+2, enable?(index))
  end
  #--------------------------------------------------------------------------
  # ● 刷新
  #--------------------------------------------------------------------------
  def refresh
    create_contents
    draw_all_items
  end
end
#==============================================================================
# ■ Window_Status
#------------------------------------------------------------------------------
#  状态画面中,显示角色基本信息的窗口。
#==============================================================================
class Window_Status
  #--------------------------------------------------------------------------
  # ● 绘制装备
  #--------------------------------------------------------------------------
  def draw_equipments(x, y)
    @actor.equips.each_with_index do |item, i|
      draw_item_name(item, x + 2, y + (line_height+8) * i-8)
    end
  end
end

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

本版积分规则

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

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

GMT+8, 2024-4-28 03:37

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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