summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-05-15 13:32:08 -0300
committerJesusaves <cpntb1@ymail.com>2020-05-15 13:32:08 -0300
commitd7f6e0bb3763e539da515747e06be73f3e9e6da6 (patch)
treebcd222c29cbdf041a901deba86ae0efe1cf39ebc /npc
parent97bc720f46e3151a7e1ad6b3134d6c04cbfda469 (diff)
downloadserverdata-d7f6e0bb3763e539da515747e06be73f3e9e6da6.tar.gz
serverdata-d7f6e0bb3763e539da515747e06be73f3e9e6da6.tar.bz2
serverdata-d7f6e0bb3763e539da515747e06be73f3e9e6da6.tar.xz
serverdata-d7f6e0bb3763e539da515747e06be73f3e9e6da6.zip
Why aurora function file was excluded? D:
Diffstat (limited to 'npc')
-rw-r--r--npc/functions/aurora.txt81
1 files changed, 81 insertions, 0 deletions
diff --git a/npc/functions/aurora.txt b/npc/functions/aurora.txt
new file mode 100644
index 000000000..a6be801c3
--- /dev/null
+++ b/npc/functions/aurora.txt
@@ -0,0 +1,81 @@
+// TMW2 scripts.
+// Authors:
+// Jesusalva
+// Description:
+// AURORA EVENT FRAMEWORK
+// Previously known as FY:Event System
+//
+// Controls weekly events so Saulc, seeds and I can take vacations.
+// See also: seasons.txt, command/event.txt, event.txt, 003-1/events.txt
+// soulmenhir.txt and, of course, the event maps (if any).
+// Aurora Event Framework functions are called by event.txt
+// specs override and is overriden by those defined in commands/event.txt
+
+// AEF: BEGIN
+function script FYNewEvent {
+ debugmes "\033[1mFY event is set to happen...";
+ $FYEVENT_CYCLE+=1;
+ // Overrides standard event system
+ $EVENT$="";
+ switch ($FYEVENT_CYCLE % 12) {
+ case 1:
+ $EVENT$="Kamelot";
+ kamibroadcast("Kamelot Season is now open!", "Aurora Events");
+ break;
+ case 2:
+ break;
+ case 3:
+ break;
+ case 4:
+ break;
+ case 5:
+ break;
+ case 6:
+ break;
+ case 7:
+ break;
+ case 8:
+ break;
+ case 9:
+ break;
+ case 10:
+ break;
+ case 11:
+ break;
+ case 12:
+ break;
+ }
+ return;
+}
+
+// Modify Kamelot
+function script FYE_Kamelot {
+ .@g=getcharid(2);
+ if ($@FYE_KAMELOT[.@g] != gettimeparam(GETTIME_DAYOFMONTH)) {
+ mesc l("Kamelot Season is open!");
+
+ // Instance still exists
+ if (instanceowner($@KAMELOT_ID[.@g]) == .@g) {
+ mesc l("However, your guild just challenged Kamelot Dungeons.");
+ mesc l("Please wait a while.");
+ return false;
+ }
+ mesc l("Should we?");
+ next;
+ if (askyesno() == ASK_NO)
+ return false;
+
+ // Someone began while you waited
+ if (instanceowner($@KAMELOT_ID[.@g]) == .@g)
+ return true;
+
+ // Begin
+ callfunc("KamelotCleanup", .@g);
+ $@FYE_KAMELOT[.@g] = gettimeparam(GETTIME_DAYOFMONTH);
+ mesc l("Have fun!");
+ next;
+ return true;
+ }
+ return false;
+}
+