summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-15 17:53:26 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-15 17:53:26 +0300
commit403a522d51434252a27578a84bb09da25ae1d6ab (patch)
tree518c1610295248096c8905d44a28d92081f1c731
parent36f39a0992266632465b4e8f50acc0f09cd0c30d (diff)
downloadevol-hercules-403a522d51434252a27578a84bb09da25ae1d6ab.tar.gz
evol-hercules-403a522d51434252a27578a84bb09da25ae1d6ab.tar.bz2
evol-hercules-403a522d51434252a27578a84bb09da25ae1d6ab.tar.xz
evol-hercules-403a522d51434252a27578a84bb09da25ae1d6ab.zip
Impliment script command closeDialog.
-rw-r--r--src/map/init.c2
-rw-r--r--src/map/script.c7
-rw-r--r--src/map/script.h1
3 files changed, 9 insertions, 1 deletions
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