12-07-2016, 09:27 PM
Well, taking Hallowed Ground going off at 25% and not going off if Rampart is already up as an example:
"Player.hp.percent <= 25 and not {HAS_RAMPART} and Player.castinginfo.lastcastid ~= {RAMPART}.id"
For fight or flight:
"{HAS_BLOODBATH} or not {BLOODBATH} or Player.castinginfo.lastcastid == {BLOODBATH}.id"
Make sure that in cases like calling {BLOODBATH}.id you do not attempt this sort of thing if you do not have the skill.
Lua will throw an error at you for trying to index the ID field out of an empty table.
This is why I add a "not {BLOODBATH}" before the check to filter out the exception that would occur.
Helpful codes:
"Player.hp.percent <= 25 and not {HAS_RAMPART} and Player.castinginfo.lastcastid ~= {RAMPART}.id"
For fight or flight:
"{HAS_BLOODBATH} or not {BLOODBATH} or Player.castinginfo.lastcastid == {BLOODBATH}.id"
Make sure that in cases like calling {BLOODBATH}.id you do not attempt this sort of thing if you do not have the skill.
Lua will throw an error at you for trying to index the ID field out of an empty table.
This is why I add a "not {BLOODBATH}" before the check to filter out the exception that would occur.
Helpful codes:
Code:
{HAS_RAMPART}
{HAS_CONVALESCENCE}
{HAS_AWARENESS}
{HAS_SENTINEL}
{HAS_BULWARK}
{HAS_COVER}
{HAS_COVERED}
{HAS_HALLOWED_GROUND}
{HAS_FORESIGHT}
{HAS_BLOODBATH}
{HAS_MANTRA}
{HAS_DIVINE_VEIL}
{HAS_SHELTRON}
{HAS_STONESKIN}