summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/init.c1
-rw-r--r--src/map/script.c6
-rw-r--r--src/map/script.h1
3 files changed, 8 insertions, 0 deletions
diff --git a/src/map/init.c b/src/map/init.c
index 22e7142..f9378f8 100644
--- a/src/map/init.c
+++ b/src/map/init.c
@@ -89,6 +89,7 @@ HPExport void plugin_init (void)
addScriptCommand("showavatar", "*", showAvatar);
addScriptCommand("setavatardir", "i", setAvatarDir);
addScriptCommand("setavataraction", "i", setAvatarAction);
+ addScriptCommand("clear", "", clear);
do_init_langs();
diff --git a/src/map/script.c b/src/map/script.c
index 12902ac..1f629bd 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -693,3 +693,9 @@ BUILDIN(setAvatarAction)
send_npccommand2(script->rid2sd (st), st->oid, 8, script_getnum(st, 2), 0, 0);
return true;
}
+
+BUILDIN(clear)
+{
+ send_npccommand(script->rid2sd (st), st->oid, 9);
+ return true;
+}
diff --git a/src/map/script.h b/src/map/script.h
index 5993e37..eb917d7 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -34,5 +34,6 @@ BUILDIN(setNpcDistance);
BUILDIN(showAvatar);
BUILDIN(setAvatarDir);
BUILDIN(setAvatarAction);
+BUILDIN(clear);
#endif // EVOL_MAP_SCRIPT