First, here's the code block:
Code
function midcast(spell,action) ---------------------------- --Weaponskills & Abilities-- ---------------------------- if spell.action_type == 'Ability' then return end --------- --Magic-- --------- if spell.action_type == 'Magic' then ---------- --Enmity-- ---------- if spell.english == 'Flash' or 'Foil' then equip(sets.Utility.Enmity) return end if spell.english == 'Jettatura' or 'Blank Gaze' or 'Magnetite Cloud' or 'Sheep Song' then equip(sets.Utility.Enmity) return end ------------- --Enhancing-- ------------- if spell.english:startswith('Regen') then equip(sets.Utility.EnhancingDuration, sets.Utility.Regen) return end if spell.english:startswith('Bar') then equip(sets.Utility.EnhancingDuration, sets.Utility.EnhancingSkill) return end if spell.english == 'Temper' or 'Crusade' or spell.english == 'Aquaveil' then equip(sets.Utility.EnhancingDuration, sets.Utility.EnhancingSkill) return end if spell.english == 'Blaze Spikes' or 'Ice Spikes' or 'Shock Spikes' then equip(sets.Utility.EnhancingDuration, sets.Utility.EnhancingSkill) return end if spell.english == 'Stoneskin' then equip(sets.Utility.EnhancingDuration, sets.Utility.Stoneskin) return end if spell.english == 'Refresh' then equip(sets.Utility.EnhancingDuration, sets.Utility.Refresh) return end if spell.english == 'Phalanx' then equip(sets.Utility.EnhancingDuration, sets.Utility.EnhancingSkill, sets.Utility.Phalanx) return end ------------ --Ninjutsu-- ------------ if spell.english == 'Utsusemi: Ichi' then equip(sets.Utility.Ninjutsu) return end -------------- --Blue Magic-- -------------- if spell.english == 'Pollen' or 'Wild Carrot' or 'Healing Breeze' then equip(sets.Utility.Cure) return end if spell.english == 'Cocoon' then equip(sets.Utility.Defense) return end else send_command('@input /echo Reached end of the statement.') return end end
The first issue I had was midcast equipping my enmity sets immediately after precast sets for weaponskills, thus ruining them. I added that return if statement for abilities and that seemed to fix it.
The second issue was that it was mixing up midcast sets for spells. I added return statements to them all and that seemed to fix it.
My current issue is that it doesn't seem to pass the enmity spell set statement (first spell statements). So it just equips that for every scenario. I've tried using multiple different syntaxes with no success and have double checked spellings. I've tried using ifelse statements as well with no success, so not sure if I'm missing something or what's going on.
Any help is appreciated.