mirror of
https://github.com/Lawin0129/AthenaProfileGenerator.git
synced 2026-01-13 03:02:22 +01:00
Some changes
This commit is contained in:
43
index.js
43
index.js
@@ -1,18 +1,22 @@
|
||||
const axios = require("axios").default;
|
||||
const { default: request } = require("axios");
|
||||
const fs = require("fs");
|
||||
var athena = {"created":"","updated":"","rvn":0,"wipeNumber":1,"accountId":"","profileId":"athena","version":"no_version","items":{"loadout1":{"templateId":"CosmeticLocker:cosmeticlocker_athena","attributes":{"locker_slots_data":{"slots":{"MusicPack":{"items":[""]},"Character":{"items":[""],"activeVariants":[null]},"Backpack":{"items":[""],"activeVariants":[null]},"SkyDiveContrail":{"items":[""],"activeVariants":[null]},"Dance":{"items":["","","","","",""]},"LoadingScreen":{"items":[""]},"Pickaxe":{"items":[""],"activeVariants":[null]},"Glider":{"items":[""],"activeVariants":[null]},"ItemWrap":{"items":["","","","","","",""],"activeVariants":[null,null,null,null,null,null,null,null]}}},"use_count":0,"banner_icon_template":"StandardBanner1","banner_color_template":"DefaultColor1","locker_name":"","item_seen":false,"favorite":false},"quantity":1}},"stats":{"attributes":{"past_seasons":[],"season_match_boost":999999999,"loadouts":["loadout1"],"favorite_victorypose":"","mfa_reward_claimed":false,"quest_manager":{"dailyLoginInterval":"","dailyQuestRerolls":1},"book_level":100,"season_num":0,"favorite_consumableemote":"","banner_color":"DefaultColor1","favorite_callingcard":"","favorite_character":"","favorite_spray":[],"book_xp":100,"favorite_loadingscreen":"","book_purchased":true,"lifetime_wins":100,"favorite_hat":"","level":100,"favorite_battlebus":"","favorite_mapmarker":"","favorite_vehicledeco":"","accountLevel":100,"favorite_backpack":"","favorite_dance":["","","","","",""],"inventory_limit_bonus":0,"last_applied_loadout":"","favorite_skydivecontrail":"","favorite_pickaxe":"","favorite_glider":"","daily_rewards":{},"xp":999,"season_friend_match_boost":999999999,"active_loadout_index":0,"favorite_musicpack":"","banner_icon":"StandardBanner1","favorite_itemwraps":["","","","","","",""]}},"commandRevision":0};
|
||||
let athena = require("./athena_template.json");
|
||||
|
||||
console.log("Fortnite Athena Profile Generator by Lawin v1.0.0\n\n[GEN] Starting to generate...");
|
||||
axios.get("https://fortnite-api.com/v2/cosmetics/br").then(resp => {
|
||||
var data = resp.data.data;
|
||||
console.log("Fortnite Athena Profile Generator by Lawin v1.0.2\n");
|
||||
request.get("https://fortnite-api.com/v2/cosmetics/br").then(resp => {
|
||||
let data = resp.data.data;
|
||||
|
||||
console.log("[GEN] Starting to generate...\n");
|
||||
|
||||
data.forEach(item => {
|
||||
if (item.id.toLowerCase().includes("random")) return;
|
||||
|
||||
// Credits to PRO100KatYT for backendValue fixes
|
||||
if (item.type.backendValue == "AthenaEmoji" || item.type.backendValue == "AthenaSpray" || item.type.backendValue == "AthenaToy") item.type.backendValue = "AthenaDance";
|
||||
if (item.type.backendValue == "AthenaPetCarrier") item.type.backendValue = "AthenaBackpack";
|
||||
|
||||
var id = item.type.backendValue + ":" + item.id;
|
||||
var variants = [];
|
||||
let id = `${item.type.backendValue}:${item.id}`;
|
||||
let variants = [];
|
||||
|
||||
if (item.variants) {
|
||||
item.variants.forEach(obj => {
|
||||
@@ -24,20 +28,17 @@ axios.get("https://fortnite-api.com/v2/cosmetics/br").then(resp => {
|
||||
})
|
||||
}
|
||||
|
||||
// Dont add anything that includes "random" in the id (Chapter 1 Season 4 and 5 crash fix)
|
||||
if (!item.id.toLowerCase().includes("random")) {
|
||||
athena.items[id] = {
|
||||
"templateId": id,
|
||||
"attributes": {
|
||||
"max_level_bonus": 0,
|
||||
"level": 1,
|
||||
"item_seen": true,
|
||||
"xp": 0,
|
||||
"variants": variants,
|
||||
"favorite": false
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
athena.items[id] = {
|
||||
"templateId": id,
|
||||
"attributes": {
|
||||
"max_level_bonus": 0,
|
||||
"level": 1,
|
||||
"item_seen": true,
|
||||
"xp": 0,
|
||||
"variants": variants,
|
||||
"favorite": false
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user