CODE
#=======================================================
#â Malexos' "Better" Bow Addon v. 1.00, for the Tankentai SBS
#=======================================================
#=======================================================
# DESCRIPTION:
#======================================================
# It's basically the same old bow animation, except it shows whatever bow you
# have equipped.
#
#========================================================
# HOW TO USE:
#========================================================
# Plug und Play. Set the Bow Element to whatever element you'd like.
# Every bow that you would like to have this animation must have that element.
#
#========================================================
# NOTA BENE:
#========================================================
# I have absolutely no scripting knowledge whatsoever, just common sense.
# Let me know if there's a problem with the script. If I can't help you,
# you should probably ask Mr. Bubble, or Kylock, since I basically
# frankenscripted their scripts. You can give me credit if you like, but make
# absolutely certain you give Mr. Bubble and Kylock credit.
#========================================================
module N01
BOW_ELEMENT = 19 #The Element used to define a weapon as a bow. As I still
#like Mr. Bubble's original addon, I set the element to a
# different one than "bow".
RANGED_ANIME = {
"BOWSTRING" => ["sound", "se", 100, 100, "paralyze1"],
"RELEASEBOW" => ["sound", "se", 100, 100, "wind7"],
}
#Above are the sound effects used with the Bow Attack. You may change them
#to whatever you like, and even add sounds. If you decide to add a sound,
#make sure it's in the template found above.
# "BOWSTRING" => ["sound", "se", 100, 50, "paralyze1"],
# Ex. "BOWSTRING" is the name of the sound when plugging it in to the animation
# below.
# "sound" i'm guessing identifies this as a sound XP
# "se" lets the game know the sound is in the SE folder
# 100 = Volume
# 50 = Pitch
# "paralyze1" is the name of the sound file.
BOW_ANIME = {
"DRAW_POSE" => [ 0, 1, 1, 2, 0, -1, 0, true,"" ],
"DRAW_BOW" => ["anime", 83, 0, false, false, false],
"ARROW_ANGLE" => [ 30, 60, 11],
"SHOOT_ARROW" => ["m_a", 0, 0, 0, 15, -10, 0, 0, 0,false,"ARROW_ANGLE"],
}
ANIME.merge!(RANGED_ANIME)
ANIME.merge!(BOW_ANIME)
# Action Sequence
RANGED_ATTACK_ACTION = {
"BOW_ATTACKK" => ["BEFORE_MOVE", "WPN_SWING_UNDER", "10", "BOWSTRING",
"SHOOT_ARROW", "RELEASEBOW", "12","OBJ_ANIM","16",
"Can Collapse","FLEE_RESET"],}
ACTION.merge!(RANGED_ATTACK_ACTION)
end
module RPG
class Weapon
alias malexos_bows_base_action base_action
def base_action
# If the Element is checked on the weapons tab in the database,
# the new attack
if $data_weapons[@id].element_set.include?(N01::BOW_ELEMENT)
return "BOW_ATTACKK"
end
malexos_bows_base_action
end
alias malexos_bow_flying_graphic flying_graphic
def flying_graphic
if $data_weapons[@id].element_set.include?(N01::BOW_ELEMENT)
return "woodarrow" # Arrow graphic in Characters folder.
end
malexos_bow_flying_graphic
end
end
end
#=============================================================
# Malexos' Crossbow addon
#=============================================================
module N01
# Element used to define a weapon as a crossbow
CROSSBOW_ELEMENT = 20
RANGED_ANIME = {
"FIRE!" => ["sound", "se", 100, 100, "close1"],}
BOW_ANIME = {
"ARROW_ANGLE" => [30, 60, 11],
"SHOOT_ARROW" => ["m_a", 0, 0, 0, 5, 0, 0, 0, 0,false,"ARROW_ANGLE"],
}
ANIME.merge!(RANGED_ANIME)
# Action Sequence
RANGED_ATTACK_ACTION = {
"CROSSBOW_ATTACK" => ["JUMP_AWAY","WPN_SWING_V","30","FIRE!","WPN_SWING_V",
"SHOOT_ARROW", "OBJ_ANIM_WEIGHT","12","WPN_SWING_VL","OBJ_ANIM_L","One Wpn Only",
"16","Can Collapse","JUMP_TO","COORD_RESET"],}
ACTION.merge!(RANGED_ATTACK_ACTION)
end
module RPG
class Weapon
alias malexos_crossbow_base_action base_action
def base_action
if $data_weapons[@id].element_set.include?(N01::CROSSBOW_ELEMENT)
return "CROSSBOW_ATTACK"
end
malexos_crossbow_base_action
end
alias malexos_bow_flying_graphic flying_graphic
def flying_graphic
if $data_weapons[@id].element_set.include?(N01::CROSSBOW_ELEMENT)
return "woodarrow" # Arrow graphic in Characters folder
end
malexos_bow_flying_graphic
end
end
end