-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
73 lines (71 loc) · 3.8 KB
/
Copy pathindex.js
File metadata and controls
73 lines (71 loc) · 3.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
const fs = require('fs');
const nim = require('./modules/networkInteractionModule.js');
const PriceList = require('./modules/priceList');
const REFORGES = ["gentle","odd","fast","fair","epic","sharp","heroic","spicy","legendary","dirty","fabled","suspicious","gilded","warped","salty","treacherous","deadly","fine","grand","hasty","neat","rapid","unreal","awkward","rich","precise","spiritual","clean","fierce","heavy","light","mythic","pure","smart","titanic","wise","perfect","necrotic","spiked","renowned","cubic","reinforced","loving","ridiculous","giant","submerged","absolutely","bizarre","itchy","ominous","pleasant","pretty","shiny","simple","strange","vivid","godly","demonic","forceful","strong","superior","unpleasant","zealous","silky","bloody","shaded","sweet","fruitful","magnetic","refined","blessed","moil","toil"];
const ENCHANTS = [,"big brain","bane of arthropods","feather falling","spiked hook","depth strider","ender slayer","giant killer","luck of the sea","sugar rush","aqua affinity","fire aspect","first strike","infinite quiver","life steal","true protection","silk touch"];
async function main() {
var player = new nim.User("Topeni123");
var recepies = require("./recepies.json");
var items = [];
var pl = new PriceList();
await pl.loadBazaarPrices();
fs.writeFileSync("./output/priceList.json", JSON.stringify(pl))
var auctions = await nim.Hypixel.getAuctions();
for (var a of auctions) {
if (a == null) continue;
if (REFORGES.includes(a.item_name.split(" ")[0].toLowerCase())) {
a.item_name = a.item_name.split(" ").splice(1,a.item_name.split(" ").length - 1).join(" ");
}
if (a.item_name.startsWith("[Lvl ")) continue;
if (a.item_name.endsWith("✪")) continue;
if (a.item_name.includes("Dragon")) continue;
if (a.item_name.includes("Rune")) continue;
if (a.item_name == "null") continue;
if (a.item_name.includes("Potion")) continue;
if (a.item_name.includes("Minion Skin")) continue;
if (a.item_name.includes("[VIP]")) continue;
if (a.item_name.includes("[VIP+]")) continue;
if (a.item_name.includes("[MVP]")) continue;
if (a.item_name.includes("[MVP+]")) continue;
if (a.item_name.includes("[MVP++]")) continue;
if (a.item_name.includes("[YOUTUBE]")) continue;
if (a.item_name.includes("[ADMIN]")) continue;
if (a.item_lore.includes("§7Gear Score")) continue;
if (a.item_lore.includes("§7Gear Score")) continue;
if (a.item_name.includes(" Tier ")) continue;
if (a.item_name == "Enchanted Book") {
var customName = "Enchanted book: " + a.extra.split(" ").splice(4,a.extra.split(" ").length - 4).join(" ");
if (customName.split("Enchanted book: ")[1].split(" ").length != 1) {
if (!ENCHANTS.includes(customName.split("Enchanted book: ")[1].toLowerCase())) continue;
}
if (items.filter(i => i.name == customName).length) continue;
items.push({
name: customName,
craft: [{
id: "BAZAAR_ITEM_ID",
amount: 0
},
{
id: "BAZAAR_ITEM_ID",
amount: 0
}]
})
continue;
}
if (items.filter(i => i.name == a.item_name).length) continue;
items.push({
name: a.item_name,
craft: [{
id: "BAZAAR_ITEM_ID",
amount: 0
},
{
id: "BAZAAR_ITEM_ID",
amount: 0
}]
})
}
console.log(items.map(v => v.name));
fs.writeFileSync("./items.json", JSON.stringify(items));
}
main();