Code:
--AMMO TABLE (use the ammo you want to equip to get quiver or pouch)
--these will convert any ammo you can store in a quiver(arrow or bolt) or pouch(bullet) to the correct quiver or pouch
combined_ammo = {
["Crude Arrow"] = "Old Quiver", ["Old Arrow"] = "Rotten Quiver", ["Stone Arrow"] = "Stone Quiver", ["Bone Arrow"] = "Bone Quiver", ["Beetle Arrow"] = "Beetle Quiver",
["Horn Arrow"] = "Horn Quiver", ["Scorpion Arrow"] = "Scorpion Quiver", ["Demon Arrow"] = "Demon Quiver", ["Iron Arrow"] = "Iron Quiver", ["Silver Arrow"] = "Silver Quiver",
["Kabura Arrow"] = "Kabura Quiver", ["Sleep Arrow"] = "Sleep Quiver", ["Antlion Arrow"] = "Antlion Quiver", ["Ruszor Arrow"] = "Ruszor Quiver", ["Gargouille Arrow"] = "Gargou. Quiver",
["Chapuli Arrow"] = "Chapuli Quiver", ["Mantid Arrow"] = "Mantid Quiver", ["Achiyal. Arrow"] = "Achiyal. Quiver", ["Adlivun Arrow"] = "Adlivun Quiver", ["Tulfaire Arrow"] = "Tulfaire Quiver",
["Raaz Arrow"] = "Raaz Quiver", ["Eminent Arrow"] = "Eminent Quiver", ["Ra'Kaznar Arrow"] = "Ra'Kaznar Quiver", ["T.K. Arrow"] = "T.K. Quiver", ["Cmb.Cst. Arrow"] = "Cmb.Cst. Quiver",
["Dogbolt"] = "Old Bolt Box", ["Irn.Msk. Bolt"] = "Irn.Msk. Quiver", ["Bronze Bolt"] = "B. Bolt Quiver", ["Mythril Bolt"] = "M. Bolt Quiver", ["Darksteel Bolt"] = "D. Bolt Quiver",
["Blind Bolt"] = "Bln. Bolt Quiver", ["Acid Bolt"] = "Ac. Bolt Quiver", ["Holy Bolt"] = "Hol. Bolt Quiver", ["Sleep Bolt"] = "Slp. Bolt Quiver", ["Venom Bolt"] = "Vn. Bolt Quiver",
["Bloody Bolt"] = "Bld. Bolt Quiver", ["Darkling Bolt"] = "Dkl. Bolt Quiver", ["Fusion Bolt"] = "Fsn. Bolt Quiver", ["Drk. Adm. Bolt"] = "D.A. Bolt Quiver", ["Adaman Bolt"] = "A. Bolt Quiver",
["Midrium Bolt"] = "Mid. Bolt Quiver", ["Damascus Bolt"] = "Dm. Bolt Quiver", ["Oxidant Bolt"] = "O. Bolt Quiver", ["Achiyal. Bolt"] = "Al. Bolt Quiver", ["Adlivun Bolt"] = "Ad. Bolt Quiver",
["Titanium Bolt"] = "T. Bolt Quiver", ["Bismuth Bolt"] = "Bi. Bolt Quiver", ["Eminent Bolt"] = "Em. Bolt Quiver", ["Abrasion Bolt"] = "Abr. Bolt Quiver", ["Righteous Bolt"] = "Rig. Bolt Quiver",
["Ra'Kaznar Bolt"] = "Ra. Bolt Quiver", ["Antique Bullet"] = "Old Bullet Box", ["Silver Bullet"] = "Silv. Bul. Pouch", ["Spartan Bullet"] = "Spar. Bul. Pouch", ["Corsair Bullet"] = "Cor. Bull. Pouch",
["Iron Bullet"] = "Iron Bull. Pouch", ["Bronze Bullet"] = "Brz. Bull. Pouch", ["Bullet"] = "Bullet Pouch", ["Steel Bullet"] = "Stl. Bull. Pouch", ["Dweomer Bullet"] = "Dwm. Bul. Pouch",
["Oberon's Bullet"] = "Obr. Bull. Pouch", ["Drk. Adm. Bullet"] = "D.A. Bull. Pouch", ["Orichalc. Bullet"] = "O. Bull. Pouch", ["Adaman Bullet"] = "A. Bull. Pouch", ["Midrium Bullet"] = "Mid. Bul. Pouch",
["Damascus Bullet"] = "Dm. Bul. Pouch", ["Achiyal. Bullet"] = "Al. Bull. Pouch", ["Adlivun Bullet"] = "Ad. Bull. Pouch", ["Titanium Bullet"] = "Ti. Bull. Pouch", ["Bismuth Bullet"] = "Bi. Bull. Pouch",
["Eminent Bullet"] = "Em. Bul. Pouch", ["Ra'Kaznar Bullet"] = "Ra. Bul. Pouch",}
--COR CARD TABLE (use spell.english to get data)
--This table will give you the card and the card case for each of the quick draw skills
cards = {
["Dark Shot"] = {card="Dark Card",case="Dark Card Case",tcard="Trump Card",tcase="Trump Card Case"},
["Earth Shot"] = {card="Earth Card",case="Earth Card Case",tcard="Trump Card",tcase="Trump Card Case"},
["Ice Shot"] = {card="Ice Card",case="Ice Card Case",tcard="Trump Card",tcase="Trump Card Case"},
["Water Shot"] = {card="Water Card",case="Water Card Case",tcard="Trump Card",tcase="Trump Card Case"},
["Wind Shot"] = {card="Wind Card",case="Wind Card Case",tcard="Trump Card",tcase="Trump Card Case"},
["Fire Shot"] = {card="Fire Card",case="Fire Card Case",tcard="Trump Card",tcase="Trump Card Case"},
["Thunder Shot"] = {card="Thunder Card",case="Thunder Card Case",tcard="Trump Card",tcase="Trump Card Case"},
["Light Shot"] = {card="Light Card",case="Light Card Case",tcard="Trump Card",tcase="Trump Card Case"},
}
--NIN TOOLS TABLE (use spell.english to get data)
--This table is will give you the tools, universal tool, abd tool bogs for each spell that a NIN can cast
nin_tools ={
["Monomi: Ichi"] = {tool='Sanjaku-Tenugui',tool_bag="Toolbag (Sanja)",tool_bag_id=5417,uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)",uni_tool_bag_id=5868},
["Aisha: Ichi"] = {tool='Soshi',tool_bag="Toolbag (Soshi)",tool_bag_id=5734,uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)",uni_tool_bag_id=5869},
["Katon: Ichi"] = {tool='Uchitake',tool_bag="Toolbag (Uchi)",tool_bag_id=5308,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
["Katon: Ni"] = {tool='Uchitake',tool_bag="Toolbag (Uchi)",tool_bag_id=5308,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
["Katon: San"] = {tool='Uchitake',tool_bag="Toolbag (Uchi)",tool_bag_id=5308,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
["Hyoton: Ichi"] = {tool='Tsurara',tool_bag="Toolbag (Tsura)",tool_bag_id=5309,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
["Hyoton: Ni"] = {tool='Tsurara',tool_bag="Toolbag (Tsura)",tool_bag_id=5309,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
["Hyoton: San"] = {tool='Tsurara',tool_bag="Toolbag (Tsura)",tool_bag_id=5309,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
["Huton: Ichi"] = {tool='Kawahori-Ogi',tool_bag="Toolbag (Kawa)",tool_bag_id=5310,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
["Huton: Ni"] = {tool='Kawahori-Ogi',tool_bag="Toolbag (Kawa)",tool_bag_id=5310,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
["Huton: San"] = {tool='Kawahori-Ogi',tool_bag="Toolbag (Kawa)",tool_bag_id=5310,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
["Doton: Ichi"] = {tool='Makibishi',tool_bag="Toolbag (Maki)",tool_bag_id=5311,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
["Doton: Ni"] = {tool='Makibishi',tool_bag="Toolbag (Maki)",tool_bag_id=5311,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
["Doton: San"] = {tool='Makibishi',tool_bag="Toolbag (Maki)",tool_bag_id=5311,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
["Raiton: Ichi"] = {tool='Hiraishin',tool_bag="Toolbag (Hira)",tool_bag_id=5312,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
["Raiton: Ni"] = {tool='Hiraishin',tool_bag="Toolbag (Hira)",tool_bag_id=5312,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
["Raiton: San"] = {tool='Hiraishin',tool_bag="Toolbag (Hira)",tool_bag_id=5312,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
["Suiton: Ichi"] = {tool='Mizu-Deppo',tool_bag="Toolbag (Mizu)",tool_bag_id=5313,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
["Suiton: Ni"] = {tool='Mizu-Deppo',tool_bag="Toolbag (Mizu)",tool_bag_id=5313,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
["Suiton: San"] = {tool='Mizu-Deppo',tool_bag="Toolbag (Mizu)",tool_bag_id=5313,uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)",uni_tool_bag_id=5867},
["Utsusemi: Ichi"] = {tool='Shihei',tool_bag="Toolbag (Shihe)",tool_bag_id=5314,uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)",uni_tool_bag_id=5868},
["Utsusemi: Ni"] = {tool='Shihei',tool_bag="Toolbag (Shihe)",tool_bag_id=5314,uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)",uni_tool_bag_id=5868},
["Utsusemi: San"] = {tool='Shihei',tool_bag="Toolbag (Shihe)",tool_bag_id=5314,uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)",uni_tool_bag_id=5868},
["Jubaku: Ichi"] = {tool='Jusatsu',tool_bag="Toolbag (Jusa)",tool_bag_id=5315,uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)",uni_tool_bag_id=5869},
["Jubaku: Ni"] = {tool='Jusatsu',tool_bag="Toolbag (Jusa)",tool_bag_id=5315,uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)",uni_tool_bag_id=5869},
["Jubaku: San"] = {tool='Jusatsu',tool_bag="Toolbag (Jusa)",tool_bag_id=5315,uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)",uni_tool_bag_id=5869},
["Hojo: Ichi"] = {tool='Kaginawa',tool_bag="Toolbag (Kagi)",tool_bag_id=5316,uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)",uni_tool_bag_id=5869},
["Hojo: Ni"] = {tool='Kaginawa',tool_bag="Toolbag (Kagi)",tool_bag_id=5316,uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)",uni_tool_bag_id=5869},
["Hojo: San"] = {tool='Kaginawa',tool_bag="Toolbag (Kagi)",tool_bag_id=5316,uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)",uni_tool_bag_id=5869},
["Kurayami: Ichi"] = {tool='Sairui-Ran',tool_bag="Toolbag (Sai)",tool_bag_id=5317,uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)",uni_tool_bag_id=5869},
["Kurayami: Ni"] = {tool='Sairui-Ran',tool_bag="Toolbag (Sai)",tool_bag_id=5317,uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)",uni_tool_bag_id=5869},
["Kurayami: San"] = {tool='Sairui-Ran',tool_bag="Toolbag (Sai)",tool_bag_id=5317,uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)",uni_tool_bag_id=5869},
["Dokumori: Ichi"] = {tool='Kodoku',tool_bag="Toolbag (Kodo)",tool_bag_id=5318,uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)",uni_tool_bag_id=5869},
["Dokumori: Ni"] = {tool='Kodoku',tool_bag="Toolbag (Kodo)",tool_bag_id=5318,uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)",uni_tool_bag_id=5869},
["Dokumori: San"] = {tool='Kodoku',tool_bag="Toolbag (Kodo)",tool_bag_id=5318,uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)",uni_tool_bag_id=5869},
["Tonko: Ichi"] = {tool='Shinobi-Tabi',tool_bag="Toolbag (Shino)",tool_bag_id=5319,uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)",uni_tool_bag_id=5868},
["Tonko: Ni"] = {tool='Shinobi-Tabi',tool_bag="Toolbag (Shino)",tool_bag_id=5319,uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)",uni_tool_bag_id=5868},
["Tonko: San"] = {tool='Shinobi-Tabi',tool_bag="Toolbag (Shino)",tool_bag_id=5319,uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)",uni_tool_bag_id=5868},
["Gekka: Ichi"] = {tool='Ranka',tool_bag="Toolbag (Ranka)",tool_bag_id=6265,uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)",uni_tool_bag_id=5868},
["Yain: Ichi"] = {tool='Furusumi',tool_bag="Toolbag (Furu)",tool_bag_id=6266,uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)",uni_tool_bag_id=5868},
["Myoshu: Ichi"] = {tool='Kabenro',tool_bag="Toolbg. (Kaben)",tool_bag_id=5863,uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)",uni_tool_bag_id=5868},
["Yurin: Ichi"] = {tool='Jinko',tool_bag="Toolbag (Jinko)",tool_bag_id=5864,uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)",uni_tool_bag_id=5869},
["Kakka: Ichi"] = {tool='Ryuno',tool_bag="Toolbag (Ryuno)",tool_bag_id=5865,uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)",uni_tool_bag_id=5868},
["Migawari: Ichi"] = {tool='Mokujin',tool_bag="Toolbag (Moku)",tool_bag_id=5866,uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)",uni_tool_bag_id=5868},
}
--NIN Tool functions
function nin_tool_check()
if (player.inventory[nin_tools[spell.english].tool] == nil or player.inventory[nin_tools[spell.english].uni_tool] == nil)
and (player.inventory[nin_tools[spell.english].tool_bag] ~= nil or player.inventory[nin_tools[spell.english].uni_tool_bag] ~= nil) then
return true
else
add_to_chat(7,"No Tools Available To Cast "..spell.english)
end
end
function nin_tool_open()
if player.inventory[nin_tools[spell.english].tool_bag] ~= nil then
return nin_tools[spell.english].tool_bag
elseif player.inventory[nin_tools[spell.english].uni_tool_bag] ~= nil then
return nin_tools[spell.english].uni_tool_bag
end
end
--NIN Tool rule
if spell.type == "Ninjutsu" and nin_tool_check() then
cancel_spell()
send_command('input /item "'..nin_tool_open()..'" <me>')
end
--Card functions
function card_getmore()
if player.inventory[cards[spell.english].case] ~= nil then
return cards[spell.english].case
elseif player.inventory[cards[spell.english].tcase] ~= nil then
return cards[spell.english].tcase
end
end
function card_check()
if (player.inventory[cards[spell.english].card] == nil or player.inventory[cards[spell.english].tcard] == nil)
and (player.inventory[cards[spell.english].case] ~= nil or player.inventory[cards[spell.english].tcase] ~= nil ) then
return true
else
add_to_chat(7,"No Cards Available To Cast "..spell.english)
end
end
--Card rule
if spell.type == "CorsairShot" and card_check() then
cancel_spell()
send_command('input /item "'..card_getmore()..'" <me>')
end
--Ammo functions
function ammo_check()
if player.inventory[combined_ammo[sets[player.status].ammo]] and player.inventory[sets[player.status].ammo] == nil then
return true
end
end
function ammo_reequip()
if player.inventory[combined_ammo[sets[player.status].ammo]] ~= nil then
return combined_ammo[sets[player.status].ammo]
end
end
--Ammo rule
if spell.english == "Ranged" and ammo_reequip_check() then
cancel_spell()
send_command('input /item "'..ammo_reequip()..'" <me>')
equip({ammo="empty"})
elseif spell.english == "Ranged" and player.inventory[sets[player.status].ammo] and player.equipment.ammo ~= sets[player.status].ammo then
equip(sets[player.status])
end