You could try this script.
Sadly I don't know who made this anymore
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