|
|
|
|
|
%isAffectedBy()
Aliases | %isAffectedBy( ) |
---|
Parameters | mixed @entity, string @affectName, [string @affectName2, ...] |
---|
|
Returns 1 if the given character or object is affected by all of the named affects, which follow the entity as parameters, are set on the entity. The following named affects can be used:
Mobiles:
bash fear paralysis blindness feign death parry champion mode fly poison channel follow protection from evil charm group sanctuary chill touch half hp regen sense life curse half mana regen shocking grasp deadly poison half move regen silence death's door heat of battle sleep detect evil hide sneak detect invisibile immortal stealth strength detect magic infravision summoned dominated invisibility sweeping double hp regen lich touch water breath double mana regen light water walk double move regen movement impaired
Objects:
anti-evil glow no remove anti-good hum paladin only anti-neutral invisible ranger only bless mage only striking cleric only magic thief only dark no drop two-handed evil curse warrior only expire no give wear expire
Example:
// // This checks that BOTH affects are active. // if( %isAffectedBy( @n, "chill touch", "lich touch" ) ) { cast dispel magic @n } endif
// // This checks if EITHER affect is active. // if( %isAffectedBy( @n, poison ) \ || \ $isAffectedBy( @n, "deadly poison" ) ) { talk @n You look like you're in pretty rough shape! } endif |
|
|
|
|
|
|
|