=beginScript Version:1.08Script Description:This script is an add-on for Blizz abs, it allows weapons to "charge up"when holding down the attack button, similar to many ABS games, when the charge time is fulfilled then a skill will be released when the attack button is release.

Script Instructions:See module Skill_Charges for skill setup.

***Setting Images***Background will be used as the background for the charging hud.Charging is used as the bar that will fill up as the weapon charges.Bar_Off_X is to center the X coordinate of the Charging bar on the background.Bar_Off_Y same as above except for the Y coordinate.Charging_Sprite is used to determine wether to use a character sprite or notset to true or false.Charging Sprites must be named as so.ActorsName_charge_weapon_type(by default weapon type is 1 in blizz abs)Weapon Types:1.sword / axe / claws / unarmed / etc. (damages in close front) 2.spear / lance (damages only in front) 3.flail (distant weapon, does not damage close enemies, front) 4.boomerang (returning projectile weapon, front) 5.bow and arrow / gun / shuriken (non-returning projectile, NO consumption) 6.bow and arrow / gun (non-returning projectile, consumes AMMUNITION) 7.shuriken (non-returning projectile, consumes ITSELF)

***Sound Settings***Sound_Effect, is the sound effect to play on charging completion.Repeat_Sound, if set to true will replay the sound effect while the button is held.

***Setting Skills for each weapon***setup your skills as follows.when [weapon_id] then return [skill_id]

Script Notes:-Opening the menu will reset the timer upon exit.

-If using a bow and arrow(weapon that consumes items), it will consume the lowest id item that the weapon can use for ammo(if you have any).

#Setup for weapons. def self.weapon_charge(weapon_id) case weapon_id #when weapon_id then return skill id when 1 then return 1 when 2 then return 2 when 3 then return 3 when 4 then return 4 when 5 then return 5 when 6 then return 6 end return 1 end

#when selecting a different weapon and player is the same. if @player.weapon_id != @player_weapon #update the players weapon variable. @player_weapon = @player.weapon_id #update the weapon type @type = BlizzABS::Weapons.type(@player_weapon) end

#checks if the player is charging an attack. if @delay == 0 #changes speed to sneak speed. $game_player.normal_speed = @charge_speed if $game_player.normal_speed != @charge_speed #checks if the charging timer has finished and release attack button. if @timer == @counter && !Input.press?(Input::Attack) skill_id = Skill_Charges.weapon_charge(@player_weapon) if skill_id == nil $game_player.character_name_org = @original_sprite if $game_player.character_name_org != @original_sprite $game_player.use_skill($data_skills[skill_id], true) end end end

#------------------------------------------------------------------------------#Update Delay Timer information#------------------------------------------------------------------------------ def update_delay #checks if battler size is greater than zero if $game_system.battlers_number > 0 #checks if the player can use attack. if $game_player.attack_can_use? #if player is holding the attack button if Input.press?(Input::Attack) #calls to check which states are stuns. check_states if @stuns == nil #checks if the player has one of those states. @stuns.each do |n| #if player's stunned reset delay timer. if @player.states.include?(n) @stunned = true else #otherwise, countdown the delay @delay -= 1 if @delay != 0 unless @delay == 0 end end end end end end

#------------------------------------------------------------------------------# Checks the states database for stun states.#------------------------------------------------------------------------------ def check_states #checks the players states to see if he's stunned @stuns = [] if @stuns == nil if @stuns == [] for i in 1...$data_states.size if $data_states[i].restriction == 4 @stuns.push($data_states[i].id) end end end end