summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authormekolat <mekolat@users.noreply.github.com>2016-06-21 16:32:06 -0400
committermekolat <mekolat@users.noreply.github.com>2016-06-22 14:49:49 -0400
commit85712c4f2ccfa9c3cec4bd0c9f515f5061a9351c (patch)
tree547e471ff8f89b6796c5694636e0ad90b02f47e8 /npc
parent4215b2baf47faf8eec14060e3da655d98ffe1636 (diff)
downloadserverdata-85712c4f2ccfa9c3cec4bd0c9f515f5061a9351c.tar.gz
serverdata-85712c4f2ccfa9c3cec4bd0c9f515f5061a9351c.tar.bz2
serverdata-85712c4f2ccfa9c3cec4bd0c9f515f5061a9351c.tar.xz
serverdata-85712c4f2ccfa9c3cec4bd0c9f515f5061a9351c.zip
add atcommand `@w` (works like `@go`)
Diffstat (limited to 'npc')
-rw-r--r--npc/commands/warp.txt231
-rw-r--r--npc/scripts.conf1
2 files changed, 232 insertions, 0 deletions
diff --git a/npc/commands/warp.txt b/npc/commands/warp.txt
new file mode 100644
index 00000000..f8e25bc0
--- /dev/null
+++ b/npc/commands/warp.txt
@@ -0,0 +1,231 @@
+// @w atcommand
+// warps using anchors or map name
+//
+// group lv: 1
+// group char lv: 2
+// log: True
+//
+// usage:
+// @w <map or anchor> [, x [, y]]
+// #w "char" <map or anchor> [, x [, y]]
+//
+// example:
+// @w artis
+// #w "char" artis
+
+- script @w 32767,{
+ end;
+
+OnCall:
+ .@m$ = strtoupper(.@atcmd_parameters$[0]); // sanitize
+
+ // ------------------------------------
+ // ARTIS
+ if (startswith(.@m$, "ART"))
+ {
+ .@map$ = "001-1";
+ .@x = 89;
+ .@y = 86;
+ }
+
+ else if (startswith(.@m$, "LIGHT"))
+ {
+ .@map$ = "001-2-0";
+ .@x = 37;
+ .@y = 32;
+ }
+
+ else if (.@m$ == "NOBLE")
+ {
+ .@map$ = "001-2-1";
+ .@x = 37;
+ .@y = 37;
+ }
+
+ else if (startswith(.@m$, "MOON"))
+ {
+ .@map$ = "001-2-2";
+ .@x = 39;
+ .@y = 34;
+ }
+
+ else if (startswith(.@m$, "LIB"))
+ {
+ .@map$ = "001-2-4";
+ .@x = 49;
+ .@y = 37;
+ }
+
+ else if (startswith(.@m$, "CITY"))
+ {
+ .@map$ = "001-2-7";
+ .@x = 36;
+ .@y = 38;
+ }
+
+ else if (.@m$ == "NOBLE2")
+ {
+ .@map$ = "001-2-10";
+ .@x = 40;
+ .@y = 38;
+ }
+
+ else if (.@m$ == "NOBLE3")
+ {
+ .@map$ = "001-2-11";
+ .@x = 45;
+ .@y = 33;
+ }
+
+ else if (.@m$ == "NOBLE4")
+ {
+ .@map$ = "001-2-12";
+ .@x = 34;
+ .@y = 32;
+ }
+
+ else if (.@m$ == "NOBLE5")
+ {
+ .@map$ = "001-2-15";
+ .@x = 34;
+ .@y = 38;
+ }
+
+ else if (startswith(.@m$, "HARB"))
+ {
+ .@map$ = "001-2-16";
+ .@x = 32;
+ .@y = 33;
+ }
+
+ else if (startswith(.@m$, "WARE"))
+ {
+ .@map$ = "001-2-18";
+ .@x = 39;
+ .@y = 31;
+ }
+
+ else if (startswith(.@m$, "MERCH") || startswith(.@m$, "BANK"))
+ {
+ .@map$ = "001-2-19";
+ .@x = 29;
+ .@y = 31;
+ }
+
+ else if (.@m$ == "SHIP2")
+ {
+ .@map$ = "001-2-21";
+ .@x = 30;
+ .@y = 28;
+ }
+
+ else if (startswith(.@m$, "ALCH"))
+ {
+ .@map$ = "001-2-26";
+ .@x = 30;
+ .@y = 32;
+ }
+
+ else if (startswith(.@m$, "BLACK"))
+ {
+ .@map$ = "001-2-27";
+ .@x = 35;
+ .@y = 32;
+ }
+
+ else if (startswith(.@m$, "PLUSH"))
+ {
+ .@map$ = "001-2-28";
+ .@x = 32;
+ .@y = 32;
+ }
+
+ else if (startswith(.@m$, "LEG"))
+ {
+ .@map$ = "001-2-33";
+ .@x = 34;
+ .@y = 36;
+ }
+
+
+ // ------------------------------------
+ // BOAT
+ else if (.@m$ == "START")
+ {
+ .@map$ = "000-0";
+ .@x = 22;
+ .@y = 24;
+ }
+
+ else if (.@m$ == "START2")
+ {
+ .@map$ = "000-0-0";
+ .@x = 26;
+ .@y = 28;
+ }
+
+ else if (.@m$ == "START3")
+ {
+ .@map$ = "000-0-1";
+ .@x = 26;
+ .@y = 28;
+ }
+
+ else if (startswith(.@m$, "DRA"))
+ {
+ .@map$ = "000-1";
+ .@x = 77;
+ .@y = 110;
+ }
+
+ else if (startswith(.@m$, "FIRST"))
+ {
+ .@map$ = "000-2-0";
+ .@x = 27;
+ .@y = 27;
+ }
+
+ else if (startswith(.@m$, "SECOND"))
+ {
+ .@map$ = "000-2-1";
+ .@x = 53;
+ .@y = 33;
+ }
+
+ else if (.@m$ == "HOLD")
+ {
+ .@map$ = "000-2-2";
+ .@x = 43;
+ .@y = 30;
+ }
+
+ else if (startswith(.@m$, "NARD"))
+ {
+ .@map$ = "000-2-3";
+ .@x = 21;
+ .@y = 27;
+ }
+
+ else if (startswith(.@m$, "ALIG"))
+ {
+ .@map$ = "000-2-4";
+ .@x = 36;
+ .@y = 29;
+ }
+
+
+ if (.@map$ == "")
+ {
+ .@map$ = .@atcmd_parameters$[0];
+ }
+ if (.@atcmd_parameters$[2] != "")
+ {
+ .@x = atoi(.@atcmd_parameters$[1]);
+ .@y = atoi(.@atcmd_parameters$[2]);
+ }
+ warp .@map$, .@x, .@y;
+ end;
+
+OnInit:
+ bindatcmd "w", "@w::OnCall", 1, 2, 1;
+}
diff --git a/npc/scripts.conf b/npc/scripts.conf
index 85d55303..2aa6f6e2 100644
--- a/npc/scripts.conf
+++ b/npc/scripts.conf
@@ -34,6 +34,7 @@ npc: npc/functions/string.txt
// custom atcommands
npc: npc/commands/music.txt
+npc: npc/commands/warp.txt
// Maps specific scripts
import: npc/_import.txt