diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/init.c | 2 | ||||
-rw-r--r-- | src/map/script.c | 10 | ||||
-rw-r--r-- | src/map/script.h | 1 |
3 files changed, 12 insertions, 1 deletions
diff --git a/src/map/init.c b/src/map/init.c index f399acf..09c0a10 100644 --- a/src/map/init.c +++ b/src/map/init.c @@ -43,7 +43,7 @@ HPExport void plugin_init (void) sockt = GET_SYMBOL("sockt"); addScriptCommand("setcamnpc", "*", setCamNpc); - addScriptCommand("restorecam", "", dummy); + addScriptCommand("restorecam", "", restoreCam); addScriptCommand("npctalk3", "s", dummy); addScriptCommand("closedialog", "", dummy); addScriptCommand("shop", "s", dummy); diff --git a/src/map/script.c b/src/map/script.c index 585dfec..7184707 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -102,3 +102,13 @@ BUILDIN(setCamNpc) return 0; } + +BUILDIN(restoreCam) +{ + TBL_PC *sd = script->rid2sd(st); + if (!sd) + return 1; + + send_npccommand(sd, st->oid, 3); + return 0; +} diff --git a/src/map/script.h b/src/map/script.h index 32a5bec..7bd1abe 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -9,5 +9,6 @@ BUILDIN(getClientVersion); BUILDIN(getLang); BUILDIN(setLang); BUILDIN(setCamNpc); +BUILDIN(restoreCam); #endif // EVOL_MAP_SCRIPT |