Created
May 23, 2025 12:09
-
-
Save driversti/e0281ee6db5275515d0eea18c79d76d6 to your computer and use it in GitHub Desktop.
Automatically dissolve all companies of the holding
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (async()=>{for(const c of Object.values(companies).filter(c=>c.holding_company_id=='0')){let id=c.id,d=3000+Math.random()*7000;try{let r=await fetch(`https://www.erepublik.com/en/economy/sell-company/${id}`,{method:'POST',headers:{'Content-Type':'application/x-www-form-urlencoded','Origin':'https://www.erepublik.com','Referer':`https://www.erepublik.com/en/economy/sell-company/${id}`},body:`disolve=${id}&pin=0000&_token=${SERVER_DATA.csrfToken}`});console.log(`Company ${id}:`,await r.json())}catch(e){console.error(`Fail ${id}:`,e)}await new Promise(r=>setTimeout(r,d))}})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment