From d527e2195f46a4dd7d152cc1b04b0c4892a063b6 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 9 Dec 2021 13:44:48 -0300 Subject: (Theoretically) make moonshrooms at Santa passive. --- npc/functions/main.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'npc/functions/main.txt') diff --git a/npc/functions/main.txt b/npc/functions/main.txt index b94aa8ac..c46f04d4 100644 --- a/npc/functions/main.txt +++ b/npc/functions/main.txt @@ -528,6 +528,19 @@ function script set_aggro { return; } +// Makes a monster passive +// unset_aggro( monster{, mode=MD_AGGRESSIVE} ) +function script unset_aggro { + .@m=getarg(0); + .@x=getarg(1, MD_AGGRESSIVE); + .@op=getunitdata(.@m, UDT_MODE); + if (.@op & .@x) { + .@op=.@op^.@x; + setunitdata(.@m, UDT_MODE, .@op); + } + return; +} + // Special function which makes a date as a number // numdate( - ) function script numdate { -- cgit v1.2.3-60-g2f50