From 95656323e8bc2f86450a2284ded759cfa77615fb Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 13 Oct 2019 13:57:01 -0300 Subject: This was redundant all along... --- npc/maze0/config.txt | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/npc/maze0/config.txt b/npc/maze0/config.txt index 5a0f315ae..1615adac5 100644 --- a/npc/maze0/config.txt +++ b/npc/maze0/config.txt @@ -413,17 +413,24 @@ function script WarpToMaze { switch (getarg(0)) { case DIR_NORTH: .@dst$=getd(MazeVar(MAZE_X, MAZE_Y, "$["+MAZENORTH+"]")); + .@x=29; .@y=38; break; case DIR_SOUTH: .@dst$=getd(MazeVar(MAZE_X, MAZE_Y, "$["+MAZESOUTH+"]")); + .@x=29; .@y=21; break; case DIR_WEST: .@dst$=getd(MazeVar(MAZE_X, MAZE_Y, "$["+MAZE_WEST+"]")); + .@x=38; .@y=31; break; case DIR_EAST: .@dst$=getd(MazeVar(MAZE_X, MAZE_Y, "$["+MAZE_EAST+"]")); + .@x=21; .@y=31; break; + default: + return Exception("INVALID DIRECTION", RB_DEFAULT|RB_ISFATAL); } + // Get MAPID .@id=getd("MAZE_"+.@dst$+"_ID"); explode(.@crd$, .@dst$, "_"); @@ -432,23 +439,10 @@ function script WarpToMaze { MAZE_X=atoi(.@crd$[0]); MAZE_Y=atoi(.@crd$[1]); - // Time to generate .@x and .@y - .@x=30; - .@y=30; switch (.@id) { - // Assumed position + // If a special map have different warp rules, specify here case MAZEMAPTYPE_NULL: .@x=30; .@y=30; break; - case MAZEMAPTYPE_DEADS: - .@x=29; .@y=38; break; - case MAZEMAPTYPE_DEADW: - .@x=21; .@y=31; break; - case MAZEMAPTYPE_DEADN: - .@x=29; .@y=21; break; - case MAZEMAPTYPE_DEADE: - .@x=38; .@y=31; break; - // We need your direction - // TODO } // We don't need MAZE_ID do we? -- cgit v1.2.3-60-g2f50