SRL Archive - General

Problem


fantoom

2010-02-16 09:52:00

Someone help me please :)
I made all things:
changed this: {.Include SRL\SRL.scar}
and: name = 'man'
and:downloaded all includes
but still gets error: Line 37: [Error] (21607:23): Unknown identifier 'RSSX1' in script C:\Documents and Settings\Kasutaja\Desktop\RSC_Theiver 1.5.scar

http://img19.imageshack.us/img19/5035/errordk.png

void_hatred

2010-02-16 10:01:22

paste the whole code please? and wrap it in SCAR tags.

thanks,
void_hatred

fantoom

2010-02-16 10:28:41

From: void_hatred
paste the whole code please? and wrap it in SCAR tags.

thanks,
void_hatred




[PHP]program New;
{.Include SRL\SRL.scar}
{.include srl/srl/misc/Reports.scar}

const
hc_route = 'C:\Users\akwardsaw\desktop\hc.bmp';
txt_route = 'C:\Users\akwardsaw\desktop\slword.txt';
theive_col = 65536; //color of the person your pick-pocketing
ground_col = 143460; //color of ground you are standing on
//on the minimap. works best in houses/ buildings
name = 'man'; //names: man, or guard.
amount = 10;//how many attempts to pickpocket
procedure DeclarePlayers;
begin

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

writeln('Declaring Players');

with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Active := True;
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
'man' : DTM := DTMFromString('78DA636C676460B8C08002FEFF87D08C503E6' +
'32F90759A809A094498331DC83A4340CD1C22CC01B9F9247E3500' +
'DFC41435');
'pickpocket' : DTM := DTMFromString('78DA63CC67626038C3C8800CFEFFFF0FA661A' +
'28CE540351709A8A902AA3947404D0350CD69026ADA816A2E1350' +
'33890837CF04AAB94440CD02A09AB3F8D50000B31F22B7');
'infight' : DTM := DTMFromString('78DA635CCAC8C0708F0105FCFFFF1F4C3342F' +
'98CE780AC0704D4B0333130DC21A0E60B11E60802CDB945408D04' +
'50CD23026A1603593709A85904643DC4AF060008CA22D0');
'guard' : DTM := DTMFromString('78DA636C63646038CA8002FEFF87D08C503E6' +
'30F907588809A6E20EB2401353381AC2304D42C02B24E1050B314' +
'C83A48841A42EE9945D8EF0088361AF0');
end;
result := finddtm(dtm, x, y, rssx1, rssy1, rssx2, rssy2);
freedtm(dtm);
end;

procedure IFinfight;
var
t, x, y : integer;
tpa : tpointarray;
begin
if not Guptext('infight', x, y) then
exit;
inc(players[currentplayer].integers[2]);
GameTabRSC(5);
marktime(t);
while Guptext('infight', x, y) do
begin
findcolorsspiraltolerance(RSCMX, RSCMY, tpa, ground_col, RSMX1, RSMY1, RSMX2, RSMY2, 2);
mouse(tpa[0].x, tpa[0].y, 2, 2, true);
wait(200 + random(300));
if timefrommark(t) > 10000 then break;
end;
mmouse(rsscx, rsscy, 20, 20);
end;

procedure PickPocket;
var
cts, a, x, y : integer;
tpa : TPointArray;
begin
cts := getcolortolerancespeed;
colortolerancespeed(3);
findcolorsspiraltolerance(rsscx, rsscy, tpa, theive_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(name, x, y) then
begin
mouse(tpa[a].x, tpa[a].y, 0, 0, false);
wait(100 + random(200));
if Guptext('pickpocket', x, y) then
begin
mouse(x, y, 20, 5, true);
inc(players[currentplayer].integers[3]);
break;
end else
mmouse(random(100), random(100), 0, 0);
end;
wait(10 + random(100));
end;
wait(1200 + random(500));
IFinfight;
SleepIfNeeded;
end;

procedure prog;
var
Client : integer;
begin

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

Client := InitializeHTTPClient(True, True);
AddPostVariable(Client, 'sleep', inttostr(players[currentplayer].integers[1])); //email to send it to
AddPostVariable(Client, 'attack', inttostr(players[currentplayer].integers[2])); //message
AddPostVariable(Client, 'attempt', inttostr(players[currentplayer].integers[3])); //subject name
PostHTTPPageEx(Client, 'http://akwardsaw.hostoi.com/Awk_theiver.php'); //website
FreeHTTPClient(Client);
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] = amount;
end.[/PHP]

tell me pls whats wrong :)

void_hatred

2010-02-16 10:38:22

sorry I've never used RSC before, what is RSSX1 meant to refer to?

oh and by the way functions/procedures don't need parentheses if they have no arguments, therefore..

procedure getimage();

could be made into…

procedure GetImage;
yeah I prefer camal-case ;)

void_hatred

fantoom

2010-02-16 10:52:36

didn't help but thx anyway ;)

void_hatred

2010-02-16 11:00:28

sorry I've never used RSC before, what is RSSX1 meant to refer to?


that was the related part ^

void_hatred

Kasi

2010-02-16 11:00:41

u need to RSC includes is should work after u have them

fantoom

2010-02-16 11:04:06

http://img19.imageshack.us/img19/5035/errordk.png

hmm.. look at the folder, i have them in folder.. but i dunno is it right?!

Gu3st...

2010-02-16 12:07:44

You have to include them too, add {.include srl/srl_rsc} on line 4

fantoom

2010-02-16 15:17:49

From: Zyt3x
You have to include them too, add {.include srl/srl_rsc} on line 4



hmm, then comes again this error
Include file C:\Program Files\SCAR 3.22\includes\srl\srl_rsc does not exist.
Failed when compiling

fantoom

2010-02-16 15:18:50

someone plspls help meh

Bionicle

2010-02-16 15:22:33

you need to download it, im not to sure where it is, but you could probably find it searching around the forums for a while.

Gu3st...

2010-02-16 16:15:05

From: fantoom
hmm, then comes again this error
Include file C:\Program Files\SCAR 3.22\includes\srl\srl_rsc does not exist.
Failed when compiling
Oh, Shout! :S I meant {.Include SRL_RSC.scar} of course :duh:

Awkwardsaw

2010-02-16 16:56:32

thats my script, you could have PM'd me or posted in my thread :p

anyways, to get SRL-RSC do the same you would with normal SRL:

new folder, named "SRL-RSC"(i think)

and check out using the correct svn link, which can be found here

fantoom

2010-02-18 08:51:04

hmm it's impossible to get this script work :S again new error
Line 271: [Error] (394:16): Unknown identifier 'MMCX' in script C:\Program Files\SCAR 3.22\includes\SRL\SRL\Core\Math.scar
Failed when compiling

Wanted

2010-02-18 10:38:20

From: fantoom
hmm it's impossible to get this script work :S again new error
Line 271: [Error] (394:16): Unknown identifier 'MMCX' in script C:\Program Files\SCAR 3.22\includes\SRL\SRL\Core\Math.scar
Failed when compiling


You can't compile include files.

fantoom

2010-02-19 16:16:02

From: IceFire908
You can't compile include files.


huh?

Bionicle

2010-02-19 16:36:09

From: fantoom
huh?


What he's saying is files in the SRL folder do not have the {.include SRL/srl.scar}, and therefor can't compile because they use functions that are in the srl include. When you use those functions in your script, they work because your script should have an {.include SRL/srl.scar} at the beginning.

fantoom

2010-02-20 05:48:48

so could someone upload that kind version that has all files it needs lol ?