Project1
标题:
有没有一个不能更换武器的脚本
[打印本页]
作者:
avilee
时间:
2008-1-28 02:20
提示:
作者被禁止或删除 内容自动屏蔽
作者:
最後一滴淚
时间:
2008-1-28 02:44
#==============================================================================
# 本脚本来自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,使用和转载请保留此信息
#==============================================================================
复制代码
[LINE]1,#dddddd[/LINE]
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1