summaryrefslogtreecommitdiff
path: root/npc/functions/util.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-03-22 11:41:46 -0300
committerJesusaves <cpntb1@ymail.com>2021-03-22 11:41:46 -0300
commit4d78bfb741dbaad9b7119ee15cffb84da3a90a2a (patch)
treee36d63ebb850ea6ce54ecd5351842ebdbeaf5f06 /npc/functions/util.txt
parent898dc974cfbd77be638995b8f6e18917c103f8f7 (diff)
downloadserverdata-4d78bfb741dbaad9b7119ee15cffb84da3a90a2a.tar.gz
serverdata-4d78bfb741dbaad9b7119ee15cffb84da3a90a2a.tar.bz2
serverdata-4d78bfb741dbaad9b7119ee15cffb84da3a90a2a.tar.xz
serverdata-4d78bfb741dbaad9b7119ee15cffb84da3a90a2a.zip
Get rid of some old code, make set_aggro function
Diffstat (limited to 'npc/functions/util.txt')
-rw-r--r--npc/functions/util.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/npc/functions/util.txt b/npc/functions/util.txt
index a95bdad76..342df1531 100644
--- a/npc/functions/util.txt
+++ b/npc/functions/util.txt
@@ -1161,6 +1161,17 @@ function script RegEasterEgg {
return;
}
+// Makes a monster aggro
+// set_aggro( monster{, mode=MD_AGGRESSIVE} )
+function script set_aggro {
+ .@m=getarg(0);
+ .@x=getarg(1, MD_AGGRESSIVE);
+ .@op=getunitdata(.@m, UDT_MODE);
+ .@op=.@op|.@x;
+ setunitdata(.@m, UDT_MODE, .@op);
+ return;
+}
+
// Special function which makes a date as a number
// numdate( - )
function script numdate {