That won't work. What you have above works as a 'AND': it will cast sanctuary only if
- $n has class WIZARD
- AND $n has class PRIEST
- AND $o is worn
- AND objval5($o) is zero
If you want it to work for both priests and wizards, you need to add an OR explicitly, as in
Code: Select all
>intercept_prog molira tethos~
if class($n) == Wizard
or if class($n) == Priest
if wear_loc($o) != -1
if objval5($o) == 0
cast 'sanctuary' $n
mposet on $n iVNUM value5 1
mpechoat $n {80}A black aura surrounds your body making you feel strangely protected.
mpechoaround $n {80}A deep black aura swirls around $N's body.
endif
endif
endif
And, if you want to display the echo '... is still in your hands' each time it fails, no matter wat the reason is, you must copy it for each else part, as in
Code: Select all
>intercept_prog molira tethos~
if class($n) == Wizard
or if class($n) == Priest
if wear_loc($o) != -1
if objval5($o) == 0
cast 'sanctuary' $n
mposet on $n iVNUM value5 1
mpechoat $n {80}A black aura surrounds your body making you feel strangely protected.
mpechoaround $n {80}A deep black aura swirls around $N's body.
else
mpechoat $n {80}The orb is still in your hands.
endif
else
mpechoat $n {80}The orb is still in your hands.
endif
else
mpechoat $n {80}The orb is still in your hands.
endif