Jump to content

Check us out:

Photo
- - - - -

ibProBattle tampermonkey


  • Please log in to reply
No replies to this topic

#1
peyote

peyote
  • Gender:Male
  • Location:Basel
  • Server:Bunker #2
Click to view battle stats
A little tampermonkey script I wrote for myself, so I don't have to click, click and click.
It does replace every link to a user profile to a direct attack with weapon number 5.

Just edit the weaponID = "5"; and replace the 5, by whichever weapon you prefer. I only use this to for the top 5 money guys. The others I attack manually, as I have to carefully choose my weapons :D
Its a pretty stupid script to be honest, I wished it would be easier to add more stuff, but the hole ibProBattle site is built out of tables, its a pita.
// ==UserScript==
// @name         iArcade
// @namespace    http://peyote.ch/
// @version      1.0
// @description  Replaces silly strings.
// @match        http://bunker.aaxxss.com/forums/ibprobattle/*
// @copyright    2013, peyote
// @require http://code.jquery.com/jquery-latest.js
// ==/UserScript==

weapon_id = 5;

/*
 * Replace profile urls, by attack urls.
 * 
 */
target = "http://bunker.aaxxss.com/forums/index.php?showuser=";
attack = "http://bunker.aaxxss.com/forums/index.php?app=ibprobattle&module=attack&section=attack&m=";
direct = "http://bunker.aaxxss.com/forums/index.php?app=ibprobattle&module=attack&m=";
weapon = "&w=" + weapon_id;
$('a').each(function() {
    $(this).attr("href", function(index, old) {
        if (old != undefined) {
            if (old.substring(0, target.length) == target) {
                return direct + old.substring(target.length) + weapon;
            }
        }
    });
});

Edited by peyote, 11 June 2013 - 05:08 AM.