diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-11-29 16:37:52 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-11-29 16:37:52 +0300 |
commit | f013f783501bb92d88133d7ac9a7be6501d0dd8e (patch) | |
tree | 7df6b705ec826c7aa3e425af04e1619a3514733a /src | |
parent | e5f25d11eee43a31b2c41b357ac144d9e40ef37a (diff) | |
download | evol-hercules-f013f783501bb92d88133d7ac9a7be6501d0dd8e.tar.gz evol-hercules-f013f783501bb92d88133d7ac9a7be6501d0dd8e.tar.bz2 evol-hercules-f013f783501bb92d88133d7ac9a7be6501d0dd8e.tar.xz evol-hercules-f013f783501bb92d88133d7ac9a7be6501d0dd8e.zip |
Add script command for move camera to relative pixel position.
New script command: movecam x,y
Diffstat (limited to 'src')
-rw-r--r-- | src/map/init.c | 1 | ||||
-rw-r--r-- | src/map/script.c | 8 | ||||
-rw-r--r-- | src/map/script.h | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/src/map/init.c b/src/map/init.c index 2448ffa..e4c395c 100644 --- a/src/map/init.c +++ b/src/map/init.c @@ -61,6 +61,7 @@ HPExport void plugin_init (void) addScriptCommand("setcamnpc", "*", setCamNpc); addScriptCommand("setcam", "ii", setCam); + addScriptCommand("movecam", "ii", moveCam); addScriptCommand("restorecam", "", restoreCam); addScriptCommand("npctalk3", "s", npcTalk3); addScriptCommand("closedialog", "", closeDialog); diff --git a/src/map/script.c b/src/map/script.c index d71cc82..e7a3df4 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -82,6 +82,14 @@ BUILDIN(setCam) return true; } +BUILDIN(moveCam) +{ + send_npccommand2(script->rid2sd (st), st->oid, 4, 0, + script_getnum(st, 2), script_getnum(st, 3)); + + return true; +} + BUILDIN(restoreCam) { getSD(); diff --git a/src/map/script.h b/src/map/script.h index fb93c77..88a0e1b 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -8,6 +8,7 @@ BUILDIN(l); BUILDIN(lg); BUILDIN(setCamNpc); BUILDIN(setCam); +BUILDIN(moveCam); BUILDIN(restoreCam); BUILDIN(npcTalk3); BUILDIN(closeDialog); |