Skip to content

Mechanics: castIf

muhahahahe edited this page Jan 5, 2018 · 2 revisions

This mechanic allows you to execute skills under certain conditions.

It is like an If/Else.

Attributes

Attribute Aliases Description Default
conditions c the global condition to check
can also be a list seperatet by AND with &&
or an OR seperated with ||
targetconditions tc compare condition to check
can also be a list
meet m skill that will be executed when conditions meet
else e skill that will be executed when conditions NOT meet
meettargeter mt targeter for the meet skill
elsetargeter et targeter for the else skill

Example

- castif{c="onground true && outside true || playerwithin{d=10} true";meet=meetMetaSkill;elese=elseMetaSkill}
The meetMetaSkill will be executed if the caster is onground and outside, he can also have a player within 10 blocks, if the caster is not outside or onground the elseMetaSkill will be executed.

- castif{c="playerwithin{d=10} true";meet=meetMetaSkill;elese=elseMetaSkill;meettargeter="@PIR{r=10}";elsetargeter="@Self"}
The meetMetaSkill will be executed at all players in a range of 10 blocks if the caster have a player within 10 blocks, if the caster has no player in range of 10 blocks the elseMetaSkill will be executed on himself.

Clone this wiki locally