summaryrefslogtreecommitdiff
path: root/npc/functions/event.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-10-10 22:48:39 -0300
committerJesusaves <cpntb1@ymail.com>2021-10-10 22:48:39 -0300
commit5afdb139fb1adbc843acd68493da0627623cdb73 (patch)
tree3fb012f2ba04d5b6ebc4aea14238f059417015f6 /npc/functions/event.txt
parentf28f5ea283b8972320f470a3b9b3d5138c7049c5 (diff)
downloadserverdata-5afdb139fb1adbc843acd68493da0627623cdb73.tar.gz
serverdata-5afdb139fb1adbc843acd68493da0627623cdb73.tar.bz2
serverdata-5afdb139fb1adbc843acd68493da0627623cdb73.tar.xz
serverdata-5afdb139fb1adbc843acd68493da0627623cdb73.zip
Thanksgiving special event
Diffstat (limited to 'npc/functions/event.txt')
-rw-r--r--npc/functions/event.txt43
1 files changed, 43 insertions, 0 deletions
diff --git a/npc/functions/event.txt b/npc/functions/event.txt
index 72e854429..7ba1e802c 100644
--- a/npc/functions/event.txt
+++ b/npc/functions/event.txt
@@ -363,6 +363,48 @@ OnBossDie:
end;
}
+- script sThankAeros NPC_HIDDEN,{
+OnInit:
+ .users=getusers(1);
+ .score=0;
+ .event=0;
+OnTimer90000:
+ if ($EVENT$ != "Thanksgiving")
+ end;
+ .users=getusers(1);
+ .score+=.users;
+
+ // Abort event and reset score
+ if (.event && .event < gettimetick(2)) {
+ .event=0;
+ .score=0;
+ $@GM_EVENT=0;
+ $@MK_SCENE=MK_NONE;
+ killmonsterall("001-1");
+ mapwarp("001-1", "000-1", 22, 22, 0);
+ announce ("The event is over!"), bc_all|bc_npc;
+ }
+
+ // Do event (lasts 30 minutes)
+ if (!.event && !$@MK_SCENE && .score > 300 && .users > 3) {
+ /* Reserve Aeros */
+ $@MK_SCENE=MK_LOCKED;
+ /* Setup the event */
+ $@AEROS_SPWN=(.users > 6 ? 2 : any(0, 1));
+ $@AEROS_AUTOSPAWN=.users+rand2(1, .users);
+ donpcevent("Mana Being#001-1::OnAutoSched");
+ /* Open the event */
+ $@GM_EVENT = 2;
+ .event = gettimetick(2) + 1800;
+ announce ("The mana bridge to Aeros is open! To participate on event, talk to ##BSoul Menhir##b!"), bc_all|bc_npc;
+ announce ("##1THANKSGIVING SPECIAL. TIME LIMIT: ##B30 MINUTES.##b##0"), bc_all|bc_npc;
+ channelmes("#world", "An event is happening on Aeros! Hurry up!");
+ }
+
+ initnpctimer;
+ end;
+}
+
function script sThanksgiving {
// Variables:
// #THANKS_DAY
@@ -966,6 +1008,7 @@ OnClock0000:
if ($EVENT$ != "")
FYStopEvent();
$EVENT$="Thanksgiving";
+ donpcevent("sThankAeros::OnTimer90000");
}
// End the event the day after
else if (.@d == .thanks_endday+1 && .@m == .thanks_endmon) {