A preserved archive of the Logical Gamers community forums, 2009-2025. The original threads and posts, served read-only. Registration, posting and private messages are gone for good.

Boredom strikes again...

1.1k views · started by Chris ·
#1
Boredom strikes again...
javascript:
var bh_skill = '1';
var bh_retreat = true;
function bh_do_attack ()
{
var hasopponent = false;
var lostbattle = false;

for ( var i in battle_data.monsters )
{
if ( $ ( '#monster_' + i + ' .health_bar' ).attr ( 'data_current_hp' ) > 0 )
{
hasopponent = true;
break;
}
}

if ( $ ( ".header_box" ).text ( ).indexOf ( 'lost' ) > -1 )
{
lostbattle = true;
}

if ( hasopponent && !lostbattle )
{
if ( $ ( '#energy_timer' ).width ( ) == 100 )
{
$ ( 'a[data_skill_id="' + bh_skill + '"]' ).click ( );
}
setTimeout ( 'bh_do_attack ()' , 1000 );
}
else if ( lostbattle )
{
$ ( "a.cancel_button" ).click ( );
}
else
{
if ( bh_retreat )
{
$ ( "#retreat_waves" ).click ( );
}
else
{
$ ( "#continue_waves" ).click ( );
}
}
}
bh_do_attack ();


Meh...
#2
Teach me!!!
#3
Snow-kun wrote:
Teach me!!!


Teach you what? It's just JavaScript injection. :]

I'm releasing my bot soon, I'm bored anyways.
Boredom strikes again... | Logical Gamers Archive