SRL Archive - Classic

REQ: Dummy hitter and beer drinker.


r4it

2009-11-26 07:22:37

Thought someone could do it… shouldnt be 2 hard with manual banking lol.
I could lend my user to test the script… if ur a trusted member.
Im a new user cause i didnt remember the email of my old user lol.

Edit:

Actually started working on it… got it to hit the dummy… and now trying to figure out how to get it to drink beer lol.

Could someone explait me how to use MouseItemRSC function?

Edit:

Took that thieving script what is posted under thieving and started editing it…
Got it to hit the dummy and drink the beer, but it fucks up.
Could someone help me with it?

mormonman

2009-11-26 13:28:02

Post what you have.

r4it

2009-11-26 13:36:05

From: mormonman
Post what you have.


I dont want to post a leeched and only modded peace of shit what doesnt even work :D

Il post it soon… if i get some more shit done.

Edit:

It usually fucks up after drinking the beer.


program New;
{.Include SRL-rsc/SRL_rsc.scar}
{.include srl/srl/misc/Reports.scar}

const
hc_route = 'C:\Users\akwardsaw\desktop\hc.bmp';
txt_route = 'C:\Users\akwardsaw\desktop\slword.txt';
man_col = 1648179; //color of the man, HAS to be a "man"
ground_col = 143460; //color of ground you are standing on
//on the minimap. works best in houses/ buildings
Integer = 2;
procedure DeclarePlayers;
begin

HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

writeln('Declaring Players');

with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Active := True;
integers[0] := 20; //how many attempts to pick pocket?
end;
end;

procedure getimage(); //Thanks too 'gottapercha'

var
b: Integer;
begin
b:= Bitmapfromstring(254,39, ''); //Create an empty bitmap with the correct width and height
CopyClientToBitmap(b, RSSX1+129, 230, RSSX1+383, 269); //Take a screenshot and copy it to b
sleep(400);
SaveBitmap(b, hc_route );
sleep(5000);
writeln('Got Image Sent to Leosleep!');
FreeBitmap(b); //Don't forget to free your bitmap after using
end;

procedure gettext; // By Thick As Blood
var
s2 : string;
InFile : Integer;
begin
InFile:= OpenFile(txt_route, False);
writeln('Typeing Text Now');
ReadFileString(InFile, s2, FileSize(InFile));
s2 := GetLetters(s2);
CloseFile(InFile);
if s2 = 'unknown' then//antiban...
begin
Mouse(RSSX1+170, 298, 12, 3, true);
Exit;
end;
Wait(Random(1500));
TypeSend(s2);
inc(players[currentplayer].integers[1]);
end;

procedure SleepIfNeeded;//by antti mies
var
I, x, y: Integer;
TooTired: Integer;
begin
TooTired := BitmapFromString(47, 10, 'beNpjYACC////M1AA4Nr/gwF5' +
'JkA0km0ChQ7A4xg036FZgVUQTQqrmcQYiytksLJxKSBSC0E1WL0zU' +
'I4ZkJBBi6mBdQyelD840wxWxcTnJoKZgqTcNIgAAJCMK/E=');
FindBitmapMaskTolerance(TooTired, x, y, RSSX1+52, 306, RSSX1+100, 317, 0, 0);
FreeBitmap(TooTired);
if X = 0 then Exit;
if not GameTabRSC(6) then Exit;
MMouse(RSSX1+477, 40, 33, 30);
Wait(2300+Random(555));
if FindColoredAreaTolerance(x, y, 3036283, RSSX1+267, 37, RSSX1+508, 237, 5, 0) then Mouse(x, y, 3, 3, true)
else Exit;
Wait(2500 + random(500));
repeat
while (GetColor(RSSX1+209, 249) = 255) do
Wait(500);
Wait(600);
GetImage;
GetText;
Wait(500 + random(1000));
Inc(I);
if I > 10 then
begin
WriteLn('LeoSleep Failed :(');
TerminateScript;
end;
until(GetColor(RSSX1+167,41)<>65535);
Wait(999);
end;

procedure antiban;
begin
if random(10) = 0 then SleepIfNeeded
end;

function Guptext(uptext : string; var x, y : integer): boolean;
var dtm : integer;
begin
case lowercase(uptext) of
'dummy' : DTM := DTMFromString('78DA636C636060E066C000FC40CC08C3DD408' +
'29D012B6084D17D40828B809A69408203BF1A00D79F0272');

'hit' : DTM := DTMFromString('78DA6334656460D8CA8001F8819811862D80E' +
'42606AC801146DB0059DB09A83106B276E257030048A803D0');

'att' : DTM := DTMFromString('78DA63EC646060B060644007AC400C1365D40' +
'6B22C31D53020AB390964591350731AC83225A0660F1176CD65C4' +
'EA6614355B89302714C83223A02618C8B221A02606D33DFFFFFF4' +
'755538D6917869A1584D500006A0B124A');

end;
result := finddtm(dtm, x, y, rssx1, rssy1, rssx2, rssy2);
freedtm(dtm);
end;

procedure IFatt;
var
t, x, y : integer;
tpa : tpointarray;
MM: Boolean;
begin
if not Guptext('att', x, y) then
exit;
inc(players[currentplayer].integers[2]);
GameTabRSC(5);
marktime(t);
while Guptext('att', x, y) do
begin
y := ((2+5)/5)-1;
x := 2 mod 5;
if not GameTabOpenedRSC(6) then MM := True;
if not GameTabRSC(6) then Exit;
if MM then MMouse(RSSX1+477, 40, 33, 30);
Wait(99+Random(99));
MMouse(RSSX1+285+x*49, 50+y*34, 5, 5);
GameTabOpenedRSC(6);
GetMousePos(x, y);
if MM then Wait(99+Random(99));
Mouse(x, y, 0, 0, True);
Wait(99+Random(99));
Mouse(x, y, 0, 0, True);
end;
wait(100 + random(500));
end;

procedure PickPocket;
var
cts, a, x, y : integer;
tpa : TPointArray;
begin
cts := getcolortolerancespeed;
colortolerancespeed(3);
findcolorsspiraltolerance(rsscx, rsscy, tpa, man_col, rssx1, rssy1, rssx2, rssy2, 2);
if length(tpa) < 50 then exit;
for a := 0 to 50 do
begin
mmouse(tpa[a].x, tpa[a].y, 0, 0);
if Guptext('dummy', x, y) then
begin
mouse(tpa[a].x, tpa[a].y, 0, 0, false);
wait(100 + random(300));
if Guptext('hit', x, y) then
begin
mouse(x, y, 0, 0, true);
inc(players[currentplayer].integers[3]);
break;
end else
mmouse(random(100), random(100), 0, 0);
end;
wait(10 + random(100));
end;
wait(2000 + random(500));
IFatt;
SleepIfNeeded;
end;

procedure prog;
begin
SRLPlayerReport(
ResultDebugBox, 0, false,
[false, False, false, False, False, false],
['Times slept', 'Got into fights', 'Total pick pockets'],
[], [1, 2, 3], [], []);
end;

procedure scriptterminate;
begin
prog;
end;

begin
setuprsc;
declareplayers;
if not loggedinRSC then loginrsc;
repeat
PickPocket;
wait(10 + random(20));
until players[currentplayer].integers[3] = players[currentplayer].integers[0];
end.

Awkwardsaw

2009-11-26 15:03:26

From: r4it
I dont want to post a leeched and only modded peace of shit what doesnt even work :D

Il post it soon… if i get some more shit done.

Edit:

It usually fucks up after drinking the beer.


program New;
{.Include SRL-rsc/SRL_rsc.scar}
{.include srl/srl/misc/Reports.scar}

const
hc_route = 'C:\Users\akwardsaw\desktop\hc.bmp';
txt_route = 'C:\Users\akwardsaw\desktop\slword.txt';
man_col = 1648179; //color of the man, HAS to be a "man"
ground_col = 143460; //color of ground you are standing on
//on the minimap. works best in houses/ buildings
Integer = 2;
procedure DeclarePlayers;
begin

HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

writeln('Declaring Players');

with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Active := True;
integers[0] := 20; //how many attempts to pick pocket?
end;
end;

procedure getimage(); //Thanks too 'gottapercha'

var
b: Integer;
begin
b:= Bitmapfromstring(254,39, ''); //Create an empty bitmap with the correct width and height
CopyClientToBitmap(b, RSSX1+129, 230, RSSX1+383, 269); //Take a screenshot and copy it to b
sleep(400);
SaveBitmap(b, hc_route );
sleep(5000);
writeln('Got Image Sent to Leosleep!');
FreeBitmap(b); //Don't forget to free your bitmap after using
end;

procedure gettext; // By Thick As Blood
var
s2 : string;
InFile : Integer;
begin
InFile:= OpenFile(txt_route, False);
writeln('Typeing Text Now');
ReadFileString(InFile, s2, FileSize(InFile));
s2 := GetLetters(s2);
CloseFile(InFile);
if s2 = 'unknown' then//antiban...
begin
Mouse(RSSX1+170, 298, 12, 3, true);
Exit;
end;
Wait(Random(1500));
TypeSend(s2);
inc(players[currentplayer].integers[1]);
end;

procedure SleepIfNeeded;//by antti mies
var
I, x, y: Integer;
TooTired: Integer;
begin
TooTired := BitmapFromString(47, 10, 'beNpjYACC////M1AA4Nr/gwF5' +
'JkA0km0ChQ7A4xg036FZgVUQTQqrmcQYiytksLJxKSBSC0E1WL0zU' +
'I4ZkJBBi6mBdQyelD840wxWxcTnJoKZgqTcNIgAAJCMK/E=');
FindBitmapMaskTolerance(TooTired, x, y, RSSX1+52, 306, RSSX1+100, 317, 0, 0);
FreeBitmap(TooTired);
if X = 0 then Exit;
if not GameTabRSC(6) then Exit;
MMouse(RSSX1+477, 40, 33, 30);
Wait(2300+Random(555));
if FindColoredAreaTolerance(x, y, 3036283, RSSX1+267, 37, RSSX1+508, 237, 5, 0) then Mouse(x, y, 3, 3, true)
else Exit;
Wait(2500 + random(500));
repeat
while (GetColor(RSSX1+209, 249) = 255) do
Wait(500);
Wait(600);
GetImage;
GetText;
Wait(500 + random(1000));
Inc(I);
if I > 10 then
begin
WriteLn('LeoSleep Failed :(');
TerminateScript;
end;
until(GetColor(RSSX1+167,41)<>65535);
Wait(999);
end;

procedure antiban;
begin
if random(10) = 0 then SleepIfNeeded
end;

function Guptext(uptext : string; var x, y : integer): boolean;
var dtm : integer;
begin
case lowercase(uptext) of
'dummy' : DTM := DTMFromString('78DA636C636060E066C000FC40CC08C3DD408' +
'29D012B6084D17D40828B809A69408203BF1A00D79F0272');

'hit' : DTM := DTMFromString('78DA6334656460D8CA8001F8819811862D80E' +
'42606AC801146DB0059DB09A83106B276E257030048A803D0');

'att' : DTM := DTMFromString('78DA63EC646060B060644007AC400C1365D40' +
'6B22C31D53020AB390964591350731AC83225A0660F1176CD65C4' +
'EA6614355B89302714C83223A02618C8B221A02606D33DFFFFFF4' +
'755538D6917869A1584D500006A0B124A');

end;
result := finddtm(dtm, x, y, rssx1, rssy1, rssx2, rssy2);
freedtm(dtm);
end;

procedure IFatt;
var
t, x, y : integer;
tpa : tpointarray;
MM: Boolean;
begin
if not Guptext('att', x, y) then
exit;
inc(players[currentplayer].integers[2]);
GameTabRSC(5);
marktime(t);
while Guptext('att', x, y) do
begin
y := ((2+5)/5)-1;
x := 2 mod 5;
if not GameTabOpenedRSC(6) then MM := True;
if not GameTabRSC(6) then Exit;
if MM then MMouse(RSSX1+477, 40, 33, 30);
Wait(99+Random(99));
MMouse(RSSX1+285+x*49, 50+y*34, 5, 5);
GameTabOpenedRSC(6);
GetMousePos(x, y);
if MM then Wait(99+Random(99));
Mouse(x, y, 0, 0, True);
Wait(99+Random(99));
Mouse(x, y, 0, 0, True);
end;
wait(100 + random(500));
end;

