From 138adf72d498e17d071cc3de33119339879c9442 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 14 Jan 2022 09:36:03 -0300 Subject: Instance Porthos and add placeholder NPC --- npc/functions/aurora.txt | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'npc/functions') diff --git a/npc/functions/aurora.txt b/npc/functions/aurora.txt index bbb707b40..af0592bcd 100644 --- a/npc/functions/aurora.txt +++ b/npc/functions/aurora.txt @@ -606,7 +606,7 @@ function script FYE_Olympics_MX { function script FYE_Olympics_CH { if ($EVENT$ != "Olympics") return; - // FIXME: Change based on using different verbs/adjectives? + // TODO: Change based on using different verbs/adjectives? FYMOLY_CHANTI += 1; setq Q_AuroraEvent, getq2(Q_AuroraEvent) + 1; return; @@ -626,8 +626,19 @@ function script FYE_Olympics_AL { function script FYE_Olympics_TO { if ($EVENT$ != "Olympics") return false; - // FIXME: Instancing - warp "001-14", 92, 90; + .@m$ = "moly@"+getcharid(0); + if (instanceowner(@olympics) != getcharid(3)) { + .@id = instance_create("moly@"+getcharid(0), getcharid(3), IOT_CHAR); + if (.@id < 0) return false; + .@mp$ = instance_attachmap("001-14", .@id, 0, .@m$); + @olympics = .@id; + // It'll be self-destroyed when time runs out (30 minutes) + instance_set_timeout(1800, 1800, .@id); + instance_init(.@id); + } else { + instance_set_timeout(1800, 1800, @olympics); + } + warp .@m$, 92, 90; return true; } @@ -704,7 +715,7 @@ function script FYE_Submit { // Stops any Aurora Event function script FYStopEvent { - setarray .@av$, "Kamelot", "Regnum", "Expo", "Fishing", "Candor", "Mining", "Tower", "Raid"; + setarray .@av$, "Kamelot", "Regnum", "Expo", "Fishing", "Candor", "Mining", "Tower", "Raid", "Olympics"; if (array_find(.@av$, $EVENT$) >= 0) { sClear(); $EVENT$=""; -- cgit v1.2.3-60-g2f50