
Originally Posted by
Landsoul
If you want to use if spellmap == for multiple spells in a single line do you have to use spellMap == 'SpellName' every time? Or is there a shorter way of doing this?
Like
If spellMap == 'Spell1' or spellMap == 'Spell 2' or spellMap == 'Spell3' or spellMap == 'Spell 4'
Is there a better/shorter way of doing this like in Spellcast you could put | pineline between spells.
if S{ 'Spell1','Spell 2','Spell3','Spell 4'}:contains(spellmap) then
and to anybody who needs it here is my obi rules
Code:
sets.spell_obi={Fire={waist="Karin Obi"},Earth={waist="Dorin Obi"},Water={waist="Suirin Obi"},Wind={waist="Furin Obi"},Ice={waist="Hyorin Obi"},
Lightning={waist="Rairin Obi"},Light={waist="Korin Obi"},Dark={waist="Anrin Obi"},}
Typ = {spells = S{'White Magic','Black Magic','Ninjutsu','Geomancy','Blue Magic','Bard Song'},
abilitys = S{'/jobability','/pet','/weaponskill','/monsterskill','/range'},}
if not Typ.abilitys:contains(spell.prefix) and spell.action_type ~= "Item" then
local spell_element = (type(spell.element)=='number' and res.elements[spell.element] or res.elements:with('name', spell.element))
if spell_element.name == world.weather_element or spell_element.name == world.day_element then
if player.inventory["Hachirin-no-Obi"] or player.wardrobe["Hachirin-no-Obi"] then
equip({waist="Hachirin-no-Obi"})
elseif player.inventory[sets.spell_obi[spell_element.en].waist] or player.wardrobe[sets.spell_obi[spell_element.en].waist] then
equip(sets.spell_obi[spell_element.en])
end
end
end