Date: 2019/08/06 12:05:28 UTC-07:00
Type: Denizen Script
# Usage:
# 1: Select an NPC
# 2: Configure as a Sentinel
# 3: /ex flag npc magic_power:SPELL_NAME_HERE | Change the SPELL_NAME_HERE to the spell name
# 4: /ex flag npc power_cooldown:10 | Change 10 to the cooldown time (in seconds)
sentinel_spell_magic:
type: world
events:
on sentinel npc attacks:
- if !<npc.has_flag[magic_power]>:
- stop
- if <npc.has_flag[power_cooldown_active]>:
- determine cancelled
- flag npc power_cooldown_active duration:<npc.flag[power_cooldown]>
- execute as_npc "/c <npc.flag[magic_power]>"
- determine cancelled