diff options
-rw-r--r-- | db/re/item_db.conf | 16 | ||||
-rw-r--r-- | npc/functions/aurora.txt | 75 | ||||
-rw-r--r-- | npc/functions/news.txt | 13 | ||||
-rw-r--r-- | npc/functions/util.txt | 2 |
4 files changed, 91 insertions, 15 deletions
diff --git a/db/re/item_db.conf b/db/re/item_db.conf index 35200bf17..8959adc7d 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -5403,6 +5403,22 @@ item_db: ( noauction: true } }, +{ + Id: 921 + AegisName: "EventOre" + Name: "Mysterious Ore" + Type: "IT_ETC" + Buy: 0 + Sell: 0 + Weight: 0 + Trade: { + notrade: true + nodrop: true + noselltonpc: true + nomail: true + noauction: true + } +}, // <!-- Necklaces --> 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; diff --git a/npc/functions/news.txt b/npc/functions/news.txt index 18001b671..b6eb85d2c 100644 --- a/npc/functions/news.txt +++ b/npc/functions/news.txt @@ -498,6 +498,19 @@ function script EventHelp { mes l("Catch the golden fish swarm!"); mesc l("Location: Fishing spots in the water."), 3; ///////////////////////////////////////////////////////////////////////// + } else if ($EVENT$ == "Mining") { + mesc ".:: " + l("Miners Union Research Request!") + " ::.", 2; + mes ""; + mes l("While mining bifs, a strange powder appeared."); + mes l("The effects and uses - if any - are still unknown."); + mes ""; + mes l("The Miners Union is trying to research this powder."); + mes l("A reward is promised to those whom cooperate."); + mes l("Collaborate by giving this powder to Aurora, before it vanishes!"); + mes ""; + mes l("Mysterious Powder expires after some time!"); + mesc l("Location: All bifs in the world."), 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 45aa5fb7a..dbe80e46e 100644 --- a/npc/functions/util.txt +++ b/npc/functions/util.txt @@ -608,7 +608,7 @@ function script alignment { // 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"; + setarray .@av$, "Expo", "Fishing", "Mining"; if (array_find(.@av$, $EVENT$) >= 0) { return true; } |