赞 | 8 |
VIP | 14 |
好人卡 | 35 |
积分 | 32 |
经验 | 46931 |
最后登录 | 2024-8-10 |
在线时间 | 1442 小时 |
Lv3.寻梦者
- 梦石
- 0
- 星屑
- 3176
- 在线时间
- 1442 小时
- 注册时间
- 2009-7-27
- 帖子
- 1454
|
本帖最后由 爆焰 于 2012-1-21 02:07 编辑
改好了。排版真是乱七八糟的- #==============================================================================
- # 本脚本来自www.66RPG.com,使用和转载请保留此信息
- #==============================================================================
- #==============================================================================
- # ■ Window_PlayTime
- #------------------------------------------------------------------------------
- # メニュー画面でプレイ時間を表示するウィンドウです。
- #==============================================================================
- $fontface = "微软雅黑"
- $fontsize = 20
- class Window_PlayTime < Window_Base
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize
- super(0, 0, 160, 70)
- self.contents = Bitmap.new(width - 32, height - 32)
- self.contents.font.name = $fontface
- self.contents.font.size = $fontsize
- refresh
- end
- #--------------------------------------------------------------------------
- # ● リフレッシュ
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- self.contents.font.color = system_color
- self.contents.draw_text(0, -8, 120, 32, "游戏时间")
- @total_sec = Graphics.frame_count / Graphics.frame_rate
- hour = @total_sec / 60 / 60
- min = @total_sec / 60 % 60
- sec = @total_sec % 60
- text = sprintf("%02d:%02d:%02d", hour, min, sec)
- self.contents.font.color = normal_color
- self.contents.draw_text(0, 12, 120, 32, text, 2)
- end
- #--------------------------------------------------------------------------
- # ● フレーム更新
- #--------------------------------------------------------------------------
- def update
- super
- if Graphics.frame_count / Graphics.frame_rate != @total_sec
- refresh
- end
- end
- end
- #==============================================================================
- # ■ Window_MapName
- # Location Script by Sunrunner
- #------------------------------------------------------------------------------
- # メニュー画面で歩数を表示するウィンドウです。
- #==============================================================================
- class Window_MapName < Window_Base
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize
- super(0, 0, 160, 70)
- self.contents = Bitmap.new(width - 32, height - 32)
- self.contents.font.name = $fontface
- self.contents.font.size = $fontsize
- refresh
- end
- #--------------------------------------------------------------------------
- # ● リフレッシュ
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- self.contents.font.color = system_color
- self.contents.draw_text(0, -8, 120, 32, "当前位置")
- self.contents.font.color = normal_color
- $maps = load_data("Data/MapInfos.rxdata")
- @map_id = $game_map.map_id
- @currentmap = $maps[@map_id].name
- self.contents.font.size = 18
- self.contents.draw_text(40,-5,440,64,@currentmap)
- end
- end
- #==============================================================================
- # ■ Window_Gold
- #------------------------------------------------------------------------------
- # ゴールドを表示するウィンドウです。
- #==============================================================================
- class Window_Gold < Window_Base
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize
- super(0, 0, 160, 70)
- self.contents = Bitmap.new(width - 32, height - 32)
- self.contents.font.name = $fontface
- self.contents.font.size = $fontsize
- refresh
- end
- #--------------------------------------------------------------------------
- # ● リフレッシュ
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- self.contents.font.color = system_color
- self.contents.draw_text(0, -8, 120, 32, "¥")
- cx = contents.text_size($data_system.words.gold).width
- self.contents.font.color = normal_color
- self.contents.draw_text(0, 12, 120-cx-2, 32, $game_party.gold.to_s, 2)
- end
- end
- #==============================================================================
- # ■ Window_MenuStatus
- #------------------------------------------------------------------------------
- # メニュー画面でパーティメンバーのステータスを表示するウィンドウです。
- #==============================================================================
- class Window_MenuStatus < Window_Selectable
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize
- super(0, 0, 480, 415)
- self.contents = Bitmap.new(width - 32, height - 32)
- self.contents.font.name = $fontface
- self.contents.font.size = $fontsize
- refresh
- self.active = false
- self.index = -1
- end
- #--------------------------------------------------------------------------
- # ● リフレッシュ
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- @item_max = $game_party.actors.size
- for i in 0...$game_party.actors.size
- x = 64
- y = i * 75
- actor = $game_party.actors[i]
- draw_actor_graphic(actor, x - 40, y + 70)
- draw_actor_name(actor, x, y)
- draw_actor_class(actor, x + 144, y)
- draw_actor_level(actor, x, y + 24)
- draw_actor_state(actor, x + 90, y + 24)
- draw_actor_exp(actor, x, y + 48)
- draw_actor_hp(actor, x + 236, y + 24)
- draw_actor_sp(actor, x + 236, y + 48)
- end
- end
- #--------------------------------------------------------------------------
- # ● カーソルの矩形更新
- #--------------------------------------------------------------------------
- def update_cursor_rect
- if @index < 0
- self.cursor_rect.empty
- else
- self.cursor_rect.set(0, @index * 75, self.width - 32, 75)
- end
- end
- end
- #==============================================================================
- # ■ Scene_Menu
- #------------------------------------------------------------------------------
- # メニュー画面の処理を行うクラスです。
- #==============================================================================
- class Window_Title < Window_Base
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize
- super(38, 60, 156, 70)
- self.contents = Bitmap.new(width - 32, height - 32)
- self.contents.font.name = $fontface
- self.contents.font.size = $fontsize
- refresh
- end
- def refresh
- self.contents.clear
- self.contents.font.color = system_color
- self.contents.font.color = normal_color
- self.contents.draw_text(30, 5, 100, 30, "菜单")
- end
- end
- #--------------------------------
- class Scene_Menu
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- # menu_index : コマンドのカーソル初期位置
- #--------------------------------------------------------------------------
- def initialize(menu_index = 0)
- @menu_index = menu_index
- end
- #--------------------------------------------------------------------------
- # ● メイン処理
- #--------------------------------------------------------------------------
- def main
- # ステータスウィンドウを作成
- @scene_menu = Window_Title.new
- @scene_menu.x = 6
- @scene_menu.y = 0
- @scene_menu.back_opacity = 160
- # コマンドウィンドウを作成
- @sprite = Spriteset_Map.new
- s1 = "背包"
- s2 = "技能"
- s3 = "装备"
- s4 = "状态"
- s5 = "记载"
- s6 = "载入"
- s7 = "换人"
- s8 = "结束"
- @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7, s8])
- @command_window.index = @menu_index
- @command_window.x = 5
- @command_window.y = 66
- @command_window.back_opacity = 160
- # パーティ人数が 0 人の場合
- if $game_party.actors.size == 0
- # アイテム、スキル、装備、ステータスを無効化
- @command_window.disable_item(0)
- @command_window.disable_item(1)
- @command_window.disable_item(2)
- @command_window.disable_item(3)
- end
- # セーブ禁止の場合
- if $game_system.save_disabled
- # セーブを無効にする
- @command_window.disable_item(4)
- end
- # プレイ時間ウィンドウを作成
- @playtime_window = Window_PlayTime.new
- @playtime_window.x = 320
- @playtime_window.y = 0
- @playtime_window.back_opacity = 160
- # 歩数ウィンドウを作成
- @steps_window = Window_MapName.new
- @steps_window.x = 480
- @steps_window.y = 0
- @steps_window.back_opacity = 160
- # ゴールドウィンドウを作成
- @gold_window = Window_Gold.new
- @gold_window.x = 162
- @gold_window.y = 0
- @gold_window.back_opacity = 160
- # ステータスウィンドウを作成
- @status_window = Window_MenuStatus.new
- @status_window.x = 160
- @status_window.y = 65
- @status_window.back_opacity = 160
- # トランジション実行
- Graphics.transition
- # メインループ
- loop do
- # ゲーム画面を更新
- Graphics.update
- # 入力情報を更新
- Input.update
- # フレーム更新
- update
- # 画面が切り替わったらループを中断
- if $scene != self
- break
- end
- end
- # トランジション準備
- Graphics.freeze
- # ウィンドウを解放
- @command_window.dispose
- @playtime_window.dispose
- @steps_window.dispose
- @gold_window.dispose
- @status_window.dispose
- @scene_menu.dispose
- @sprite.dispose
- end
- #--------------------------------------------------------------------------
- # ● フレーム更新
- #--------------------------------------------------------------------------
- def update
- # ウィンドウを更新
- @command_window.update
- @playtime_window.update
- @steps_window.update
- @gold_window.update
- @status_window.update
- # コマンドウィンドウがアクティブの場合: update_command を呼ぶ
- if @command_window.active
- update_command
- return
- end
- # ステータスウィンドウがアクティブの場合: update_status を呼ぶ
- if @status_window.active
- update_status
- return
- end
- end
- #--------------------------------------------------------------------------
- # ● フレーム更新 (コマンドウィンドウがアクティブの場合)
- #--------------------------------------------------------------------------
- def update_command
- # B ボタンが押された場合
- if Input.trigger?(Input::B)
- # キャンセル SE を演奏
- $game_system.se_play($data_system.cancel_se)
- # マップ画面に切り替え
- $scene = Scene_Map.new
- return
- end
- # C ボタンが押された場合
- if Input.trigger?(Input::C)
- # パーティ人数が 0 人で、セーブ、ゲーム終了以外のコマンドの場合
- if $game_party.actors.size == 0 and @command_window.index < 4
- # ブザー SE を演奏
- $game_system.se_play($data_system.buzzer_se)
- return
- end
- # コマンドウィンドウのカーソル位置で分岐
- case @command_window.index
- when 0 # アイテム
- $game_system.se_play($data_system.decision_se)
- # 切换到物品画面
- $scene = Scene_Item.new
- when 1 # スキル
- $game_system.se_play($data_system.decision_se)
- # 激活状态窗口
- @command_window.active = false
- @status_window.active = true
- @status_window.index = 0
- when 2 # 装備
- $game_system.se_play($data_system.decision_se)
- # 激活状态窗口
- @command_window.active = false
- @status_window.active = true
- @status_window.index = 0
- when 3 # ステータス
- $game_system.se_play($data_system.decision_se)
- # 激活状态窗口
- @command_window.active = false
- @status_window.active = true
- @status_window.index = 0
-
- when 4 # セーブ
- # セーブ禁止の場合
- if $game_system.save_disabled
- # 演奏冻结 SE
- $game_system.se_play($data_system.buzzer_se)
- return
- end
- # 演奏确定 SE
- $game_system.se_play($data_system.decision_se)
- # 切换到存档画面
- $scene = Scene_Save.new
- when 5 # ロード
- Input.update
- # 決定 SE を演奏
- @continue_enabled = false
- for i in 0..3
- if FileTest.exist?("Save#{i+1}.rxdata")
- @continue_enabled = true
- end
- end
- if @continue_enabled
- # 演奏决定音效
- $game_system.se_play($data_system.decision_se)
- # 写个“火翼鸟”
- $menu_load = "火翼鸟"
- # 切换到读档画面
- $scene = Scene_Load.new
- else
- # 冻结音效
- $game_system.se_play($data_system.buzzer_se)
- end
- when 8
- if $game_party.actors.size > 0
- $game_system.se_play($data_system.decision_se)
- $scene = Scene_Lvup.new(0,5)
- else
- $game_system.se_play($data_system.buzzer_se)
- end
- when 6
- $scene = Chaochao_Scene_Party.new
- when 7 # ゲーム終了
- # 決定 SE を演奏
- $game_system.se_play($data_system.decision_se)
- # ゲーム終了画面に切り替え
- $scene = Scene_End.new
- else
-
- end
- return
- end
- end
- #--------------------------------------------------------------------------
- # ● フレーム更新 (ステータスウィンドウがアクティブの場合)
- #--------------------------------------------------------------------------
- def update_status
- # B ボタンが押された場合
- if Input.trigger?(Input::B)
- # キャンセル SE を演奏
- $game_system.se_play($data_system.cancel_se)
- # コマンドウィンドウをアクティブにする
- @command_window.active = true
- @status_window.active = false
- @status_window.index = -1
- return
- end
- # C ボタンが押された場合
- if Input.trigger?(Input::C)
- # コマンドウィンドウのカーソル位置で分岐
- case @command_window.index
- when 1 # スキル
- # このアクターの行動制限が 2 以上の場合
- if $game_party.actors[@status_window.index].restriction >= 2
- # ブザー SE を演奏
- $game_system.se_play($data_system.buzzer_se)
- return
- end
- # 決定 SE を演奏
- $game_system.se_play($data_system.decision_se)
- # スキル画面に切り替え
- $scene = Scene_Skill.new(@status_window.index)
- when 2 # 装備
- # 決定 SE を演奏
- $game_system.se_play($data_system.decision_se)
- # 装備画面に切り替え
- $scene = Scene_Equip.new(@status_window.index)
- when 3 # ステータス
- # 決定 SE を演奏
- $game_system.se_play($data_system.decision_se)
- # ステータス画面に切り替え
- $scene = Scene_Status.new(@status_window.index)
- end
- return
- end
- end
- end
- #==============================================================================
- # 本脚本来自www.66RPG.com,使用和转载请保留此信息
- #==============================================================================
- #==============================================================================
- # 本脚本来自www.66RPG.com,使用和转载请保留此信息
- #==============================================================================
- #==============================================================================
- # 本脚本来自www.66RPG.com,使用和转载请保留此信息
- #==============================================================================
- #==============================================================================
- # ■ chaochao的人物仓库ver1.02正式版
- # 修改了Game_Party
- # 功能:
- # 用来存放角色的仓库……
- # 召唤画面用$scene = Chaochao_Scene_Party.new
- # 其它使用说明在代码里已经备注。
- #------------------------------------------------------------------------------
- # 作者:chaochao
- # http://zhuchao.go1.icpcn.com
- #==============================================================================
- class Chaochao_Window_PartyLeft < Window_Selectable
- def initialize
- super(0, 0, 320, 224)
- self.contents = Bitmap.new(width - 32, height - 32)
- self.index = 0
- refresh
- end
- def actor
- return @actors[self.index]
- end
- def refresh
- if self.contents != nil
- self.contents.dispose
- self.contents = nil
- end
- @actors = []
- for i in 0...$game_party.actors.size
- @actors.push($game_party.actors[i])
- end
-
- @item_max = 5
- if @item_max > 0
- self.contents = Bitmap.new(width - 32, (row_max+1) * 32)
- for i in 0...@item_max
- draw_item(i)
- end
- end
- end
- def draw_item(index)
- if @actors[index] != nil
- actor = @actors[index]
- text = @actors[index].name
- lv = @actors[index].level.to_s + " "
- if $game_party.chaochao.include?(actor.id) or $game_party.actors.size <= 1
- self.contents.font.color = Color.new(255, 0, 0) #不能被移动的颜色
- else
- self.contents.font.color = Color.new(0, 255, 0) #可以被移动的颜色
- end
- self.contents.draw_text(4, index * 32 + 32, 288, 32, text)
- self.contents.font.color = normal_color
- self.contents.font.size = 16
- self.contents.draw_text(4, index * 32 + 36, 288, 32, "等级: ", 2)
- colorx = [255.0000 - 255.0000/60 * @actors[index].level,0].max
- colory = [255.0000 / 60 * @actors[index].level,255].min
- self.contents.font.color = Color.new(colorx, colory, 0)
- self.contents.draw_text(4, index * 32 + 36, 288, 32, lv, 2)
- self.contents.font.color = normal_color
- self.contents.font.size = 22
- else
- self.contents.draw_text(4, index * 32 + 32, 288, 32, "没有人物!")
- end
- end
- def update_cursor_rect
- if @index < 0
- self.cursor_rect.empty
- return
- end
- row = @index / @column_max
- if row < self.top_row
- self.top_row = row
- end
- if row > self.top_row + (self.page_row_max - 1)
- self.top_row = row - (self.page_row_max - 1)
- end
- cursor_width = self.width / @column_max - 32
- x = @index % @column_max * (cursor_width + 32)
- y = @index / @column_max * 32 - self.oy + 32
- self.cursor_rect.set(x, y, cursor_width, 32)
- end
- def item_max
- return @item_max
- end
- def actor?(index)
- return @actors[index] == nil ? false : true
- end
- def set_index(x)
- @index = x
- end
- end
- #------------------------------------------------------------------------------
- class Chaochao_Window_PartyRight < Window_Selectable
- def initialize
- super(320, 0, 320, 224)
- self.contents = Bitmap.new(width - 32, height - 32)
- self.index = -1
- refresh
- end
- def actor
- return @actors[self.index]
- end
- def refresh
- if self.contents != nil
- self.contents.dispose
- self.contents = nil
- end
- @actors = []
- for i in 0...$game_party.actors2.size
- @actors.push($game_party.actors2[i])
- end
-
- @item_max = $game_party.actors2.size
- if @item_max > 0
- self.contents = Bitmap.new(width - 32, row_max * 32)
- for i in 0...@item_max
- draw_item(i)
- end
- elsif @item_max == 0
-
- end
- end
- def draw_item(index)
- actor = @actors[index]
- text = @actors[index].name
- lv = @actors[index].level.to_s + " "
- if $game_party.chaochao2.include?(actor.id) or $game_party.actors.size >= 5
- self.contents.font.color = Color.new(255, 0, 0) #不能被移动的颜色
- else
- self.contents.font.color = Color.new(0, 255, 0) #可以被移动的颜色
- end
- self.contents.draw_text(4, index * 32, 288, 32, text)
- self.contents.font.color = normal_color
- self.contents.font.size = 16
- self.contents.draw_text(4, index * 32 + 4, 288, 32, "等级: ", 2)
- colorx = [255.0000 - 255.0000/60 * @actors[index].level,0].max
- colory = [255.0000 / 60 * @actors[index].level,255].min
- self.contents.font.color = Color.new(colorx, colory, 0)
- self.contents.draw_text(4, index * 32 + 4, 288, 32, lv, 2)
- self.contents.font.color = normal_color
- self.contents.font.size = 22
- end
- def update_cursor_rect
- if @index < 0
- self.cursor_rect.empty
- return
- end
- row = @index / @column_max
- if row < self.top_row
- self.top_row = row
- end
- if row > self.top_row + (self.page_row_max - 1)
- self.top_row = row - (self.page_row_max - 1)
- end
- cursor_width = self.width / @column_max - 32
- x = @index % @column_max * (cursor_width + 32)
- y = @index / @column_max * 32 - self.oy
- self.cursor_rect.set(x, y, cursor_width, 32)
- end
- def item_max
- return @item_max
- end
- def actor?(index)
- return @actors[index] == nil ? false : true
- end
- def set_index(x)
- @index = x
- end
- end
- #------------------------------------------------------------------------------
- class Chaochao_Window_PartyData < Window_Base
- def initialize
- super(0, 224, 640, 256)
- self.contents = Bitmap.new(width - 32, height - 32)
- @actor = nil
- end
- def set_actor(actor)
- self.contents.clear
- draw_actor_name(actor, 4, 0)
- draw_actor_state(actor, 140, 0)
- draw_actor_hp(actor, 284, 0)
- draw_actor_sp(actor, 460, 0)
- @actor = actor
- self.visible = true
- end
- def clear
- self.contents.clear
- end
- end
- #------------------------------------------------------------------------------
- class Game_Party
- attr_reader :actors2
- attr_reader :chaochao#不能从队伍向备用角色移动的角色ID
- attr_reader :chaochao2#不能从备用角色向队伍移动的角色ID
- def initialize
- @actors = []
- @gold = 0
- @steps = 0
- @items = {}
- @weapons = {}
- @armors = {}
- @actors2 = []
- @chaochao = []
- @chaochao2 = []
- end
- def add_actor(actor_id,type=1)#type为1是向队伍中添加,为2则相反。
- case type
- when 1
- if $game_actors[actor_id] != nil
- actor = $game_actors[actor_id]
- #如果队伍没有满和队伍中没有此角色
- if @actors.size < 5 and not @actors.include?(actor) and not @actors2.include?(actor)
- @actors.push(actor)
- $game_player.refresh
- end
- end
- when 2
- if $game_actors[actor_id] != nil
- actor = $game_actors[actor_id]
- #如果角色不在队伍中和不在备用角色队伍中的情况下
- #向备用角色中添加角色
- if not @actors.include?(actor) and not @actors2.include?(actor)
- @actors2.push(actor)
- $game_player.refresh
- end
- end
- end
- end
- def huanren(index,type=1)#type为1是从备用角色向队伍中移动,为2则相反。
- actor = $game_actors[index]
- case type
- when 1
- if @actors.size < 5 and @actors2.include?(actor) and not @chaochao2.include?(index) and not @actors.include?(actor)
- @actors.push(actor)
- @actors2.delete(actor)
- $game_system.se_play($data_system.decision_se)
- $game_player.refresh
- end
- when 2
- if @actors.include?(actor) and not @chaochao.include?(index) and not @actors2.include?(actor)
- @actors2.push(actor)
- @actors.delete(actor)
- $game_system.se_play($data_system.decision_se)
- $game_player.refresh
- end
- end
- end
- #type1,1是操作队伍中的角色能否向备用队伍移动,2则相反。
- #type2,1是添加不能移动的,2是删除不能移动的。
- def yidong(actor_id,type1,type2=1)
- case type2
- when 1
- case type1
- when 1
- @chaochao.push(actor_id)
- when 2
- @chaochao2.push(actor_id)
- end
- when 2
- case type1
- when 1
- @chaochao.delete(actor_id)
- when 2
- @chaochao2.delete(actor_id)
- end
- end
- end
- #type,1从队伍中离开,2从备用角色中离开,3从队伍和备用角色中离开。
- def remove_actor(actor_id,type=1)
- actor = $game_actors[actor_id]
- case type
- when 1
- @actors.delete(actor)
- $game_player.refresh
- when 2
- @actors2.delete(actor)
- $game_player.refresh
- when 3
- @actors.delete(actor)
- @actors2.delete(actor)
- $game_player.refresh
- end
- end
- def refresh
- new_actors = []
- new_actors2 = []
- for i in [email protected]
- if $data_actors[@actors[i].id] != nil
- new_actors.push($game_actors[@actors[i].id])
- end
- end
- @actors = new_actors
- for i in [email protected]
- if $data_actors[@actors2[i].id] != nil
- new_actors2.push($game_actors[@actors2[i].id])
- end
- end
- @actors2 = new_actors2
- end
- end
- #------------------------------------------------------------------------------
- class Chaochao_Scene_Party
- def main
- @left_temp_command = 0
- @right_temp_command = 0
- @temp = 0
- @left_window = Chaochao_Window_PartyLeft.new
- @left_window.active = true
- @right_window = Chaochao_Window_PartyRight.new
- @right_window.active = false
- @data_window = Chaochao_Window_PartyData.new
- update_data
- Graphics.transition
- loop do
- Graphics.update
- Input.update
- update
- if $scene != self
- break
- end
- end
- Graphics.freeze
- @left_window.dispose
- @right_window.dispose
- @data_window.dispose
- end
- def update
- @left_window.update
- @right_window.update
- @data_window.update
- update_command
- update_data
- end
- def update_command
- if Input.trigger?(Input::B)
- $game_system.se_play($data_system.cancel_se)
- #画面切换
- $scene = Scene_Map.new
- return
- end
- if @left_window.active
- update_left
- return
- end
- if @right_window.active
- update_right
- return
- end
- end
- def update_left
- if Input.trigger?(Input::RIGHT)
- if @right_window.item_max > 0
- @left_temp_command = @left_window.index
- @left_window.set_index(-1)
- $game_system.se_play($data_system.cursor_se)
- @left_window.active = false
- @right_window.active = true
- @left_window.refresh
- @right_window.refresh
- @right_window.set_index(@right_temp_command)
- return
- else
- $game_system.se_play($data_system.buzzer_se)
- return
- end
- end
- if Input.trigger?(Input::C)
- if @left_window.active and @left_window.actor?(@left_window.index) and $game_party.actors.size > 1 and not $game_party.chaochao.include?($game_party.actors[@left_window.index].id)
- $game_party.huanren($game_party.actors[@left_window.index].id,2)#type为1是从备用角色向队伍中移动,为2则相反。
- @left_window.refresh
- @right_window.refresh
- else
- $game_system.se_play($data_system.buzzer_se)
- end
- end
- return
- end
- def update_right
- if Input.trigger?(Input::LEFT)
- if @left_window.item_max > 0
- @right_temp_command = @right_window.index
- @right_window.set_index(-1)
- $game_system.se_play($data_system.cursor_se)
- @left_window.active = true
- @right_window.active = false
- @left_window.refresh
- @right_window.refresh
- @left_window.set_index(@left_temp_command)
- return
- else
- $game_system.se_play($data_system.buzzer_se)
- return
- end
- end
- if Input.trigger?(Input::C)
- if $game_party.actors.size >= 5
- $game_system.se_play($data_system.buzzer_se)
- return
- end
- if @right_window.active and @right_window.actor?(@right_window.index) and not $game_party.chaochao2.include?($game_party.actors2[@right_window.index].id)
- $game_party.huanren($game_party.actors2[@right_window.index].id,1)#type为1是从备用角色向队伍中移动,为2则相反。
- if $game_party.actors2.size == 0
- @right_temp_command = @right_window.index
- @right_window.set_index(-1)
- $game_system.se_play($data_system.cursor_se)
- @left_window.active = true
- @right_window.active = false
- @left_window.refresh
- @right_window.refresh
- @left_window.set_index(@left_temp_command)
- end
- if @right_window.index > 0
- @right_window.set_index(@right_window.index-1)
- end
- @left_window.refresh
- @right_window.refresh
- else
- $game_system.se_play($data_system.buzzer_se)
- end
- end
- return
- end
- def update_data
- if @left_window.active
- if $game_party.actors[@left_window.index] != nil
- @data_window.set_actor($game_party.actors[@left_window.index])
- else
- @data_window.clear
- end
- return
- end
- if @right_window.active
- if $game_party.actors2[@right_window.index] != nil
- @data_window.set_actor($game_party.actors2[@right_window.index])
- else
- @data_window.clear
- end
- return
- end
- end
- end
- #==============================================================================
- # 本脚本来自www.66RPG.com,使用和转载请保留此信息
- #=============================================================================
- #==============================================================================
- # ■ Interpreter (分割定义 4)
- #------------------------------------------------------------------------------
- # 执行事件命令的解释器。本类在 Game_System 类
- # 和 Game_Event 类的内部使用。
- #==============================================================================
- class Interpreter
- #--------------------------------------------------------------------------
- # ● 角色的替换
- #--------------------------------------------------------------------------
- def command_129
- # 获取角色
- actor = $game_actors[@parameters[0]]
- # 角色有效的情况下
- if actor != nil
- # 操作分支
- if @parameters[1] == 0
- if @parameters[2] == 1
- $game_actors[@parameters[0]].setup(@parameters[0])
- end
- if $game_party.actors.size == 5
- $game_party.add_actor(@parameters[0],2)
- else
- $game_party.add_actor(@parameters[0])
- end
- else
- $game_party.remove_actor(@parameters[0],3)
- end
- end
- # 继续
- return true
- end
- end
- #==============================================================================
- # 本脚本来自www.66RPG.com,使用和转载请保留此信息
- #==============================================================================
复制代码 |
|