SRL Archive - OSR Help

Help with 1st script


catanado15

2012-04-14 07:33:01

I need help to my first script… it will be an Al-Kharid Tanner. i've done this, but get some errors… can anyone teach me ?


program ArrowShafter;
//{$DEFINE SMART}
{$i srl/srl.simba}

{$IFDEF SMART}
{$i srl/srl/misc/paintsmart.simba}
{$ENDIF}

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name := ''; // Username
Pass := ''; // Password
Active := True; // Set to true if you want to use Player 0
end;
end;

procedure Antiban;
begin
if(not(LoggedIn))then Exit;
begin
case Random(100) of
10: RandomRClick;
30: PickUpMouse;
50: RandomMovement;
70: BoredHuman;
89: ExamineInv;
end;
end;
end;

procedure Withraw ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63E46566608863644006B5311E601A260' +
'A001F210193');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;
procedure takeall ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA633464666078CAC8800C562D5A04A661A' +
'200403C030B');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;
procedure Walk ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63CC646160C861644006FD09F6601A260' +
'A002E67020B');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;
procedure Findtannery ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63CC656160B064644006CB2B43C0344C1' +
'4002CE30222');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end.

if (findobjcustom(x,y,['Ellis'],[5593203] then

procedure Trade ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63646666602866644006A55161601A260' +
'A00207401A2');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end.
procedure Tan-Hides ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63DCC8C4C030879101191C3BB1054CC34' +
'4014DB90395');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end.

procedure Takeall ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63D46462604860644006EFEFDC02D3305' +
'10039AD0334');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end.
procedure backtobank ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63FCC2CCC0E0CDC8800CD6CE2A04D3305' +
'100454902FE');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end.
procedure backtobank ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA639464616050676440065B16BB8269982' +
'80021AD01E4');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end.
rocedure takeall ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA633464666078CAC8800C562D5A04A661A' +
'200403C030B');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;

repeat

until(not logged in) Then(exit)





procedure MainLoop;
begin
end;

begin
{$IFDEF SMART}
Smart_Server := 0;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
{$ENDIF}
SetupSRL();
ClearDebug();
DeclarePlayers();
LoginPlayer();
MainLoop();
end.

eska

2012-04-14 07:41:34

Use simba tag
[*simba][*/simba]

(remove *)

No way I'm reading this in its current form. My eye are starting to bleed.

riwu

2012-04-14 07:49:04

u should NEVER end a procedure with a "." (full-stop). "." is only reserved for the mainloop (at the very end of ur script). So replace all "end." with "end;" in procedures should fix most errors.

Also why some of ur codes just appear out of nowhere?
eg: line 134.

And i would advise that you read up on standards, its better to start using good standards right from start than to fix all of them later on.

RightClick

2012-04-14 08:04:54

Put simba tag please, or nobody going to read your script:stirthepot:

catanado15

2012-04-14 08:11:34

program ArrowShafter;
//{$DEFINE SMART}
{$i srl/srl.simba}

{$IFDEF SMART}
{$i srl/srl/misc/paintsmart.simba}
{$ENDIF}

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name := ''; // Username
Pass := ''; // Password
Active := True; // Set to true if you want to use Player 0
end;
end;

procedure Antiban;
begin
if(not(LoggedIn))then Exit;
begin
case Random(100) of
10: RandomRClick;
30: PickUpMouse;
50: RandomMovement;
70: BoredHuman;
89: ExamineInv;
end;
end;
end;

procedure Withraw ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63E46566608863644006B5311E601A260' +
'A001F210193');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;
procedure takeall ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA633464666078CAC8800C562D5A04A661A' +
'200403C030B');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;
procedure Walk ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63CC646160C861644006FD09F6601A260' +
'A002E67020B');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;
procedure Findtannery ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63CC656160B064644006CB2B43C0344C1' +
'4002CE30222');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end.

if (findobjcustom(x,y,['Ellis'],[5593203] then

procedure Trade ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63646666602866644006A55161601A260' +
'A00207401A2');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end.
procedure Tan-Hides ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63DCC8C4C030879101191C3BB1054CC34' +
'4014DB90395');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end.

procedure Takeall ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63D46462604860644006EFEFDC02D3305' +
'10039AD0334');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end.
procedure backtobank ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63FCC2CCC0E0CDC8800CD6CE2A04D3305' +
'100454902FE');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end.
procedure backtobank ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA639464616050676440065B16BB8269982' +
'80021AD01E4');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end.
rocedure takeall ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA633464666078CAC8800C562D5A04A661A' +
'200403C030B');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;

repeat

until(not logged in) Then(exit)





procedure MainLoop;
begin
end;

begin
{$IFDEF SMART}
Smart_Server := 0;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
{$ENDIF}
SetupSRL();
ClearDebug();
DeclarePlayers();
LoginPlayer();
MainLoop();
end.

catanado15

2012-04-14 08:13:15

From: riwu
u should NEVER end a procedure with a "." (full-stop). "." is only reserved for the mainloop (at the very end of ur script). So replace all "end." with "end;" in procedures should fix most errors.

Also why some of ur codes just appear out of nowhere?
eg: line 134.

And i would advise that you read up on standards, its better to start using good standards right from start than to fix all of them later on.


at line 134 i done that to find a moving NPC, but i'm starting scripting… that's why my fails :P

Joe

2012-04-14 08:34:34

This looks like a copy and paste from Kyle Undefind's Tutorial on "how make your first simple script"… if it is, put in creds

catanado15

2012-04-14 08:40:21

From: JOEbot
This looks like a copy and paste from Kyle Undefind's Tutorial on "how make your first simple script"… if it is, put in creds


Yes, some parts are….

Rezozo

2012-04-14 09:10:10

Mother of god… Can't even figure out what you want!

Compile it, if there are errors, post. Il look at it then!

Joey Out!

catanado15

2012-04-14 09:24:33

From: joeygupta
Mother of god… Can't even figure out what you want!

Compile it, if there are errors, post. Il look at it then!

Joey Out!

[Hint] C:\Simba\Includes\SRL/SRL/core/mapwalk.simba(1353:3): Variable 'BOX' never used at line 1352
[Error] (135:19): Unknown identifier 'x' at line 134

Imagine

2012-04-14 10:08:44

I'm guessing part of the error has to do with:


if (findobjcustom(x,y,['Ellis'],[5593203] then

It's missing an end bracket, and it has no begin/end/thing to do if it is true?

Abu

2012-04-14 10:16:51

Man I hate not being a mod. Wrong section.

Anyways this should compile:
program ArrowShafter;
//{$DEFINE SMART}
{$i srl/srl.simba}

{$IFDEF SMART}
{$i srl/srl/misc/paintsmart.simba}
{$ENDIF}

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name := ''; // Username
Pass := ''; // Password
Active := True; // Set to true if you want to use Player 0
end;
end;

procedure Antiban;
begin
if(not(LoggedIn))then Exit;
begin
case Random(100) of
10: RandomRClick;
30: PickUpMouse;
50: RandomMovement;
70: BoredHuman;
89: ExamineInv;
end;
end;
end;

procedure Withraw ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63E46566608863644006B5311E601A260' +
'A001F210193');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;
procedure takeallOne;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA633464666078CAC8800C562D5A04A661A' +
'200403C030B');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;
procedure Walk ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63CC646160C861644006FD09F6601A260' +
'A002E67020B');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;
procedure Findtannery ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63CC656160B064644006CB2B43C0344C1' +
'4002CE30222');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;

procedure Trade ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63646666602866644006A55161601A260' +
'A00207401A2');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;

procedure TanHides;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63DCC8C4C030879101191C3BB1054CC34' +
'4014DB90395');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;

procedure TakeallTwo;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63D46462604860644006EFEFDC02D3305' +
'10039AD0334');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;

procedure backtobank ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63FCC2CCC0E0CDC8800CD6CE2A04D3305' +
'100454902FE');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;

procedure backtobanktwo;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA639464616050676440065B16BB8269982' +
'80021AD01E4');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;

procedure takeall ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA633464666078CAC8800C562D5A04A661A' +
'200403C030B');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;


procedure MainLoop;
begin
end;

begin
{$IFDEF SMART}
Smart_Server := 0;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
{$ENDIF}
SetupSRL();
ClearDebug();
DeclarePlayers();
LoginPlayer();
MainLoop();
end.

Mistakes you were making:
- Naming two procedures exactly the same
- Leaving a space before putting a semicolon.
- Putting full stops after your ends, the only full stop you use is one the final end of the entire script
- Random lines of code between procedures

catanado15

2012-04-14 10:38:46

From: abu_jwka
Man I hate not being a mod. Wrong section.

Anyways this should compile:
program ArrowShafter;
//{$DEFINE SMART}
{$i srl/srl.simba}

{$IFDEF SMART}
{$i srl/srl/misc/paintsmart.simba}
{$ENDIF}

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name := ''; // Username
Pass := ''; // Password
Active := True; // Set to true if you want to use Player 0
end;
end;

procedure Antiban;
begin
if(not(LoggedIn))then Exit;
begin
case Random(100) of
10: RandomRClick;
30: PickUpMouse;
50: RandomMovement;
70: BoredHuman;
89: ExamineInv;
end;
end;
end;

