Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function farm() {
- if ($(".StreamRpgError") != undefined) {
- location.reload();
- } else {
- var a = $('.srpg-map-actions-expired-button');
- var b = $('.fight-results-buttons');
- var c = $('.srpg-map-actions-fight-buttons');
- var d = $('.rewards-cta-buttons');
- e = $('#srpg-map-nodes-node-node_raid_scifi_1_1_tier_4');
- if (e) { e.click(); }
- e = $('#srpg-map-nodes-node-node_fantasy_3_1_tier_4');
- if (e) { e.click(); }
- e = $('#srpg-map-nodes-node-node_fantasy_2_1_tier_4');
- if (e) { e.click(); }
- e = $('#srpg-map-nodes-node-node_raid_fantasy_1_1_tier_4');
- if (e) { e.click(); }
- e = $('#srpg-map-nodes-node-node_fantasy_1_1_tier_4');
- if (e) { e.click(); }
- e = $('#srpg-map-nodes-node-node_raid_military_1_1_tier_4');
- if (e) { e.click(); }
- e = $('#srpg-map-nodes-node-node_military_1_1_tier_4');
- if (e) { e.click(); }
- e = $('#srpg-map-nodes-node-node_raid_fantasy_1_1_tier_4');
- if (e) { e.click(); }
- e = $('#srpg-map-nodes-node-node_military_2_1_tier_4');
- if (e) { e.click(); }
- if ($('.CountdownTimer') && $('.CountdownTimer').innerHTML == "00:00") {
- $('#srpg-nav-tab-GEAR').click();
- $('#srpg-nav-tab-FIGHT').click();
- }
- if (a) {
- f = a.getElementsByClassName('srpg-button');
- f[0].click();
- } else if (b) {
- f = b.getElementsByClassName('srpg-button');
- f[0].click();
- } else if (c) {
- f = c.getElementsByClassName('srpg-button');
- f[0].click();
- } else if (d) {
- f = d.getElementsByClassName('srpg-button btn btn-default');
- if (f.length == 3) {
- f[2].click();
- } else if (f.length == 2) {
- f[1].click();
- } else {
- f[0].click();
- }
- } else {
- console.log("%cFarming", "color:#009FC0");
- }
- if ($(".srpg-button-raid") != null) {
- $(".srpg-button-raid").click();
- }
- if ($(".srpg-button-maps") != null) {
- $(".srpg-button-maps").click();
- }
- }
- }
- function sellall() {
- if ($("#srpg-nav-tab-GEAR") != null) {
- $("#srpg-nav-tab-GEAR").click();
- }
- if ($(".backpack-item-common") != null) {
- $(".backpack-item-common").click();
- } else if ($(".backpack-item-uncommon") != null) {
- $(".backpack-item-uncommon").click();
- } else if ($(".backpack-item-rare") != null) {
- $(".backpack-item-rare").click();
- } else if ($(".backpack-item-epic") != null) {
- $(".backpack-item-epic").click();
- } else if ($(".backpack-item-common") == null && $(".backpack-item-uncommon") == null && $(".backpack-item-rare") == null && $(".backpack-item-epic") == null) {
- console.log("%cnothing to sell", "color:#FF00FF");
- } else {
- console.log("%cerror selling", "color:#FF0000");
- if ($("#srpg-nav-tab-FIGHT") != null) {
- $("#srpg-nav-tab-FIGHT").click();
- }
- }
- if ($(".srpg-active-item-actions-trash") != null) {
- $(".srpg-active-item-actions-trash").click();
- if ($(".button-block > .btn-default") != null) {
- $(".button-block > .btn-default").click();
- }
- } else {
- if ($("#srpg-nav-tab-FIGHT") != null) {
- $("#srpg-nav-tab-FIGHT").click();
- } else if ($("#srpg-nav-tab-button") != null) {
- $("#srpg-nav-tab-button").click();
- } else if ($("#srpg-nav-tab-continue") != null) {
- $("#srpg-nav-tab-continue").click();
- } else {
- console.log("%cbutton error", "color:#FF0000");
- }
- }
- if ($("#srpg-nav-tab-FIGHT") != null) {
- $("#srpg-nav-tab-FIGHT").click();
- }
- }
- function contribute() {
- var str = "";
- if ($("#srpg-building-building_watchtower-contribute") != null) {
- $("#srpg-building-building_watchtower-contribute").click();
- console.log("%cupgrading watchtower", "color:#0000FF");
- } else {
- str += "watchtower ";
- }
- if ($("#srpg-building-building_wormhole-contribute") != null) {
- $("#srpg-building-building_wormhole-contribute").click();
- console.log("%cupgrading wormhole", "color:#0000FF");
- } else {
- str += "wormhole ";
- }
- if ($("#srpg-build-building_barracks-contribute") != null) {
- $("#srpg-building-building_barracks-contribute").click();
- console.log("%cupgrading barracks", "color:#0000FF");
- } else {
- str += "barracks ";
- }
- if (str != "") {
- console.log("%c" + "%s" + "maxed", "color:#FF00FF", str);
- }
- }
- if (i == null) { var i = 0; }
- if (j == null) { var j = 0; }
- function main() {
- console.log("\n".repeat(10));
- farm();
- if (i >= 8) {
- console.log("%cTrying to sell", "color:#0000FF");
- sellall();
- i = 0;
- } else if (j >= 16) {
- console.log("%cTrying to contribute", "color:#0000FF");
- contribute();
- j = 0;
- }
- i++;
- j++;
- console.log("i = " + i + "\n" + "j = " + j);
- }
- main();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement