summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormekolat <mekolat@users.noreply.github.com>2016-03-22 14:26:26 -0400
committermekolat <mekolat@users.noreply.github.com>2016-04-25 06:57:42 -0400
commit7c21e91ca9dc319e16611e90ca64371c9a2678ab (patch)
treecd071b6b7e51ddc9572cb968c3ab7a3cc8b822b9
parent636ff667090ba472c4e1ad66290ed6370bdded66 (diff)
downloadserverdata-7c21e91ca9dc319e16611e90ca64371c9a2678ab.tar.gz
serverdata-7c21e91ca9dc319e16611e90ca64371c9a2678ab.tar.bz2
serverdata-7c21e91ca9dc319e16611e90ca64371c9a2678ab.tar.xz
serverdata-7c21e91ca9dc319e16611e90ca64371c9a2678ab.zip
further ferry improvements
-rw-r--r--world/map/npc/001-1/dock.txt33
-rw-r--r--world/map/npc/002-1/_import.txt1
-rw-r--r--world/map/npc/002-1/dock.txt5
-rw-r--r--world/map/npc/008-1/dock.txt62
-rw-r--r--world/map/npc/009-1/_import.txt1
-rw-r--r--world/map/npc/009-1/dock.txt8
-rw-r--r--world/map/npc/020-1/_import.txt1
-rw-r--r--world/map/npc/020-1/dock.txt6
-rw-r--r--world/map/npc/029-1/dock.txt33
-rw-r--r--world/map/npc/031-1/dock.txt30
-rw-r--r--world/map/npc/functions/ferry.txt70
11 files changed, 132 insertions, 118 deletions
diff --git a/world/map/npc/001-1/dock.txt b/world/map/npc/001-1/dock.txt
index 0e9fb55b..077e3ce6 100644
--- a/world/map/npc/001-1/dock.txt
+++ b/world/map/npc/001-1/dock.txt
@@ -1,24 +1,30 @@
// The ferry dock
// Author: Wushin
-// Ferry Sign
-001-1,61,71,0|script|Ferry Schedule#2|396
+001-1,75,70,0|script|Tulimshar Koga|395,9,4
{
- callfunc "FerryManifest";
+ set @npc_distance, 10;
+ callfunc "PCtoNPCRange";
+ if(@npc_check) end;
+ callfunc "BoardFerry";
end;
-}
-001-1,75,70,0|script|Tulimshar Koga|395,8,3
-{
+OnTouch:
+ addtimer get(.warp_delay, "#FerryConfig"), strnpcinfo(0)+"::OnBoard";
+ end;
+
+OnBoard:
callfunc "BoardFerry";
- close;
+ end;
}
-001-1,68,72,0|script|Tulimshar Dock|400,3,3
+001-1,68,72,0|script|Tulimshar Dock|400,2,2
{
- set @DockNumber, 2;
- callfunc "FerryManifest";
- close;
+ set @npc_distance, 3;
+ callfunc "PCtoNPCRange";
+ if(@npc_check) end;
+ callfunc "BoardFerry";
+ end;
}
001-1,70,70,0|script|#TulimsharDock|32767
@@ -27,6 +33,11 @@
OnCommandArrive:
disablenpc "Tulimshar Dock";
enablenpc "Tulimshar Koga";
+ areatimer 0, "001-1", 66, 71, 77, 73, get(.warp_delay, "#FerryConfig"), strnpcinfo(0)+"::OnAreaWarp"; // warp players on dock
+ end;
+
+OnAreaWarp:
+ callfunc "BoardFerry";
end;
OnCommandWarp:
diff --git a/world/map/npc/002-1/_import.txt b/world/map/npc/002-1/_import.txt
index 1e4e50cf..b052f96e 100644
--- a/world/map/npc/002-1/_import.txt
+++ b/world/map/npc/002-1/_import.txt
@@ -6,7 +6,6 @@ npc: npc/002-1/_nodes.txt
npc: npc/002-1/_warps.txt
npc: npc/002-1/anwar.txt
npc: npc/002-1/bard.txt
-npc: npc/002-1/dock.txt
npc: npc/002-1/elanore.txt
npc: npc/002-1/gaurds.txt
npc: npc/002-1/itka.txt
diff --git a/world/map/npc/002-1/dock.txt b/world/map/npc/002-1/dock.txt
deleted file mode 100644
index db947145..00000000
--- a/world/map/npc/002-1/dock.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-002-1,67,65,0|script|Ferry Schedule#3|396
-{
- callfunc "FerryManifest";
- end;
-}
diff --git a/world/map/npc/008-1/dock.txt b/world/map/npc/008-1/dock.txt
index 1ce308e6..acb3a23e 100644
--- a/world/map/npc/008-1/dock.txt
+++ b/world/map/npc/008-1/dock.txt
@@ -1,22 +1,29 @@
// The ferry dock
-008-1,134,69,0|script|Ferry Schedule#5|397
+008-1,147,64,0|script|Hurnscald North Koga|395,10,3
{
- callfunc "FerryManifest";
+ set @npc_distance, 11;
+ callfunc "PCtoNPCRange";
+ if(@npc_check) end;
+ callfunc "BoardFerry";
end;
-}
-008-1,147,64,0|script|Hurnscald North Koga|395,8,3
-{
+OnTouch:
+ addtimer get(.warp_delay, "#FerryConfig"), strnpcinfo(0)+"::OnBoard";
+ end;
+
+OnBoard:
callfunc "BoardFerry";
- close;
+ end;
}
-008-1,139,65,0|script|Hurnscald North Dock|400,3,3
+008-1,139,65,0|script|Hurnscald North Dock|400,2,1
{
- set @DockNumber, 2;
- callfunc "FerryManifest";
- close;
+ set @npc_distance, 3;
+ callfunc "PCtoNPCRange";
+ if(@npc_check) end;
+ callfunc "BoardFerry";
+ end;
}
008-1,120,44,0|script|#Hurnscald NorthDock|32767
@@ -25,6 +32,11 @@
OnCommandArrive:
disablenpc "Hurnscald North Dock";
enablenpc "Hurnscald North Koga";
+ areatimer 0, "008-1", 137, 64, 141, 65, get(.warp_delay, "#FerryConfig"), strnpcinfo(0)+"::OnAreaWarp"; // warp players on dock
+ end;
+
+OnAreaWarp:
+ callfunc "BoardFerry";
end;
OnCommandWarp:
@@ -33,17 +45,30 @@ OnCommandWarp:
end;
}
-008-1,147,75,0|script|Hurnscald South Koga|395,8,3
+008-1,147,75,0|script|Hurnscald South Koga|395,10,3
{
+ set @npc_distance, 10;
+ callfunc "PCtoNPCRange";
+ if(@npc_check) end;
callfunc "BoardCandorFerry";
- close;
+ end;
+
+OnTouch:
+ addtimer get(.warp_delay, "#FerryConfig"), strnpcinfo(0)+"::OnBoard";
+ end;
+
+OnBoard:
+ callfunc "BoardCandorFerry";
+ end;
}
-008-1,139,76,0|script|Hurnscald South Dock|400,3,3
+008-1,139,76,0|script|Hurnscald South Dock|400,2,1
{
- set @DockNumber, 1;
- callfunc "FerryManifest";
- close;
+ set @npc_distance, 3;
+ callfunc "PCtoNPCRange";
+ if(@npc_check) end;
+ callfunc "BoardCandorFerry";
+ end;
}
008-1,65,25,0|script|#Hurnscald SouthDock|32767
@@ -52,6 +77,11 @@ OnCommandWarp:
OnCommandArrive:
disablenpc "Hurnscald South Dock";
enablenpc "Hurnscald South Koga";
+ areatimer 0, "008-1", 137, 75, 141, 76, get(.warp_delay, "#FerryConfig"), strnpcinfo(0)+"::OnAreaWarp"; // warp players on dock
+ end;
+
+OnAreaWarp:
+ callfunc "BoardCandorFerry";
end;
OnCommandWarp:
diff --git a/world/map/npc/009-1/_import.txt b/world/map/npc/009-1/_import.txt
index 6c27b6c5..2e6b551f 100644
--- a/world/map/npc/009-1/_import.txt
+++ b/world/map/npc/009-1/_import.txt
@@ -5,7 +5,6 @@ npc: npc/009-1/_mobs.txt
npc: npc/009-1/_nodes.txt
npc: npc/009-1/_warps.txt
npc: npc/009-1/constable.txt
-npc: npc/009-1/dock.txt
npc: npc/009-1/guide.txt
npc: npc/009-1/jack.txt
npc: npc/009-1/mapflags.txt
diff --git a/world/map/npc/009-1/dock.txt b/world/map/npc/009-1/dock.txt
deleted file mode 100644
index fab8f3d0..00000000
--- a/world/map/npc/009-1/dock.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-// Ferry Sign
-
-009-1,46,34,0|script|FerrySchedule#4|397
-{
- callfunc "FerryManifest";
- end;
-}
-
diff --git a/world/map/npc/020-1/_import.txt b/world/map/npc/020-1/_import.txt
index a48fad5d..dec7f1d5 100644
--- a/world/map/npc/020-1/_import.txt
+++ b/world/map/npc/020-1/_import.txt
@@ -5,7 +5,6 @@ npc: npc/020-1/KrickKrackKrock.txt
npc: npc/020-1/_mobs.txt
npc: npc/020-1/_nodes.txt
npc: npc/020-1/_warps.txt
-npc: npc/020-1/dock.txt
npc: npc/020-1/mapflags.txt
npc: npc/020-1/rockscissor.txt
npc: npc/020-1/soul-menhir.txt
diff --git a/world/map/npc/020-1/dock.txt b/world/map/npc/020-1/dock.txt
deleted file mode 100644
index 46d7de73..00000000
--- a/world/map/npc/020-1/dock.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-// Ferry Sign
-020-1,81,76,0|script|Ferry Schedule#7|398
-{
- callfunc "FerryManifest";
- end;
-}
diff --git a/world/map/npc/029-1/dock.txt b/world/map/npc/029-1/dock.txt
index 0252368b..fcb27b6c 100644
--- a/world/map/npc/029-1/dock.txt
+++ b/world/map/npc/029-1/dock.txt
@@ -1,23 +1,29 @@
// The ferry dock
-// Ferry Sign
-029-1,43,104,0|script|Ferry Schedule#8|397
+029-1,46,111,0|script|Candor Dock|400,1,0
{
- callfunc "FerryManifest";
+ set @npc_distance, 1;
+ callfunc "PCtoNPCRange";
+ if(@npc_check) end;
+ callfunc "BoardCandorFerry";
end;
-}
-029-1,46,110,0|script|Candor Dock|400,3,3
-{
- set @DockNumber, 1;
- callfunc "FerryManifest";
- close;
+OnTouch:
+ addtimer get(.warp_delay, "#FerryConfig"), strnpcinfo(0)+"::OnBoard";
+ end;
+
+OnBoard:
+ callfunc "BoardCandorFerry";
+ end;
}
-029-1,51,118,0|script|Candor Koga|395,8,8
+029-1,51,118,0|script|Candor Koga|395,8,7
{
+ set @npc_distance, 8;
+ callfunc "PCtoNPCRange";
+ if(@npc_check) end;
callfunc "BoardCandorFerry";
- close;
+ end;
}
029-1,55,110,0|script|#CandorDock|32767
@@ -26,6 +32,11 @@
OnCommandArrive:
disablenpc "Candor Dock";
enablenpc "Candor Koga";
+ areatimer 0, "029-1", 39, 111, 53, 113, get(.warp_delay, "#FerryConfig"), strnpcinfo(0)+"::OnAreaWarp"; // warp players on dock
+ end;
+
+OnAreaWarp:
+ callfunc "BoardCandorFerry";
end;
OnCommandWarp:
diff --git a/world/map/npc/031-1/dock.txt b/world/map/npc/031-1/dock.txt
index a2f19941..1904487e 100644
--- a/world/map/npc/031-1/dock.txt
+++ b/world/map/npc/031-1/dock.txt
@@ -1,23 +1,26 @@
// The ferry dock
-// Ferry Sign
-031-1,95,107,0|script|Ferry Schedule#6|398
+031-1,110,108,0|script|Nivalis Koga|395,12,2
{
- callfunc "FerryManifest";
+ callfunc "BoardFerry";
end;
-}
-031-1,110,108,0|script|Nivalis Koga|395,6,2
-{
+OnTouch:
+ addtimer get(.warp_delay, "#FerryConfig"), strnpcinfo(0)+"::OnBoard";
+ end;
+
+OnBoard:
callfunc "BoardFerry";
- close;
+ end;
}
-031-1,99,109,0|script|Nivalis Dock|400,3,3
+031-1,99,109,0|script|Nivalis Dock|400,2,1
{
- set @DockNumber, 2;
- callfunc "FerryManifest";
- close;
+ set @npc_distance, 3;
+ callfunc "PCtoNPCRange";
+ if(@npc_check) end;
+ callfunc "BoardFerry";
+ end;
}
031-1,100,100,0|script|#NivalisDock|32767
@@ -27,6 +30,11 @@
OnCommandArrive:
disablenpc "Nivalis Dock";
enablenpc "Nivalis Koga";
+ areatimer 0, "031-1", 97, 108, 108, 110, get(.warp_delay, "#FerryConfig"), strnpcinfo(0)+"::OnAreaWarp"; // warp players on dock
+ end;
+
+OnAreaWarp:
+ callfunc "BoardFerry";
end;
OnCommandWarp:
diff --git a/world/map/npc/functions/ferry.txt b/world/map/npc/functions/ferry.txt
index 6cda12a7..5f9e57f7 100644
--- a/world/map/npc/functions/ferry.txt
+++ b/world/map/npc/functions/ferry.txt
@@ -18,9 +18,10 @@ OnInit:
setarray $@CandorDocks$, "Candor", "Hurnscald South";
donpcevent "#"+$@MainDocks$[$@MainCurrentDock]+"Dock::OnCommandArrive";
donpcevent "#"+$@CandorDocks$[$@CandorCurrentDock]+"Dock::OnCommandArrive";
+ set .warp_delay, 430;
if (debug >= 2) end;
initnpctimer;
- end;
+ goto L_k1city2;
L_NextDock:
set $@MainLastDock, $@MainCurrentDock;
@@ -99,64 +100,39 @@ function|script|FerryHelp
mes "\"We also have some slot machines in case you get bored.\"";
return;
}
-function|script|FerryManifest
-{
- if (@DockNumber == 1) goto L_CandorFerry;
- if (@DockNumber == 2) goto L_WorldFerry;
- mes "Which Ferry do you want to check the schedule for?";
- menu
- "World Ferry.", L_WorldFerry,
- "Candor Ferry.", L_CandorFerry;
-
-L_CandorFerry:
- mes "The ferry is currently at "+$@CandorDocks$[$@CandorCurrentDock];
- set @NextDock, ($@CandorCurrentDock + 1);
- if(@NextDock == getarraysize($@CandorDocks$))
- set @NextDock, 0;
- mes "The ferry will be arriving at "+$@CandorDocks$[@NextDock]+" next";
- next;
- goto L_Close;
-
-L_WorldFerry:
- mes "The ferry is currently at "+$@MainDocks$[$@MainCurrentDock];
- set @NextDock, ($@MainCurrentDock + 1);
- if(@NextDock == getarraysize($@MainDocks$))
- set @NextDock, 0;
- mes "The ferry will be arriving at "+$@MainDocks$[@NextDock]+" next";
- next;
- goto L_Close;
-
-L_Close:
- close2;
- return;
-}
function|script|BoardFerry
{
- mes "Board the ferry?";
- menu
- "Yes.", L_Board,
- "No.", L_Return;
+ if ($@MainCurrentDock == 0 && getmap() == "008-1") goto L_Board;
+ elif ($@MainCurrentDock == 1 && getmap() == "031-1") goto L_Board;
+ elif ($@MainCurrentDock == 2 && getmap() == "001-1") goto L_Board;
+
+ set @NextDock, $@MainCurrentDock + 1;
+ if(@NextDock == getarraysize($@MainDocks$)) set @NextDock, 0;
+ message strcharinfo(0),
+ "Ferry : ##3The ferry is currently at ##B"+$@MainDocks$[$@MainCurrentDock]+"##b. "
+ +"It will be arriving at ##B"+$@MainDocks$[@NextDock]+"##b next.";
+ return;
L_Board:
- close2;
- warp "035-2",39,29;
- goto L_Return;
-
-L_Return:
+ warp "035-2",32,29;
return;
}
function|script|BoardCandorFerry
{
- mes "Board the ferry?";
- menu
- "Yes.", L_Board,
- "No.", L_Return;
+ if ($@CandorCurrentDock == 0 && getmap() == "029-1") goto L_Board;
+ elif ($@CandorCurrentDock == 1 && getmap() == "008-1") goto L_Board;
+
+ set @NextDock, $@CandorCurrentDock + 1;
+ if(@NextDock == getarraysize($@CandorDocks$)) set @NextDock, 0;
+ message strcharinfo(0),
+ "Ferry : ##3The ferry is currently at ##B"+$@CandorDocks$[$@CandorCurrentDock]+"##b. "
+ +"It will be arriving at ##B"+$@CandorDocks$[@NextDock]+"##b next.";
+ return;
L_Board:
- close2;
- warp "036-2",39,29;
+ warp "036-2",32,29;
goto L_Return;
L_Return: