From 7d9fb1c5c1101fc1fc0afaa2508c842cedbf1a5a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 29 Nov 2014 19:04:23 +0300 Subject: add script command for clear npc window. New script command: clear --- src/map/init.c | 1 + src/map/script.c | 6 ++++++ src/map/script.h | 1 + 3 files changed, 8 insertions(+) (limited to 'src') 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 -- cgit v1.2.3-70-g09d2