From 8a48bf02e99874e6aaf7171d259f5f2a3e8a45e3 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 25 Jun 2023 23:30:22 -0300 Subject: Add bare minimum support for Porthos Event Portals --- npc/033-1/misc.txt | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) (limited to 'npc/033-1') 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; +} + -- cgit v1.2.3-70-g09d2