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

Project1

 找回密码
 注册会员
搜索
Project1 查看内容

被诅咒不可拆除的装备

2005-10-19 00:00| 发布者: 柳柳| 查看: 4831| 评论: 0|原作者: 66RPG

摘要:    作者 RPG Advocatewww.phylomortis.com翻译:柳柳  版本与更新  2005年7月更新  相关网址    范例工程 不提供 脚本功能 这个脚本允许你创建不能卸下的诅咒装备
 

 作者

RPG Advocate
www.phylomortis.com
翻译:柳柳

 版本与更新

 2005年7月更新

 相关网址

 

 范例工程

不提供



脚本功能

这个脚本允许你创建不能卸下的诅咒装备,唯一被卸下的方法是通过事件里面的更改角色装备,一旦装备,诅咒武器和防具将会显示紫色。

原文:

This script allows you to create weapons and armor that can't be unequipped normally. The only way these items can be unequipped is through the "Change Equipped Items" event command. Once equipped, cursed weapons and armor will show up in purple (by default). To use this script, first add the two global variables to Game_System, as shown, the replace Scene_Equip#update_right with the code provided. Then, add the new methods Window_EquipRight#draw_item_name and Window_Base#cursed_color.

Note: If copied as directed, this script will mess up my weapon optimization script and my two-handed weapon script.(这两个没有提供,因为他写的版本不是很好- -) Both the weapon optimization script and the two-handed weapon script can be used with this script, but you'll need to know how to merge them on your own. Also be aware that the weapon optimization script won't exclude cursed weapons unless you modify it to do this yourself.

使用方法

全选后拷贝,选中main按insert插入新脚本,粘贴。注意,自行添加被诅咒的物品,参考脚本中的注释

脚本冲突可能:比较少,一些装备类吧,还有物品颜色表示的那个(可能会覆盖这个的颜色,不过并无大碍)。

相关截图

 


 

 脚本内容

#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================

#==============================================================================
# ■ Game_System
#------------------------------------------------------------------------------
#  处理系统附属数据的类。也可执行诸如 BGM 管理之类的功能。
#==============================================================================
class Game_System
 attr_accessor :cursed_weapons
 attr_accessor :cursed_armors
 alias carol3_ini initialize
 def initialize
   @cursed_weapons = []  #——在这里输入诅咒武器的编号,用逗号隔开。
   @cursed_armors = []   #——在这里输入诅咒防具编号,逗号隔开。比如 = [1,2,3,4]
   carol3_ini
 end
end
#==============================================================================
# ■ Scene_Equip
#------------------------------------------------------------------------------
#  处理装备画面的类。
#==============================================================================
class Scene_Equip
 def update_right
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new(2)
      return
    end
    if Input.trigger?(Input::C)
      w = @actor.weapon_id
      a1 = @actor.armor1_id
      a2 = @actor.armor2_id
      a3 = @actor.armor3_id
      a4 = @actor.armor4_id
      if @actor.equip_fix?(@right_window.index)
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      if @right_window.index == 0 && $game_system.cursed_weapons.include?(w)
        $game_system.se_play($data_system.buzzer_se)
        return
       elsif @right_window.index == 1 && $game_system.cursed_armors.include?(a1)
        $game_system.se_play($data_system.buzzer_se)
        return
       elsif @right_window.index == 2 && $game_system.cursed_armors.include?(a2)
        $game_system.se_play($data_system.buzzer_se)
        return
       elsif @right_window.index == 3 && $game_system.cursed_armors.include?(a3)
        $game_system.se_play($data_system.buzzer_se)
        return
       elsif @right_window.index == 4 && $game_system.cursed_armors.include?(a4)
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      $game_system.se_play($data_system.decision_se)
      @right_window.active = false
      @item_window.active = true
      @item_window.index = 0
      return
    end
    if Input.trigger?(Input::R)
      $game_system.se_play($data_system.cursor_se)
      @actor_index += 1
      @actor_index %= $game_party.actors.size
      $scene = Scene_Equip.new(@actor_index, @right_window.index)
      return
    end
    if Input.trigger?(Input::L)
      $game_system.se_play($data_system.cursor_se)
      @actor_index += $game_party.actors.size - 1
      @actor_index %= $game_party.actors.size
      $scene = Scene_Equip.new(@actor_index, @right_window.index)
      return
    end
  end
end
#==============================================================================
# ■ Window_EquipRight
#------------------------------------------------------------------------------
#  装备画面、显示角色现在装备的物品的窗口。
#==============================================================================
class Window_EquipRight < Window_Selectable
  def draw_item_name(item, x, y)
    if item == nil
      return
    end
    bitmap = RPG::Cache.icon(item.icon_name)
    if item.is_a?(RPG::Weapon) && $game_system.cursed_weapons.include?(item.id)
      self.contents.font.color = cursed_color
    end
    if item.is_a?(RPG::Armor) && $game_system.cursed_armors.include?(item.id)
      self.contents.font.color = cursed_color
    end
    self.contents.draw_text(x + 28, y, 212, 32, item.name)
  end
end
#==============================================================================
# ■ Window_Base
#------------------------------------------------------------------------------
#  游戏中全部窗口的超级类。
#==============================================================================
class Window_Base < Window
  def cursed_color
    return Color.new(255, 107, 255)
  end
end

 

#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================


 

脚本使用的通用说明

约定:本脚本来源于网络,任何人不得随意将本脚本应用于商业用途,如需转载,必须保留所有版权信息,如果是国内作者,最好征求作者同意——否则发生任何后果,66RPG不予负责。使用此脚本表示您默认接受上述约定。

说明:不同脚本之间、尤其是不同作者脚本之间会有冲突,本站会对已知脚本冲突进行简单说明。测试新脚本请下载本站提供的测试文件或者新建工程测试。脚本不要贪多,否则可能会互相冲突对您的游戏造成未知的影响。如果脚本内或者本站内提供了解释,请务必完全看完解释后再使用,如有问题,请到论坛讨论。


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

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

GMT+8, 2024-4-19 12:40

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

返回顶部