Skill Cooldown script
#2
You could try this script.
Sadly I don't know who made this anymore

Code:
   #==============================================================================
   #
   #------------------------------------------------------------------------------
   #
   #==============================================================================
   module Config
     Cooldown = {} # Do not touch
     Cooldown[1] = 10 # Skill with ID 1 has a cooldown of 10 turns.
   
   end
   
   #==============================================================================
   #
   #------------------------------------------------------------------------------
   #
   #==============================================================================
   class RPG::Skill
     #--------------------------------------------------------------------------
     #
     #--------------------------------------------------------------------------
     def cooldown
       return (Config::Cooldown[@id] != nil ? Config::Cooldown[@id] : 0)
     end
   end
   
   #==============================================================================
   #
   #------------------------------------------------------------------------------
   #
   #==============================================================================
   class Game_Battler
     #--------------------------------------------------------------------------
     #
     #--------------------------------------------------------------------------
     attr_accessor :cooldown
     #--------------------------------------------------------------------------
     #
     #--------------------------------------------------------------------------
     alias cooldown_initialize initialize
     def initialize
       cooldown_initialize
       @cooldown = {}
     end
     #--------------------------------------------------------------------------
     #
     #--------------------------------------------------------------------------
     alias cooldown_skill_can_use skill_can_use?
     def skill_can_use?(skill_id)
       return false if @cooldown[skill_id] != nil and @cooldown[skill_id] > 0
       return cooldown_skill_can_use(skill_id)
     end
     #--------------------------------------------------------------------------
     #
     #--------------------------------------------------------------------------
     def update_cooldowns
       @cooldown.keys.each {|id|
         @cooldown[id] = [@cooldown[id] - 1, 0].max if @cooldown[id] != nil
       }
     end
     #--------------------------------------------------------------------------
     #
     #--------------------------------------------------------------------------
     def cooldown_clear
       @cooldown.keys.each {|id| @cooldown[id] = 0}
     end
     #--------------------------------------------------------------------------
     #
     #--------------------------------------------------------------------------
     alias cooldown_skill_effect skill_effect
     def skill_effect(user, skill)
       effective = cooldown_skill_effect(user, skill)
       user.cooldown[skill.id] = skill.cooldown if effective
       return effective
     end
   end
   
   #==============================================================================
   #
   #------------------------------------------------------------------------------
   #
   #==============================================================================
   class Scene_Battle
     #--------------------------------------------------------------------------
     #
     #--------------------------------------------------------------------------
     alias cooldown_update_phase4_step2 update_phase4_step2
     def update_phase4_step2
       @active_battler.update_cooldowns
       cooldown_update_phase4_step2
     end
     #--------------------------------------------------------------------------
     #
     #--------------------------------------------------------------------------
     alias cooldown_battle_end battle_end
     def battle_end(result)
       for actor in $game_party.actors
         actor.cooldown_clear
       end
       cooldown_battle_end(result)
     end
   end
Reply }


Messages In This Thread
Skill Cooldown script - by Fenriswolf - 12-06-2019, 04:47 PM
RE: Skill Cooldown script - by Mel - 12-06-2019, 06:07 PM
RE: Skill Cooldown script - by Fenriswolf - 12-06-2019, 06:30 PM
RE: Skill Cooldown script - by Mel - 12-07-2019, 12:40 AM
RE: Skill Cooldown script - by Fenriswolf - 12-07-2019, 01:31 AM
RE: Skill Cooldown script - by DerVVulfman - 12-07-2019, 04:53 AM
RE: Skill Cooldown script - by Fenriswolf - 12-07-2019, 12:24 PM
RE: Skill Cooldown script - by Fenriswolf - 12-08-2019, 11:43 PM
RE: Skill Cooldown script - by kyonides - 12-09-2019, 12:28 AM
RE: Skill Cooldown script - by Fenriswolf - 12-09-2019, 11:57 AM
RE: Skill Cooldown script - by DerVVulfman - 12-10-2019, 04:17 AM
RE: Skill Cooldown script - by Fenriswolf - 12-10-2019, 11:10 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Plugin or Script help with Item menu, SKill menu, and Equip menu JayRay 2 62 Yesterday, 03:09 AM
Last Post: JayRay
   A Skill that throws enemies? Bennerdeben 10 916 10-08-2024, 05:12 PM
Last Post: Bennerdeben
   Script compatibility help Lord Vectra 3 4,604 07-25-2021, 11:42 PM
Last Post: DerVVulfman
   [RMXP] Showing skill gained by leveling up on battle result FrQise 12 12,648 05-07-2021, 02:05 PM
Last Post: FrQise
   Adding face script on Cogwheel's RTAB Battle Status rekkatsu 15 15,842 08-25-2020, 03:09 AM
Last Post: DerVVulfman
   "Wait" in the script Whisper 13 16,160 04-28-2020, 04:06 PM
Last Post: Whisper
   Help iwth script (RGSS Player crash) Whisper 3 8,533 06-17-2017, 05:03 PM
Last Post: Whisper
   Help modifying a script Keeroh 7 10,215 06-11-2017, 04:43 PM
Last Post: DerVVulfman
Question  Mog Menu script: help me stop the crazy picture movement during transitions Zachariad 4 9,856 05-31-2017, 05:10 AM
Last Post: Zachariad
   Scan skill should show states Tumen 5 9,211 05-02-2017, 03:33 AM
Last Post: DerVVulfman



Users browsing this thread: 1 Guest(s)