Skip to content

Instantly share code, notes, and snippets.

@driversti
Last active April 11, 2023 11:19
Show Gist options
  • Save driversti/b24bf2732523bdcb0c72748fa6cdd99a to your computer and use it in GitHub Desktop.
Save driversti/b24bf2732523bdcb0c72748fa6cdd99a to your computer and use it in GitHub Desktop.
The commands allow you to automate endorsing and traveling in eRepublik during the Spring Break event.
=== ENDORSES ===
Open the browser's console and paste the command:
for(let i=0;i<=220;i++){setTimeout(()=>{fetch('https://www.erepublik.com/en/main/donate-article',{method:'POST',headers:{'content-type':'application/x-www-form-urlencoded','cookie':`erpk=${erepublik.settings.pomelo.authToken}`},body:`articleId=${2765400+i}&amount=5&_token=${SERVER_DATA.csrfToken}`,compress:true})},5000*i);}
Press Enter. In about 17,5 min you will have about 200 endorses of 5сс
=== TRAVELLING ===
You can run the following command in your browser's console to travel between Wellington, Hungary and Castilla y Leon, Spain in a loop with a 6-second delay between each travel until the total distance reaches 1,900,000 km:
let dist=0;const t=()=>fetch('https://www.erepublik.com/en/main/travel',{method:'POST',headers:{'content-type':'application/x-www-form-urlencoded','cookie':`erpk=${erepublik.settings.pomelo.authToken}`},body:`check=moveAction&_token=${SERVER_DATA.csrfToken}&travelMethod=preferTicket&${dist%39884<19953?'inRegionId=714&toCountryId=13':'inRegionId=173&toCountryId=15'}`,compress:true}).then(()=>{dist+=19953;if(dist<1900000)setTimeout(t,6000)});t();
Enjoy.
Please endorce my article if you found the script helful
https://www.erepublik.com/en/article/do-not-hesitate-to-endorse--2766033/1/20
#you can edit the script in the following way:
#If you need 100 endorses more, in the script
#for(let i=0;i<=210;i++){setTimeout(()=>{fetch('https://www.erepublik.com/en/main/donate-article',{method:'POST',headers:{'content-type':'application/x-www-form-urlencoded','cookie':`erpk=${erepublik.settings.pomelo.authToken}`},body:`articleId=${2765400+i}&amount=5&_token=${SERVER_DATA.csrfToken}`,compress:true})},5000*i);}
#210 replace with the amount of endorses you have left to complete the mission.
#2765400 replace with an article ID, that is a quite recent. With 2765700 for example. So this is a command that may help you:
#for(let i=0;i<=100;i++){setTimeout(()=>{fetch('https://www.erepublik.com/en/main/donate-article',{method:'POST',headers:{'content-type':'application/x-www-form-urlencoded','cookie':`erpk=${erepublik.settings.pomelo.authToken}`},body:`articleId=${2765700+i}&amount=5&_token=${SERVER_DATA.csrfToken}`,compress:true})},5000*i);}
# === TRAVELLING ===
# curl 'https://www.erepublik.com/en/main/travel' -H 'content-type: application/x-www-form-urlencoded' -H 'cookie: erpk=eee' --data-raw 'check=moveAction&_token=ttt&travelMethod=preferTicket&inRegionId=714&toCountryId=13' --compressed
# curl 'https://www.erepublik.com/en/main/travel' -H 'content-type: application/x-www-form-urlencoded' -H 'cookie: erpk=eee' --data-raw 'check=moveAction&_token=ttt&travelMethod=preferTicket&inRegionId=173&toCountryId=15' --compressed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment