-
-
Save z16/228a8a076b9d714d3b51 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function precast(spell,action) | |
handled = send_precast_action(spell) | |
if handled then print('handled') return end | |
if midaction() then print('midaction') cancel_spell() return end | |
local equipSet = nil | |
if spell.type=="JobAbility" then | |
equipSet = sets.JA | |
if equipSet[spell.english] then | |
equipSet = equipSet[spell.english] | |
print('JA specific equip') | |
else | |
print('JA general equip') | |
end | |
elseif spell.type=="WeaponSkill" then | |
if player.target.distance>6 then | |
message('Target too far away!') | |
cancel_spell() | |
print('WS distance') | |
return | |
end | |
equipSet = ws_gear(spell) | |
print('WS equip') | |
elseif spell.type=="Ninjutsu" or string.find(spell.type,"Magic") then | |
equipSet = sets.precast | |
if equipSet[spell.type] then | |
equipSet = equipSet[spell.type] | |
print('Magic specific equip') | |
else | |
print('Magic general equip') | |
end | |
end | |
if equipSet then | |
print('Equipping') | |
equip(process_locks(equipSet,spell)) | |
end | |
print('Not equipping') | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment