SRL Archive - Help and Support

Script Problem: Thiever.


Abyssal

2006-06-09 18:00:34

I haven't done SCAR in ages, so how about a little help? :P

This script loads and does nothing. Anyone know why?

Keen

2006-06-09 18:02:10

Idk.. I would have to see the script.

Have you put "setupsrl;" at the start of your main event loop? :confused:

EDIT:

Lol never noticed the attachment.. sorry. :p

You said the script compiles but when I run it, it dosnt know what find is.
Also don't you have to load the bmp?

Abyssal

2006-06-09 18:14:36

Oops, sorry. I must have deleted the Obj after Find. Even if I did load the BMP's, it never had to search for them because it doesn't click on the man.

Bebe

2006-06-09 18:19:17

{-----------------------------------]
[- Lumbridge Man Thiever -]
[-----------------------------------]
[- Setup: -]
[- 1. Start either logged in, or -]
[- out. -]
[- 2. Set RuneScape to V-Bright. -]
[- 3. Start right outside of -]
[- Lumbridge Castle, by the -]
[- man with the blue shirt. -]
[- 4. Pick the colors and start. -]
[-----------------------------------}
program Lumbridge_Man_Thiever;

{.include SRL\SRL.scar}

const
Shirt = 13270644; //The man's shirt.

var
a, b: Integer;
PickPocket: Integer;

procedure LoadBitmaps;
begin
PickPocket:= BitmapFromString(21, 2, 'z78DA3375313531317743020660802' +
'90201A660F5101297B81B0E80A906BF7A62CCC7256E800320AB04' +
'0037A23AD2');
end;

procedure ThieveMan;
begin
if(Findobj(a, b, 'Attack Man', Shirt, 15))then
begin
Mouse(a, b, 2, 2, False);
if(FindBitmapSpiralTolerance(PickPocket, a, b, MCX1, MCX2, MCY1, MCY2, 10))then
begin
Mouse(a, b, 2, 2, True);
Wait(2000);
if(FindColorSpiralTolerance(a, b, 2024692, MCX1, MCX2, MCY1, MCY2, 10))then
begin
Wait(5000);
end;
end;
end;
end;

begin
SetupSRL;
LoadBitmaps;
repeat
ThieveMan;
until(False);
end.

Use higher tolerances if needed, I uped yours to 15 and 10. ;)

Keen

2006-06-09 18:21:45

Im not sure nothing much looks wrong with the script.
Mahby it's something to do with the color..

But I can't really help.. sorry man.

—-

Just a tip.

You don't need a bit map.. use this procedure.

[PHP]function PopUp(Option: String): Boolean;
By: RsN
Description:
Finds Popup menu, then clicks Option.
[/PHP]

Btw, nice to see you around again man. :)
Im genius from saradomin and kait btw.. doubt you remember me though.

Abyssal

2006-06-09 18:22:51

Sorry about this thread, but I just realized it.

I used MCX1, MCX2. When I should use MCX1, MCY1. I think.

Anyways, it works now.

Thanks for the help.

Bebe

2006-06-09 19:40:25

Why are you looking in the chat box anyway?

{-----------------------------------]
[- Lumbridge Man Thiever -]
[-----------------------------------]
[- Setup: -]
[- 1. Start either logged in, or -]
[- out. -]
[- 2. Set RuneScape to V-Bright. -]
[- 3. Start right outside of -]
[- Lumbridge Castle, by the -]
[- man with the blue shirt. -]
[- 4. Pick the colors and start. -]
[-----------------------------------}
program Lumbridge_Man_Thiever;

{.include SRL\SRL.scar}

const
Shirt = 13270644; //The man's shirt.

var
a, b: Integer;
PickPocket: Integer;

procedure LoadBitmaps;
begin
PickPocket:= BitmapFromString(21, 2, 'z78DA3375313531317743020660802' +
'90201A660F5101297B81B0E80A906BF7A62CCC7256E800320AB04' +
'0037A23AD2');
end;

procedure ThieveMan;
begin
if(Findobj(a, b, 'ttack Man', Shirt, 15))then
begin
Mouse(a, b, 2, 2, False);
if(FindBitmapSpiralTolerance(PickPocket, a, b, MSX1,MSY1,MSX2,MSY2, 10))then
begin
Mouse(a, b, 2, 2, True);
Wait(2000);
if(FindColorSpiralTolerance(a, b, 2024692, MSX1,MSY1,MSX2,MSY2, 10))then
begin
Wait(5000);
end;
end;
end;
end;

begin
SetupSRL;
LoadBitmaps;
repeat
ThieveMan;
until(False);
end.

Keen

2006-06-09 20:14:11

Bebe, he was ment to be searching in the main screen but had the chat dimensions in the script by accident.