Added StW Event Quests (S2-S10)

This commit is contained in:
PRO100KatYT
2022-05-07 09:42:29 +02:00
parent 1922c1e876
commit 67e8890f5d
5 changed files with 5232 additions and 124 deletions

View File

@@ -3,7 +3,7 @@ bUseConfigDisplayName=false # If this is set to false, it will use the email to
displayName=LawinServer # Your fortnite display name.
[Profile]
bCompletedSeasonalQuests=false # If this is set to true, every seasonal quest will be on complete. Works from Season 3 to Season 19.
bCompletedSeasonalQuests=false # If this is set to true, every BR and StW seasonal quest will be on complete. Works for Battle Royale from Season 3 to Season 19 and for Save the World from Season 2 to Season X.
[GameServer]
# Matchmaker gameserver config, you can use this to connect to gameservers like rift (titanium), fortmp, etc... (they have to be hosting though).

View File

@@ -41,6 +41,7 @@
- Support a Creator with specific codes
- Fully working daily challenges system (New daily challenge every day, replacing daily challenges, etc...)
- Item transformation
- Event Quests from Season 2 up to Season X (Can change)
### Battle Royale:
- CloudStorage and ClientSettings (Settings saving)

File diff suppressed because it is too large Load Diff

View File

@@ -745,6 +745,10 @@ express.post("/fortnite/api/game/v2/profile/*/client/ClientQuestLogin", async (r
if (req.query.profileId == "profile0" || req.query.profileId == "campaign") {
DailyQuestIDS = QuestIDS.SaveTheWorld.Daily
if (QuestIDS.SaveTheWorld.hasOwnProperty(`Season${memory.season}`)) {
SeasonQuestIDS = QuestIDS.SaveTheWorld[`Season${memory.season}`]
}
for (var key in profile.items) {
if (profile.items[key].templateId.toLowerCase().startsWith("quest:daily")) {
QuestCount += 1;
@@ -763,19 +767,6 @@ express.post("/fortnite/api/game/v2/profile/*/client/ClientQuestLogin", async (r
if (profile.items[key].templateId.toLowerCase().startsWith("quest:athenadaily")) {
QuestCount += 1;
}
if (key.split("")[0] == "S" && (Number.isInteger(Number(key.split("")[1]))) && (key.split("")[2] == "-" || (Number.isInteger(Number(key.split("")[2])) && key.split("")[3] == "-"))) {
if (!key.startsWith(`S${memory.season}-`)) {
delete profile.items[key];
ApplyProfileChanges.push({
"changeType": "itemRemoved",
"itemId": key
})
StatChanged = true;
}
}
}
}
@@ -852,87 +843,104 @@ express.post("/fortnite/api/game/v2/profile/*/client/ClientQuestLogin", async (r
}
} catch (err) {}
if (SeasonQuestIDS) {
for (var ChallengeBundleSchedule in SeasonQuestIDS.ChallengeBundleSchedules) {
if (profile.items.hasOwnProperty(ChallengeBundleSchedule.itemGuid)) {
for (var key in profile.items) {
if (key.split("")[0] == "S" && (Number.isInteger(Number(key.split("")[1]))) && (key.split("")[2] == "-" || (Number.isInteger(Number(key.split("")[2])) && key.split("")[3] == "-"))) {
if (!key.startsWith(`S${memory.season}-`)) {
delete profile.items[key];
ApplyProfileChanges.push({
"changeType": "itemRemoved",
"itemId": ChallengeBundleSchedule.itemGuid
"itemId": key
})
StatChanged = true;
}
ChallengeBundleSchedule = SeasonQuestIDS.ChallengeBundleSchedules[ChallengeBundleSchedule];
profile.items[ChallengeBundleSchedule.itemGuid] = {
"templateId": ChallengeBundleSchedule.templateId,
"attributes": {
"unlock_epoch": "2018-01-31T00:00:00.000Z",
"max_level_bonus": 0,
"level": 1,
"item_seen": true,
"xp": 0,
"favorite": false,
"granted_bundles": ChallengeBundleSchedule.granted_bundles
},
"quantity": 1
}
ApplyProfileChanges.push({
"changeType": "itemAdded",
"itemId": ChallengeBundleSchedule.itemGuid,
"item": profile.items[ChallengeBundleSchedule.itemGuid]
})
StatChanged = true;
}
}
if (SeasonQuestIDS) {
if (req.query.profileId == "athena") {
for (var ChallengeBundleSchedule in SeasonQuestIDS.ChallengeBundleSchedules) {
if (profile.items.hasOwnProperty(ChallengeBundleSchedule.itemGuid)) {
ApplyProfileChanges.push({
"changeType": "itemRemoved",
"itemId": ChallengeBundleSchedule.itemGuid
})
}
ChallengeBundleSchedule = SeasonQuestIDS.ChallengeBundleSchedules[ChallengeBundleSchedule];
profile.items[ChallengeBundleSchedule.itemGuid] = {
"templateId": ChallengeBundleSchedule.templateId,
"attributes": {
"unlock_epoch": new Date().toISOString(),
"max_level_bonus": 0,
"level": 1,
"item_seen": true,
"xp": 0,
"favorite": false,
"granted_bundles": ChallengeBundleSchedule.granted_bundles
},
"quantity": 1
}
for (var ChallengeBundle in SeasonQuestIDS.ChallengeBundles) {
if (profile.items.hasOwnProperty(ChallengeBundle.itemGuid)) {
ApplyProfileChanges.push({
"changeType": "itemRemoved",
"itemId": ChallengeBundle.itemGuid
"changeType": "itemAdded",
"itemId": ChallengeBundleSchedule.itemGuid,
"item": profile.items[ChallengeBundleSchedule.itemGuid]
})
StatChanged = true;
}
ChallengeBundle = SeasonQuestIDS.ChallengeBundles[ChallengeBundle];
for (var ChallengeBundle in SeasonQuestIDS.ChallengeBundles) {
if (profile.items.hasOwnProperty(ChallengeBundle.itemGuid)) {
ApplyProfileChanges.push({
"changeType": "itemRemoved",
"itemId": ChallengeBundle.itemGuid
})
}
if (config.Profile.bCompletedSeasonalQuests == true && ChallengeBundle.hasOwnProperty("questStages")) {
ChallengeBundle.grantedquestinstanceids = ChallengeBundle.grantedquestinstanceids.concat(ChallengeBundle.questStages);
ChallengeBundle = SeasonQuestIDS.ChallengeBundles[ChallengeBundle];
if (config.Profile.bCompletedSeasonalQuests == true && ChallengeBundle.hasOwnProperty("questStages")) {
ChallengeBundle.grantedquestinstanceids = ChallengeBundle.grantedquestinstanceids.concat(ChallengeBundle.questStages);
}
profile.items[ChallengeBundle.itemGuid] = {
"templateId": ChallengeBundle.templateId,
"attributes": {
"has_unlock_by_completion": false,
"num_quests_completed": 0,
"level": 0,
"grantedquestinstanceids": ChallengeBundle.grantedquestinstanceids,
"item_seen": true,
"max_allowed_bundle_level": 0,
"num_granted_bundle_quests": 0,
"max_level_bonus": 0,
"challenge_bundle_schedule_id": ChallengeBundle.challenge_bundle_schedule_id,
"num_progress_quests_completed": 0,
"xp": 0,
"favorite": false
},
"quantity": 1
}
profile.items[ChallengeBundle.itemGuid].attributes.num_granted_bundle_quests = ChallengeBundle.grantedquestinstanceids.length;
if (config.Profile.bCompletedSeasonalQuests == true) {
profile.items[ChallengeBundle.itemGuid].attributes.num_quests_completed = ChallengeBundle.grantedquestinstanceids.length;
profile.items[ChallengeBundle.itemGuid].attributes.num_progress_quests_completed = ChallengeBundle.grantedquestinstanceids.length;
}
ApplyProfileChanges.push({
"changeType": "itemAdded",
"itemId": ChallengeBundle.itemGuid,
"item": profile.items[ChallengeBundle.itemGuid]
})
StatChanged = true;
}
profile.items[ChallengeBundle.itemGuid] = {
"templateId": ChallengeBundle.templateId,
"attributes": {
"has_unlock_by_completion": false,
"num_quests_completed": 0,
"level": 0,
"grantedquestinstanceids": ChallengeBundle.grantedquestinstanceids,
"item_seen": true,
"max_allowed_bundle_level": 0,
"num_granted_bundle_quests": 0,
"max_level_bonus": 0,
"challenge_bundle_schedule_id": ChallengeBundle.challenge_bundle_schedule_id,
"num_progress_quests_completed": 0,
"xp": 0,
"favorite": false
},
"quantity": 1
}
profile.items[ChallengeBundle.itemGuid].attributes.num_granted_bundle_quests = ChallengeBundle.grantedquestinstanceids.length;
if (config.Profile.bCompletedSeasonalQuests == true) {
profile.items[ChallengeBundle.itemGuid].attributes.num_quests_completed = ChallengeBundle.grantedquestinstanceids.length;
profile.items[ChallengeBundle.itemGuid].attributes.num_progress_quests_completed = ChallengeBundle.grantedquestinstanceids.length;
}
ApplyProfileChanges.push({
"changeType": "itemAdded",
"itemId": ChallengeBundle.itemGuid,
"item": profile.items[ChallengeBundle.itemGuid]
})
StatChanged = true;
}
for (var Quest in SeasonQuestIDS.Quests) {
@@ -948,18 +956,18 @@ express.post("/fortnite/api/game/v2/profile/*/client/ClientQuestLogin", async (r
profile.items[Quest.itemGuid] = {
"templateId": Quest.templateId,
"attributes": {
"creation_time": "2018-01-31T00:00:00.000Z",
"creation_time": new Date().toISOString(),
"level": -1,
"item_seen": true,
"playlists": [],
"sent_new_notification": true,
"challenge_bundle_id": Quest.challenge_bundle_id,
"challenge_bundle_id": Quest.challenge_bundle_id || "",
"xp_reward_scalar": 1,
"challenge_linked_quest_given": "",
"quest_pool": "",
"quest_state": "Active",
"bucket": "",
"last_state_change_time": "2018-01-31T00:00:00.000Z",
"last_state_change_time": new Date().toISOString(),
"challenge_linked_quest_parent": "",
"max_level_bonus": 0,
"xp": 0,

View File

@@ -24,22 +24,31 @@ express.get("/fortnite/api/calendar/v1/timeline", async (req, res) => {
"eventType": "EventFlag.Spring2018Phase1",
"activeUntil": "9999-01-01T00:00:00.000Z",
"activeSince": "2020-01-01T00:00:00.000Z"
},
{
"eventType": "EventFlag.Spring2018Phase2",
"activeUntil": "9999-01-01T00:00:00.000Z",
"activeSince": "2020-01-01T00:00:00.000Z"
},
{
"eventType": "EventFlag.Spring2018Phase3",
"activeUntil": "9999-01-01T00:00:00.000Z",
"activeSince": "2020-01-01T00:00:00.000Z"
},
{
"eventType": "EventFlag.Spring2018Phase4",
"activeUntil": "9999-01-01T00:00:00.000Z",
"activeSince": "2020-01-01T00:00:00.000Z"
})
if (memory.build >= 3.1) {
activeEvents.push(
{
"eventType": "EventFlag.Spring2018Phase2",
"activeUntil": "9999-01-01T00:00:00.000Z",
"activeSince": "2020-01-01T00:00:00.000Z"
})
}
if (memory.build >= 3.3) {
activeEvents.push(
{
"eventType": "EventFlag.Spring2018Phase3",
"activeUntil": "9999-01-01T00:00:00.000Z",
"activeSince": "2020-01-01T00:00:00.000Z"
})
}
if (memory.build >= 3.4) {
activeEvents.push(
{
"eventType": "EventFlag.Spring2018Phase4",
"activeUntil": "9999-01-01T00:00:00.000Z",
"activeSince": "2020-01-01T00:00:00.000Z"
})
}
}
if (memory.season == 4) {
@@ -54,7 +63,7 @@ express.get("/fortnite/api/calendar/v1/timeline", async (req, res) => {
"activeUntil": "9999-01-01T00:00:00.000Z",
"activeSince": "2020-01-01T00:00:00.000Z"
})
if (memory.build.toString().includes(".") && (Number(memory.build.toString().split(".")[1].split("")[0]) >= 3)) {
if (memory.build >= 4.3) {
activeEvents.push(
{
"eventType": "EventFlag.Blockbuster2018Phase2",
@@ -62,7 +71,7 @@ express.get("/fortnite/api/calendar/v1/timeline", async (req, res) => {
"activeSince": "2020-01-01T00:00:00.000Z"
})
}
if (memory.build.toString().includes(".") && (Number(memory.build.toString().split(".")[1].split("")[0]) >= 4)) {
if (memory.build >= 4.4) {
activeEvents.push(
{
"eventType": "EventFlag.Blockbuster2018Phase3",
@@ -70,7 +79,7 @@ express.get("/fortnite/api/calendar/v1/timeline", async (req, res) => {
"activeSince": "2020-01-01T00:00:00.000Z"
})
}
if (memory.build.toString().includes(".") && (Number(memory.build.toString().split(".")[1].split("")[0]) >= 5)) {
if (memory.build >= 4.5) {
activeEvents.push(
{
"eventType": "EventFlag.Blockbuster2018Phase4",
@@ -115,21 +124,6 @@ express.get("/fortnite/api/calendar/v1/timeline", async (req, res) => {
if (memory.season == 6) {
activeEvents.push(
{
"eventType": "EventFlag.Fortnitemares",
"activeUntil": "9999-01-01T00:00:00.000Z",
"activeSince": "2020-01-01T00:00:00.000Z"
},
{
"eventType": "EventFlag.FortnitemaresPhase1",
"activeUntil": "9999-01-01T00:00:00.000Z",
"activeSince": "2020-01-01T00:00:00.000Z"
},
{
"eventType": "EventFlag.FortnitemaresPhase2",
"activeUntil": "9999-01-01T00:00:00.000Z",
"activeSince": "2020-01-01T00:00:00.000Z"
},
{
"eventType": "EventFlag.LTM_Fortnitemares",
"activeUntil": "9999-01-01T00:00:00.000Z",
@@ -140,6 +134,27 @@ express.get("/fortnite/api/calendar/v1/timeline", async (req, res) => {
"activeUntil": "9999-01-01T00:00:00.000Z",
"activeSince": "2020-01-01T00:00:00.000Z"
})
if (memory.build >= 6.20) {
activeEvents.push(
{
"eventType": "EventFlag.Fortnitemares",
"activeUntil": "9999-01-01T00:00:00.000Z",
"activeSince": "2020-01-01T00:00:00.000Z"
},
{
"eventType": "EventFlag.FortnitemaresPhase1",
"activeUntil": "9999-01-01T00:00:00.000Z",
"activeSince": "2020-01-01T00:00:00.000Z"
})
}
if (memory.build >= 6.22) {
activeEvents.push(
{
"eventType": "EventFlag.FortnitemaresPhase2",
"activeUntil": "9999-01-01T00:00:00.000Z",
"activeSince": "2020-01-01T00:00:00.000Z"
})
}
}
if (memory.build == 6.20 || memory.build == 6.21) {
@@ -217,7 +232,7 @@ express.get("/fortnite/api/calendar/v1/timeline", async (req, res) => {
"activeUntil": "9999-01-01T00:00:00.000Z",
"activeSince": "2020-01-01T00:00:00.000Z"
})
if (memory.build.toString().includes(".") && (Number(memory.build.toString().split(".")[1].split("")[0]) >= 2)) {
if (memory.build >= 8.2) {
activeEvents.push(
{
"eventType": "EventFlag.Spring2019.Phase2",
@@ -255,7 +270,7 @@ express.get("/fortnite/api/calendar/v1/timeline", async (req, res) => {
"activeUntil": "9999-01-01T00:00:00.000Z",
"activeSince": "2020-01-01T00:00:00.000Z"
})
if (memory.build.toString().includes(".") && (Number(memory.build.toString().split(".")[1].split("")[0]) >= 2)) {
if (memory.build >= 9.2) {
activeEvents.push(
{
"eventType": "EventFlag.Season9.Phase2",
@@ -327,7 +342,7 @@ express.get("/fortnite/api/calendar/v1/timeline", async (req, res) => {
"activeSince": "2020-01-01T00:00:00.000Z"
})
if (memory.build.toString().includes(".") && (Number(memory.build.toString().split(".")[1].split("")[0]) >= 2)) {
if (memory.build >= 11.2) {
activeEvents.push(
{
"eventType": "EventFlag.Starlight",
@@ -336,7 +351,7 @@ express.get("/fortnite/api/calendar/v1/timeline", async (req, res) => {
})
}
if (memory.build.toString().includes(".") && (Number(memory.build.toString().split(".")[1].split("")[0]) < 3)) {
if (memory.build < 11.3) {
activeEvents.push(
{
"eventType": "EventFlag.Season11.Fortnitemares.Quests.Phase1",