summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-01-13 20:39:39 -0300
committerJesusaves <cpntb1@ymail.com>2022-01-13 20:39:39 -0300
commitd207a260e10cc3cf54d8cd00279f6ea5fb07ed93 (patch)
treea4ae7d1b3466b87cfde8d8ec7f5a155679e3e5a1 /npc
parent3e9653011d31037238b99122b3c9dfd7b60315a4 (diff)
downloadserverdata-d207a260e10cc3cf54d8cd00279f6ea5fb07ed93.tar.gz
serverdata-d207a260e10cc3cf54d8cd00279f6ea5fb07ed93.tar.bz2
serverdata-d207a260e10cc3cf54d8cd00279f6ea5fb07ed93.tar.xz
serverdata-d207a260e10cc3cf54d8cd00279f6ea5fb07ed93.zip
Add some groundwork for Magic Olympics
Diffstat (limited to 'npc')
-rw-r--r--npc/config/magic.txt1
-rw-r--r--npc/craft/alchemy.txt1
-rw-r--r--npc/functions/aurora.txt92
-rw-r--r--npc/functions/hub.txt1
-rw-r--r--npc/functions/news.txt9
-rw-r--r--npc/functions/util.txt2
6 files changed, 105 insertions, 1 deletions
diff --git a/npc/config/magic.txt b/npc/config/magic.txt
index 8a1f98e28..107db1c51 100644
--- a/npc/config/magic.txt
+++ b/npc/config/magic.txt
@@ -67,6 +67,7 @@ function script GetManaExp {
// Update Magic EXP
MAGIC_EXP=MAGIC_EXP+.@pt+.@bonus;
+ callfunc "FYE_Olympics_MX", (.@pt + .@bonus);
return;
}
diff --git a/npc/craft/alchemy.txt b/npc/craft/alchemy.txt
index 331ed1abf..ec268006b 100644
--- a/npc/craft/alchemy.txt
+++ b/npc/craft/alchemy.txt
@@ -51,6 +51,7 @@ function script AlchemySystem {
}
.@s=usecraft(.@craft);
.@i++;
+ callfunc "FYE_Olympics_AL";
// Exploiting?!
if (!.@s)
break;
diff --git a/npc/functions/aurora.txt b/npc/functions/aurora.txt
index 7937e1b06..fed63e8f8 100644
--- a/npc/functions/aurora.txt
+++ b/npc/functions/aurora.txt
@@ -75,6 +75,21 @@ function script FYNewEvent {
DelChrRegFromEveryPlayer("DTOWER_ROLL");
DelChrRegFromEveryPlayer("DTOWER_FLOOR");
DelChrRegFromEveryPlayer("FYRAID_LV");
+ // Olympics are costlier: Clean less often
+ if ($FYEVENT_CYCLE % 12 == 1) {
+ DelChrRegFromEveryPlayer("FYMOLY_ENBALL");
+ DelChrRegFromEveryPlayer("FYMOLY_ICBOSS");
+ DelChrRegFromEveryPlayer("FYMOLY_FLUFFY");
+ DelChrRegFromEveryPlayer("FYMOLY_CHANTI");
+ DelChrRegFromEveryPlayer("FYMOLY_ALCHMY");
+ DelChrRegFromEveryPlayer("FYMOLY_MPWLVL");
+ DelChrRegFromEveryPlayer("FYMOLY_MANAXP");
+ DelChrRegFromEveryPlayer("FYMOLY_RACERS");
+ DelChrRegFromEveryPlayer("FYMOLY_HOCUSM");
+ DelChrRegFromEveryPlayer("FYMOLY_SURVIV");
+ DelChrRegFromEveryPlayer("FYMOLY_FRIEND");
+ DelChrRegFromEveryPlayer("FYMOLY_SPAMMY");
+ }
deletearray $FYRAID_OWNER;
deletearray $FYRAID_TIME;
deletearray $FYRAID_HP;
@@ -538,6 +553,80 @@ function script FYE_Mining {
+// Configure Magic Olympics
+function script FYEConf_Olympics {
+ setarray $FYREWARD_PT, 100, 220, 440, 880, 1320,
+ 1760, 2640, 3520, 5275, 7040,
+ 10560, 14080, 21120, 28160, 35200,
+ 42240, 57000, 70400, 85000, 112640,
+ 140800, 169000, 197120, 225300, 281160,
+ 337920, 394240, 450560, 550000, 675000;
+ // PS. Max Est. ? pts
+
+ FYE_Autoset();
+ $FYLOGIN_PTS=0;
+ return;
+}
+
+
+// Modify Magic Skills
+function script FYE_Olympics_SK {
+ if ($EVENT$ != "Olympics") return;
+ .@sk=getarg(0, @skillId);
+ .@sl=getarg(1, @skillLevel);
+ .@st=getarg(2, @skillTarget);
+
+ .@cl = $@MSK_CLASS[.@sk];
+
+ // Supportive
+ if (.@cl == CLASS_SCHOLARSHIP &&
+ .@st != getcharid(3) &&
+ .@st > 1 &&
+ .@sk != SM_PROVOKE &&
+ .@sk != EVOL_AREA_PROVOKE)
+ FMOLY_FRIEND += 1;
+
+ // Generic
+ FYMOLY_SPAMMY += .@sl;
+ setq Q_AuroraEvent, getq2(Q_AuroraEvent) + rand2(.@sl + 1);
+ return;
+}
+
+// Modify Mana EXP Gain
+function script FYE_Olympics_MX {
+ if ($EVENT$ != "Olympics") return;
+ .@var=getarg(0, 0);
+
+ FMOLY_MANAXP += .@var;
+ setq Q_AuroraEvent, getq2(Q_AuroraEvent) + rand2(.@var + 1);
+ return;
+}
+
+// Count Chanting Usage
+function script FYE_Olympics_CH {
+ if ($EVENT$ != "Olympics") return;
+
+ // FIXME: Change based on using different verbs/adjectives?
+ FYMOLY_CHANTI += 1;
+ setq Q_AuroraEvent, getq2(Q_AuroraEvent) + 1;
+ return;
+}
+
+// Count Alchemy Usage
+function script FYE_Olympics_AL {
+ if ($EVENT$ != "Olympics") return;
+
+ .@units = getarg(0, 1);
+ FYMOLY_ALCHMY += .@units;
+ setq Q_AuroraEvent, getq2(Q_AuroraEvent) + .@units;
+ return;
+}
+
+
+
+
+
+
// "Submit" button from 003-1/events.txt
// Don't forget to enable it in npc/utils.txt as well!!
@@ -589,6 +678,9 @@ function script FYE_Submit {
setq2 Q_AuroraEvent, .@pts;
delitem EventNaftalin, countitem(EventNaftalin);
+ } else if ($EVENT$ == "Olympics") {
+ // .:: MAGIC OLYMPICS ::.
+ // Handled separately
} else {
// Wut? This is not an Aurora Event
Exception($EVENT$+" is NOT a valid Aurora Event; Misdefinition.\n\nPlease ensure that it is defined in utils, aurora, news, and command/event.\n\nFYE_Submit - FYEventUsesRanking - FYE_* - FYEConf_* - FYStopEvent", RB_DEFAULT|RB_ISFATAL);
diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt
index 4a33df300..c449e2904 100644
--- a/npc/functions/hub.txt
+++ b/npc/functions/hub.txt
@@ -509,6 +509,7 @@ function script HUB_SkillInvoke {
// Record to database
skillInvoke[@skillId] = skillInvoke[@skillId] + 1;
+ callfunc "FYE_Olympics_SK";
// Script-based skills
/* *********************************************************************** */
diff --git a/npc/functions/news.txt b/npc/functions/news.txt
index 1b1e51ae2..a1b999a07 100644
--- a/npc/functions/news.txt
+++ b/npc/functions/news.txt
@@ -306,6 +306,15 @@ function script EventHelp {
mes l("Collect their %s as well, so our wizards can do their magic!", getitemlink(EventNaftalin));
mesc l("Location: The Mana Plane, Showdown Chamber"), 3;
/////////////////////////////////////////////////////////////////////////
+ } else if ($EVENT$ == "Olympics") {
+ mesc ".:: " + l("Magic Olympics") + " ::.", 2;
+ mes "";
+ mes l("The Magic Olympics are held by the Academy Grand Masters roughly quarterly, and allow the brightest mages to acquire scholarships at the Magic Academy.");
+ mes l("Only one vouch can be acquired, and you cannot be vouched to Grand Master position. You need to have touched the Mana Stone to participate.");
+ mes "";
+ mes l("Talk to Hocus in Porthos (via Menhir) to enroll.");
+ mesc l("Location: The Mana Plane, Porthos"), 3;
+ /////////////////////////////////////////////////////////////////////////
} else {
mesc l("There's no help available for this event.");
/////////////////////////////////////////////////////////////////////////
diff --git a/npc/functions/util.txt b/npc/functions/util.txt
index 67d14bbea..0cc280f09 100644
--- a/npc/functions/util.txt
+++ b/npc/functions/util.txt
@@ -694,7 +694,7 @@ function script islegendary {
// Returns if an event is a ranked Aurora Event or not
// (Had to be moved from functions/aurora.txt)
function script FYEventUsesRanking {
- setarray .@av$, "Expo", "Fishing", "Mining", "Tower", "Raid";
+ setarray .@av$, "Expo", "Fishing", "Mining", "Tower", "Raid", "Olympics";
if (array_find(.@av$, $EVENT$) >= 0) {
return true;
}