赞 | 0 |
VIP | 195 |
好人卡 | 0 |
积分 | 12 |
经验 | 4022 |
最后登录 | 2014-4-11 |
在线时间 | 423 小时 |
Lv3.寻梦者
- 梦石
- 0
- 星屑
- 1220
- 在线时间
- 423 小时
- 注册时间
- 2010-12-26
- 帖子
- 337
|
本帖最后由 358429534 于 2012-8-6 07:37 编辑
这位大大727241476华丽的放上脚本,出现致命bug,无使用*说明!
是VA的吧!
请问这脚本可实现战斗中扑捉效果吗?
可以的话这脚本要如何使用?- #==============================================================================
- # ■ Scene_Baby
- #------------------------------------------------------------------------------
- # 对召唤兽的管理菜单
- #==============================================================================
- class Scene_Baby
- #--------------------------------------------------------------------------
- # ● 主处理
- #--------------------------------------------------------------------------
- def initialize(actor_index = 0)
- $kds_baby = actor_index
- $baby_face = 0
- if $game_party.actors[$kds_baby].kds_baby.size > 0
- if $game_party.actors[$kds_baby].kds_canzhan != 0
- $baby_index = $game_actors[$game_party.actors[$kds_baby].kds_canzhan]
- else
- $baby_index = $game_actors[$game_party.actors[$kds_baby].kds_baby[0]]
- end
- $stop = nil
- else
- $stop = 0
- end
- end
- def main
- @help_window = Window_Help.new
- @help_window.y = 480-64
- @item_window = Window_Item.new
- @item_window.active = false
- @item_window.help_window = @help_window
- @item_window.index = -1
- if $game_party.actors[$kds_baby].kds_baby.size > 0
- if $game_party.actors[$kds_baby].kds_canzhan != 0
- @skill_window = Window_Skill.new($game_actors[$game_party.actors[$kds_baby].kds_canzhan])
- @skill_window.help_window = @help_window
- else
- @skill_window = Window_Skill.new($game_actors[$game_party.actors[$kds_baby].kds_baby[0]])
- @skill_window.help_window = @help_window
- end
- else
- @skill_window = Window_Skill.new(0)
- end
- @skill_window.active = false
- @skill_window.index = -1
- @skill_window.update
- s1 = "设置参战"
- s2 = "查看技能"
- s3 = "使用物品"
- s4 = "能力分配"
- s5 = "放生宠物"
- s6 = "退出菜单"
- @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5,s6])
- @command_window.y = 480-64-192-32
- if $game_party.actors[$kds_baby].kds_baby.size == 0
- @command_window.disable_item(0)
- @command_window.disable_item(1)
- @command_window.disable_item(2)
- @command_window.disable_item(3)
- @command_window.disable_item(4)
- end
- @command_window.refresh
- @command_window.update
-
- s1 = ""
- s3 = ""
- s2 = ""
- s4 = ""
- s5 = ""
- @command2_window = Window_Command.new(110, [s1, s2, s3, s4, s5],1,16,14)
- @command2_window.x = 160+236+125-6
- @command2_window.y = -4+16+24+22+7+1
- @command2_window.index = -1
- @command2_window.back_opacity = 0
- @command2_window.opacity = 0
- @command2_window.active = false
- @command2_window.help_window = @help_window
-
- if $game_party.actors[$kds_baby].kds_baby.size > 0
- if $game_party.actors[$kds_baby].kds_canzhan != 0
- @status_window = Window_EquipLeft.new($game_actors[$game_party.actors[$kds_baby].kds_canzhan])
- else
- @status_window = Window_EquipLeft.new($game_actors[$game_party.actors[$kds_baby].kds_baby[0]])
- end
- else
- @status_window = Window_EquipLeft.new(0)
- end
- if $game_party.actors[$kds_baby].kds_baby.size > 0
- if $game_party.actors[$kds_baby].kds_canzhan != 0
- @head_window = Window_Head.new($game_actors[$game_party.actors[$kds_baby].kds_canzhan])
- else
- @head_window = Window_Head.new($game_actors[$game_party.actors[$kds_baby].kds_baby[0]])
- end
- else
- @head_window = Window_Head.new(0)
- end
- if $game_party.actors[$kds_baby].kds_baby.size > 0
- if $game_party.actors[$kds_baby].kds_canzhan != 0
- @babys_window = Window_Baby.new($game_actors[$game_party.actors[$kds_baby].kds_canzhan])
- else
- @babys_window = Window_Baby.new($game_actors[$game_party.actors[$kds_baby].kds_baby[0]])
- end
- else
- @babys_window = Window_Baby.new(0)
- end
- @babys_window.index = -1
- @babys_window.update
- @babys_window.active = false
- @babys_window.help_window = @help_window
- Graphics.transition(40, "Graphics/Transitions/" + $data_system.battle_transition)
- loop do
- Graphics.update
- Input.update
- update
- if $scene != self
- break
- end
- end
- # 装备过渡
- Graphics.freeze
- # 释放窗口
- $stop = nil
- @command_window.dispose
- @command2_window.dispose
- @help_window.dispose
- @item_window.dispose
- @head_window.dispose
- @status_window.dispose
- @skill_window.dispose
- @babys_window.dispose
- end
- #--------------------------------------------------------------------------
- # ● 刷新画面
- #--------------------------------------------------------------------------
- def update
- @help_window.update
- $baby_face += 1
- if ($baby_face+12)%12 == 0 and $game_party.actors[$kds_baby].kds_baby.size > 0
- @head_window.refresh
- if $baby_face == 36
- $baby_face = 0
- end
- end
-
- if Input.trigger?(Input::B) and @command_window.active == true
- $game_system.se_play($data_system.cancel_se)
- $scene = Scene_Menu.new(7)
- return
- end
- if @command2_window.active
- @command2_window.update
- up_command2
- end
- if @babys_window.active
- @babys_window.update
- up_babys
- end
- if @skill_window.active
- @skill_window.update
- up_skill
- end
- if @command_window.active
- @command_window.update
- up_command
- end
- if @item_window.active
- @item_window.update
- up_item
- end
- end
-
- def up_command
- if Input.trigger?(Input::B)
- $game_system.se_play($data_system.cancel_se)
- Graphics.freeze
- @babys_window.index = -1
- @babys_window.active = false
- @command_window.active = true
- @help_window.set_text("")
- Graphics.transition
- return
- end
- if Input.trigger?(Input::C)
- $command_index = @command_window.index
- if @command_window.index != 5 and @command_window.index != 2
- if $game_party.actors[$kds_baby].kds_baby.size == 0
- $game_system.se_play($data_system.buzzer_se)
- return
- end
- $game_system.se_play($data_system.decision_se)
- @command_window.active = false
- @babys_window.index = 0
- @babys_window.active = true
- $baby_index = $game_actors[$game_party.actors[$kds_baby].kds_baby[0]]
- @baby_index = 0
- @babys_window.refresh
- @head_window.refresh
- @skill_window.refresh
- @status_window.refresh2
- elsif @command_window.index == 5
- $game_system.se_play($data_system.cancel_se)
- $scene = Scene_Menu.new(7)
- elsif @command_window.index == 2
- if $game_party.actors[$kds_baby].kds_baby.size == 0
- $game_system.se_play($data_system.buzzer_se)
- return
- end
- $game_system.se_play($data_system.decision_se)
- @item_window.update
- @item_window.index = -1
- @command_window.active = false
- @babys_window.index = 0
- @babys_window.active = true
- $baby_index = $game_actors[$game_party.actors[$kds_baby].kds_baby[0]]
- @baby_index = 0
- @babys_window.refresh
- @head_window.refresh
- @skill_window.refresh
- @status_window.refresh2
- end
- return
- end
- end
-
- def up_babys
- if @babys_window.index != @baby_index
- @baby_index = @babys_window.index
- $baby_index = $game_actors[$game_party.actors[$kds_baby].kds_baby[@babys_window.index]]
- @babys_window.refresh
- @head_window.refresh
- @skill_window.refresh
- @status_window.refresh2
- end
- if Input.trigger?(Input::B)
- $game_system.se_play($data_system.cancel_se)
- Graphics.freeze
- @babys_window.index = -1
- @babys_window.active = false
- @command_window.active = true
- @help_window.set_text("")
- Graphics.transition
- return
- end
- if Input.trigger?(Input::C)
- Graphics.freeze
- $game_system.se_play($data_system.decision_se)
- @chong = $game_actors[$game_party.actors[$kds_baby].kds_baby[@babys_window.index]]
- @zhu = $game_party.actors[$kds_baby]
- case @command_window.index
- when 0
- if $game_party.actors[$kds_baby].kds_canzhan == $game_party.actors[$kds_baby].kds_baby[@babys_window.index]
- $game_party.actors[$kds_baby].kds_canzhan = 0
- else
- $game_party.actors[$kds_baby].kds_canzhan = $game_party.actors[$kds_baby].kds_baby[@babys_window.index]
- end
- @babys_window.refresh
- when 1
- @babys_window.active = false
- @skill_window.index = 0
- @skill_window.active = true
- when 2
- @babys_window.active = false
- @item_window.index = 0
- @item_window.active = true
- when 3
- @babys_window.active = false
- @command2_window.index = 0
- @command2_window.active = true
- when 4
- $game_variables[29] = $game_party.actors[$kds_baby].id
- $game_party.remove_actor(@chong.id)
- @baby_index = 0
- if @babys_window.index > 0
- @babys_window.index -= 1
- end
- if @zhu.kds_baby.size == 0
- $stop = 0
- @babys_window.index = -1
- @babys_window.active = false
- @command_window.active = true
- @help_window.set_text("")
- @command_window.disable_item(0)
- @command_window.disable_item(1)
- @command_window.disable_item(2)
- @command_window.disable_item(3)
- @command_window.disable_item(4)
- @command_window.refresh
- @command_window.update
- end
- @babys_window.refresh
- @head_window.refresh
- @skill_window.refresh
- @status_window.refresh2
- end
- Graphics.transition
- return
- end
- end
-
- def up_skill
- if Input.trigger?(Input::B)
- $game_system.se_play($data_system.cancel_se)
- Graphics.freeze
- @babys_window.active = true
- @skill_window.index = -1
- @skill_window.active = false
- Graphics.transition
- return
- end
- end
-
- def up_item
- if Input.trigger?(Input::B)
- $game_system.se_play($data_system.cancel_se)
- Graphics.freeze
- @babys_window.active = true
- @item_window.index = -1
- @item_window.active = false
- Graphics.transition
- return
- end
- if Input.trigger?(Input::C)
- @item = @item_window.item
- if @item == nil
- $game_system.se_play($data_system.buzzer_se)
- return
- end
-
- if @item.element_set.include?(11)
- if @chong.skills.include?(@item.recover_hp) == false
- @chong.learn_skill(@item.recover_hp)
- else
- $game_system.se_play($data_system.buzzer_se)
- return
- end
- elsif @item.element_set.include?(12)
- $game_system.se_play(@item.menu_se)
- end
- $game_system.se_play(@item.menu_se)
- if @item.consumable
- $game_party.lose_item(@item.id, 1)
- end
- @item_window.refresh
- @skill_window.refresh
- @status_window.refresh2
- return
- end
- end
- def up_command2
- if Input.trigger?(Input::B)
- $game_system.se_play($data_system.cancel_se)
- Graphics.freeze
- @babys_window.active = true
- @command2_window.index = -1
- @command2_window.active = false
- Graphics.transition
- return
- end
- if Input.trigger?(Input::C)
- if @chong.qianli <= 0
- $game_system.se_play($data_system.buzzer_se)
- return
- end
- $game_system.se_play($data_system.decision_se)
- case @command2_window.index
- when 0
- @chong.maxhp += 12
- @chong.hp += 12
- when 1
- @chong.maxsp += 5
- @chong.int += 1
- when 2
- @chong.str += 1
- when 3
- @chong.dex += 1.5
- when 4
- @chong.agi += 1
- end
- @chong.qianli -= 1
- @status_window.refresh2
- end
复制代码 |
|