I'm having trouble figuring out how to setup a toggle for a auto cast out of combat for example:
Toggle:
Code:
**************.toggle.create(
'autofire',
'Interface\\Icons\\Spell_Nature_MoonGlow.blp',
'Auto-Moon/Fire',
'Toggle Auto-Start Casting.')
Code:
-- Auto Cast Out-of-Combat
{ '8921', { -- Moonfire Dot
'player.spell(8921).exists',
'target.debuff(8921).duration < 2',
'target.spell(8921).range',
'target.exists',
'target.enemy'
}, 'target' },
{ '93402', { -- Sunfire Dot
'player.spell(93402).exists',
'target.debuff(93402).duration < 2',
'target.spell(93402).range',
'target.exists',
'target.enemy'
},'target' },
I've tried this but I know it's wrong some how but can't figure it out...
Code:
{{
-- Auto Cast Out-of-Combat
{ '8921', { -- Moonfire Dot
'player.spell(8921).exists',
'target.debuff(8921).duration < 2',
'target.spell(8921).range',
'target.exists',
'target.enemy'
}, 'target' },
{ '93402', { -- Sunfire Dot
'player.spell(93402).exists',
'target.debuff(93402).duration < 2',
'target.spell(93402).range',
'target.exists',
'target.enemy'
},'target' },
}, 'modifier.autofire' },
It works fine but would like to toggle on and off when in a group/raid.