summaryrefslogtreecommitdiff
path: root/world/map/npc/commands/warp.txt
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc/commands/warp.txt')
-rw-r--r--world/map/npc/commands/warp.txt49
1 files changed, 0 insertions, 49 deletions
diff --git a/world/map/npc/commands/warp.txt b/world/map/npc/commands/warp.txt
deleted file mode 100644
index 0e2a7ab7..00000000
--- a/world/map/npc/commands/warp.txt
+++ /dev/null
@@ -1,49 +0,0 @@
--|script|@warp|32767
-{
- callfunc "argv_splitter";
- if (@argv$[3] == "" && @argv$[2] == "" && @argv$[1] != "" && @argv[1] < 2)
- set @argv$[3], @argv$[1];
-
- set .@n$, if_then_else(@argv$[3] != "", "char", "") + "warp";
- if (GM < CMD_WARP && GM < G_SYSOP) goto L_GM; // check if you can use it on self
- set .@target_id, BL_ID;
- if (@argv$[3] != "") set .@target_id, getcharid(3, @argv$[3]);
- if (@argv$[3] != "" && !(isloggedin(.@target_id))) goto L_Failed; // do NOT fallback to self
- if (@argv$[3] != "" && GM < CMD_CHARWARP && GM < G_SYSOP) goto L_GM; // when target is not self, use charwarp permission
-
- if (@argv$[0] == "")
- set @argv$[0], getmap();
-
- setarray @map_anchor$[0], "", "", "", "";
- callfunc "map2anchor";
-
- gmlog "@"+.@n$+" " + @args$;
- if (.@target_id != BL_ID)
- message strcharinfo(0), .@n$+" : The operation succeeded.";
-
- set @GMWARP_map$, @map_anchor$[0];
- set @GMWARP_x, if_then_else(@argv[1] > 1, @argv[1], @map_anchor$[1]);
- set @GMWARP_y, if_then_else(@argv[2] > 1, @argv[2], @map_anchor$[2]);
- addtimer 0, strnpcinfo(0) + "::OnWarp", .@target_id;
- end;
-
-OnWarp:
- warp @GMWARP_map$, @GMWARP_x, @GMWARP_y;
- set @GMWARP_map$, "";
- set @GMWARP_x, 0;
- set @GMWARP_y, 0;
- end;
-
-L_Failed:
- message strcharinfo(0), .@n$+" : Impossible to attach to the target player. Did you try putting the name in \"quotation marks\"?";
- end;
-
-L_GM:
- message strcharinfo(0), .@n$+" : GM command is level "+ if_then_else(@argv$[1] != "", CMD_CHARWARP, CMD_WARP) +", but you are level " + GM;
- end;
-
-OnInit:
- registercmd chr(ATCMD_SYMBOL) + "warp", strnpcinfo(0);
- registercmd chr(ATCMD_SYMBOL) + "charwarp", strnpcinfo(0);
- end;
-}