赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 360 |
最后登录 | 2021-2-21 |
在线时间 | 7 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 85
- 在线时间
- 7 小时
- 注册时间
- 2007-7-25
- 帖子
- 14
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
Kaiser.DS 给老关的宠物系统的脚本
怎么修改宠物升级之后的点数?
本来是升级之后有5点附加,怎么修改成3点附加?
脚本数据库
- class Game_Actor < Game_Battler
- alias kds_setup setup
- def setup(actor_id)
- if @baby == nil
- @baby = []
- end
- if @qianli == nil
- @qianli = 0
- end
- if @kds_canzhan == nil
- @kds_canzhan = 0
- end
- @bbzh = []
- kds_setup(actor_id)
- end
- def kds_baby
- return @baby
- end
- def kds_canzhan=(kds_canzhan)
- @kds_canzhan = kds_canzhan
- return @kds_canzhan
- end
- def kds_canzhan
- return @kds_canzhan
- end
- def zhuren=(zhuren)
- @zhuren = zhuren
- return @zhuren
- end
- def zhuren
- return @zhuren
- end
- def ac_id=(ac_id)
- @ac_id = ac_id
- return @ac_id
- end
- def ac_id
- return @ac_id
- end
- def bbzh
- return @bbzh
- end
-
- end
- class Game_Party
- def add_actor(actor_id)
- actor = $game_actors[actor_id]
- if actor_id < 20
- if not @actors.include?(actor)
- @actors.push(actor)
- $game_player.refresh
- end
- elsif $game_actors[$game_variables[29]].kds_baby.include?(actor_id) == false and $game_actors[$game_variables[29]].kds_baby.size < 72
- $game_actors[$game_variables[29]].kds_baby.push(actor_id)
- $game_actors[actor_id].zhuren = $game_variables[29]
- end
- end
- def remove_actor(actor_id)
- if actor_id >= 20
- $game_actors[$game_variables[29]].kds_baby.delete(actor_id)
- if $game_actors[$game_variables[29]].kds_canzhan == actor_id
- $game_actors[$game_variables[29]].kds_canzhan = 0
- end
- else
- @actors.delete($game_actors[actor_id])
- end
- $game_player.refresh
- end
- end
- class Scene_Battle
- def chu
- for kds in 0..$game_party.actors.size-1
- $game_party.actors[kds].ac_id = kds
- $game_party.actors[kds].bbzh.clear
- if $game_party.actors[kds].id < 20 and $game_party.actors[kds].kds_canzhan != 0
- $game_party.actors[kds].bbzh.push($game_party.actors[kds].kds_canzhan)
- end
- end
- end
- def kds_push_baby
- for kds in 1..17
- if $game_party.actors.include?($game_actors[kds]) and $game_actors[kds].kds_baby != 0 and $game_actors[kds].kds_canzhan != 0
- $game_party.actors.push($game_actors[$game_actors[kds].kds_canzhan])
- end
- end
- end
- def kds_delete_baby
- for kds in 1..17
- if $game_party.actors.include?($game_actors[kds]) and $game_actors[kds].kds_baby != 0 and $game_actors[kds].kds_canzhan != 0
- $game_party.actors.delete($game_actors[$game_actors[kds].kds_canzhan])
- end
- end
- end
- end
-
- class Window_Head < Window_Selectable
- def initialize(actor)
- super(160, 0, 236, 192)
- @actor = actor
- self.contents = Bitmap.new(width - 32, height - 32)
- if @actor != 0
- refresh
- end
- end
- def refresh
- self.contents.clear
- if @face != nil
- @face.dispose
- end
- if $stop == 0
- return
- end
- @actor = $baby_index
- @face = Bitmap.new("Graphics/Battlers/#{@actor.battler_name.split(/◆/)[0]}")
- src_rect = Rect.new(($baby_face/12)*@face.width/4, 0, @face.width/4, @face.height)
- self.contents.blt(-30, -20, @face, src_rect)
- end
- end
- class Window_Baby < Window_Selectable
- def initialize(actor)
- super(0, 0, 160, 480-64-192-32)
- @actor = actor
- @column_max = 1
- self.index = 0
- if $game_temp.in_battle
- self.y = 64
- self.x = 320-80
- self.z = 9999
- self.back_opacity = 160
- if actor.kds_baby.size > 0
- $kds_baby = actor.ac_id
- @baby_zhu = actor
- refresh
- end
- return
- end
- if @actor != 0
- refresh
- end
- end
- def baby
- return $game_party.actors[$kds_baby].kds_baby[index]#@data[self.index]
- end
- def refresh
- if self.contents != nil
- self.contents.dispose
- self.contents = nil
- end
- @data = []
- if $stop == 0
- return
- end
- for i in 0..$game_party.actors[$kds_baby].kds_baby.size-1
- baby = $game_party.actors[$kds_baby].kds_baby[i]
- if baby != nil
- @data.push(baby)
- end
- end
- @item_max = @data.size
- if @item_max > 0
- self.contents = Bitmap.new(width - 32, 480)
- for i in 0..@item_max-1
- draw_baby(i)
- end
- end
- end
-
- def draw_baby(index)
- baby = $game_party.actors[$kds_baby].kds_baby[index]
- @actor = $game_actors[baby]
- if $game_temp.in_battle
- if @baby_zhu.bbzh.include?(@baby_zhu.kds_baby[index]) == false
- self.contents.font.color = normal_color
- else
- self.contents.font.color = Color.new(30,30,30,255)
- end
- else
- if $game_party.actors[$kds_baby].kds_canzhan == baby
- self.contents.font.color = Color.new(255,0,0)
- else
- self.contents.font.color = normal_color
- end
- end
- x = 4 + index % 1 * (288 + 32)
- y = index / 1 * 32
- self.contents.draw_text(x + 28, y, 204, 32, @actor.name, 0)
- end
- def update_help
- if $game_temp.in_battle == false
- case $command_index
- when 0
- @help_window.set_text("请按确定键设置。(红色-参战、白色-休息)")
- when 1
- @help_window.set_text("请选择要查看技能的召唤兽。")
- when 2
- @help_window.set_text("请选择要使用物品的召唤兽。")
- when 3
- @help_window.set_text("请选择要提升能力的召唤兽。")
- when 4
- @help_window.set_text("请选择要放生的召唤兽。")
- end
- end
- end
- end
- class Window_Base < Window
- def draw_actor_parameter2(actor, x, y, type)
- case type
- when 0
- parameter_name = $data_system.words.atk
- parameter_value = actor.atk
- when 1
- parameter_name = $data_system.words.pdef
- parameter_value = actor.pdef
- when 2
- parameter_name = $data_system.words.mdef
- parameter_value = actor.mdef
- when 3
- parameter_name = $data_system.words.str
- parameter_value = actor.str
- when 4
- parameter_name = $data_system.words.dex
- parameter_value = actor.dex
- when 5
- parameter_name = $data_system.words.agi
- parameter_value = actor.agi
- when 6
- parameter_name = $data_system.words.int
- parameter_value = actor.int
- when 7
- parameter_name = "潜力"
- parameter_value = actor.qianli
- end
- if type < 7
- self.contents.font.color = system_color
- self.contents.font.size = 15
- self.contents.draw_text(x, y, 120, 32, parameter_name)
- self.contents.font.color = normal_color
- self.contents.draw_text(x + 70, y, 36, 32, parameter_value.to_s, 2)
- else
- if actor.qianli > 0
- self.contents.font.color = Color.new(200,30,80)
- else
- self.contents.font.color = system_color
- end
- self.contents.font.size = 15
- self.contents.draw_text(x, y, 120, 32, parameter_name)
- self.contents.font.color = normal_color
- if actor.qianli > 0
- self.contents.font.color = Color.new(200,30,80)
- else
- self.contents.font.color = Color.new(0,0,0,255)
- end
- self.contents.draw_text(x + 43, y, 36, 32, parameter_value.to_s, 2)
- self.contents.font.color = Color.new(0,0,0,255)
- end
-
-
- end
- def draw_actor_level2(actor, x, y)
- self.contents.font.color = system_color
- self.contents.draw_text(x+10, y, 32, 32, "Lv")
- self.contents.font.color = normal_color
- self.contents.draw_text(x + 32, y, 24, 32, actor.level.to_s, 2)
- end
- end
复制代码
脚本操作库
- #==============================================================================
- # ■ 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 @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)
- $scene = Scene_Menu.new(7)
- 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)
- @chong.level = 1
- @chong.maxhp = @chong.base_maxhp
- @chong.maxsp = @chong.base_maxsp
- @chong.str = @chong.base_str
- @chong.dex = @chong.base_dex
- @chong.agi = @chong.base_agi
- @chong.int = @chong.base_int
- @chong.qianli = 0
- 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 += 10
- @chong.hp += 10
- when 1
- @chong.maxsp += 6
- @chong.int += 1
- when 2
- @chong.str += 1
- when 3
- @chong.dex += 1
- when 4
- @chong.agi += 1
- end
- @chong.qianli -= 1
- @status_window.refresh2
- end
- end
- end
复制代码 版务信息:本贴由楼主自主结贴~ |
|