From 403a522d51434252a27578a84bb09da25ae1d6ab Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 15 Nov 2014 17:53:26 +0300 Subject: Impliment script command closeDialog. --- src/map/init.c | 2 +- src/map/script.c | 7 +++++++ src/map/script.h | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/map/init.c b/src/map/init.c index b74a3b4..1327cb6 100644 --- a/src/map/init.c +++ b/src/map/init.c @@ -45,7 +45,7 @@ HPExport void plugin_init (void) addScriptCommand("setcamnpc", "*", setCamNpc); addScriptCommand("restorecam", "", restoreCam); addScriptCommand("npctalk3", "s", npcTalk3); - addScriptCommand("closedialog", "", dummy); + addScriptCommand("closedialog", "", closeDialog); addScriptCommand("shop", "s", dummy); addScriptCommand("getitemlink", "s", dummyStr); addScriptCommand("l", "s*", l); diff --git a/src/map/script.c b/src/map/script.c index 67ab95a..e54f6e2 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -133,3 +133,10 @@ BUILDIN(npcTalk3) return true; } + +BUILDIN(closeDialog) +{ + getSD(); + send_npccommand(script->rid2sd (st), st->oid, 5); + return true; +} diff --git a/src/map/script.h b/src/map/script.h index 9116aaa..45a3aea 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -11,5 +11,6 @@ BUILDIN(setLang); BUILDIN(setCamNpc); BUILDIN(restoreCam); BUILDIN(npcTalk3); +BUILDIN(closeDialog); #endif // EVOL_MAP_SCRIPT -- cgit v1.2.3-70-g09d2