summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/constants.conf5
-rw-r--r--npc/033-1/misc.txt59
2 files changed, 63 insertions, 1 deletions
diff --git a/db/constants.conf b/db/constants.conf
index c8f4660..8cd0b90 100644
--- a/db/constants.conf
+++ b/db/constants.conf
@@ -2229,6 +2229,11 @@ constants_db: {
HCD_MKBASEMENT: 8
HCD_MARKET: 10
+ comment__: "Porthos Events Identifiers"
+ PORTHOS_UNUSED: 0
+ PORTHOS_STDBY: 1
+ PORTHOS_BUSY: 2
+
comment__: "Mirror Lake Server Identifiers"
WORLD_ID: 1
MLP_TMW: 3
diff --git a/npc/033-1/misc.txt b/npc/033-1/misc.txt
index 50fc9de..4537c80 100644
--- a/npc/033-1/misc.txt
+++ b/npc/033-1/misc.txt
@@ -2,7 +2,7 @@
// Author:
// Jesusalva
// Description:
-// Guild House
+// Guild House & Warps
033-1,134,79,0 script #GDoor NPC_NO_SPRITE,0,0,{
end;
@@ -36,3 +36,60 @@ OnTouch:
}
+
+
+
+
+
+function script SetPorthosPortal {
+ .@id = getarg(0);
+ mesn l("Portal %02d", .@id);
+ mes l("Do you want to activate an event?");
+ next;
+ select
+ l("Cancel");
+ mes "";
+ switch (@menu) {
+ default:
+ mes l("Ok.");
+ break;
+ }
+ close;
+ return;
+}
+
+
+033-1,72,190,0 script #Porthos01 NPC_NO_SPRITE,0,0,{
+ end;
+OnTouch:
+ if ($@EVENT_01 == PORTHOS_BUSY) {
+ dispbottom l("This portal is currently busy - an event must be in progress.");
+ end;
+ }
+ if ($@EVENT_01 == PORTHOS_UNUSED) {
+ if (is_admin() || is_master())
+ SetPorthosPortal(1);
+ dispbottom l("This portal is not currently active.");
+ end;
+ }
+ warp $@EVENT_01_M$, $@EVENT_01_X, $@EVENT_01_Y;
+ end;
+}
+
+033-1,44,160,0 script #Porthos02 NPC_NO_SPRITE,0,0,{
+ end;
+OnTouch:
+ if ($@EVENT_02 == PORTHOS_BUSY) {
+ dispbottom l("This portal is currently busy - an event must be in progress.");
+ end;
+ }
+ if ($@EVENT_02 == PORTHOS_UNUSED) {
+ if (is_admin() || is_master())
+ SetPorthosPortal(2);
+ dispbottom l("This portal is not currently active.");
+ end;
+ }
+ warp $@EVENT_02_M$, $@EVENT_02_X, $@EVENT_02_Y;
+ end;
+}
+