procedure Withraw ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63E46566608863644006B5311E601A260' +
'A001F210193');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;
procedure takeallOne;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA633464666078CAC8800C562D5A04A661A' +
'200403C030B');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;
procedure Walk ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63CC646160C861644006FD09F6601A260' +
'A002E67020B');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;
procedure Findtannery ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63CC656160B064644006CB2B43C0344C1' +
'4002CE30222');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;

procedure Trade ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63646666602866644006A55161601A260' +
'A00207401A2');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;

procedure TanHides;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63DCC8C4C030879101191C3BB1054CC34' +
'4014DB90395');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;

procedure TakeallTwo;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63D46462604860644006EFEFDC02D3305' +
'10039AD0334');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;

procedure backtobank ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63FCC2CCC0E0CDC8800CD6CE2A04D3305' +
'100454902FE');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;

procedure backtobanktwo;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA639464616050676440065B16BB8269982' +
'80021AD01E4');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;

procedure takeall ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA633464666078CAC8800C562D5A04A661A' +
'200403C030B');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;


procedure MainLoop;
begin
end;

begin
{$IFDEF SMART}
Smart_Server := 0;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
{$ENDIF}
SetupSRL();
ClearDebug();
DeclarePlayers();
LoginPlayer();
MainLoop();
end.

Mistakes you were making:
- Naming two procedures exactly the same
- Leaving a space before putting a semicolon.
- Putting full stops after your ends, the only full stop you use is one the final end of the entire script
- Random lines of code between procedures


Thank you so much ! now to finish the script to can use, what i need to do now ?

riwu

2012-04-14 10:46:32

From: abu_jwka
Man I hate not being a mod. Wrong section.

Anyways this should compile:
program ArrowShafter;
//{$DEFINE SMART}
{$i srl/srl.simba}

{$IFDEF SMART}
{$i srl/srl/misc/paintsmart.simba}
{$ENDIF}

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name := ''; // Username
Pass := ''; // Password
Active := True; // Set to true if you want to use Player 0
end;
end;

procedure Antiban;
begin
if(not(LoggedIn))then Exit;
begin
case Random(100) of
10: RandomRClick;
30: PickUpMouse;
50: RandomMovement;
70: BoredHuman;
89: ExamineInv;
end;
end;
end;

procedure Withraw ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63E46566608863644006B5311E601A260' +
'A001F210193');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;
procedure takeallOne;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA633464666078CAC8800C562D5A04A661A' +
'200403C030B');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;
procedure Walk ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63CC646160C861644006FD09F6601A260' +
'A002E67020B');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;
procedure Findtannery ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63CC656160B064644006CB2B43C0344C1' +
'4002CE30222');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;

procedure Trade ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63646666602866644006A55161601A260' +
'A00207401A2');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;

procedure TanHides;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63DCC8C4C030879101191C3BB1054CC34' +
'4014DB90395');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;

procedure TakeallTwo;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63D46462604860644006EFEFDC02D3305' +
'10039AD0334');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;

procedure backtobank ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA63FCC2CCC0E0CDC8800CD6CE2A04D3305' +
'100454902FE');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;

procedure backtobanktwo;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA639464616050676440065B16BB8269982' +
'80021AD01E4');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;

procedure takeall ;
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('78DA633464666078CAC8800C562D5A04A661A' +
'200403C030B');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, mouse_Left);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;


procedure MainLoop;
begin
end;

begin
{$IFDEF SMART}
Smart_Server := 0;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
{$ENDIF}
SetupSRL();
ClearDebug();
DeclarePlayers();
LoginPlayer();
MainLoop();
end.

Mistakes you were making:
- Naming two procedures exactly the same
- Leaving a space before putting a semicolon.
- Putting full stops after your ends, the only full stop you use is one the final end of the entire script
- Random lines of code between procedures

You shouldn't feed him like that, now he will just expect people to finish the script for him. Tell him the mistakes, and let him fix it himself.

From: catanado15
Thank you so much ! now to finish the script to can use, what i need to do now ?

I suggest u dont try to jump into making a script when u have not even learn the basics.
Read through basic tutorials such as http://villavu.com/forum/showthread.php?t=58935, then maybe start making some basic flash game scripts, and slowly learn to script for rs and use advance functions.

Its like learning a new maths topic, understand the basic concepts first before
jumping into doing a question!

Joe

2012-04-14 10:48:38

From: catanado15
Yes, some parts are….


SNIPE :spot: Well you should put in credits, or at least ask him for permission.

Abu

2012-04-14 10:54:36

From: riwu
You shouldn't feed him like that, now he will just expect people to finish the script for him. Tell him the mistakes, and let him fix it himself.


Meh, I was bored :p

Also, if he expects people to finish off his scripts then he isn't going to get very far…

[XoL]

2012-04-14 10:57:48

From: abu_jwka
Meh, I was bored :p

Also, if he expects people to finish off his scripts then he isn't going to get very far…


I was going to do the same thing, so don't worry.
Yeah it is true, people only help to a certain degree (And this was fine).

catanado15

2012-04-14 10:58:00

From: abu_jwka
Meh, I was bored :p

Also, if he expects people to finish off his scripts then he isn't going to get very far…


No, i don't want ppl to finish my scripts…. I've read all tutorials, but the only eg. that they give are powermine or powerchop…. Nothing like banking, finding NPC's….

Abu

2012-04-14 11:03:08

From: catanado15
No, i don't want ppl to finish my scripts…. I've read all tutorials, but the only eg. that they give are powermine or powerchop…. Nothing like banking, finding NPC's….


You should try taking advantage of the SRL Include….

On Simba, there's a functions list. Type in part of a function you want to look for, for example 'bank' and you will be shown all the different functions that help you bank. Such as OpenBankFast.

You'll be surprised how much time the SRL include could save you… :)

catanado15

2012-04-14 11:09:03

From: abu_jwka
You should try taking advantage of the SRL Include….

On Simba, there's a functions list. Type in part of a function you want to look for, for example 'bank' and you will be shown all the different functions that help you bank. Such as OpenBankFast.

You'll be surprised how much time the SRL include could save you… :)


Finally a good answer ;D thank you again :P I'm reading the site that is on the post

Joe

2012-04-14 12:08:41

From: abu_jwka
Meh, I was bored :p

Also, if he expects people to finish off his scripts then he isn't going to get very far…


I started my scripting from somebodys script, then compared… a finished script with proper standards WILL get you farther than doing it wrong yourself

catanado15

2012-04-14 13:11:12

Can anyone tell me how to walk ? walk using DTM's ?

Joe

2012-04-14 14:24:09

From: catanado15
Can anyone tell me how to walk ? walk using DTM's ?


You mean DDTMs

Total

2012-04-14 14:31:17

DTM Walking(chapter 4)

ObjDTMs

Use whichever you want depending on where you are walking.

catanado15

2012-04-15 09:55:44

program new;
{$DEFINE SMART}
{$i SRL\SRL.simba}
{$i sps\sps.simba}

procedure DeclarePlayers;
begin
HowManyPlayers:= 1;
CurrentPlayer:= 0;

Players[0].Name:= '';
Players[0].Pass:= '';
Players[0].Active:= True;
end;


var
MyPath:TpointArray;

begin
SPS_SETUP(RUNESCAPE_SURFACE,['12_9']);
myPath := [Point(113, 396), Point(144, 359), Point(165, 320), Point(136, 296)];
SPS_WalkPath(mypath);
end;
begin
Smart_Server:= 35;
Smart_Members:= False;
Smart_Signed:= True;
Smart_SuperDetail:= False;

ClearDebug;
SetupSRL;
DeclarePlayers;
LoginPlayer;
end.

I've done this, but it gives me some errors…

[Hint] C:\Simba\Includes\SRL/SRL/core/mapwalk.simba(1353:3): Variable 'BOX' never used at line 1352
[Error] (25:5): period ('.') expected at line 24
Compiling failed.

Any1 can help me plz ? i want to start scripting :x

Total

2012-04-15 12:59:12

You need to put the path into a procedure or function.


procedure WalkPath;
var
MyPath:TpointArray;

begin
SPS_SETUP(RUNESCAPE_SURFACE,['12_9']);
myPath := [Point(113, 396), Point(144, 359), Point(165, 320), Point(136, 296)];
SPS_WalkPath(mypath);
end;

And then whenever you want to walk the path, you use WalkPath;.

catanado15

2012-04-15 14:41:41

Hmmm, thank you ! Now i can continue :D

catanado15

2012-04-15 16:13:47

SRL Compiled in 0 msec
SMART Initialized.
Loaded: Server 35, Members: False, Signed: True, Super Detail: False.
Error: Out Of Range at line 11
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]

i got this error…. line 11 is Players[0].name:= ' ';

Spandzbab

2012-04-27 14:24:35

From: catanado15
SRL Compiled in 0 msec
SMART Initialized.
Loaded: Server 35, Members: False, Signed: True, Super Detail: False.
Error: Out Of Range at line 11
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]

i got this error…. line 11 is Players[0].name:= ' ';

Go to your msi folder and delete players.txt and re add them.

Also remember to free your DTMs and bitmaps at the end of your script.

P.S. Wrong section, this is a section for tutorials not script help.