procedure PickPocket;
var
cts, a, x, y : integer;
tpa : TPointArray;
begin
cts := getcolortolerancespeed;
colortolerancespeed(3);
findcolorsspiraltolerance(rsscx, rsscy, tpa, man_col, rssx1, rssy1, rssx2, rssy2, 2);
if length(tpa) < 50 then exit;
for a := 0 to 50 do
begin
mmouse(tpa[a].x, tpa[a].y, 0, 0);
if Guptext('dummy', x, y) then
begin
mouse(tpa[a].x, tpa[a].y, 0, 0, false);
wait(100 + random(300));
if Guptext('hit', x, y) then
begin
mouse(x, y, 0, 0, true);
inc(players[currentplayer].integers[3]);
break;
end else
mmouse(random(100), random(100), 0, 0);
end;
wait(10 + random(100));
end;
wait(2000 + random(500));
IFatt;
SleepIfNeeded;
end;

procedure prog;
begin
SRLPlayerReport(
ResultDebugBox, 0, false,
[false, False, false, False, False, false],
['Times slept', 'Got into fights', 'Total pick pockets'],
[], [1, 2, 3], [], []);
end;

procedure scriptterminate;
begin
prog;
end;

begin
setuprsc;
declareplayers;
if not loggedinRSC then loginrsc;
repeat
PickPocket;
wait(10 + random(20));
until players[currentplayer].integers[3] = players[currentplayer].integers[0];
end.


i can make one real fast, lol. since its my theiver any ways

edit: what part is messing up?

edit edit:
program New;
{.Include SRL-rsc/SRL_rsc.scar}
{.include srl/srl/misc/Reports.scar}

const
hc_route = 'C:\Users\akwardsaw\desktop\hc.bmp';
txt_route = 'C:\Users\akwardsaw\desktop\slword.txt';
man_col = 1648179; //color of the man, HAS to be a "man"
Integer = 2;
procedure DeclarePlayers;
begin

HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

writeln('Declaring Players');

with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Active := True;
integers[0] := 20; //how many attempts to pick pocket?
end;
end;

procedure getimage(); //Thanks too 'gottapercha'

var
b: Integer;
begin
b:= Bitmapfromstring(254,39, ''); //Create an empty bitmap with the correct width and height
CopyClientToBitmap(b, RSSX1+129, 230, RSSX1+383, 269); //Take a screenshot and copy it to b
sleep(400);
SaveBitmap(b, hc_route );
sleep(5000);
writeln('Got Image Sent to Leosleep!');
FreeBitmap(b); //Don't forget to free your bitmap after using
end;

procedure gettext; // By Thick As Blood
var
s2 : string;
InFile : Integer;
begin
InFile:= OpenFile(txt_route, False);
writeln('Typeing Text Now');
ReadFileString(InFile, s2, FileSize(InFile));
s2 := GetLetters(s2);
CloseFile(InFile);
if s2 = 'unknown' then//antiban...
begin
Mouse(RSSX1+170, 298, 12, 3, true);
Exit;
end;
Wait(Random(1500));
TypeSend(s2);
inc(players[currentplayer].integers[1]);
end;

procedure SleepIfNeeded;//by antti mies
var
I, x, y: Integer;
TooTired: Integer;
begin
TooTired := BitmapFromString(47, 10, 'beNpjYACC////M1AA4Nr/gwF5' +
'JkA0km0ChQ7A4xg036FZgVUQTQqrmcQYiytksLJxKSBSC0E1WL0zU' +
'I4ZkJBBi6mBdQyelD840wxWxcTnJoKZgqTcNIgAAJCMK/E=');
FindBitmapMaskTolerance(TooTired, x, y, RSSX1+52, 306, RSSX1+100, 317, 0, 0);
FreeBitmap(TooTired);
if X = 0 then Exit;
if not GameTabRSC(6) then Exit;
MMouse(RSSX1+477, 40, 33, 30);
Wait(2300+Random(555));
if FindColoredAreaTolerance(x, y, 3036283, RSSX1+267, 37, RSSX1+508, 237, 5, 0) then Mouse(x, y, 3, 3, true)
else Exit;
Wait(2500 + random(500));
repeat
while (GetColor(RSSX1+209, 249) = 255) do
Wait(500);
Wait(600);
GetImage;
GetText;
Wait(500 + random(1000));
Inc(I);
if I > 10 then
begin
WriteLn('LeoSleep Failed :(');
TerminateScript;
end;
until(GetColor(RSSX1+167,41)<>65535);
Wait(999);
end;

