Difference between revisions of "MUDL:has spell active"

From SlothMUD Wiki
Jump to: navigation, search
(Created page with " __TOC__ = Summary = {|class="abilitiestable" border="0" cellspacing="0" cellpadding="0" ! Function Name | has_spell_active |- ! Settable | No |- ! Returns | Boolean |} {...")
 
 
(One intermediate revision by the same user not shown)
Line 34: Line 34:
 
     if (!has_spell_active(target(%c), spell_id('blindness')),
 
     if (!has_spell_active(target(%c), spell_id('blindness')),
 
     (
 
     (
         msg_character(target(%c), '$N does something hideous!', %c),
+
         msg_character(target(%c), '$N does something hideous!', %c)
 
     )),
 
     )),
 
     return(true)
 
     return(true)

Latest revision as of 19:45, 8 November 2018


Summary

Function Name has_spell_active
Settable No
Returns Boolean


Parameter Options
Target (character), Spell (integer)


This function returns True if the Target is currently affected by the specified spell.


Example

setproc <mobile> # every_round
if (target(%c),
(
    if (!has_spell_active(target(%c), spell_id('blindness')),
    (
        msg_character(target(%c), '$N does something hideous!', %c)
    )),
    return(true)
}},

return(false)