diff --git a/CloudStorage/DefaultGame.ini b/CloudStorage/DefaultGame.ini index b363b5a..9aa26c5 100644 --- a/CloudStorage/DefaultGame.ini +++ b/CloudStorage/DefaultGame.ini @@ -20,3 +20,6 @@ bIsAthenaGlobalChatEnabled=true # Battle royale global chat. +FrontEndPlaylistData=(PlaylistName=Playlist_DefaultSquad, PlaylistAccess=(bEnabled=true, bIsDefaultPlaylist=true, bVisibleWhenDisabled=false, bDisplayAsNew=false, CategoryIndex=0, bDisplayAsLimitedTime=false, DisplayPriority=6)) +FrontEndPlaylistData=(PlaylistName=Playlist_PlaygroundV2, PlaylistAccess=(bEnabled=true, bIsDefaultPlaylist=false, bVisibleWhenDisabled=false, bDisplayAsNew=false, CategoryIndex=2, bDisplayAsLimitedTime=false, DisplayPriority=16)) +FrontEndPlaylistData=(PlaylistName=Playlist_Campaign, PlaylistAccess=(bEnabled=true, bInvisibleWhenEnabled=true)) + +[/Script/FortniteGame.FortOnlineAccount] +bEnableEulaCheck=false diff --git a/Config/config.ini b/Config/config.ini index 7e19f6f..eaf1335 100644 --- a/Config/config.ini +++ b/Config/config.ini @@ -18,4 +18,55 @@ bAllSTWEventsActivated=false # IP the matchmaker will use upon join. ip=127.0.0.1 # PORT the matchmaker will use upon join. -port=7777 \ No newline at end of file +port=7777 + +[Events] +# All dates must be specified using ISO date format only (UTC). +# *Requires a Gameserver connected to this LawinServer backend. Clients can use other backends. + +## The Rocket Start event. (v4.5 Only)* + +# If this is set to true, the event countdown will appear next to +# the Rocket and the event will start at the date below. +bEnableGeodeEvent=false +geodeEventStartDate=2020-01-01T00:00:00.000Z +# If this is set to true, the Crack will stay in the sky AFTER the event. +# The crack will fully expand after ~13.6 real days after the Rocket event start date. +bEnableCrackInTheSky=false + +## Eight mini-events which took the following objects from the map: (v4.5 Only)* +## 1. Lonely Lodge Sign, 2. Motel Sign, 3. Tomatohead Mascot, 4. NOMS Sign, 5. Durr Burger Mascot +## and brought the following objects to the map: +## 6. Ship Anchor, 7. Horse Carriage, 8. Dinosaur Skeleton. +## To see the exact locations, you can check out this video: https://youtu.be/NXL7rkiJVqM + +# If this is set to true, the blue rift effects will appear at places mentioned above. +bEnableS4OddityPrecursor=false +# If this is set to true, the mini-events will begin to start. (Adjust the options below) +bEnableS4OddityExecution=false +# Start date for the Season 4 mini-events. If you have the Rocket event enabled as +# well, then set this date to at least 4 minutes after your Rocket start date. +S4OddityEventStartDate=2020-01-01T00:00:00.000Z +# Time (in minutes) after which another mini-event (1-8) will occur. +# If set to 0, all mini-events will happen at once. +S4OddityEventsInterval=0 + +## Tomatohead Comeback mini-event. (v5.21 Only)* + +# When set to true, the blue rift effects will start appearing on +# top of the Tomato Town restaurant at the date specified below. +bEnableS5OddityPrecursor=false +S5OddityPrecursorDate=2020-01-01T00:00:00.000Z +# When set to true, Tomatohead will be rifted back to Tomato Town at the date specified below. +bEnableS5OddityExecution=false +S5OddityExecutionDate=2020-01-01T00:00:00.000Z + +## Lightning from the sky Crack and Cube Spawning Event. (v5.30 Only)* + +# When set to true, the crack will start shooting lightning bolts destroying +# cacti and eventually spawn the cube on the date specified below. +bEnableCubeLightning=false +cubeSpawnDate=2020-01-01T00:00:00.000Z + +## Blockbuster Contest winner video at Risky Reels event. (v5.30 Only)* +bEnableBlockbusterRiskyEvent=false diff --git a/README.md b/README.md index 3a14f47..e84dee3 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,7 @@ - Seasonal Quests from Season 3 up to Season 21 (Can change) - Purchasable battle pass from Season 2 to Season 10 (Can change) - Discovery Tab +- Configurable backend sided in-game events - check out the Events seciton in config.ini for more details ## How to use? 1) Install [NodeJS](https://nodejs.org/en/) diff --git a/profiles/campaign.json b/profiles/campaign.json index 4fe83a5..1ca761b 100644 --- a/profiles/campaign.json +++ b/profiles/campaign.json @@ -39202,6 +39202,374 @@ }, "quantity": 1 }, + "Schematic:SID_Assault_Bone_SR_Crystal_T05": { + "templateId": "Schematic:SID_Assault_Bone_SR_Crystal_T05", + "attributes": { + "legacy_alterations": [], + "max_level_bonus": 0, + "level": 50, + "refund_legacy_item": false, + "item_seen": true, + "alterations": [ + "", + "", + "", + "", + "", + "" + ], + "xp": 0, + "refundable": false, + "alteration_base_rarities": [], + "favorite": false + }, + "quantity": 1 + }, + "Schematic:SID_Assault_Bone_SR_Ore_T05": { + "templateId": "Schematic:SID_Assault_Bone_SR_Ore_T05", + "attributes": { + "legacy_alterations": [], + "max_level_bonus": 0, + "level": 50, + "refund_legacy_item": false, + "item_seen": true, + "alterations": [ + "", + "", + "", + "", + "", + "" + ], + "xp": 0, + "refundable": false, + "alteration_base_rarities": [], + "favorite": false + }, + "quantity": 1 + }, + "Schematic:SID_Assault_Bone_VR_Crystal_T05": { + "templateId": "Schematic:SID_Assault_Bone_VR_Crystal_T05", + "attributes": { + "legacy_alterations": [], + "max_level_bonus": 0, + "level": 50, + "refund_legacy_item": false, + "item_seen": true, + "alterations": [ + "", + "", + "", + "", + "", + "" + ], + "xp": 0, + "refundable": false, + "alteration_base_rarities": [], + "favorite": false + }, + "quantity": 1 + }, + "Schematic:SID_Assault_Bone_VR_Ore_T05": { + "templateId": "Schematic:SID_Assault_Bone_VR_Ore_T05", + "attributes": { + "legacy_alterations": [], + "max_level_bonus": 0, + "level": 50, + "refund_legacy_item": false, + "item_seen": true, + "alterations": [ + "", + "", + "", + "", + "", + "" + ], + "xp": 0, + "refundable": false, + "alteration_base_rarities": [], + "favorite": false + }, + "quantity": 1 + }, + "Schematic:SID_Pistol_Bone_Pistol_SR_Crystal_T05": { + "templateId": "Schematic:SID_Pistol_Bone_Pistol_SR_Crystal_T05", + "attributes": { + "legacy_alterations": [], + "max_level_bonus": 0, + "level": 50, + "refund_legacy_item": false, + "item_seen": true, + "alterations": [ + "", + "", + "", + "", + "", + "" + ], + "xp": 0, + "refundable": false, + "alteration_base_rarities": [], + "favorite": false + }, + "quantity": 1 + }, + "Schematic:SID_Pistol_Bone_Pistol_SR_Ore_T05": { + "templateId": "Schematic:SID_Pistol_Bone_Pistol_SR_Ore_T05", + "attributes": { + "legacy_alterations": [], + "max_level_bonus": 0, + "level": 50, + "refund_legacy_item": false, + "item_seen": true, + "alterations": [ + "", + "", + "", + "", + "", + "" + ], + "xp": 0, + "refundable": false, + "alteration_base_rarities": [], + "favorite": false + }, + "quantity": 1 + }, + "Schematic:SID_Pistol_Bone_Pistol_VR_Crystal_T05": { + "templateId": "Schematic:SID_Pistol_Bone_Pistol_VR_Crystal_T05", + "attributes": { + "legacy_alterations": [], + "max_level_bonus": 0, + "level": 50, + "refund_legacy_item": false, + "item_seen": true, + "alterations": [ + "", + "", + "", + "", + "", + "" + ], + "xp": 0, + "refundable": false, + "alteration_base_rarities": [], + "favorite": false + }, + "quantity": 1 + }, + "Schematic:SID_Pistol_Bone_Pistol_VR_Ore_T05": { + "templateId": "Schematic:SID_Pistol_Bone_Pistol_VR_Ore_T05", + "attributes": { + "legacy_alterations": [], + "max_level_bonus": 0, + "level": 50, + "refund_legacy_item": false, + "item_seen": true, + "alterations": [ + "", + "", + "", + "", + "", + "" + ], + "xp": 0, + "refundable": false, + "alteration_base_rarities": [], + "favorite": false + }, + "quantity": 1 + }, + "Schematic:SID_Shotgun_Bone_SR_Crystal_T05": { + "templateId": "Schematic:SID_Shotgun_Bone_SR_Crystal_T05", + "attributes": { + "legacy_alterations": [], + "max_level_bonus": 0, + "level": 50, + "refund_legacy_item": false, + "item_seen": true, + "alterations": [ + "", + "", + "", + "", + "", + "" + ], + "xp": 0, + "refundable": false, + "alteration_base_rarities": [], + "favorite": false + }, + "quantity": 1 + }, + "Schematic:SID_Shotgun_Bone_SR_Ore_T05": { + "templateId": "Schematic:SID_Shotgun_Bone_SR_Ore_T05", + "attributes": { + "legacy_alterations": [], + "max_level_bonus": 0, + "level": 50, + "refund_legacy_item": false, + "item_seen": true, + "alterations": [ + "", + "", + "", + "", + "", + "" + ], + "xp": 0, + "refundable": false, + "alteration_base_rarities": [], + "favorite": false + }, + "quantity": 1 + }, + "Schematic:SID_Shotgun_Bone_VR_Crystal_T05": { + "templateId": "Schematic:SID_Shotgun_Bone_VR_Crystal_T05", + "attributes": { + "legacy_alterations": [], + "max_level_bonus": 0, + "level": 50, + "refund_legacy_item": false, + "item_seen": true, + "alterations": [ + "", + "", + "", + "", + "", + "" + ], + "xp": 0, + "refundable": false, + "alteration_base_rarities": [], + "favorite": false + }, + "quantity": 1 + }, + "Schematic:SID_Shotgun_Bone_VR_Ore_T05": { + "templateId": "Schematic:SID_Shotgun_Bone_VR_Ore_T05", + "attributes": { + "legacy_alterations": [], + "max_level_bonus": 0, + "level": 50, + "refund_legacy_item": false, + "item_seen": true, + "alterations": [ + "", + "", + "", + "", + "", + "" + ], + "xp": 0, + "refundable": false, + "alteration_base_rarities": [], + "favorite": false + }, + "quantity": 1 + }, + "Schematic:SID_SMG_bone_SR_Crystal_T05": { + "templateId": "Schematic:SID_SMG_bone_SR_Crystal_T05", + "attributes": { + "legacy_alterations": [], + "max_level_bonus": 0, + "level": 50, + "refund_legacy_item": false, + "item_seen": true, + "alterations": [ + "", + "", + "", + "", + "", + "" + ], + "xp": 0, + "refundable": false, + "alteration_base_rarities": [], + "favorite": false + }, + "quantity": 1 + }, + "Schematic:SID_SMG_bone_SR_Ore_T05": { + "templateId": "Schematic:SID_SMG_bone_SR_Ore_T05", + "attributes": { + "legacy_alterations": [], + "max_level_bonus": 0, + "level": 50, + "refund_legacy_item": false, + "item_seen": true, + "alterations": [ + "", + "", + "", + "", + "", + "" + ], + "xp": 0, + "refundable": false, + "alteration_base_rarities": [], + "favorite": false + }, + "quantity": 1 + }, + "Schematic:SID_SMG_bone_VR_Crystal_T05": { + "templateId": "Schematic:SID_SMG_bone_VR_Crystal_T05", + "attributes": { + "legacy_alterations": [], + "max_level_bonus": 0, + "level": 50, + "refund_legacy_item": false, + "item_seen": true, + "alterations": [ + "", + "", + "", + "", + "", + "" + ], + "xp": 0, + "refundable": false, + "alteration_base_rarities": [], + "favorite": false + }, + "quantity": 1 + }, + "Schematic:SID_SMG_bone_VR_Ore_T05": { + "templateId": "Schematic:SID_SMG_bone_VR_Ore_T05", + "attributes": { + "legacy_alterations": [], + "max_level_bonus": 0, + "level": 50, + "refund_legacy_item": false, + "item_seen": true, + "alterations": [ + "", + "", + "", + "", + "", + "" + ], + "xp": 0, + "refundable": false, + "alteration_base_rarities": [], + "favorite": false + }, + "quantity": 1 + }, "Schematic:SID_Assault_Winter_SR_Ore_T05": { "templateId": "Schematic:SID_Assault_Winter_SR_Ore_T05", "attributes": { @@ -53277,7 +53645,7 @@ "followerslot3": "", "followerslot2": "", "followerslot1": "", - "commanderslot": "Hero:HID_Outlander_SphereFragment_SR_T05", + "commanderslot": "Hero:HID_Commando_GrenadeGun_SR_T05", "followerslot5": "", "followerslot4": "" }, @@ -53304,7 +53672,7 @@ "followerslot3": "", "followerslot2": "", "followerslot1": "", - "commanderslot": "Hero:HID_Constructor_008_SR_T05", + "commanderslot": "Hero:HID_Commando_GrenadeGun_SR_T05", "followerslot5": "", "followerslot4": "" }, @@ -53325,14 +53693,13 @@ "CampaignHeroLoadout5": { "templateId": "CampaignHeroLoadout:defaultloadout", "attributes": { - "slot_id": "a ", "team_perk": "", "loadout_name": "", "crew_members": { "followerslot3": "", "followerslot2": "", "followerslot1": "", - "commanderslot": "Hero:HID_Ninja_029_DinoNinja_SR_T05", + "commanderslot": "Hero:HID_Commando_GrenadeGun_SR_T05", "followerslot5": "", "followerslot4": "" }, @@ -53359,7 +53726,7 @@ "followerslot3": "", "followerslot2": "", "followerslot1": "", - "commanderslot": "Hero:HID_Constructor_HammerTank_SR_T05", + "commanderslot": "Hero:HID_Commando_GrenadeGun_SR_T05", "followerslot5": "", "followerslot4": "" }, @@ -53386,7 +53753,7 @@ "followerslot3": "", "followerslot2": "", "followerslot1": "", - "commanderslot": "Hero:HID_Commando_GCGrenade_SR_T05", + "commanderslot": "Hero:HID_Commando_GrenadeGun_SR_T05", "followerslot5": "", "followerslot4": "" }, @@ -53413,7 +53780,7 @@ "followerslot3": "", "followerslot2": "", "followerslot1": "", - "commanderslot": "Hero:HID_Ninja_023_SR_T05", + "commanderslot": "Hero:HID_Commando_GrenadeGun_SR_T05", "followerslot5": "", "followerslot4": "" }, @@ -53440,7 +53807,7 @@ "followerslot3": "", "followerslot2": "", "followerslot1": "", - "commanderslot": "Hero:HID_Commando_008_SR_T05", + "commanderslot": "Hero:HID_Commando_GrenadeGun_SR_T05", "followerslot5": "", "followerslot4": "" }, @@ -61031,6 +61398,28 @@ }, "quantity": 1 }, + "Hero:HID_Commando_047_Prickly_Patroller_SR_T05": { + "templateId": "Hero:HID_Commando_047_Prickly_Patroller_SR_T05", + "attributes": { + "outfitvariants": [], + "backblingvariants": [], + "gender": 0, + "level": 50, + "item_seen": true, + "squad_slot_idx": -1, + "portrait": "", + "hero_name": "DefaultHeroName", + "max_level_bonus": 0, + "squad_id": "", + "mode_loadouts": [], + "xp": 0, + "slotted_building_id": "", + "refundable": false, + "building_slot_used": -1, + "favorite": false + }, + "quantity": 1 + }, "Token:hordepointstier2": { "templateId": "Token:hordepointstier2", "attributes": { diff --git a/responses/contentpages.json b/responses/contentpages.json index f1c6932..cdf1a4b 100644 --- a/responses/contentpages.json +++ b/responses/contentpages.json @@ -6284,7 +6284,8 @@ "_noIndex": false, "_activeDate": "2019-08-21T15:59:59.342Z", "lastModified": "2019-10-29T13:07:27.936Z", - "_locale": "en-US" + "_locale": "en-US", + "_templateName": "FortniteGameDynamicBackgrounds" }, "creativenews": { "news": { diff --git a/structure/discovery.js b/structure/discovery.js index 7907101..bb6db31 100644 --- a/structure/discovery.js +++ b/structure/discovery.js @@ -16,6 +16,24 @@ express.post("/links/api/fn/mnemonic", async (req, res) => { res.json(MnemonicArray); }) +express.get("/links/api/fn/mnemonic/:playlist/related", async (req, res) => { + var response = { + "parentLinks": [], + "links": {} + }; + + if (req.params.playlist) { + for (var i in discovery.Panels[0].Pages[0].results) { + var linkData = discovery.Panels[0].Pages[0].results[i].linkData; + if (linkData.mnemonic == req.params.playlist) { + response.links[req.params.playlist] = linkData; + } + } + } + + res.json(response); +}) + express.get("/links/api/fn/mnemonic/*", async (req, res) => { for (var i in discovery.Panels[0].Pages[0].results) { if (discovery.Panels[0].Pages[0].results[i].linkData.mnemonic == req.url.split("/").slice(-1)[0]) { diff --git a/structure/functions.js b/structure/functions.js index 598393a..7c4327a 100644 --- a/structure/functions.js +++ b/structure/functions.js @@ -234,54 +234,55 @@ function getContentPages(req) { } catch (err) {} try { - contentpages.dynamicbackgrounds.backgrounds.backgrounds[0].stage = `season${memory.season}`; - contentpages.dynamicbackgrounds.backgrounds.backgrounds[1].stage = `season${memory.season}`; - + const backgrounds = contentpages.dynamicbackgrounds.backgrounds.backgrounds; + const season = `season${memory.season}${memory.season >= 21 ? "00" : ""}`; + console.log(season) + backgrounds[0].stage = season; + backgrounds[1].stage = season; + if (memory.season == 10) { - contentpages.dynamicbackgrounds.backgrounds.backgrounds[0].stage = "seasonx"; - contentpages.dynamicbackgrounds.backgrounds.backgrounds[1].stage = "seasonx"; - } - else if (memory.build == 11.31 || memory.build == 11.40) { - contentpages.dynamicbackgrounds.backgrounds.backgrounds[0].stage = "Winter19"; - contentpages.dynamicbackgrounds.backgrounds.backgrounds[1].stage = "Winter19"; - } - else if (memory.build == 19.01) { - contentpages.dynamicbackgrounds.backgrounds.backgrounds[0].stage = "winter2021"; - contentpages.dynamicbackgrounds.backgrounds.backgrounds[0].backgroundimage = "https://cdn2.unrealengine.com/t-bp19-lobby-xmas-2048x1024-f85d2684b4af.png"; + backgrounds[0].stage = "seasonx"; + backgrounds[1].stage = "seasonx"; + } else if (memory.build == 11.31 || memory.build == 11.40) { + backgrounds[0].stage = "Winter19"; + backgrounds[1].stage = "Winter19"; + } else if (memory.build == 19.01) { + backgrounds[0].stage = "winter2021"; + backgrounds[0].backgroundimage = "https://cdn2.unrealengine.com/t-bp19-lobby-xmas-2048x1024-f85d2684b4af.png"; contentpages.subgameinfo.battleroyale.image = "https://cdn2.unrealengine.com/19br-wf-subgame-select-512x1024-16d8bb0f218f.jpg"; contentpages.specialoffervideo.bSpecialOfferEnabled = "true"; - } - else if (memory.season == 20) { - contentpages.dynamicbackgrounds.backgrounds.backgrounds[0].backgroundimage = "https://cdn2.unrealengine.com/t-bp20-lobby-2048x1024-d89eb522746c.png"; + } else if (memory.season == 20) { + backgrounds[0].backgroundimage = "https://cdn2.unrealengine.com/t-bp20-lobby-2048x1024-d89eb522746c.png"; if (memory.build == 20.40) { - contentpages.dynamicbackgrounds.backgrounds.backgrounds[0].backgroundimage = "https://cdn2.unrealengine.com/t-bp20-40-armadillo-glowup-lobby-2048x2048-2048x2048-3b83b887cc7f.jpg"; + backgrounds[0].backgroundimage = "https://cdn2.unrealengine.com/t-bp20-40-armadillo-glowup-lobby-2048x2048-2048x2048-3b83b887cc7f.jpg"; + } + } else if (memory.season == 21) { + backgrounds[0].backgroundimage = "https://cdn2.unrealengine.com/s21-lobby-background-2048x1024-2e7112b25dc3.jpg"; + if (memory.build == 21.10) { + backgrounds[0].stage = "season2100"; } - } - else if (memory.season == 21) { - contentpages.dynamicbackgrounds.backgrounds.backgrounds[0].backgroundimage = "https://cdn2.unrealengine.com/s21-lobby-background-2048x1024-2e7112b25dc3.jpg"; if (memory.build == 21.30) { - contentpages.dynamicbackgrounds.backgrounds.backgrounds[0].backgroundimage = "https://cdn2.unrealengine.com/nss-lobbybackground-2048x1024-f74a14565061.jpg"; - contentpages.dynamicbackgrounds.backgrounds.backgrounds[0].stage = "season2130"; + backgrounds[0].backgroundimage = "https://cdn2.unrealengine.com/nss-lobbybackground-2048x1024-f74a14565061.jpg"; + backgrounds[0].stage = "season2130"; } - } - else if (memory.season == 22) { - contentpages.dynamicbackgrounds.backgrounds.backgrounds[0].backgroundimage = "https://cdn2.unrealengine.com/t-bp22-lobby-square-2048x2048-2048x2048-e4e90c6e8018.jpg"; - } - - else if (memory.season == 23) { - contentpages.dynamicbackgrounds.backgrounds.backgrounds[0].backgroundimage = "https://cdn2.unrealengine.com/t-bp23-lobby-2048x1024-2048x1024-26f2c1b27f63.png"; + } else if (memory.season == 22) { + backgrounds[0].backgroundimage = "https://cdn2.unrealengine.com/t-bp22-lobby-square-2048x2048-2048x2048-e4e90c6e8018.jpg"; + } else if (memory.season == 23) { + backgrounds[0].backgroundimage = "https://cdn2.unrealengine.com/t-bp23-lobby-2048x1024-2048x1024-26f2c1b27f63.png"; if (memory.build == 23.10) { - contentpages.dynamicbackgrounds.backgrounds.backgrounds[0].backgroundimage = "https://cdn2.unrealengine.com/t-bp23-winterfest-lobby-square-2048x2048-2048x2048-277a476e5ca6.png"; + backgrounds[0].backgroundimage = "https://cdn2.unrealengine.com/t-bp23-winterfest-lobby-square-2048x2048-2048x2048-277a476e5ca6.png"; contentpages.specialoffervideo.bSpecialOfferEnabled = "true"; } - } - else if (memory.season == 24) { - contentpages.dynamicbackgrounds.backgrounds.backgrounds[0].backgroundimage = "https://cdn2.unrealengine.com/t-ch4s2-bp-lobby-4096x2048-edde08d15f7e.jpg" - } + } else if (memory.season == 24) { + backgrounds[0].backgroundimage = "https://cdn2.unrealengine.com/t-ch4s2-bp-lobby-4096x2048-edde08d15f7e.jpg" + } + else if (memory.season == 25) { - contentpages.dynamicbackgrounds.backgrounds.backgrounds[0].backgroundimage = "https://cdn2.unrealengine.com/s25-lobby-4k-4096x2048-4a832928e11f.jpg"; - contentpages.dynamicbackgrounds.backgrounds.backgrounds[1].backgroundimage = "https://cdn2.unrealengine.com/fn-shop-ch4s3-04-1920x1080-785ce1d90213.png"; - contentpages.dynamicbackgrounds.backgrounds.backgrounds[1].stage = "defaultnotris"; + backgrounds[0].backgroundimage = "https://cdn2.unrealengine.com/s25-lobby-4k-4096x2048-4a832928e11f.jpg"; + backgrounds[1].backgroundimage = "https://cdn2.unrealengine.com/fn-shop-ch4s3-04-1920x1080-785ce1d90213.png"; + if (memory.build == 25.11) { + backgrounds[0].backgroundimage = "https://cdn2.unrealengine.com/t-s25-14dos-lobby-4096x2048-2be24969eee3.jpg"; + } } } catch (err) {} diff --git a/structure/main.js b/structure/main.js index 913e089..df46ef3 100644 --- a/structure/main.js +++ b/structure/main.js @@ -386,4 +386,12 @@ express.all("/v1/epic-settings/public/users/*/values", async (req, res) => { res.json({}) }) +express.get("/fortnite/api/game/v2/br-inventory/account/*", async (req, res) => { + res.json({ + "stash": { + "globalcash": 5000 + } + }) +}) + module.exports = express; diff --git a/structure/timeline.js b/structure/timeline.js index 9cd87e8..a67417c 100644 --- a/structure/timeline.js +++ b/structure/timeline.js @@ -1090,7 +1090,7 @@ express.get("/fortnite/api/calendar/v1/timeline", async (req, res) => { }) } - if (24.3 <= memory.build <= 25) { + if (24.3 <= memory.build && memory.build <= 25) { activeEvents.push( { "eventType": "EventFlag.HordeV3", @@ -1188,25 +1188,174 @@ express.get("/fortnite/api/calendar/v1/timeline", async (req, res) => { "EventFlag.YarrrTwo" ] + var activeEventsSet = new Set(activeEvents.map(e => e.eventType)); for (var i = 0; i < Events.length; i++) { var Event = Events[i]; - var bAlreadyExists = false; - - for (var x = 0; x < activeEvents.length; x++) { - var ActiveEvent = activeEvents[x]; - if (ActiveEvent.eventType == Event) { - bAlreadyExists = true; - } - } - - if (bAlreadyExists == false) { - activeEvents.push( - { + if (!activeEventsSet.has(Event)) { + activeEvents.push({ "eventType": Event, "activeUntil": "9999-01-01T00:00:00.000Z", "activeSince": "2020-01-01T00:00:00.000Z" + }); + } + } + } + + const stateTemplate = { + "activeStorefronts": [], + "eventNamedWeights": {}, + "seasonNumber": memory.season, + "seasonTemplateId": `AthenaSeason:athenaseason${memory.season}`, + "matchXpBonusPoints": 0, + "seasonBegin": "2020-01-01T13:00:00Z", + "seasonEnd": "9999-01-01T14:00:00Z", + "seasonDisplayedEnd": "9999-01-01T07:30:00Z", + "weeklyStoreEnd": "9999-01-01T00:00:00Z", + "stwEventStoreEnd": "9999-01-01T00:00:00.000Z", + "stwWeeklyStoreEnd": "9999-01-01T00:00:00.000Z", + "sectionStoreEnds": { + "Featured": "9999-01-01T00:00:00.000Z" + }, + "dailyStoreEnd": "9999-01-01T00:00:00Z" + }; + + var states = [{ + validFrom: "2020-01-01T00:00:00.000Z", + activeEvents: activeEvents.slice(), + state: stateTemplate + }] + + if (memory.build == 4.5) { + if (config.Events.bEnableGeodeEvent == true) { + states[0].activeEvents.push({ + "eventType": "EventFlag.BR_S4_Geode_Countdown", + "activeUntil": config.Events.geodeEventStartDate + }) + + states.push({ + validFrom: config.Events.geodeEventStartDate, + activeEvents: activeEvents.slice(), + state: stateTemplate + }) + + var EventEndDate = new Date(new Date(config.Events.geodeEventStartDate).getTime() + 3 * 60000).toISOString(); + + states[1].activeEvents.push({ + "eventType": "EventFlag.BR_S4_Geode_Begin", + "activeUntil": EventEndDate + }) + + activeEvents.push({ + "eventType": "EventFlag.BR_S4_Geode_Over", + "activeUntil": "9999-01-01T00:00:00.000Z" + }) + + if (config.Events.bEnableCrackInTheSky == true) { + activeEvents.push({ + "eventType": "EventFlag.BR_S4_Rift_Growth", + "activeUntil": new Date(new Date(EventEndDate).getTime() + 13.6 * 24 * 60 * 60 * 1000).toISOString() // It takes 13.6 days for the crack to fully expand. }) } + + states.push({ + validFrom: EventEndDate, + activeEvents: activeEvents.slice(), + state: stateTemplate + }) + } + + if (config.Events.bEnableS4OddityPrecursor == true) { + for (var i = 1; i <= 8; i++) { + var StartDate = new Date(new Date(config.Events.S4OddityEventStartDate).getTime() + config.Events.S4OddityEventsInterval * (i-1) * 60000).toISOString(); + activeEvents.push({ + "eventType": `EventFlag.BR_S4_Oddity_0${i}_Tell`, + "activeUntil": StartDate + }) + } + states[states.length - 1].activeEvents = activeEvents.slice(); + } + if (config.Events.bEnableS4OddityExecution == true) { + for (var i = 1; i <= 8; i++) { + var StartDate = new Date(new Date(config.Events.S4OddityEventStartDate).getTime() + config.Events.S4OddityEventsInterval * (i-1) * 60000).toISOString(); + + activeEvents.push({ + "eventType": `EventFlag.BR_S4_Oddity_0${i}_Event`, + "activeUntil": "9999-01-01T00:00:00.000Z" + }) + + var index = activeEvents.findIndex(item => item.eventType === `EventFlag.BR_S4_Oddity_0${i}_Tell`); + if (index !== -1) { + activeEvents.splice(index, 1); + } + + states.push({ + validFrom: StartDate, + activeEvents: activeEvents.slice(), + state: stateTemplate + }) + } + } + } + + if (memory.build == 5.21) { + if (config.Events.bEnableS5OddityPrecursor == true) { + states.push({ + validFrom: config.Events.S5OddityPrecursorDate, + activeEvents: activeEvents.slice(), + state: stateTemplate + }) + + states[1].activeEvents.push( + { + "eventType": "EventFlag.BR_S5_Oddity_Tomato_Tell", + "activeUntil": "9999-01-01T00:00:00.000Z" + }) + } + if (config.Events.bEnableS5OddityExecution == true) { + states.push({ + validFrom: config.Events.S5OddityExecutionDate, + activeEvents: activeEvents.slice(), + state: stateTemplate + }) + + states[states.length - 1].activeEvents.push( + { + "eventType": "EventFlag.BR_S5_Oddity_Tomato_Event", + "activeUntil": "9999-01-01T00:00:00.000Z" + }) + } + } + + if (memory.build == 5.30) { + if (config.Events.bEnableBlockbusterRiskyEvent == true) { + activeEvents.push({ + "eventType": "EventFlag.BR_S5_RiskyReels_Event", + "activeUntil": "9999-01-01T00:00:00.000Z" + }) + states[0].activeEvents = activeEvents.slice(); + } + + if (config.Events.bEnableCubeLightning == true) { + states[0].activeEvents.push( + { + "eventType": "EventFlag.BR_S5_Rift_Corrupt", + "activeUntil": config.Events.cubeSpawnDate + }, + { + "eventType": "EventFlag.BR_S5_Cube_Lightning", + "activeUntil": config.Events.cubeSpawnDate + }) + + activeEvents.push({ + "eventType": "EventFlag.BR_S5_Cube_TurnOn", + "activeUntil": "9999-01-01T00:00:00.000Z" + }) + + states.push({ + validFrom: config.Events.cubeSpawnDate, + activeEvents: activeEvents.slice(), + state: stateTemplate + }) } } @@ -1217,27 +1366,7 @@ express.get("/fortnite/api/calendar/v1/timeline", async (req, res) => { "cacheExpire": "9999-01-01T22:28:47.830Z" }, "client-events": { - "states": [{ - "validFrom": "2020-01-01T20:28:47.830Z", - "activeEvents": activeEvents, - "state": { - "activeStorefronts": [], - "eventNamedWeights": {}, - "seasonNumber": memory.season, - "seasonTemplateId": `AthenaSeason:athenaseason${memory.season}`, - "matchXpBonusPoints": 0, - "seasonBegin": "2020-01-01T13:00:00Z", - "seasonEnd": "9999-01-01T14:00:00Z", - "seasonDisplayedEnd": "9999-01-01T07:30:00Z", - "weeklyStoreEnd": "9999-01-01T00:00:00Z", - "stwEventStoreEnd": "9999-01-01T00:00:00.000Z", - "stwWeeklyStoreEnd": "9999-01-01T00:00:00.000Z", - "sectionStoreEnds": { - "Featured": "9999-01-01T00:00:00.000Z" - }, - "dailyStoreEnd": "9999-01-01T00:00:00Z" - } - }], + "states": states, "cacheExpire": "9999-01-01T22:28:47.830Z" } },