procedure antiban;
begin
if random(10) = 0 then SleepIfNeeded
end;

function Guptext(uptext : string; var x, y : integer): boolean;
var dtm : integer;
begin
case lowercase(uptext) of
'dummy' : DTM := DTMFromString('78DA636C636060E066C000FC40CC08C3DD408' +
'29D012B6084D17D40828B809A69408203BF1A00D79F0272');

'hit' : DTM := DTMFromString('78DA6334656460D8CA8001F8819811862D80E' +
'42606AC801146DB0059DB09A83106B276E257030048A803D0');

'att' : DTM := DTMFromString('78DA63EC646060B060644007AC400C1365D40' +
'6B22C31D53020AB390964591350731AC83225A0660F1176CD65C4' +
'EA6614355B89302714C83223A02618C8B221A02606D33DFFFFFF4' +
'755538D6917869A1584D500006A0B124A');

end;
result := finddtm(dtm, x, y, rssx1, rssy1, rssx2, rssy2);
freedtm(dtm);
end;

var z : integer;

procedure IFatt;
var
x, y : integer;
MM: Boolean;
begin
if not Guptext('att', x, y) then
exit;
inc(z);
inc(players[currentplayer].integers[2]);
MM := GameTabRSC(6);
GetMousePos(x, y);
if MM then Wait(99+Random(99));
MouseItemRSC(z, 2);
Wait(99+Random(99));
MouseItemRSC(z + 1, 2);
wait(100 + random(500));
end;

procedure PickPocket;
var
cts, a, x, y : integer;
tpa : TPointArray;
begin
cts := getcolortolerancespeed;
colortolerancespeed(3);
findcolorsspiraltolerance(rsscx, rsscy, tpa, man_col, rssx1, rssy1, rssx2, rssy2, 2);
if length(tpa) < 50 then exit;
for a := 0 to 50 do
begin
mmouse(tpa[a].x, tpa[a].y, 0, 0);
if Guptext('dummy', x, y) then
begin
mouse(tpa[a].x, tpa[a].y, 0, 0, false);
wait(100 + random(300));
if Guptext('hit', x, y) then
begin
mouse(x, y, 0, 0, true);
inc(players[currentplayer].integers[3]);
break;
end;
end;
end;
wait(1000 + random(500));
IFatt;
SleepIfNeeded;
end;

procedure prog;
begin
SRLPlayerReport(
ResultDebugBox, 0, false,
[false, False, false, False, False, false],
['Times slept', 'Got into fights', 'Total pick pockets'],
[], [1, 2, 3], [], []);
end;

procedure scriptterminate;
begin
prog;
end;

begin
setuprsc;
declareplayers;
if not loggedinRSC then loginrsc;
repeat
PickPocket;
wait(10 + random(20));
until players[currentplayer].integers[3] = players[currentplayer].integers[0];
end.

try that out :)

r4it

2009-11-26 15:19:23

WOuld be nice if u could help :D

Mm… detecting the dummy doesnt work as i would like and sometimes it runs out of the room… after the drinking usually… browse trought the code and see what iv done wrong… havent tinkered with scar scripting much.

mormonman

2009-11-26 15:25:22

Make a new dummy clicking function, and make it click the dummy *after* you drink only.

r4it

2009-11-26 16:35:28

Awkwardsaw the one u posted… doesnt drink… opens inv and stops there.

morttt

2009-11-26 18:51:39

With all the bugs they left in rsc, it's a shame they took out the cocktail shaker bug. Reduced stats with one click and no need to bank :duh:

weequ

2009-11-27 10:44:27

From: morttt
With all the bugs they left in rsc, it's a shame they took out the cocktail shaker bug. Reduced stats with one click and no need to bank :duh:
Do you remember what drink we had to buy from the gnome bar? It used to lower attack like 7 or 8 levels..

morttt

2009-11-27 11:36:53

Whiskey still lowers attack by 8 levels, you can buy that from Blurberry. Stocks 5 at a time and respawn is quite fast.

Cocktail shaker didn't even need a drink lol, just click pour when it was empty:p

weequ

2009-11-27 11:57:23

From: morttt
Whiskey still lowers attack by 8 levels, you can buy that from Blurberry. Stocks 5 at a time and respawn is quite fast.

Cocktail shaker didn't even need a drink lol, just click pour when it was empty:p
Ty :)