PDA

View Full Version : Battle-Scape bot # Alcher #



Daher
09-22-2012, 03:24 PM
{$DEFINE RS2}
{$I OSI\OSI.scar}

var
A:Integer;
B:Integer;
begin
repeat
Mouse(786,259,0,0,true);
wait(100);
if findcolor(A,B,634799,587,391,799,549) then
Mouse(A,B,0,0,true);
wait(800);
if findcolor(A,B,858751,566,241,803,559) then
Mouse(A,B,0,0,true);
wait(100);
if findcolor(A,B,71705,748,394,771,412) then
Mouse(691,255,0,0,true);
wait(100);
if findcolor(A,B,45311,566,241,803,559) then
TypeSend('rune');

if findcolor(A,B,45311,566,241,803,559) then
TypeSend('iron');

if findcolor(A,B,45311,566,241,803,559) then
TypeSend('black');

if findcolor(A,B,45311,566,241,803,559) then
TypeSend('brown');

if findcolor(A,B,45311,566,241,803,559) then
TypeSend('steel');

if findcolor(A,B,45311,566,241,803,559) then
TypeSend('bronze');

if findcolor(A,B,45311,566,241,803,559) then
TypeSend('dragon');

if findcolor(A,B,45311,566,241,803,559) then
TypeSend('mithril');

if findcolor(A,B,45311,566,241,803,559) then
TypeSend('adamant');

if findcolor(A,B,45311,566,241,803,559) then
TypeSend('5');

if findcolor(A,B,45311,566,241,803,559) then
TypeSend('1');

if findcolor(A,B,45311,566,241,803,559) then
TypeSend('2');

if findcolor(A,B,45311,566,241,803,559) then
TypeSend('3');

if findcolor(A,B,45311,566,241,803,559) then
TypeSend('4');

if findcolor(A,B,45311,566,241,803,559) then
TypeSend('6');

if findcolor(A,B,45311,566,241,803,559) then
TypeSend('7');

if findcolor(A,B,45311,566,241,803,559) then
TypeSend('8');

if findcolor(A,B,45311,566,241,803,559) then
TypeSend('9');

if findcolor(A,B,45311,566,241,803,559) then
TypeSend('10');
if findcolor(A,B,45311,566,241,803,559) then
TypeSend('seven');

if findcolor(A,B,45311,566,241,803,559) then
TypeSend('six');

if findcolor(A,B,45311,566,241,803,559) then
TypeSend('five');

if findcolor(A,B,45311,566,241,803,559) then
TypeSend('four');

if findcolor(A,B,45311,566,241,803,559) then
TypeSend('three');

if findcolor(A,B,45311,566,241,803,559) then
TypeSend('two');

if findcolor(A,B,45311,566,241,803,559) then
TypeSend('one');

if findcolor(A,B,45311,566,241,803,559) then
TypeSend('eight');
if findcolor(A,B,45311,566,241,803,559) then
TypeSend('nine');
if findcolor(A,B,45311,566,241,803,559) then
TypeSend('ten');
if findcolor(A,B,45311,566,241,803,559) then
TypeSend('attack');
if findcolor(A,B,45311,566,241,803,559) then
TypeSend('defence');
if findcolor(A,B,45311,566,241,803,559) then
TypeSend('strength');
if findcolor(A,B,45311,566,241,803,559) then
TypeSend('Hitpoints');
if findcolor(A,B,45311,566,241,803,559) then
TypeSend('range');
if findcolor(A,B,45311,566,241,803,559) then
TypeSend('prayer');
if findcolor(A,B,45311,566,241,803,559) then
TypeSend('magic');
if findcolor(A,B,45311,566,241,803,559) then
TypeSend('cooking');
if findcolor(A,B,45311,566,241,803,559) then
TypeSend('woodcutting');
if findcolor(A,B,45311,566,241,803,559) then
TypeSend('fletching');
if findcolor(A,B,45311,566,241,803,559) then
TypeSend('fishing');
if findcolor(A,B,45311,566,241,803,559) then
TypeSend('firemaking');
if findcolor(A,B,45311,566,241,803,559) then
TypeSend('crafting');
if findcolor(A,B,45311,566,241,803,559) then
TypeSend('smithing');
if findcolor(A,B,45311,566,241,803,559) then
TypeSend('mining');
if findcolor(A,B,45311,566,241,803,559) then
TypeSend('herblore');
if findcolor(A,B,45311,566,241,803,559) then
TypeSend('agility');
if findcolor(A,B,45311,566,241,803,559) then
TypeSend('thieving');
if findcolor(A,B,45311,566,241,803,559) then
TypeSend('slayer');
if findcolor(A,B,45311,566,241,803,559) then
TypeSend('farming');
if findcolor(A,B,45311,566,241,803,559) then
TypeSend('runecrafting');
if findcolor(A,B,45311,566,241,803,559) then
TypeSend('hunter');
if findcolor(A,B,45311,566,241,803,559) then
TypeSend('construction');
until(false);
end.

// Alcher ^

/ Scar code.

weequ
09-22-2012, 04:04 PM
Why
if findcolor(A,B,45311,566,241,803,559) then
30 times or something.. I mean they all have same parameters? And how come it uses OSI.scar?

Daher
09-23-2012, 05:21 PM
Why
if findcolor(A,B,45311,566,241,803,559) then
30 times or something.. I mean they all have same parameters? And how come it uses OSI.scar?

Well it's a random, we can't make an actual inject able code so we actually guess the word that it's randomized.

We can't either have


if findcolor(A,B,45311,566,241,803,559);
TypeSend(TQL);
TypeSend(TQL);
TypeSend(TQL);

Stacked up either, since it'll not recognize the color 45311, instead it would type it out every time it repeats itself, instead we put out a if findcolor at every TypeSend. So that we'll not interrupt the script doing it's task every 5 seconds.

weequ
09-23-2012, 05:57 PM
Does typing the correct word remove the Color 45311?

You could make it shorter and easier to understand like this:


{$DEFINE RS2}
{$I OSI\OSI.scar}

var
Texts: Array of String;
X, Y, I:Integer;

begin //0 1 2 3 4 5 High(Texts)
Texts := ['rune', 'iron', 'black', 'brown', 'steel', 'bronze', 'dragon', 'mithril', 'adamant', '5', '1', '2', '3', '4', '6'];//Didn't add all the words.
repeat
Mouse(786,259,0,0,true);
wait(100);
if findcolor(X,Y,634799,587,391,799,549) then
Mouse(A,B,0,0,true);
wait(800);
if findcolor(X,Y,858751,566,241,803,559) then
Mouse(A,B,0,0,true);
wait(100);
if findcolor(X,Y,71705,748,394,771,412) then
Mouse(691,255,0,0,true);
wait(100);
I := 0;
while (findcolor(X,Y,45311,566,241,803,559) or (I > High(Texts))) do
begin
TypeSend(Texts[I]);//Type
I := I + 1; //Increase I by one
end;
if I > High(Texts) then TerminateScript;//None of the Texts worked.
until(false);
end.
I didn't bother adding all the words to Texts but you can do it easily just by adding a comma and a string.




if findcolor(A,B,45311,566,241,803,559);
TypeSend(TQL);
TypeSend(TQL);
TypeSend(TQL);

Stacked up either, since it'll not recognize the color 45311, instead it would type it out every time it repeats itself, instead we put out a if findcolor at every TypeSend. So that we'll not interrupt the script doing it's task every 5 seconds.
To solve this problem:
if findcolor(A,B,45311,566,241,803,559) then
begin//Everything between begin and end; will be executed when the color is found and nothing when it's not found.
TypeSend(TQL);//It's common practice to add indentation to this kind of code blocks including loops because it makes the script easier to read leaving less change for error.
TypeSend(TQL);
TypeSend(TQL);
end;

exilednoob
09-30-2012, 03:47 AM
Omg you dont even need this Script.
Just use Gary's Hood auto clicker/auto alcher.

Daher
09-30-2012, 12:56 PM
Omg you dont even need this Script.
Just use Gary's Hood auto clicker/auto alcher.

And how would the script complete randoms ?

exilednoob
10-01-2012, 12:29 AM
And how would the script complete randoms ?

You just have to watch for randoms yourself, they are rare while high alching anyway
You cant leave a bot unattended for more than a couple hours on Battle-Scape anyway without getting banned.

Daher
10-02-2012, 02:48 PM
You just have to watch for randoms yourself, they are rare while high alching anyway
You cant leave a bot unattended for more than a couple hours on Battle-Scape anyway without getting banned.

What if you're afk :duh: