summaryrefslogtreecommitdiff
path: root/npc/functions/aurora.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-06-23 06:47:53 -0300
committerJesusaves <cpntb1@ymail.com>2020-06-23 06:47:53 -0300
commite2695c3f7ff02533f6911fdbb03bf0f507386f35 (patch)
tree22e1cd9ae24891a60f59d1dc414cad7e66c455d3 /npc/functions/aurora.txt
parent205f482cfd70eb95441fa71937ddc53f912b1012 (diff)
downloadserverdata-e2695c3f7ff02533f6911fdbb03bf0f507386f35.tar.gz
serverdata-e2695c3f7ff02533f6911fdbb03bf0f507386f35.tar.bz2
serverdata-e2695c3f7ff02533f6911fdbb03bf0f507386f35.tar.xz
serverdata-e2695c3f7ff02533f6911fdbb03bf0f507386f35.zip
Mining Union's Research Request Aurora Event
Diffstat (limited to 'npc/functions/aurora.txt')
-rw-r--r--npc/functions/aurora.txt75
1 files changed, 61 insertions, 14 deletions
diff --git a/npc/functions/aurora.txt b/npc/functions/aurora.txt
index 363d33312..a55aa0107 100644
--- a/npc/functions/aurora.txt
+++ b/npc/functions/aurora.txt
@@ -56,6 +56,7 @@ function script FYNewEvent {
DelItemFromEveryPlayer(EventTreasure2);
DelItemFromEveryPlayer(EventTreasure3);
DelItemFromEveryPlayer(EventFish);
+ DelItemFromEveryPlayer(EventOre);
// Select the event
switch ($FYEVENT_CYCLE % 12) {
case 1:
@@ -83,10 +84,9 @@ function script FYNewEvent {
kamibroadcast("Kamelot Season is now open!", "Aurora Events");
break;
case 6:
- // FIXME: PLACEHOLDER
- $EVENT$="Expo";
- callfunc("FYEConf_Expo");
- kamibroadcast("World Expo is now open!", "Aurora Events");
+ $EVENT$="Mining";
+ callfunc("FYEConf_Mining");
+ kamibroadcast("Minion Union's Research Request is now open!", "Aurora Events");
break;
case 7:
// FIXME: PLACEHOLDER
@@ -96,9 +96,9 @@ function script FYNewEvent {
break;
case 8:
// FIXME: PLACEHOLDER
- $EVENT$="Fishing";
- callfunc("FYEConf_Fishing");
- kamibroadcast("Catch the Golden Fish is now open!", "Aurora Events");
+ $EVENT$="Expo";
+ callfunc("FYEConf_Expo");
+ kamibroadcast("World Expo is now open!", "Aurora Events");
break;
case 9:
// FIXME: PLACEHOLDER
@@ -107,9 +107,9 @@ function script FYNewEvent {
break;
case 10:
// FIXME: PLACEHOLDER
- $EVENT$="Expo";
- callfunc("FYEConf_Expo");
- kamibroadcast("World Expo is now open!", "Aurora Events");
+ $EVENT$="Fishing";
+ callfunc("FYEConf_Fishing");
+ kamibroadcast("Catch the Golden Fish is now open!", "Aurora Events");
break;
case 11:
// FIXME: PLACEHOLDER
@@ -119,9 +119,9 @@ function script FYNewEvent {
break;
case 12:
// FIXME: PLACEHOLDER
- $EVENT$="Fishing";
- callfunc("FYEConf_Fishing");
- kamibroadcast("Catch the Golden Fish is now open!", "Aurora Events");
+ $EVENT$="Mining";
+ callfunc("FYEConf_Mining");
+ kamibroadcast("Minion Union's Research Request is now open!", "Aurora Events");
break;
}
donpcevent "Aurora::OnRestore";
@@ -261,6 +261,8 @@ function script FYE_Autoset {
// Modify Mob Killing
// Serves for multiple events, preserves killedrid
function script AuroraMobkill {
+ if ($EVENT$ == "Mining")
+ FYE_Mining(killedrid);
return;
}
@@ -394,6 +396,44 @@ function script FYE_Fishing {
+// Configure Mining Union Research Event
+function script FYEConf_Mining {
+ 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. 705740 pts (overflow)
+
+ FYE_Autoset();
+ $FYLOGIN_PTS=rand2(16,20);
+ return;
+}
+
+
+// Modify Bifs
+function script FYE_Mining {
+ .@mob=getarg(0, killedrid);
+ // Only ores
+ if (getmonsterinfo(.@mob, MOB_RACE) != RC_Mineral)
+ return;
+
+ // TODO: Merit-based random formula [AVG: 5] about 70pts/min
+ // TODO: Big vs Small bifs (regex OK, size OK)
+ .@ore=rand2(3, 6);
+ if (.@mob == EleniumBif)
+ .@ore-=1;
+ getitem EventOre, .@ore;
+ return;
+}
+
+
+
+
+
+
+
// "Submit" button from 003-1/events.txt
// Don't forget to enable it in npc/utils.txt as well!!
function script FYE_Submit {
@@ -426,6 +466,12 @@ function script FYE_Submit {
setq2 Q_AuroraEvent, .@pts;
delitem EventFish, countitem(EventFish);
+ } else if ($EVENT$ == "Mining") {
+ // .:: MINION UNION'S RESEARCH REQUEST EVENT ::.
+ .@pts+=countitem(EventOre)*1;
+
+ setq2 Q_AuroraEvent, .@pts;
+ delitem EventOre, countitem(EventOre);
} 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);
@@ -440,7 +486,7 @@ function script FYE_Submit {
// Stops any Aurora Event
function script FYStopEvent {
- setarray .@av$, "Kamelot", "Regnum", "Expo", "Fishing";
+ setarray .@av$, "Kamelot", "Regnum", "Expo", "Fishing", "Mining";
if (array_find(.@av$, $EVENT$) >= 0) {
sClear();
$EVENT$="";
@@ -482,6 +528,7 @@ function script FYRewardEvent {
DelItemFromEveryPlayer(EventTreasure2);
DelItemFromEveryPlayer(EventTreasure3);
DelItemFromEveryPlayer(EventFish);
+ DelItemFromEveryPlayer(EventOre);
*/
}
return;