SRL Archive - Other Scripts

Darkthrone Recruiter


splatt25

2007-05-22 12:54:05

Hi i have read lots of tuts on scripting and have tried to make a rectruiter for darkthrone but i dont know what i have been doing wrong as if i go by coordinates it only does a couple of clicks in the right place then stops, i then tried bitmap and it does the same.
heres what i have so far

program DarkThroneRecruiter;

const
loadtime = 4000; //Pause between clicks change for your internet speed
var
c: Integer;
untitled: Integer;
x,y: Integer;

procedure LoadBmp;
begin
untitled := BitmapFromString(9, 10, 'z78DAA590410A43310844A' +
'FA446635C6A12EF7FA47E6AA11FDAD045B31032CC638601F8F7D9' +
'D060C99C20B296BB40DDBD83797795D9F689CD8CC9A6439CF8FA3' +
'268CC319B950E8880F98342485C3A3A377D51A7AC15D448BB2052' +
'5195B5B7F3339DA09DA8686AD82246272D3F4B13EC472ADD512BA' +
'BD85288D0A09FD7F06B817BC3A2F6B6095F3634EF81A3A8656381' +
'552B1626CABBFE250CC1F1DDFC727E5A1EC8AB6F8B');
end;

procedure UseBmp;
begin
if(FindBitmapIn(untitled,x,y,394, 356,409, 367)) then
begin
MoveMouseSmooth(x,y);
Wait(loadtime);
ClickMouse(x,y,true);
end;
end;

begin
MoveMouseSmooth(670,103);
Wait(1000);

MoveMouseSmooth(698,125);
ClickMouse(698,125,true);
Wait(3000+random(200));

MoveMouseSmooth(512, 380);
ClickMouse(512, 380,true);
MoveMouseSmooth(455, 360);

Wait(4000);

c:= 0;
repeat
LoadBmp;
UseBmp;
c:= c + 1;
until (c = 350)
FreeBitmap(untitled);
end.

Please help me find the problem
Ash

shaunthasheep

2007-05-23 15:07:08

ur problem is here

repeat
LoadBmp;
UseBmp;
c:= c + 1;
until (c = 350)
FreeBitmap(untitled);

first of all.. u only need to load the Bmp Once.. so it should look like this


LoadBmp;
repeat
UseBmp;
c:= c + 1;
until (c = 350)
FreeBitmap(untitled);

second of all…. if it doesn't find the bitmap.. it will still add C + 1

so first we need to edit this:

procedure UseBmp;
begin
if(FindBitmapIn(untitled,x,y,394, 356,409, 367)) then
begin
MoveMouseSmooth(x,y);
Wait(loadtime);
ClickMouse(x,y,true);
end;
end;


to

function UseBmp : boolean;
begin
if(FindBitmapIn(untitled,x,y,394, 356,409, 367)) then
begin
MoveMouseSmooth(x,y);
Wait(loadtime);
ClickMouse(x,y,true);
Result := True;
end;
end;
this return true if the button was clicked.

now we need to change this part again:


LoadBmp;
repeat
UseBmp;
c:= c + 1;
until (c = 350)
FreeBitmap(untitled);


to


LoadBmp;
repeat
if UseBmp then //if the button was clicked it will add one, else it wont
c:= c + 1;
until (c = 350)
FreeBitmap(untitled);

splatt25

2007-05-24 08:45:07

Hey cheers for the help im new to scripting if you hadn't noticed lol.
Cheers again!
Ash