So, in my BAM macro I have a sub for casting illusions (Human or Skeleton) and the code below works (as far as I can see and have been able to test), but it feels awkward and cumbersome, also I am not sure that it covers all scenarios/posibilities.
The idea is to:
Thoughts? Improvements? Spot any bugs or ways this can fail? One illusion blocks another, what if I sometimes want to use a third illusion (manual click)?
The idea is to:
- Always have an illusion. Be without illusion as little as possible. Items: Amulet of Necropotence (Skeleton, instant cast) and Circlet of Disguise (Human, 7 second cast)
- Prefer Human illusion, but use Skeleton illusion as a last resort (use instant cast skeleton if you are busy fighting a mob or running around not paying attention).
- Avoid chat window spam
- Do not cast illusion if you are already casting illusion (the event fires three times, I think, or atleast twice).
- You died
- Your illusion faded whilst the macro was not running
- Your illusion was debuffed
Thoughts? Improvements? Spot any bugs or ways this can fail? One illusion blocks another, what if I sometimes want to use a third illusion (manual click)?
Sub Cast_Illusion:
Sub Cast_Illusion
/if (!${Me.Casting.ID}) {
/if (${Me.Buff[Illusion: Skeleton].ID} > 0 || ${Me.Buff[Resurrection Sickness].ID} > 0) {
/useitem "Amulet of Necropotence"
} else /if (${Me.Combat} || ${Me.Moving}) {
/removebuff Illusion
/useitem "Amulet of Necropotence"
} else {
/if (${Me.Sitting}) {
/useitem "Circlet of Disguise"
/delay 8s
/sit
} else {
/useitem "Circlet of Disguise"
/delay 8s
}
}
}
/return