幻想森林

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 1294|回复: 4

[RMVX] 化冻大哥。。能不能近来下。有事求。。

[复制链接]

8

主题

16

帖子

173

积分

③业余

积分
173
QQ
发表于 2007-1-3 14:45:58 | 显示全部楼层 |阅读模式
就是那个纯事件设置到达一定等级才能装备某些装备的教程连接已经失效了。。。能不能麻烦你再发一次。。或者教教我。。。55555555555555555555
新人
回复

使用道具 举报

30

主题

409

帖子

4699

积分

⑥精研

积分
4699
发表于 2007-1-3 15:47:33 | 显示全部楼层
我有收藏,代化冻发一下。

本帖子中包含更多资源

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

x
回复 支持 反对

使用道具 举报

。&亂碼 该用户已被删除
发表于 2007-1-3 16:18:43 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

8

主题

16

帖子

173

积分

③业余

积分
173
QQ
 楼主| 发表于 2007-1-4 00:01:57 | 显示全部楼层
下下来了...完全不理解..不懂弄..
新人
回复 支持 反对

使用道具 举报

1

主题

175

帖子

1937

积分

⑥精研

积分
1937
发表于 2007-1-5 00:10:10 | 显示全部楼层
恩...试着用脚本做一个简单的...8知道有没有用..
其实我只是想试试split的用法啦~~

class Window_EquipItem
  def draw_item(index)
    item = @data[index]
    x = 4 + index % 2 * (288 + 32)
    y = index / 2 * 32
    case item
    when RPG::Weapon
      number = $game_party.weapon_number(item.id)
    when RPG::Armor
      number = $game_party.armor_number(item.id)
    end
  
    bitmap = RPG::Cache.icon(item.icon_name)
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
    self.contents.font.color = normal_color
if @actor.level < item.name.split(/,/)[1].to_i
        self.contents.font.color = disabled_color
        end
    self.contents.draw_text(x + 28, y, 212, 32, item.name.split(/,/)[0], 0)
    self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
    self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
  end
end

class Window_Base
def draw_item_name(item, x, y)
    if item == nil
      return
    end
    bitmap = RPG::Cache.icon(item.icon_name)
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))

    self.contents.font.color = normal_color
    self.contents.draw_text(x + 28, y, 212, 32, item.name.split(/,/)[0])
  end
end

class Window_Item
  def draw_item(index)
    item = @data[index]
    case item
    when RPG::Item
      number = $game_party.item_number(item.id)
    when RPG::Weapon
      number = $game_party.weapon_number(item.id)
    when RPG::Armor
      number = $game_party.armor_number(item.id)
    end
    if item.is_a?(RPG::Item) and
       $game_party.item_can_use?(item.id)
      self.contents.font.color = normal_color
    else
      self.contents.font.color = disabled_color
    end

    x = 4 + index % 2 * (288 + 32)
    y = index / 2 * 32
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon(item.icon_name)

    opacity = self.contents.font.color == normal_color ? 255 : 128
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.draw_text(x + 28, y, 212, 32, item.name.split(/,/)[0], 0)
    self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
    self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
  end
end
class Window_ShopBuy
   def draw_item(index)
    item = @data[index]
    # 获取物品所持数
    case item
    when RPG::Item
      number = $game_party.item_number(item.id)
    when RPG::Weapon
      number = $game_party.weapon_number(item.id)
    when RPG::Armor
      number = $game_party.armor_number(item.id)
    end
    # 价格在所持金以下、并且所持数不是 99 的情况下为普通文字颜色
    # 除此之外的情况设置为无效文字色
    if item.price <= $game_party.gold and number < 99
      self.contents.font.color = normal_color
    else
      self.contents.font.color = disabled_color
    end
    x = 4
    y = index * 32
    rect = Rect.new(x, y, self.width - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon(item.icon_name)

    opacity = self.contents.font.color == normal_color ? 255 : 128
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.draw_text(x + 28, y, 212, 32, item.name.split(/,/)[0], 0)
    self.contents.draw_text(x + 240, y, 88, 32, item.price.to_s, 2)
  end
end
class Window_ShopSell
    def draw_item(index)
    item = @data[index]
    case item
    when RPG::Item
      number = $game_party.item_number(item.id)
    when RPG::Weapon
      number = $game_party.weapon_number(item.id)
    when RPG::Armor
      number = $game_party.armor_number(item.id)
    end
    # 可以卖掉的显示为普通文字颜色、除此之外设置成无效文字颜色
    if item.price > 0
      self.contents.font.color = normal_color
    else
      self.contents.font.color = disabled_color
    end
    x = 4 + index % 2 * (288 + 32)
    y = index / 2 * 32
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon(item.icon_name)

    opacity = self.contents.font.color == normal_color ? 255 : 128
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.draw_text(x + 28, y, 212, 32, item.name.split(/,/)[0], 0)
    self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
    self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
  end
end

class Scene_Equip
    def update_item
    # 按下 B 键的情况下
    if Input.trigger?(Input::B)
      # 演奏取消 SE
      $game_system.se_play($data_system.cancel_se)
      # 激活右侧窗口
      @right_window.active = true
      @item_window.active = false
      @item_window.index = -1
      return
    end
    # 按下 C 键的情况下
    if Input.trigger?(Input::C)
      
      # 获取物品窗口现在选择的装备数据
      item = @item_window.item
      # 变更装备
   
     
    if @actor.level >= item.name.split(/,/)[1].to_i
      @actor.equip(@right_window.index, item == nil ? 0 : item.id)
        # 演奏装备 SE
         $game_system.se_play($data_system.equip_se)
     # 激活右侧窗口
      @right_window.active = true
      @item_window.active = false
      @item_window.index = -1
      # 再生成右侧窗口、物品窗口的内容
      @right_window.refresh
      @item_window.refresh
    else
      $game_system.se_play($data_system.buzzer_se)
    end
   
      return
    end
  end
end



恩...在装备后面加",等级"..比如"铜剑,2"就是限制两级装备铜剑...-v-
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|幻想森林

GMT+8, 2025-6-27 01:26 , Processed in 0.011844 second(s), 22 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

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