Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (() => {
- const price = 500000; // cena itemka, tutaj jest 500k
- const names = ["Mikstura wiewiórki", "dupa goryla"]; // nazwy itemków ktore maja byc sellniete po wuzej wymienionej cenie
- const old_g = window._g;
- const itemsToSell = new Array();
- const sellItem = (id) => new Promise(resolve => {
- fetch(`/engine?t=ah&sell=${id}&price=&bo=${price}&time=48&ev=${window.g.ev}&browser_token=${window.g.browser_token}&aid=${window.g.aid}`)
- .then(data => data.json())
- .then(data => resolve(data))
- .catch(err => resolve());
- });
- const getItems = () => {
- for(const [id, {name, loc}] of Object.entries(window.g.item)){
- if(loc === "g" && names.includes(name) && !itemsToSell.includes(id)){
- itemsToSell.push(id);
- }
- }
- }
- const start = async () => {
- getItems();
- window._g = Function.prototype;
- for(const id of itemsToSell){
- const result = await sellItem(id);
- if(result !== undefined){
- window.parseInput(result);
- }
- }
- window._g = old_g;
- }
- start();
- })()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement