全新傻瓜式任务系统
升级版先看截图
代码
RUBY 代码
#==============================================================================
# ■ Window_Command 显示任务帮助窗口的类。
#------------------------------------------------------------------------------
# 脚本作者:薄凉看客,转载或使用请保留此信息。
#==============================================================================
class Window_Command
def update_help
caseself.index
when0
help = ""
when1
help = ""
when2
help = ""
end
@help_window.set_text(help)
end
end
RUBY 代码
#==============================================================================
# ■ Window_Helprw 显示任务帮助窗口的类。
#------------------------------------------------------------------------------
# 脚本作者:薄凉看客,转载或使用请保留此信息。
#==============================================================================
class Window_Helprw < Window_Base
def initialize
super(320, 50, 300, 380)
self.opacity = 0
self.contents = Bitmap.new(width - 32, height - 32)
end
def set_text(text, item = "", align = 0)
if text != @textor align != @alignor item != @item
self.contents.clear
self.contents.font.color = system_color
self.contents.font.size = 13
self.contents.draw_text(68, -2, self.width - 40, 32, "任务描述")
self.contents.draw_text(68, -2 + 113, self.width - 40, 32, "任务目标")
self.contents.draw_text(68, -2 + 226, self.width - 40, 32, "任务奖励")
if item == ""and text == ""
self.contents.font.color = Color.new(255, 120, 120, 255)
xx = "未选中任务,或没有领取任"
self.contents.draw_text(15, 20, self.width - 40, 32, xx, align)
xx = "务没有相关描绘。"
self.contents.draw_text(15, 40, self.width - 40, 32, xx, align)
xx = "未选中任务,或没有领取任"
self.contents.draw_text(15, 111 + 22, self.width - 40, 32, xx, align)
xx = "务没有相关描绘。"
self.contents.draw_text(15, 111 + 42, self.width - 40, 32, xx, align)
xx = "未选中任务,或没有领取任"
self.contents.draw_text(15, 224 + 20, self.width - 40, 32, xx, align)
xx = "务没有相关描绘。"
self.contents.draw_text(15, 224 + 40, self.width - 40, 32, xx, align)
end
self.contents.font.color = normal_color
self.contents.font.size = 15
if item != ""
case item.name
when"一夫当关"
xx = "乱童山麓一行与树精"
self.contents.draw_text(27, 20, self.width - 40, 32, xx, align)
xx = "一战险些丢了命!虽"
self.contents.draw_text(27, 40, self.width - 40, 32, xx, align)
xx = "胜却也是惨胜,努力"
self.contents.draw_text(27, 60, self.width - 40, 32, xx, align)
xx = "修炼,方能未雨绸缪。"
self.contents.draw_text(27, 80, self.width - 40, 32, xx, align)
xx = "帕吉尔等级达到30级"
self.contents.draw_text(27, 111 + 22, self.width - 40, 32, xx, align)
self.contents.font.color = Color.new(120, 255, 120, 255)
xx = "完成情况:"
self.contents.draw_text(27, 111 + 42, self.width - 40, 32, xx, align)
if$game_party.actors.level < 30
self.contents.font.color = Color.new(255, 120, 120, 255)
xx = "(未达成)"
else
self.contents.font.color = Color.new(120, 255, 120, 255)
xx = "(已达成)"
end
self.contents.draw_text(100, 111 + 42, self.width - 40, 32, xx, align)
self.contents.font.color = normal_color
xx = "当前等级:"
self.contents.draw_text(27, 111 + 62, self.width - 40, 32, xx, align)
self.contents.font.color = Color.new(120, 255, 120, 255)
actor = $game_party.actors
xx = actor.level.to_s
self.contents.draw_text(100, 111 + 62, self.width - 40, 32, xx, align)
self.contents.font.color = normal_color
xx = "目标等级:"
self.contents.draw_text(27, 111 + 82, self.width - 40, 32, xx, align)
self.contents.font.color = Color.new(255, 120, 120, 255)
xx = "30"
self.contents.draw_text(100, 111 + 82, self.width - 40, 32, xx, align)
self.contents.font.color = Color.new(120, 255, 120, 255)
bitmap = RPG::Cache.icon("刀.png")
self.contents.blt(15, 224 + 25, bitmap, Rect.new(0, 0, 24, 24))
xx = "云霄·寒光刀 × 1"
self.contents.draw_text(45, 224 + 20, self.width - 40, 32, xx, align)
bitmap = RPG::Cache.icon("剑.png")
self.contents.blt(15, 224 + 45, bitmap, Rect.new(0, 0, 24, 24))
self.contents.font.color = Color.new(255, 120, 120, 255)
xx = "云霄·饮血剑 × 1"
self.contents.draw_text(45, 224 + 40, self.width - 40, 32, xx, align)
self.contents.font.color = Color.new(120, 120, 255, 255)
bitmap = RPG::Cache.icon("棍.png")
self.contents.blt(15, 224 + 65, bitmap, Rect.new(0, 0, 24, 24))
xx = "云霄·月魔棍 × 1"
self.contents.draw_text(45, 224 + 60, self.width - 40, 32, xx, align)
self.contents.font.color = Color.new(255, 255, 64, 255)
bitmap = RPG::Cache.icon("枪.png")
self.contents.blt(15, 224 + 85, bitmap, Rect.new(0, 0, 24, 24))
xx = "云霄·青鳞枪 × 1"
self.contents.draw_text(45, 224 + 80, self.width - 40, 32, xx, align)
self.contents.font.color = Color.new(255, 120, 120, 255)
self.contents.font.size = 10
xx = "以上4种装备任选其一(要什么?要我?)"
self.contents.draw_text(10, 224 + 95, self.width - 40, 32, xx, align)
when"将魂"
xx = "将军战死沙场,他的传"
self.contents.draw_text(22, 20, self.width - 40, 32, xx, align)
xx = "说被埋葬,沉睡了千年"
self.contents.draw_text(22, 40, self.width - 40, 32, xx, align)
xx = "的将军魂被魔军唤醒。"
self.contents.draw_text(22, 60, self.width - 40, 32, xx, align)
xx = "勇士,快去阻止他吧!"
self.contents.draw_text(22, 80, self.width - 40, 32, xx, align)
xx = "进入将军墓中,阻止魔"
self.contents.draw_text(22, 111 + 22, self.width - 40, 32, xx, align)
xx = "军的邪恶计划!"
self.contents.draw_text(22, 111 + 42, self.width - 40, 32, xx, align)
self.contents.font.color = Color.new(120, 255, 120, 255)
xx = "完成情况:"
self.contents.draw_text(22, 111 + 62, self.width - 40, 32, xx, align)
self.contents.font.color = Color.new(255, 120, 120, 255)
#这里直接是未完成,其实写的时候,可以分歧一个开关
xx = "(未完成)"
self.contents.draw_text(100, 111 + 62, self.width - 40, 32, xx, align)
self.contents.font.color = Color.new(255, 255, 64, 255)
#这里直接是未完成,其实写的时候,可以分歧一个开关
xx = "未打败,魔·将魂"
self.contents.draw_text(22, 111 + 82, self.width - 40, 32, xx, align)
bitmap = RPG::Cache.icon("书·桔色皮.png")
self.contents.blt(10, 224 + 25, bitmap, Rect.new(0, 0, 24, 24))
xx = "战法·围魏救赵 × 1"
self.contents.font.color = Color.new(255, 255, 64, 255)
self.contents.draw_text(35, 224 + 20, self.width - 40, 32, xx, align)
bitmap = RPG::Cache.icon("书·蓝皮.png")
self.contents.blt(10, 224 + 45, bitmap, Rect.new(0, 0, 24, 24))
xx = "战法·火烧乌巢 × 1"
self.contents.font.color = Color.new(120, 120, 255, 255)
self.contents.draw_text(35, 224 + 40, self.width - 40, 32, xx, align)
bitmap = RPG::Cache.icon("书·绿皮.png")
self.contents.blt(10, 224 + 65, bitmap, Rect.new(0, 0, 24, 24))
xx = "战法·窃符救赵 × 1"
self.contents.font.color = Color.new(120, 255, 120, 255)
self.contents.draw_text(35, 224 + 60, self.width - 40, 32, xx, align)
bitmap = RPG::Cache.icon("书·紫皮.png")
self.contents.blt(10, 224 + 85, bitmap, Rect.new(0, 0, 24, 24))
xx = "战法·草船借箭 × 1"
self.contents.font.color = Color.new(255, 120, 120, 255)
self.contents.draw_text(35, 224 + 80, self.width - 40, 32, xx, align)
self.contents.font.size = 10
xx = "以上4种战法任选其一(要什么?要我?)"
self.contents.draw_text(10, 224 + 95, self.width - 40, 32, xx, align)
when"探索神秘之塔"
xx = "小镇后山有一神秘塔。"
self.contents.draw_text(22, 20, self.width - 40, 32, xx, align)
xx = "就连当地人也从未进去"
self.contents.draw_text(22, 40, self.width - 40, 32, xx, align)
xx = "过,最近在塔顶出现了"
self.contents.draw_text(22, 60, self.width - 40, 32, xx, align)
xx = "奇异的色彩,去看看吧!"
self.contents.draw_text(22, 80, self.width - 40, 32, xx, align)
xx = "登上神秘塔塔顶,打败"
self.contents.draw_text(22, 111 + 22, self.width - 40, 32, xx, align)
xx = "精灵,拿到月华天石。"
self.contents.draw_text(22, 111 + 42, self.width - 40, 32, xx, align)
self.contents.font.color = Color.new(120, 255, 120, 255)
xx = "完成情况:"
self.contents.draw_text(22, 111 + 62, self.width - 40, 32, xx, align)
self.contents.font.color = Color.new(255, 120, 120, 255)
#这里直接是未完成,其实写的时候,可以分歧一个开关
xx = "(未完成)"
self.contents.draw_text(100, 111 + 62, self.width - 40, 32, xx, align)
self.contents.font.color = Color.new(255, 255, 64, 255)
#这里直接是未完成,其实写的时候,可以分歧一个开关
xx = "未拿到月华天石"
self.contents.draw_text(22, 111 + 82, self.width - 40, 32, xx, align)
bitmap = RPG::Cache.icon("特殊魔石.png")
self.contents.blt(10, 224 + 25, bitmap, Rect.new(0, 0, 24, 24))
xx = "魔石·莱西斯特 × 1"
self.contents.font.color = Color.new(255, 255, 64, 255)
self.contents.draw_text(35, 224 + 20, self.width - 40, 32, xx, align)
bitmap = RPG::Cache.icon("自动魔石.png")
self.contents.blt(10, 224 + 45, bitmap, Rect.new(0, 0, 24, 24))
xx = "魔石·拉捷特斯 × 1"
self.contents.font.color = Color.new(120, 120, 255, 255)
self.contents.draw_text(35, 224 + 40, self.width - 40, 32, xx, align)
bitmap = RPG::Cache.icon("技能魔石.png")
self.contents.blt(10, 224 + 65, bitmap, Rect.new(0, 0, 24, 24))
xx = "魔石·新月之力 × 1"
self.contents.font.color = Color.new(120, 255, 120, 255)
self.contents.draw_text(35, 224 + 60, self.width - 40, 32, xx, align)
bitmap = RPG::Cache.icon("魔法魔石.png")
self.contents.blt(10, 224 + 85, bitmap, Rect.new(0, 0, 24, 24))
xx = "魔石·菲布尔利 × 1"
self.contents.font.color = Color.new(255, 120, 120, 255)
self.contents.draw_text(35, 224 + 80, self.width - 40, 32, xx, align)
self.contents.font.size = 10
xx = "随机以上4种魔石,看你有没有RP拿了!"
self.contents.draw_text(10, 224 + 95, self.width - 40, 32, xx, align)
when"索尔的委托"
xx = "乱童山麓,索尔的妹妹"
self.contents.draw_text(22, 20, self.width - 40, 32, xx, align)
xx = "被魔蝎攻击,身中剧毒"
self.contents.draw_text(22, 40, self.width - 40, 32, xx, align)
xx = "索尔自己要照看妹妹,"
self.contents.draw_text(22, 60, self.width - 40, 32, xx, align)
xx = "只好拜托你找解药了。"
self.contents.draw_text(22, 80, self.width - 40, 32, xx, align)
xx = "找到解药:"
self.contents.draw_text(22, 111 + 22, self.width - 40, 32, xx, align)
xx = "九花玉露"
self.contents.draw_text(22, 111 + 42, self.width - 40, 32, xx, align)
self.contents.font.color = Color.new(120, 255, 120, 255)
xx = "完成情况:"
self.contents.draw_text(22, 111 + 62, self.width - 40, 32, xx, align)
self.contents.font.color = Color.new(255, 120, 120, 255)
#这里直接是未完成,其实写的时候,可以分歧一个开关
xx = "(未完成)"
self.contents.draw_text(100, 111 + 62, self.width - 40, 32, xx, align)
self.contents.font.color = Color.new(255, 255, 64, 255)
#这里直接是未完成,其实写的时候,可以分歧一个开关
xx = "未拿到九花玉露"
self.contents.draw_text(22, 111 + 82, self.width - 40, 32, xx, align)
bitmap = RPG::Cache.icon("048-Skill05.png")
self.contents.blt(10, 224 + 25, bitmap, Rect.new(0, 0, 24, 24))
xx = "EXP 上升 10000 点"
self.contents.font.color = Color.new(255, 255, 64, 255)
self.contents.draw_text(35, 224 + 20, self.width - 40, 32, xx, align)
bitmap = RPG::Cache.icon("048-Skill05.png")
self.contents.blt(10, 224 + 45, bitmap, Rect.new(0, 0, 24, 24))
xx = "金钱 增加 10000"
self.contents.font.color = Color.new(120, 120, 255, 255)
self.contents.draw_text(35, 224 + 40, self.width - 40, 32, xx, align)
when"习乐"
xx = "音乐是最美妙的艺术!"
self.contents.draw_text(22, 20, self.width - 40, 32, xx, align)
xx = "人们在它的世界里陶醉!"
self.contents.draw_text(22, 40, self.width - 40, 32, xx, align)
xx = "你与乐神仅一步之遥!"
self.contents.draw_text(22, 60, self.width - 40, 32, xx, align)
xx = "去追寻那天籁之音吧!"
self.contents.draw_text(22, 80, self.width - 40, 32, xx, align)
xx = "向修道院中乐神习乐,"
self.contents.draw_text(22, 111 + 22, self.width - 40, 32, xx, align)
xx = "或者在菜单中学习乐。"
self.contents.draw_text(22, 111 + 42, self.width - 40, 32, xx, align)
self.contents.font.color = Color.new(120, 255, 120, 255)
xx = "完成情况:"
self.contents.draw_text(22, 111 + 62, self.width - 40, 32, xx, align)
self.contents.font.color = Color.new(255, 120, 120, 255)
#这里直接是未完成,其实写的时候,可以分歧一个开关
xx = "(未完成)"
self.contents.draw_text(100, 111 + 62, self.width - 40, 32, xx, align)
self.contents.font.color = Color.new(255, 255, 64, 255)
#这里直接是未完成,其实写的时候,可以分歧一个开关
xx = "未学习乐"
self.contents.draw_text(22, 111 + 82, self.width - 40, 32, xx, align)
bitmap = RPG::Cache.icon("乐魂·Easy.png")
self.contents.blt(10, 224 + 25, bitmap, Rect.new(0, 0, 24, 24))
xx = "乐魂·海之风暴 × 1"
self.contents.font.color = Color.new(255, 255, 64, 255)
self.contents.draw_text(35, 224 + 20, self.width - 40, 32, xx, align)
bitmap = RPG::Cache.icon("乐魂·Fever.png")
self.contents.blt(10, 224 + 45, bitmap, Rect.new(0, 0, 24, 24))
xx = "乐魂·高斯模糊 × 1"
self.contents.font.color = Color.new(120, 120, 255, 255)
self.contents.draw_text(35, 224 + 40, self.width - 40, 32, xx, align)
bitmap = RPG::Cache.icon("乐魂·Hard.png")
self.contents.blt(10, 224 + 65, bitmap, Rect.new(0, 0, 24, 24))
xx = "乐魂·梦的预见 × 1"
self.contents.font.color = Color.new(120, 255, 120, 255)
self.contents.draw_text(35, 224 + 60, self.width - 40, 32, xx, align)
bitmap = RPG::Cache.icon("乐魂·Normal.png")
self.contents.blt(10, 224 + 85, bitmap, Rect.new(0, 0, 24, 24))
xx = "乐魂·天空之城 × 1"
self.contents.font.color = Color.new(255, 120, 120, 255)
self.contents.draw_text(35, 224 + 80, self.width - 40, 32, xx, align)
self.contents.font.size = 10
xx = "乐等级达到5,即可得以上4种乐魂之一。"
self.contents.draw_text(10, 224 + 95, self.width - 40, 32, xx, align)
end
end
@text = text
@item = item
@align = align
@actor = nil
end
self.visible = true
end
end
RUBY 代码
#==============================================================================
# ■ Window_Itemrw 显示任务列表窗口的类。
#------------------------------------------------------------------------------
# 脚本作者:薄凉看客,转载或使用请保留此信息。
#==============================================================================
class Window_Item < Window_Selectable
def refresh
ifself.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in1...$data_items.size
if$game_party.item_number(i) > 0
if$data_items.description != "主线任务"and
$data_items.description != "支线任务"and
$data_items.description != "日常任务"
@data.push($data_items)
end
end
end
unless$game_temp.in_battle
for i in1...$data_weapons.size
if$game_party.weapon_number(i) > 0
@data.push($data_weapons)
end
end
for i in1...$data_armors.size
if$game_party.armor_number(i) > 0
@data.push($data_armors)
end
end
end
@item_max = @data.size
if@item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
for i in0...@item_max
draw_item(i)
end
end
end
end
class Window_Itemrw < Window_Selectable
def initialize
super(107, 91, 210, 500)
@column_max = 1
refresh
self.index = -1
end
def item
return@data
end
def refresh(kind = 0)
ifself.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
if kind == 0
for i in1...$data_items.size
if$game_party.item_number(i) > 0
if$data_items.description == "主线任务"
@data.push($data_items)
end
end
end
elsif kind == 1
for i in1...$data_items.size
if$game_party.item_number(i) > 0
if$data_items.description == "支线任务"
@data.push($data_items)
end
end
end
elsif kind == 2
for i in1...$data_items.size
if$game_party.item_number(i) > 0
if$data_items.description == "日常任务"
@data.push($data_items)
end
end
end
end
@item_max = @data.size
if@item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 38)
for i in0...@item_max
draw_item(i)
end
end
end
def draw_item(index)
item = @data
case item
whenRPG::Item
number = $game_party.item_number(item.id)
end
x = index % 1 * (150 + 32) + 10
y = index / 1 * 38
self.contents.font.size = 15
self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
end
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description,
self.item == nil ? "" : @data)
end
def update_cursor_rect
self.cursor_rect.empty
end
end
RUBY 代码
#==============================================================================
# ■ Blkk_rw 显示任务场景的类。
#------------------------------------------------------------------------------
# 脚本作者:薄凉看客,转载或使用请保留此信息。
#==============================================================================
class Blkk_rw
def initialize(index = 0)
@index = index
end
def main
xx = Spriteset_Map.new
blkk = []
blkk = 0
@command_window = Window_Command.new(210, [
"", "", ""], blkk)
@command_window.index = @index
@command_window.visible = false
@help_window = Window_Helprw.new
@item_window = Window_Itemrw.new
@item_window.active = false
@item_window.opacity = 0
@command_window.help_window = @help_window
@item_window.help_window = @help_window
picture = Sprite.new
picture.bitmap = Bitmap.new("Graphics/Pictures/任务背景图.png")
picture.x -= 18
@picture2 = Sprite.new
@picture2.bitmap = Bitmap.new("Graphics/Pictures/主线任务.png")
@picture2.x -= 18
@picture3 = Sprite.new
@picture3.bitmap = Bitmap.new("Graphics/Pictures/支线任务.png")
@picture3.x -= 18
@picture3.opacity = 0
@picture4 = Sprite.new
@picture4.bitmap = Bitmap.new("Graphics/Pictures/日常任务.png")
@picture4.x -= 18
@picture4.opacity = 0
@arrow = Sprite.new
@arrow.bitmap = Bitmap.new("Graphics/Pictures/arrow4.png")
@arrow.x = 100
@arrow.y = 106
@arrow.opacity = 0
Graphics.transition
loopdo
Graphics.update
Input.update
update
if$scene != self
break
end
end
Graphics.freeze
@command_window.dispose
xx.dispose
picture.dispose
@picture2.dispose
@picture3.dispose
@picture4.dispose
@arrow.dispose
@help_window.dispose
@item_window.dispose
end
def update
@command_window.update
@help_window.update
@item_window.update
@item_window.refresh(@command_window.index)
case@command_window.index
when0
@picture2.opacity = 255
@picture3.opacity = 0
@picture4.opacity = 0
when1
@picture2.opacity = 0
@picture3.opacity = 255
@picture4.opacity = 0
when2
@picture2.opacity = 0
@picture3.opacity = 0
@picture4.opacity = 255
end
case@item_window.index
when-1
@arrow.opacity = 0
when0
@arrow.y = 106
@arrow.opacity = 255
when1
@arrow.y = 106 + 38
@arrow.opacity = 255
when2
@arrow.y = 106 + 38 * 2
@arrow.opacity = 255
when3
@arrow.y = 106 + 38 * 3
@arrow.opacity = 255
when4
@arrow.y = 106 + 38 * 4
@arrow.opacity = 255
when5
@arrow.y = 106 + 38 * 5
@arrow.opacity = 255
when6
@arrow.y = 106 + 38 * 6
@arrow.opacity = 255
end
if@command_window.active
update_command
return
end
if@item_window.active
update_item
return
end
end
def update_command
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
if Input.trigger?(Input::C)
$game_system.se_play($data_system.decision_se)
case@command_window.index
when0
@command_window.active = false
@item_window.active = true
@item_window.index = 0
when1
@command_window.active = false
@item_window.active = true
@item_window.index = 0
when2
@command_window.active = false
@item_window.active = true
@item_window.index = 0
end
return
end
end
def update_item
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@item_window.active = false
@command_window.active = true
@item_window.index = -1
return
end
end
end
赠送:超级命令窗体脚本
RUBY 代码
#==============================================================================
# ■ Window_Command 超级命令窗体的类。
#------------------------------------------------------------------------------
# 脚本作者:薄凉看客,转载或使用请保留此信息。
#==============================================================================
=begin
在生成Command.new时后边可以有第三个参数——一个数组(另附加一个图标文件名数组)
数组详细说明(数组参数是非必须的,可有可无):
[0:列数, 1:X坐标, 2:Y坐标, 3:Z坐标, 4:未选中字体大小, 5:选中字体大小,
6:未选中字体时的颜色, 7:选中字体时的颜色, 8:未选中时的字体名, 9:选中时的字体名,
10:项目无效化时的字体名, 11:项目无效化1, 12:项目无效化2, 13:项目无效化3,
14:项目无效化4, 15:窗口的不透明度, 16:背景的不透明度, 17:内容的不透明度,
18:是否显示图标]
注:如果需要显示图标,需要再加一个数组参数(非必须)来指定图标文件名(
当然也可以使用默认图标,数组内指定的图标会按012345的顺序依次显示,而
且不管你有几个选项,你都必须指定6个图标名,否则按默认处理)。
举个例子:
#---------把Scene_Menu的26行脚本替换为以下内容,就能看到效果---------
array_menu = []
array_menu = 6#让选择项横着选
array_menu = 0#修改命令窗体的X坐标
array_menu = 100#修改命令窗体的Y坐标为100
array_menu = 15#修改命令窗体未选中时的字体大小为15
array_menu = 22#修改命令窗体选中时的字体大小为22
array_menu = 500#修改Z坐标,保证命令窗体显示在最上方
array_menu = 5#让5号选择项(即结束)无效化
array_menu = 150#修改窗体的不透明度
array_menu = 150#修改背景的不透明度
array_menu = 150#修改内容的不透明度
array_menu = true#给命令窗体显示上图标
icon_commands = ["041-Item10.png", "050-Skill07.png",
"019-Accessory04.png", "045-Skill02.png", "036-Item05.png",
"046-Skill03.png"]#这是指定图标文件名
mmand_window = Window_Command.new(640, ,
array_menu, icon_commands)
#---------把Scene_Menu的26行脚本替换为以上内容,就能看到效果---------
=end
class Window_Command < Window_Selectable
def initialize(width, command, commands = [], icon_commands = 0)
if icon_commands = 0or icon_commands.class != Array
icon_commands = ["041-Item10.png", "050-Skill07.png",
"019-Accessory04.png", "045-Skill02.png", "036-Item05.png",
"046-Skill03.png"]
elsif icon_commands.class == Arrayand(icon_commands == nilor
icon_commands == nilor icon_commands == nilor
icon_commands == nilor icon_commands == nilor
icon_commands == nil)
icon_commands = ["041-Item10.png", "050-Skill07.png",
"019-Accessory04.png", "045-Skill02.png", "036-Item05.png",
"046-Skill03.png"]
end
if commands.class != Array
commands = []
end
if commands == 1or commands == nil
if commands == niland commands != nil
super(0, commands, width, command.size * 32 + 32)
elsif commands != niland commands == nil
super(commands, 0, width, command.size * 32 + 32)
elsif commands == niland commands == nil
super(0, 0, width, command.size * 32 + 32)
elsif commands != niland commands != nil
super(commands, commands, width, command.size * 32 + 32)
end
else
if commands == niland commands != nil
super(0, commands, width, 64)
elsif commands != niland commands == nil
super(commands, 0, width, 64)
elsif commands == niland commands == nil
super(0, 0, width, 64)
elsif commands != niland commands != nil
super(commands, commands, width, 64)
end
end
if commands != nil
self.z = commands
else
self.z = 100
end
@command = command
@item_max = @command.size
if commands != nil
@column_max = commands
else
@column_max = 1
end
if commands != nil
@size1 = commands
else
@size1 = 22
end
if commands != nil
@size2 = commands
else
@size2 = 22
end
if commands != nil
@color1 = commands
else
@color1 = normal_color
end
if commands != nil
@color2 = commands
else
@color2 = normal_color
end
if commands != nil
@name1 = commands
else
@name1 = "黑体"
end
if commands != nil
@name2 = commands
else
@name2 = "黑体"
end
if commands != nil
@name3 = commands
else
@name3 = "黑体"
end
if commands != nil
@disable_item1 = commands
else
@disable_item1 = -1
end
if commands != nil
@disable_item2 = commands
else
@disable_item2 = -1
end
if commands != nil
@disable_item3 = commands
else
@disable_item3 = -1
end
if commands != nil
@disable_item4 = commands
else
@disable_item4 = -1
end
self.contents = Bitmap.new(width - 32, @item_max * 32)
if commands != niland commands >= 0and commands = 0and commands = 0and commands
页:
[1]