QuesTMajoR 4 Report post Posted May 10, 2013 Does anyone have a Cooldown or Skill Timer Script. Script like " AFTER a Hero uses a skill, it will cooldown for 4 TURNS before it is usable again ". IF YOU HAVE THEN THANKS! :D ~QMP Share this post Link to post Share on other sites
Bigace360 38 Report post Posted May 11, 2013 Does this fit your needs, it's by KGC #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ #_/ â—† é…延スã‚ル - KGC_DelaySkill â—† #_/ â—‡ Last update : 2008/03/23 â—‡ #_/---------------------------------------------------------------------------- #_/ 発動ã¾ã§ã«ã‚¿ã‚¤ãƒ ラグãŒç™ºç”Ÿã™ã‚‹ã‚¹ã‚ルを作æˆã—ã¾ã™ã€‚ #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ $imported = {} if $imported == nil $imported["DelaySkill"] = true if $game_special_elements == nil $game_special_elements = {} $data_system = load_data("Data/System.rxdata") end # é…延スã‚ル属性 $game_special_elements["skill_delay"] = $data_system.elements.index("é…延スã‚ル") if $game_special_elements["skill_delay"] == nil # 互æ›æ€§ä¿æŒã®ãŸã‚ "時間差" ã«ã‚‚対応 $game_special_elements["skill_delay"] = $data_system.elements.index("時間差スã‚ル") end if $game_special_elements["skill_delay"] == nil $game_special_elements["skill_delay"] = $data_system.elements.index("DelaySkill") end #============================================================================== # â–¡ Game_DelaySkillInfo #------------------------------------------------------------------------------ # é…延スã‚ルã®æƒ…å ±ã‚’ä¿æŒã™ã‚‹ã‚¯ãƒ©ã‚¹ã§ã™ã€‚ #============================================================================== class Game_DelaySkillInfo #-------------------------------------------------------------------------- # â—‹ 公開インスタンス変数 #-------------------------------------------------------------------------- attr_accessor :turn_count # é…延ターン数 attr_accessor :skill_id # 発動スã‚ルID attr_accessor :user # 発動者 #-------------------------------------------------------------------------- # â—‹ オブジェクトåˆæœŸåŒ– #-------------------------------------------------------------------------- def initialize @turn_count = 0 @skill_id = 0 @user = nil end end #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ #============================================================================== # â– Game_Battler (分割定義 1) #============================================================================== class Game_Battler #-------------------------------------------------------------------------- # ◠公開インスタンス変数 #-------------------------------------------------------------------------- attr_accessor :delay_skills # é…延スã‚ルé…列 attr_accessor :states # ステート #-------------------------------------------------------------------------- # ◠オブジェクトåˆæœŸåŒ– #-------------------------------------------------------------------------- alias initialize_KGC_DelaySkill initialize def initialize initialize_KGC_DelaySkill @delay_skills = [] end end #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ #============================================================================== # â– Scene_Battle (分割定義 1) #============================================================================== class Scene_Battle #-------------------------------------------------------------------------- # â— ãƒ¡ã‚¤ãƒ³å‡¦ç† #-------------------------------------------------------------------------- alias main_KGC_DelaySkill main def main clear_actor_delay_skills main_KGC_DelaySkill end #-------------------------------------------------------------------------- # â—‹ アクター全員ã®é…延スã‚ルを解除 #-------------------------------------------------------------------------- def clear_actor_delay_skills $game_party.actors.each { |actor| actor.delay_skills = [] } end end #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ #============================================================================== # â– Scene_Battle (分割定義 4) #============================================================================== class Scene_Battle #-------------------------------------------------------------------------- # ◠フレーム更新 (メインフェーズ ステップ 1 : アクション準備) #-------------------------------------------------------------------------- alias update_phase4_step1_KGC_DelaySkill update_phase4_step1 def update_phase4_step1 update_phase4_step1_KGC_DelaySkill update_delay_skill if @active_battler != nil end #-------------------------------------------------------------------------- # â—‹ é…延スã‚ルã®æ›´æ–° #-------------------------------------------------------------------------- def update_delay_skill # é…延スã‚ル発動ã¾ã§ã®ã‚¿ãƒ¼ãƒ³æ•°ã‚’減ら㙠for ds in @active_battler.delay_skills ds.turn_count -= 1 end end #-------------------------------------------------------------------------- # ◠スã‚ルアクション çµæžœä½œæˆ #-------------------------------------------------------------------------- alias make_skill_action_result_KGC_DelaySkill make_skill_action_result def make_skill_action_result make_skill_action_result_KGC_DelaySkill make_delay_skill_effect end #-------------------------------------------------------------------------- # â—‹ é…延スã‚ル効果ã®ä½œæˆ #-------------------------------------------------------------------------- def make_delay_skill_effect return unless @skill.element_set.include?($game_special_elements["skill_delay"]) for i in 0...@target_battlers.size target = @target_battlers[i] # ダメージ㌠Miss ã®å ´åˆã¯æ¬¡ã¸ next if target.damage == nil || target.damage == "Miss" # 対象をスã‚ルヒットå‰ã«æˆ»ã™ target.states = @target_battlers2[i].states.dup target.hp = @target_battlers2[i].hp target.sp = @target_battlers2[i].sp # 発動ターン, 発動スã‚ル, 発動者をセット d_skill = Game_DelaySkillInfo.new d_skill.turn_count = @skill.variance d_skill.skill_id = @skill.power d_skill.user = @active_battler target.delay_skills << d_skill # ダメージ㫠"Reserve" ã‚’è¨å®š target.damage = "Reserve" end end #-------------------------------------------------------------------------- # ◠スã‚ルã¾ãŸã¯ã‚¢ã‚¤ãƒ†ãƒ ã®å¯¾è±¡å´ãƒãƒˆãƒ©ãƒ¼è¨å®š # scope : スã‚ルã¾ãŸã¯ã‚¢ã‚¤ãƒ†ãƒ ã®åŠ¹æžœç¯„囲 #-------------------------------------------------------------------------- alias set_target_battlers_KGC_DelaySkill set_target_battlers def set_target_battlers(scope) set_target_battlers_KGC_DelaySkill(scope) # 対象å´ãƒãƒˆãƒ©ãƒ¼ã‚’ä¿å˜ @target_battlers2 = [] for i in 0...@target_battlers.size @target_battlers2[i] = @target_battlers[i].dup end end #-------------------------------------------------------------------------- # ◠フレーム更新 (メインフェーズ) #-------------------------------------------------------------------------- alias update_phase4_KGC_DelaySkill update_phase4 def update_phase4 if @phase4_step == 6 check_delay_skill end update_phase4_KGC_DelaySkill end #-------------------------------------------------------------------------- # â—‹ é…延スã‚ル発動判定 #-------------------------------------------------------------------------- def check_delay_skill # 対象(行動者)ãŒæˆ¦é—˜ä¸èƒ½ã®å ´åˆã¯é…延スã‚ルを解除 if @active_battler.dead? @active_battler.delay_skills = [] return end for i in 0...@active_battler.delay_skills.size # ã¾ã 発動ã—ãªã„å ´åˆã¯æ¬¡ã¸ next if @active_battler.delay_skills[i].turn_count > 0 skill = $data_skills[@active_battler.delay_skills[i].skill_id] # スã‚ルを発動 @active_battler.skill_effect(@active_battler.delay_skills[i].user, skill) @help_window.set_text(skill.name, 1) @animation2_id = skill.animation2_id @common_event_id = skill.common_event_id @target_battlers = [@active_battler] # 発動ã—ãŸé…延スã‚ルを削除ã—ã€ã‚¹ãƒ†ãƒƒãƒ— 4 ã«ç§»è¡Œ @active_battler.delay_skills.delete_at(i) @phase4_step = 4 break end end end Share this post Link to post Share on other sites
QuesTMajoR 4 Report post Posted May 12, 2013 Ummm.. Thanks for the Sript . Im sorry for this question but : " How can I make a skill to be delayed? "I can't figure it out how to make it . Thanks again in advance! Share this post Link to post Share on other sites
Bigace360 38 Report post Posted May 12, 2013 check this page out, if you're still confused after reading this then I'll see what I can do. http://ytomy.sakura.ne.jp/tkool/rpgtech/php/tech.php?tool=XP&cat=tech_xp/skill&tech=delay_skill It's in japanese so you're going to have to translate it. I'm using google chrome to translate the page. Share this post Link to post Share on other sites
QuesTMajoR 4 Report post Posted May 12, 2013 Okay . Thanks again Biggie! I'll wait for your Response .. :D Share this post Link to post Share on other sites