SRL Archive - S.M.A.R.T. Tutorials

The EASY way of modifying scripts


Markus

2007-11-19 07:06:56

To the guy from MMOGuides who copied this to his site: please credit me and I don't mind;)


This is what I use, and it works fine :)

First you need to edit your SRL and SMART a bit:
Step 1.
Open SMART.scar and insert this line as the first line:

{$DEFINE SMART}
Step 2.
Open SRL.scar, add this to SetupSRL as the first line under begin:
NOTE: Fill in the SmartSetup line!

{$IFDEF SMART}
SmartSetup({your prefix here}, false, {signed? true/false});
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
{$ENDIF}
Save it.

The future
If you want to run a script WITH smart, add {.include smart.scar} before srl.scar, then fire up the script.
It will automatically load up SMART and start autoing.
Note:Colors cant be picked then. If you want to pick colors make a new script:

program lol;
{.include SRL/SRL/Misc/smart.scar}
{.include srl/srl.scar}
begin
setupsrl;
end.
Then pick the colors and run the script :)
Pros
no need to mess with main loops
only one line to modify
if you dont include smart.scar it will work with normal runescape/scarscape
Cons
Need to do some more work on beforehand

If you have ANY problems/questions, READ THE WHOLE THREAD BEFORE POSTING

Markus

2007-11-19 08:39:48

From: Trevor3443
so, if we edit it like this, we do not have to make seperate scripts…one for normal RS and one for SMART?

I am at school and I have not tryed out SMART yet, so I am not sure how it works, but how is this diffrent from including it the other way, the way WT-Fawki gave the directions for setup?

or was that the pros / cons section?


When I get home I will read this tutorial again, thanks :)


This is different as you only need to add ONE line of code, not five ;)

mastaraymond

2007-11-19 08:47:07

Yeah. This is the easiest way of doing… I only need 1 line to add in every script to make it SMART Compatible :)

P1nky

2007-11-19 12:08:02

im getting this error why?


[Runtime Error] : Exception: Access violation at address 033510AB in module 'Embedded SMART.dll'. Read of address 000006DC in line 38 in script C:\Program Files\SCAR 3.12\includes\Smart.scar

DO I NEED WHAT YOU SAID MARCUS?

n3ss3s

2007-11-19 12:11:25

Trevor, they're Compiler Directives, though you propably knew that already.

I would also like to know about the compiler directives, they have been said to be handy many times.

Negaal

2007-11-19 13:16:28

{$DEFINE SMART}

{$IFDEF SMART}
{$ENDIF}


Thought they were something with Java…

anyways i didn't add these, and smart works well for me

This is my srl.scar, looks okay?

Also didn't changed anything in smart.scar

only changed typesend; in text.scar

1 more question, do i need to do activateclient before setting up smart or after it…?

{*******************************************************************************
procedure SetupSRL;
by: SRL Dev Team
Description: Sets up all variables needed to run SRL.
*******************************************************************************}

procedure SmartSetupEx(worldnumber: integer; hiDetail, signed: boolean);
var
prefix: string;
begin
prefix := ReadINI('World' + IntToStr(worldnumber), 'Prefix', AppPath + 'includes\SRL\SCSS\worlds.ini');
if(prefix = '')then
begin
writeln('Invalid world number or corrupted world list. Please review your settings');
TerminateScript;
end;
SmartSetup(prefix, hiDetail, signed);
end;


procedure SetupSRL;
begin
SmartSetupEx(119,false,false)
while not(SmartReady) do Wait(100);
SetTargetDC(SmartGetDC);
MouseSpeed := 15;
NickNameBMP := 0;
CheckHPFirst := True;
Reincarnate := False;
TalkAfterRandoms := False;
RoadColor := 0;
WaterColor := 0;
BankColor := 0;
LampSkill := 'mining';
SetUpSRLReport;
SetMouseMode(false);
LoadCosineArrays;
SymbolAccuracy:= 0.8;
LoadNPCArray;
LoadSRLBitMaps;
SolveChatRandoms := True;
SetupSRLAutoResponder
UseSandWichSolver := True;
UseBoxSolver := True;
UseCerterSolver := True;
UseFindmod := True;
UseFindtrade := True;
Screenshots := False;
TheFile := RewriteFile(AppPath + 'ChatLog.txt', False);
Writeln ('SRL Compiled in '+ IntToStr(GetTimeRunning) + ' msec');
end;

Markus

2007-11-19 13:56:46

I use the directives to determine if smart.scar is included, as I am 1337 :D with one line of code I can choose between smart/normal rs :p

From: negaal
Thought they were something with Java…

anyways i didn't add these, and smart works well for me

This is my srl.scar, looks okay?

Also didn't changed anything in smart.scar

only changed typesend; in text.scar

1 more question, do i need to do activateclient before setting up smart or after it…?


No, you dont need activateclient.
Hmm, looks okay, mine just waits until client is fully loaded ;)

@p1nky: you sure you got smartsetup in srl.scar before calling any smart function?

Negaal

2007-11-19 14:12:12

So if i don't use these
{$DEFINE SMART}

{$IFDEF SMART}
{$ENDIF}


and don't use include smart.scar

and i try to run script on regular Rs client i get an error?


…i better add those…
Great tut…Thx

oliver1205

2007-11-19 15:17:39

good tut, but what do you mean " if you want to pick colors make a new script"

Harry

2007-11-19 15:33:43

Good tut :)

Markus

2007-11-19 16:21:37

@Oliver:You need to load smart first before picking any colors.

{.include smart.scar}
{.include srl/srl.scar}
begin
setupsrl;
end.
Now pick the colors and run again:)

Lalaji

2007-11-19 20:54:11

What Do you thing is wrong if
SMART loads,
Script start,
enters user and pass, but then fails to press the "login" button

i dont think i messed with login.scar :mad:

RAM

2007-11-19 21:03:48

From: lalaji
What Do you thing is wrong if
SMART loads,
Script start,
enters user and pass, but then fails to press the "login" button

i dont think i messed with login.scar :mad:


Redownload SCAR 3.13 ?

Lalaji

2007-11-19 21:24:30

Oh sweet worked, Ths…

legendaryhero90

2007-11-19 21:39:09

From: lalaji
Oh sweet worked, Ths…


isnt it beautiful…? :redface:

Bobarkinator

2007-11-19 22:30:04

Great idea!

Sebo

2007-11-21 16:45:06

Thanks, my script works great now, this hepled a ton, and is very easy to follow.

Daniel

2008-01-17 19:27:44

BUMP!
Good tutorial, i want it to get more noticeable at the top of the list :p

Makes S.M.A.R.T easy!

Markus

2008-01-18 05:05:27

Hehe thanks :)

Any suggestions to add?

footballjds

2008-01-18 09:14:19

Nope. none i can think of. if a noob comes along and ask somthing.. add it i guess. yeah this is kick ass!

it pwnzez pwnz0rs. hands down :p

EDIT: maybe explain what the setupsmart('world abrr'…ect.. comes from.. maybe is there a way so that you can do setupsmarter and input the world number? and it look somwhere for the abrr..? :p that'd be cool

Markus

2008-01-18 09:53:50

It's called SmartSetupEx, should be somewhere on the forums.

MasterOfStuff

2008-02-04 10:47:31

Easy, awesome tut. This seemed confusing at first, but it really isn't.

Cazax

2008-02-04 13:30:35

every time i run a script with SMART it says:
Line 7: [Error] (12315:11): Duplicate identifier 'MOVEMOUSE' in script

Markus

2008-02-04 14:15:36

Include SMART.Scar BEFORE SRL :)

kingarabian

2008-02-04 17:20:12

Markus you the man dawg!!!

carbonchain

2008-02-04 17:39:06

Wow thanks a bunch for this. I love this tool!

Main

2008-02-04 17:42:11

so smart.scar should be this?
{$DEFINE SMART}
{
smart.scar overwrites the SCAR procedures.
You should always include this before any other include, even SRL.scar
}

procedure MoveMouse(x, y: Integer);
begin
SmartMoveMouse(x, y);
end;

procedure HoldMouse(x, y: Integer; left: Boolean);
begin
SmartHoldMouse(x, y, left);
end;

procedure ReleaseMouse(x, y: Integer; left: Boolean);
begin
SmartReleaseMouse(x, y, left);
end;

procedure KeyUp(key: Byte);
begin
If Key = 13 Then
Key := 10;
SmartReleaseKey(key);
end;

procedure KeyDown(key: Byte);
begin
If Key = 13 Then
Key := 10;
SmartHoldKey(key);
end;

procedure SendKeys(S: String);
begin
SmartSendKeys(S);
end;

procedure GetMousePos(var x, y: Integer);
begin
SmartGetMousePos(x, y);
end;

function GetColor(x, y: Integer): Integer;
begin
result:= SmartGetColor(x, y);
end;

procedure SmartSetTarget;
var
Smart_Bitmap: Integer;
begin
Smart_Bitmap:= BitmapFromString(765,503,'');
GetBitmapCanvas(Smart_Bitmap).Handle:= SmartGetDC;
SetTargetBitmap(Smart_Bitmap);
FreeBitmap(Smart_Bitmap);
end;

function FindWindow(Title: String): Boolean;
begin
result:= true;
end;

procedure ActivateClient;
begin
end;

function FindWindowBySize(Width, Height: Integer): Boolean;
begin
result:= true;
end;

procedure SmartSetupEx(worldnumber: integer; hiDetail, signed: boolean);
var
prefix: string;
begin
prefix := ReadINI('World' + IntToStr(worldnumber), 'Prefix', AppPath + 'includes\SRL\SCSS\worlds.ini');
if(prefix = '')then
begin
writeln('Invalid world number or corrupted world list. Please review your settings');
TerminateScript;
end;
SmartSetup(prefix, hiDetail, signed);
end;

and srl.scar is
//----------------------------------------------------------------------------//
//-- Scar Standard Resource Library --//
//----------------------------------------------------------------------------//
//-- by: Azeroth, Bebemycat2, BenLand100, benleegt, Boreas, c0de, --//
//-- Cheesehunk, Dankness, driger1592, Flyboy, Freddy1990, --//
//-- inferno, Kernel Klink, Knightstreak, Krazy_Meerkat, Krichevskoy, --//
//-- Lorax, Mad Cow, masquerader, moparisthebest, Mutant Squirrle, --//
//-- nielsie95, phantombmx, pups, Pyro, realrune, Renax, Ron, RsN, --//
//-- Solemn wishes, Spky, SRL, Starblaster100, Stupid3ooo, Sumilion, --//
//-- tarajunky, Wizzup?, WT-Fakawi, XxKanexX, Yakman, _ChArMz....... --//
//-- --//
//-- ....... and the SRL Community. --//
//----------------------------------------------------------------------------//


//----------------------------------------------------------------------------//
// -- SRL Level 1 Includes --//
// -- --//
// -- Low Level SCAR Math, Mouse Movement and Color Clicking routines. --//
//----------------------------------------------------------------------------//

{.include SRL/SRL/Core/Globals.scar}
{.include SRL/SRL/Core/Math.scar}
{.include SRL/SRL/Core/Mouse.scar}
{.include SRL/SRL/Core/Color.scar}
{.include SRL/SRL/Core/Players.scar}

//----------------------------------------------------------------------------//
// -- SRL Level 2 Includes --//
// -- --//
// -- Interface, Object and OCR routines. --//
//----------------------------------------------------------------------------//

{.include SRL/SRL/Core/Timing.scar}
{.include SRL/SRL/Core/GameTab.scar}
{.include SRL/SRL/Core/Text.scar}
{.include SRL/SRL/Core/Inventory.scar}
{.include SRL/SRL/Core/Object.scar}

//----------------------------------------------------------------------------//
// -- SRL Level 3 Includes --//
// -- --//
// -- MapWalking, AntiRandoms, Bank, Symbol and many more... --//
//----------------------------------------------------------------------------//

{.include SRL/SRL/Core/FlagChat.scar}
{.include SRL/SRL/Core/Login.scar}
{.include SRL/SRL/Core/Mapwalk.scar}
{.include SRL/SRL/Core/Bitmap.scar}
{.include SRL/SRL/Core/DTM.scar}
{.include SRL/SRL/Core/Bank.scar}
{.include SRL/SRL/Core/Symbol.scar}
{.include SRL/SRL/Core/RC.scar}
{.include SRL/SRL/Core/AutoColor.scar}
{.include SRL/SRL/Core/AntiRandoms/Common.scar}
{.include SRL/SRL/Core/Globalstats.scar}
{.include SRL/SRL/Core/CAutoRespond.scar}
{.include SRL/SRL/Core/AntiRandoms/Box.scar}
{.include SRL/SRL/Core/AntiRandoms/Certer.scar}
{.include SRL/SRL/Core/AntiRandoms/Demon.scar}
{.include SRL/SRL/Core/AntiRandoms/Frog.scar}
{.include SRL/SRL/Core/AntiRandoms/Quiz.scar}
{.include SRL/SRL/Core/AntiRandoms/Sandwich.scar}
{.include SRL/SRL/Core/AntiRandoms/EvilBob.scar}
{.include SRL/SRL/Core/AntiRandoms/ChatRandoms.scar}
{.include SRL/SRL/Core/AntiRandoms/AntiRandoms.scar}
{.include SRL/SRL/Core/AntiBan.scar}
{.include SRL/SRL/Core/Amount.scar}

{*******************************************************************************
procedure SetupSRL;
by: SRL Dev Team
Description: Sets up all variables needed to run SRL.
*******************************************************************************}

procedure SetupSRL;
begin
{$IFDEF SMART}
SmartSetup({your prefix here}, false, {signed? true/false});
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
{$ENDIF}

MouseSpeed := 15;
CheckHPFirst := True;
Reincarnate := False;
TalkAfterRandoms := False;
RoadColor := 0;
WaterColor := 0;
BankColor := 0;
LampSkill := 'mining';
SetUpSRLReport;
SetMouseMode(false);
LoadCosineArrays;
SymbolAccuracy:= 0.8;
LoadNPCArray;
LoadSRLBitMaps;
SolveChatRandoms := True;
SetupSRLAutoResponder
UseSandWichSolver := True;
UseBoxSolver := True;
UseCerterSolver := True;
UseFindmod := True;
UseFindtrade := True;
Screenshots := False;
TheFile := RewriteFile(ScriptPath + 'ChatLog.txt', False);
Writeln ('SRL Compiled in '+ IntToStr(GetTimeRunning) + ' msec');
end;

footballjds

2008-02-04 20:04:01

yup, you got it MAIN :D

nobody u kno

2008-02-04 20:05:19

can someone please just tell me where i download smart.scar

footballjds

2008-02-04 20:18:20

dude, its included in srl rev 12 :duh:

Firebrand

2008-02-04 22:47:37

Great Idea, But is this the only change between SRL Rev #11 and #12 ??

Any syntax or Function/Procedure changes ?

And what Do I put for the prefix bit ?

KoKouKo

2008-02-04 23:50:07

wouldnt this be easier if people started writing it in their scripts (i apologize for the lack of standards)

program example;
{.include SRL/SRL/Misc/Smart.scar}
{.include srl/srl.scar}

const
smart = true;
world = 144;

begin
if(smart=true)then
begin
SmartSetupEx(world, False, False);
SetTargetDC(SmartGetDC);
end;
setupsrl;
//blah blah blah
end.

Negaal

2008-02-05 04:00:08

From: KoKouKo
wouldnt this be easier if people started writing it in their scripts (i apologize for the lack of standards)

program example;
{.include SRL/SRL/Misc/Smart.scar}
{.include srl/srl.scar}

const
smart = true;
world = 144;

begin
if(smart=true)then
begin
SmartSetupEx(world, False, False);
SetTargetDC(SmartGetDC);
end;
setupsrl;
//blah blah blah
end.

No, No, No, why is it needed if you need to include Smart.scar only?


if(smart=true)then
begin
SmartSetupEx(world, False, False);
SetTargetDC(SmartGetDC);
end;

This part is in SRL.scar if you'll follow Markus's tutorial.

Heavenzeyez1

2008-02-05 04:38:01

Helped alot, thanks,
Eerik.

natea

2008-02-05 14:42:32

I cant find smart.scar :( im dumb

Main

2008-02-05 15:57:08

help?
procedure SetupSRL;
begin
{$IFDEF SMART}
SmartSetup({your prefix here}, false, {signed? true/false});
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
{$ENDIF}

Failed when compiling
Line 79: [Error] (12425:30): Syntax error in script I:\b1\scar\smart\includes\SRL/SRL.scar

nobody u kno

2008-02-05 15:58:40

From: footballjds
yup, you got it MAIN :D


I just copied and pasted the code he showed to where its supposed to be in my smart and srl scripts and i get a syntax error in this line:

SmartSetup({your prefix here}, false, {signed? true/false});

And also when i copied and pasted The $IFDEF part of the code it shows up as black text on my script and not green. Its supposed to be a "$" sign in front of the IFDEF right?

Markus

2008-02-05 16:01:44

@noboy u now + MAIN_FTW: You will need to replace the SmartSetup with one filled in like this:
SmartSetup('nl3', false, true);
This will load SMART signed in world 13.
Use your own prefix (get them from the RS world page) to choose the world you want, and the last boolean is if you want to auto signed or not.

radragon16

2008-02-05 16:06:03

It needs to look something like this IF you want to use the same world for every script:Where 144 is your world(server), and where the first true/false is for determining whether it is high detail or low. The second true/false option is for using either signed or unsigned java.


[CODE]procedure SetupSRL;
begin
{$IFDEF SMART}
SmartSetupEx(144,True,True);
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
{$ENDIF}


And as Markus said this is the way you would set it up for calling it with the world prefix instead of the server number: Where ams3 is the world that you want to bot in, and the booleans stay the same.

{$IFDEF SMART}
SmartSetup('ams3', True, True);
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
{$ENDIF}

All of this info is in the forums. If you are still having problems please read.:(h):

EDIT: Markus you beat me lol.

nobody u kno

2008-02-05 16:22:43

Alright this is what my three scripts look like. I have no clue what im doing wrong.

Smart.scar:
{$DEFINE SMART}
{
smart.scar overwrites the SCAR procedures.
You should always include this before any other include, even SRL.scar
}

procedure MoveMouse(x, y: Integer);
begin
SmartMoveMouse(x, y);
end;

procedure HoldMouse(x, y: Integer; left: Boolean);
begin
SmartHoldMouse(x, y, left);
end;

procedure ReleaseMouse(x, y: Integer; left: Boolean);
begin
SmartReleaseMouse(x, y, left);
end;

procedure KeyUp(key: Byte);
begin
If Key = 13 Then
Key := 10;
SmartReleaseKey(key);
end;

procedure KeyDown(key: Byte);
begin
If Key = 13 Then
Key := 10;
SmartHoldKey(key);
end;

procedure SendKeys(S: String);
begin
SmartSendKeys(S);
end;

procedure GetMousePos(var x, y: Integer);
begin
SmartGetMousePos(x, y);
end;

function GetColor(x, y: Integer): Integer;
begin
result:= SmartGetColor(x, y);
end;

procedure SmartSetTarget;
var
Smart_Bitmap: Integer;
begin
Smart_Bitmap:= BitmapFromString(765,503,'');
GetBitmapCanvas(Smart_Bitmap).Handle:= SmartGetDC;
SetTargetBitmap(Smart_Bitmap);
FreeBitmap(Smart_Bitmap);
end;

function FindWindow(Title: String): Boolean;
begin
result:= true;
end;

procedure ActivateClient;
begin
end;

function FindWindowBySize(Width, Height: Integer): Boolean;
begin
result:= true;
end;

procedure SmartSetupEx(worldnumber: integer; hiDetail, signed: boolean);
var
prefix: string;
begin
prefix := ReadINI('World' + IntToStr(worldnumber), 'Prefix', AppPath + 'includes\SRL\SCSS\worlds.ini');
if(prefix = '')then
begin
writeln('Invalid world number or corrupted world list. Please review your settings');
TerminateScript;
end;
SmartSetup(prefix, hiDetail, signed);
end;

Srl.scar:
//----------------------------------------------------------------------------//
//-- Scar Standard Resource Library --//
//----------------------------------------------------------------------------//
//-- by: Azeroth, Bebemycat2, BenLand100, benleegt, Boreas, c0de, --//
//-- Cheesehunk, Dankness, driger1592, Flyboy, Freddy1990, --//
//-- inferno, Kernel Klink, Knightstreak, Krazy_Meerkat, Krichevskoy, --//
//-- Lorax, Mad Cow, masquerader, moparisthebest, Mutant Squirrle, --//
//-- nielsie95, phantombmx, pups, Pyro, realrune, Renax, Ron, RsN, --//
//-- Solemn wishes, Spky, SRL, Starblaster100, Stupid3ooo, Sumilion, --//
//-- tarajunky, Wizzup?, WT-Fakawi, XxKanexX, Yakman, _ChArMz....... --//
//-- --//
//-- ....... and the SRL Community. --//
//----------------------------------------------------------------------------//


//----------------------------------------------------------------------------//
// -- SRL Level 1 Includes --//
// -- --//
// -- Low Level SCAR Math, Mouse Movement and Color Clicking routines. --//
//----------------------------------------------------------------------------//

{.include SRL/SRL/Core/Globals.scar}
{.include SRL/SRL/Core/Math.scar}
{.include SRL/SRL/Core/Mouse.scar}
{.include SRL/SRL/Core/Color.scar}
{.include SRL/SRL/Core/Players.scar}

//----------------------------------------------------------------------------//
// -- SRL Level 2 Includes --//
// -- --//
// -- Interface, Object and OCR routines. --//
//----------------------------------------------------------------------------//

{.include SRL/SRL/Core/Timing.scar}
{.include SRL/SRL/Core/GameTab.scar}
{.include SRL/SRL/Core/Text.scar}
{.include SRL/SRL/Core/Inventory.scar}
{.include SRL/SRL/Core/Object.scar}

//----------------------------------------------------------------------------//
// -- SRL Level 3 Includes --//
// -- --//
// -- MapWalking, AntiRandoms, Bank, Symbol and many more... --//
//----------------------------------------------------------------------------//

{.include SRL/SRL/Core/FlagChat.scar}
{.include SRL/SRL/Core/Login.scar}
{.include SRL/SRL/Core/Mapwalk.scar}
{.include SRL/SRL/Core/Bitmap.scar}
{.include SRL/SRL/Core/DTM.scar}
{.include SRL/SRL/Core/Bank.scar}
{.include SRL/SRL/Core/Symbol.scar}
{.include SRL/SRL/Core/RC.scar}
{.include SRL/SRL/Core/AutoColor.scar}
{.include SRL/SRL/Core/AntiRandoms/Common.scar}
{.include SRL/SRL/Core/Globalstats.scar}
{.include SRL/SRL/Core/CAutoRespond.scar}
{.include SRL/SRL/Core/AntiRandoms/Box.scar}
{.include SRL/SRL/Core/AntiRandoms/Certer.scar}
{.include SRL/SRL/Core/AntiRandoms/Demon.scar}
{.include SRL/SRL/Core/AntiRandoms/Frog.scar}
{.include SRL/SRL/Core/AntiRandoms/Quiz.scar}
{.include SRL/SRL/Core/AntiRandoms/Sandwich.scar}
{.include SRL/SRL/Core/AntiRandoms/EvilBob.scar}
{.include SRL/SRL/Core/AntiRandoms/ChatRandoms.scar}
{.include SRL/SRL/Core/AntiRandoms/AntiRandoms.scar}
{.include SRL/SRL/Core/AntiBan.scar}
{.include SRL/SRL/Core/Amount.scar}

{*******************************************************************************
procedure SetupSRL;
by: SRL Dev Team
Description: Sets up all variables needed to run SRL.
*******************************************************************************}

procedure SetupSRL;
begin
begin
{$IFDEF SMART}
SmartSetupEx(67,True,True);
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
{$ENDIF}
MouseSpeed := 15;
CheckHPFirst := True;
Reincarnate := False;
TalkAfterRandoms := False;
RoadColor := 0;
WaterColor := 0;
BankColor := 0;
LampSkill := 'mining';
SetUpSRLReport;
SetMouseMode(false);
LoadCosineArrays;
SymbolAccuracy:= 0.8;
LoadNPCArray;
LoadSRLBitMaps;
SolveChatRandoms := True;
SetupSRLAutoResponder
UseSandWichSolver := True;
UseBoxSolver := True;
UseCerterSolver := True;
UseFindmod := True;
UseFindtrade := True;
Screenshots := False;
TheFile := RewriteFile(ScriptPath + 'ChatLog.txt', False);
Writeln ('SRL Compiled in '+ IntToStr(GetTimeRunning) + ' msec');
end;

Jukka's Guild Miner:
{
[------------------------------------------------------------------------------]
[ JuKKa's Guild Miner ]
[------------------------------------------------------------------------------]
[ Instructions: ]
[ 1) HowManyLoads = X; <- Enter how many loads per player? ]
[ 2) Enter SRLStats ID And SRLStatsPW or the script WILL NOT WORK!]
[ 3) Declare Your players! ]
[ 4) Place your players in falador east bank! ]
[ 5) Make SURE your first player makes it to the guild! ]
[------------------------------------------------------------------------------]
[ Features: ]
[ 1) Fully autocolor ]
[ 2) Great axe head finder! ]
[ 3) Great antirandoms uptodate with SRL! ]
[ 4) SEXY Mining procedure ]
[ 5) SUPPORTS STOUT! IF YOU HAVE 59 MINING! ]
[ 6) NOW SUPPORTS MITHRIL ORES! ]
[------------------------------------------------------------------------------]
}
Program GuildMiner;
{.Include SRL/SRL/Misc/smart.scar}
{.Include SRL/SRL.Scar}
Begin
SetUpSrl;
end.

Var
MiningSymbolColor, TLostHead, BrokenPicks, GotPick, CoalSearches, Mith, X, Y, Dx, Dy, TStout, ResponceTime, CurrentResponce, CurrentLoad, LadderColor: Integer;
LostHead, TBroken, MiningTol, MiningColor, ScreenShot, Gems, StoutsDrank, RespondedTimes, TRespond, TGas, Gasses, Coal, Gained, Banked: Integer;
PickHeadColors: Array Of Integer;
NoPick, EquipPick, DrinkStout: Boolean;
MiningNow, LastChatterString: String;

Const
HowManyLoads = 8; //How Many Loads Per Player? 3-8 is good.
UseResponder = False; //Use responder?
CheckVersion = True; //Check if script is uptodate? Recommended if your a leecher
TakeScreens = True; //Take Screenshots?
RCMasterNick = ''; //Whos RC Master? Leave blank if none.
SRLStatsID = '4246'; //SRL Stats ID Number, If ur a leecher FUCK OFF.
SRLStatsPW = '174jjw14'; //SRL Stats PW!, If ur a leecher FUCK OFF.
GasTolerance = 15; //Change if find you broken pickaxes!
MinGasChange = 200; //100+ About 200-300 and more. Basically tolerance.

{-----------------------------------}
CoalRock = 2702653; //DONT EDIT! }
CoalTolerance = 4; //DONT EDIT! }
MithRock = 5979710; //DONT EDIT! }
MithTolerance = 4; //DONT EDIT! }
Version = 2.0; //DONT EDIT! }
{-----------------------------------}

Procedure DeclarePlayers;
Begin

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

Players[0].Name := 'nobodyukno14';
Players[0].Pass := '174jjw14';
Players[0].Nick := 'obo';
Players[0].Booleans[1]:= True; //Mine Mith ores too?
Players[0].Pin := 0000;
Players[0].Active:= True;
{
Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';
Players[1].Booleans[1]:= False; //Mine Mith ores too?
Players[1].Pin := 0000;
Players[1].Active:= True;

Players[2].Name := '';
Players[2].Pass := '';
Players[2].Nick := '';
Players[2].Booleans[1]:= False; //Mine Mith ores too?
Players[2].Pin := 0000;
Players[2].Active:= True;

Players[3].Name := '';
Players[3].Pass := '';
Players[3].Nick := '';
Players[3].Booleans[1]:= False; //Mine Mith ores too?
Players[3].Pin := 0000;
Players[3].Active:= True;

Players[4].Name := '';
Players[4].Pass := '';
Players[4].Nick := '';
Players[4].Booleans[1]:= False; //Mine Mith ores too?
Players[4].Pin := 0000;
Players[4].Active:= True;

Players[5].Name := '';
Players[5].Pass := '';
Players[5].Nick := '';
Players[5].Booleans[1]:= False; //Mine Mith ores too?
Players[5].Pin := 0000;
Players[5].Active:= True;
}
Writeln('Starting with player '+IntToStr(CurrentPlayer)+'/' + IntToStr(HowManyPlayers-1) + '');
End;

Procedure WalkCompass(Compass: String);
Var
ExceededTries: Integer;
Begin
If(Not Loggedin)Then Exit;

Y:= MMCY;

Case LowerCase(Compass) Of
'left': X:= MMCX-35;
'right': X:= MMCX+35;
End;

Repeat
X := X+Random(25)-Random(25);
Y := Y+Random(25)-Random(25);
ExceededTries := ExceededTries + 1;
If(ExceededTries > 50)Then
Begin
Logout;
Players[CurrentPlayer].Loc := 'Error in WalkCompass';
Players[CurrentPlayer].Active := False;
Exit;
End;
Until(rs_OnMinimap(X, Y))Or(Not Loggedin);

Mouse(X, Y, 5, 5, True);
FFlag(10);

End;

Procedure VersionChecker;
Var
NewVersion: String;
Current: Extended;
Begin
If( CheckVersion )Then
Begin
NewVersion:= GetPage('http://freewebs.com/jk2fakefiles/Guildminer/version.txt');
NewVersion := Between('is ',' Thank', NewVersion);
Try
Current := StrToFloat(NewVersion);
Except
Writeln('Error in version checking..');
Exit;
End;
If(Current = Version)Then
Begin
Writeln('You''re up to date! ');
Exit;
End Else
If(Current < Version)Then
Begin
Writeln('Thank you for beta testing ;)');
Exit;
End Else
Begin
Writeln(' Your Version Is '+ FloatToStr(Version)+'. Newest Version Is '+ NewVersion);
OpenWebPage('http://www.villavu.com/forum/showthread.php?t=17826');
TerminateScript;
End;
End;
End;

Procedure Setup;
Var
C, I: Integer;
Begin
//ClearDeBug;
Writeln('Successfully compiled');

SetupSRL;
RCMaster := RCMasterNick;
RCSetNick;

LadderColor := 76120;
RoadColor := 6978948;

VersionChecker;

ScriptID := '314';
SRLID := SRLStatsID;
SRLPassword := SRLStatsPW;
If ( SRLID = '' ) Or ( SRLPassword = '' )Then
Begin
Writeln(' You Need a SRL Stats Account, Create One');
OpenWebPage('http://www.stats.srl-forums.com/index.php?action=view_script&id=314');
TerminateScript;
End;
SRLRandomsReport;

DeclarePlayers;

For C:= 0 To HowManyPlayers-1 Do
For I := 0 To 99 Do
Players[C].Integers[I] := 0;

ActivateClient;
Wait(300);

If(LoggedIn)Then
Players[CurrentPlayer].NickTPA := CreateTPAFromText(Players[CurrentPlayer].Nick, UpChars)
Else LoginPlayer;
End;

Procedure AutoRetaliate(Act: Boolean);
Var
Dx, Dy: Integer;
Begin
Gametab(1);
If(FindColorTolerance(Dx, Dy, 2106255, 580, 364, 715, 394, 10))Then
Begin
If(Not Act)Then
Mouse(657, 376, 30, 10, True)
End Else
Begin
If(Act)Then
Mouse(657, 376, 30, 10, True)
End;
End;

Function LoadPick(Style: String; Int: Integer): Integer;
Begin
Case LowerCase(Style) Of
'dtm':
Begin
Case Int Of //Bronze - Rune DTMS!
1: Result := DTMFromString('78DA63DCC0C0C0A0C9800618914820BD19486' +
'81350B38A0835AB81843E11E6E8A2AA30D39264104156B306BF1A' +
'16200600A5500645');
2: Result := DTMFromString('78DA63BCCFC0C050CA800618914820FD08489' +
'4135073134854A2AAB0B3B464E04256731BBF1A269839D5B8ED62' +
'06D1B7F0BB07A406007C420985');
3: Result := DTMFromString('78DA63CC616460286540038C4824904E05B22' +
'A5155448786328820ABC9C0AF068CD38164356EBB98606ACA09A8' +
'C927AC0600C71D0796');
4: Result := DTMFromString('78DA636C646060D06440038C482490AE0612B' +
'AA82A0C0CDC184490D5D4E257C30833471FB75D4C20BA82083520' +
'73B409A86921AC06009DB10633');
5: Result := DTMFromString('78DA638C676060B06740038C4824904E02124' +
'E04D44403096754154676460C5CC86A22F1AB6102D11140C215B7' +
'5DCC30358EF8D5000060E40523');
6: Result := DTMFromString('78DA6394636460F06440038C4824909604B27' +
'C515518397B317021AB11C3AF068CC581A43F6EBB9840B40490E5' +
'4D408D226135000BAF0415');
End
End;
'colors':
Begin
Case Int Of //Bronze - Rune
1: Result:= 1649206;
2: Result:= 3750206;
3: Result:= 5592411;
4: Result:= 4599856;
5: Result:= 3292722;
6: Result:= 5590329;
End
End;
End;
End;

Procedure Returnlevel(Var PickType, Attack, Mining: Integer);
Begin
Case PickType Of
1:
Begin
Attack := 1;
Mining := 1;
End;

2:Begin
Attack := 1;
Mining := 1;
End;

3:Begin
Attack := 5;
Mining := 6;
End;

4:Begin
Attack := 20;
Mining := 21;
End;

5:Begin
Attack := 30;
Mining := 31;
End;

6:Begin
Attack := 40;
Mining := 41;
End;
End
End;

Function AbleToEquipPick(Pick: Integer): Boolean;
Var
LevelAttack, LevelMining: Integer;
Begin
Returnlevel(Pick, LevelAttack, LevelMining);
If(Players[CurrentPlayer].Level[1] >= LevelAttack)And
(Players[CurrentPlayer].Level[15]>= LevelMining)Then
Begin
Result:= True;
Players[CurrentPlayer].Booleans[0]:= True;
End;
End;

function InIntArr(Num: Integer; I: TIntegerArray): Boolean;
var
C: Integer;
begin
for C:= 0 to Length(I) - 1 do
if(I[C] = Num)then
begin
Result:= True;
exit;
end;
end;

procedure ShrinkArray(var Arr: TIntegerArray);
var
Used: TIntegerArray;
I, Index: Integer;
begin
SetLength(Used, Length(Arr));
if(InIntArr(0, Arr))then
Inc(Index);
for I:= 0 to Length(Arr) - 1 do
if(not(InIntArr(Arr[i], Used)))then
begin
Used[Index]:= Arr[i];
Inc(Index);
end;
SetLength(Used, Index);
Arr:= Used;
end;

Function GetPickHeadColors: Boolean;
Var
FailedPick, I, II, PickDTM, PickStyle: Integer;
ColorTPA: TPointArray;
Label
GetPickColors;
Begin
FindNormalRandoms;

GetPickColors:
If(Not Loggedin)Then Exit;

If( EquipPick )Then
GameTab(5)
Else GameTab(4);

Wait(500+Random(500));
For I:= 6 DownTo 1 Do
Begin
PickDTM:= LoadPick('DTM', I);
If(FindDTM( PickDTM, X, Y, MIX1, MIY1, MIX2, MIY2))Then
Begin
FindColorsTolerance(ColorTPA, LoadPick('Colors', I), X, Y, X+30, Y+30, 10);
For II:= 0 To GetArrayLength(ColorTPA)-1 Do
Begin
SetArrayLength(PickHeadColors, GetArrayLength(PickHeadColors)+1);
PickHeadColors[II]:= GetColor(ColorTPA[II].X, ColorTPA[II].Y);
End;
PickStyle:= I;
Break;
End;
End;

ShrinkArray(PickHeadColors);

For II:= 0 To GetArrayLength(PickHeadColors)-1 Do
Begin
//Writeln('PickHeadColor['+IntToStr(II)+']:= '+IntToStr(PickHeadColors[II])+';');
If( PickHeadColors[II] <> 0)Then
Result:= True;
End;

If(Not Result)Then
Begin
Writeln('Getting NEW pickcolors, Failed');
FailedPick:= FailedPick + 1;
If(FailedPick > 4)Then
Begin
Writeln('Coudlnt get pickcolors');
Players[CurrentPlayer].Loc:='Couldnt get pickcolors';
Logout;
Players[CurrentPlayer].Active:= False;
Exit;
End;
GoTo GetPickColors;
End;

Writeln('Picked '+IntToStr(GetArrayLength(PickHeadColors)) + ' Colors');
Case I Of
1: Writeln('You have a Bronze pick axe');
2: Writeln('You have a Iron pick axe');
3: Writeln('You have a Steel pick axe');
4: Writeln('You have a Mith pick axe');
5: Writeln('You have a Addy pick axe');
6: Writeln('You have a Rune pick axe');
End
FreeDTM( PickDTM );
End;

Procedure EquipCurrentPick;
Var
PickTP: TPoint;
I: Integer;
Begin
If(Not Loggedin)Then Exit;
If(Not EquipPick)Then Exit;

GameTab(5);

For I:= 6 DownTo 1 Do
Begin
PickTP:= EquipmentCoords(5);
If(FindColorTolerance(X, Y, LoadPick('color', I), PickTP.X-30, PickTP.Y-30, PickTP.X+30, PickTP.Y+30, 5))Then
Exit;
End;

GameTab(4);
Wait(500+Random(400));
For I:= 1 To 28 Do
If(ExistsItem(I))Then
Begin
PickTP:= ItemCoords(I);
MMouse(PickTP.X, PickTP.Y, 4, 4);
Wait(50);
GetMousePos(X, Y);
If(IsUpText('ield'))Then
Begin
Mouse(X, Y, 0, 0, True);
Exit;
End;
End;
End;

Function ReturnBestPick: Integer;
Var
PickAxe, PickDTM, I, Pick: Integer;
Begin

For I:= 4 To 5 Do
Begin
GameTab(I);
PickAxe := DTMFromString('78DA63AC646460486540038C482490AE01B23' +
'208A82906B2D209A82902B2B2F1AB010034EE038A');
If(FindDTM(PickAxe, X, Y, MIX1, MIY1, MIX2, MIY2))Then
Begin
For Pick := 6 DownTo 1 Do
Begin
PickDTM := LoadPick('dtm', Pick);
If(FindDTM( PickDTM, X, Y, MIX1, MIY1, MIX2, MIY2))Then
Begin
Result:= Pick;
FreeDTM(PickDTM);
FreeDTM(PickAxe);
Exit;
End;
End;
End;
FreeDTM ( PickAxe );
End;

If(Result = 0)Then
Begin
Writeln('Error Pick');
Logout;
Players[CurrentPlayer].Active:= False;
End;
End;

Procedure InitPlayer;
Begin
CurrentLoad:= 0;
Disguise('Coal:' +IntToStr(Coal)+ ' Mith:' +IntToStr(Mith)+ ' [' +IntToStr(CurrentLoad)+ '/' +IntToStr(HowManyLoads)+ ']');
DrinkStout:= False;
If(Not Loggedin)Then Exit;

Wait(1000+Random(1000));

Autoretaliate(False);

If(GetCombatLevel < 20)Then
Begin
Writeln('Please Level Up Your Charachters in Combat');
Logout;
Players[CurrentPlayer].Loc := 'Too Low Level';
Players[CurrentPlayer].Active:= False;
Exit;
End;

Players[CurrentPlayer].Level[1] := GetSkillInfo('attack', True);
Players[CurrentPlayer].Level[15]:= GetSkillInfo('mining', True);

If(Players[CurrentPlayer].Level[15]=59)Then
Begin
DrinkStout:= True;
Writeln('Entering Guild with stout');
End Else
If(Players[CurrentPlayer].Level[15] < 59)Then
Begin
Writeln('You need level 60, To enter the guild, Or 59 with stout!');
Players[CurrentPlayer].Loc := 'Not Enough Mining Lvl';
Logout;
Players[CurrentPlayer].Active:= False;
Exit;
End;

AbleToEquipPick(ReturnBestPick);

EquipPick := Players[CurrentPlayer].Booleans[0];
EquipCurrentPick;

If(Not GetPickHeadColors)Then
Begin
Writeln('Couldnt get pick colors, Equip or have in inventory.');
Players[CurrentPlayer].Loc := 'Couldnt Get PickColors';
Logout;
Players[CurrentPlayer].Active:= False;
Exit;
End;

SetChat('On',1);
SetChat('Off',2);
SetChat('Off',3);
SetChat('Off',4);
SetChat('Off', 5);

MakeCompass('n');
SetAngle(True);
End;

Function FollowColor(Var X, Y: Integer; Color, Tol: Integer): Boolean;
Var
NoFlag, Fail: Integer;
Begin

MarkTime ( Fail );
If(FlagPresent)Then
Begin

Repeat
If(TimeFromMark( Fail ) > 5000 )Then
Begin
Result:= False;
Break;
End;
Wait(20);
Result:= FindColorSpiralTolerance(X, Y, Color, X-30, Y-30, X+30, Y+30, Tol);
Until(Not FlagPresent) Or (Not Loggedin) Or (Not Result);

If(Result)Then
Begin
MarkTime( NoFlag );
Repeat
Wait(20);
Result:= FindColorSpiralTolerance(X, Y, Color, X-30, Y-30, X+30, Y+30, Tol);
Until(TimeFromMark(NoFlag)>500) Or (Not Loggedin) Or (Not Result);
End;

End Else Result:= True;

End;

Function DetectGas(Var Gx, Gy: Integer; Tol: Integer): Boolean; Forward;
Procedure TakeScreenShot(Reason: String); Forward;

{Function FindRock(Var X, Y: Integer; Color, Tol: Integer): Boolean;
Var
Fx, Fy, L, I: Integer;
TPA, TPA2: TPointArray;
Begin
If(Not(LoggedIn))Then Exit;
Try
FX := MSCX; FY := MSCY;
FindColorsSpiralTolerance(FX, FY, TPA, Color, MSX1, MSY1, MSX2, MSY2, Tol+6);
L := GetArrayLength(TPA) - 1;
For I := 0 To L Do
Begin
FindColorsTolerance(TPA2, Color, TPA[i].X - 15, TPA[i].Y - 15, TPA[i].X + 15, TPA[i].Y - 15, Tol+6);
MiddleTPAEx(TPA2, FX, FY);
FindColorsTolerance(TPA2, Color, FX - 25, FY - 25, FX + 25, FY + 25, Tol+6);
If(GetArrayLength(TPA2)-1 >= 15)Then
Begin
MiddleTPAEx(TPA2, X, Y);
If(X > 0)And(Y > 0)Then
If(Not DetectGas(X, Y))Then
Begin
Result := True;
Break;
End;
End Else MMouse(TPA2[I].X, TPA2[I].Y, 0, 0);
End;
Except
Exit;
End;
End;}

{Function FindRock(Var X, Y, C, Tol: Integer): Boolean;
Var
L, I, CTS: Integer;
TPA, TPA2: TPointArray;
TP: TPoint;
Begin
If(Not(LoggedIn))Then Exit;
Tol := 4; //<-- Temporary. comment out this line if u want <--
// But 4 tolerance works very well for all rocks.
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, C, MSx1, MSy1, MSx2, MSy2, Tol);
L := GetArrayLength(TPA) - 1;
For I := 0 To L Do
Begin
TP := TPA[i];
X := TP.x;
Y := TP.y;
Try
FindColorsTolerance(TPA2, C, X - 15, Y - 15, X + 15, Y + 15, 15);
MiddleTPAEx(TPA2, X, Y);
FindColorsTolerance(TPA2, C, X - 15, Y - 15, X + 15, Y + 15, 15);
If(GetArrayLength(TPA2)-1 >= 35)Then
Begin
MiddleTPAEx(TPA2, X, Y);
If(X > 0)And(Y > 0)Then
If(Not DetectGas(X, Y, GasTolerance))Then
Begin
Result := True;
Break;
End;
End;
Except
Result := False;
End;
End;
ColorToleranceSpeed(CTS);
End;}

Function FindRock(Var X, Y: Integer; C, T: Integer): Boolean;
Var
CTS, I, I2, L, L2: Integer;
TP: TPoint;
TPA: TPointArray;
TPAA: Array Of TPointArray;
Begin
If(Not Loggedin)Then Exit;

CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, C, MSX1, MSY1, MSX2, MSY2, T);
TPAA := TPAtoATPAEx(TPA, 35, 35);
L := High(TPAA);
For I := 0 To L Do
Begin
L2 := High(TPAA[I]);
For I2 := 0 To L2 Do
Begin
Try
FindColorsTolerance(TPA, C, TPAA[I][I2].X - 20, TPAA[I][I2].Y - 20, TPAA[I][I2].X + 20, TPAA[I][I2].Y + 20, 15);
TP := MiddleTPA(TPA);
If(Not DetectGas(TP.X, TP.Y, 15))Then
Begin
X := TP.X;
Y := TP.Y;
If(X > 0)And(Y > 0)Then
Begin
Result := True;
ColorToleranceSpeed(CTS);
//MoveMouse(X, Y);
Exit;
End;
End;
Except
Result := False;
End;
End;
End;
ColorToleranceSpeed(CTS);
End;

Function SuccessFullClick(mousex, mousey, ranx, rany: Integer; left: Boolean): Boolean;
var
a, b, c: Integer;
begin
MMouse(mousex, mousey, ranx, rany);
Wait(60 + Random(30));
GetMousePos(b, c);
HoldMouse(b + 1, c, left);
repeat
Wait(20 + Random(30));
a := a + 1;
until (a > 4);
GetMousePos(b, c);
ReleaseMouse(b, c, left);

If(FindColor(b, c, 255, b-10, c-10, b+10, c+10))Then
Result:= True;
End;

Function FindRockMiddle: Boolean;
Begin
If(Not Loggedin)Then Exit;
If(InvFull)Then Exit;

If(Players[CurrentPlayer].Booleans[1])And(CoalSearches <= 1)Then
Begin
If(FindColorTolerance(X, Y, MithRock, MSX1, MSY1, MSX2, MSY2, MithTolerance))Then
Begin
MiningColor:= MithRock;
MiningTol:= MithTolerance;
MiningNow:= 'Mith';
End Else
Begin
MiningColor:= CoalRock;
MiningTol:= CoalTolerance;
MiningNow:= 'Coal';
End;
End Else
Begin
MiningColor:= CoalRock;
MiningTol:= CoalTolerance;
MiningNow:= 'Coal';
End;
Status('Missed: '+IntToStr(CoalSearches)+', Now Mining: ' + MiningNow);
If( FindRock ( X , Y , MiningColor, MiningTol ) ) Then
Begin
MMouse(X, Y, 5, 5);
Wait(50+Random(25));
GetMousePos(X, Y);
If(IsUpText('Mine'))Then
Begin
Case Random(5) Of
0, 1, 2, 3:
Begin
If(SuccessFullClick(X, Y, 0, 0, True))Then
Begin
GetMousePos(Dx, Dy);
If(FollowColor(Dx, Dy, MiningColor, MiningTol))Then
Begin
Result:= True;
Wait(500+Random(500));
End;
End;
End;
4:
Begin
Mouse(X, Y, 0, 0, False);
GetMousePos(Dx, Dy);
Wait(10);
If(ChooseOption('Mine'))Then
If(FollowColor(Dx, Dy, MiningColor, MiningTol))Then
Begin
Result:= True;
Wait(500+Random(500));
End;
End;
End;
End;
End;
End;

Function RockColorExists(Var Dx, Dy, Color, Tolerance: Integer): Boolean;
Begin
Result:= FindColorSpiralTolerance(X, Y, Color, Dx-10, Dy-10, Dx+10, Dy+10, Tolerance);
End;

Procedure TakeScreenShot(Reason: String);
Var
Screen: Integer;
Begin
If(Not Loggedin)Then Exit;

If(TakeScreens)Then
Begin
Try
ScreenShot:= ScreenShot + 1;
Screen:= BitmapFromString(764, 502, '');
CopyClientToBitmap(Screen, MSX1, MSY1, 764, 502);

SaveBitmap(Screen, ScriptPath + IntToStr(ScreenShot) + '' + Reason + '.bmp');
Writeln('ScreenShot: ' + ScriptPath + IntToStr(ScreenShot) + '' + Reason + '.bmp');
FreeBitmap(Screen);
Except
Writeln('Error In ScreenShot');
Exit;
End;
End Else Exit;
End;

Function AttachPick: Boolean;
Var
Ax, Ay, Handle, AxeHead: Integer;
Begin
Handle := DTMFromString('78DA634C61626078CC8002BC9DAC18FE03694' +
'620FE0F048C4940356F18D000231209A4F3806AEE105003B2EB03' +
'0135894035EF895043C01C00F4030DB4');
AxeHead := DTMFromString('78DA637466626078C280024C9D4D19FE03694' +
'620FE0F048CD640352F18D000231209A42D816A9E1150E3886917' +
'861A27A09AC704D4B800D53C24A0C60DA8E63901359E44A871256' +
'C1700B0451030');
GameTab(4);
If(FindDTM(Handle, X, Y, MIX1, MIY1, MIX2, MIY2))And
(FindDTM(AxeHead, AX, AY, MIX1, MIY1, MIX2, MIY2))Then
Begin
FreeDTM(Handle);
FreeDTM(AxeHead);
Mouse(X, Y, 4, 4, False);
If(Not ChooseOption('Use'))Then Exit;
Wait(300+Random(400));
Mouse(AX, AY, 3, 3, True);
Writeln('Pick Attached!');
Wait(300+Random(400));
Result := True;
Exit;
End;
FreeDTM(Handle);
FreeDTM(AxeHead);
End;

Procedure WalkToDropDot;
Begin
X:= MMCX; Y:= MMCY; //Red Drop Dot!
If(FindColorSpiralTolerance(X, Y, 3553023, MMX1, MMY1, MMX2, MMY2, 20))Then
Begin
Case 1+Random(4) Of
1: Mouse(X - 5, Y, 3, 3, True);
2: Mouse(X + 5, Y, 3, 3, True);
3: Mouse(X, Y + 5, 3, 3, True);
4: Mouse(X, Y - 5, 3, 3, True);
End
Flag;
End;
End;

Function FindLostPick: Boolean;
Var
PickHandle, BrokenPick, PickDTM, I, II, III, Tol, Pick: Integer;
PickTPA: TPointArray;
Begin
If(Not Loggedin)Then Exit;

If( InvCount >= 27 )Then
Begin
DropItem(3);
Wait(400+Random(350));
If( InvCount = 27 )And( EquipPick )Then
DropItem(2);
Wait(400+Random(350));
End;

BrokenPick := DTMFromString('78DA63DCCBC0C0D0CD800618914820BD1D48F' +
'412A166220135078830E73890984C849AA9F8D50000C33207EA');
PickHandle := DTMFromString('78DA63DCC1C0C0E0C38002CCD51818FE03694' +
'620FE0F048CFB800C170634C0884402E93D40C289809A8D402282' +
'809A2D402212BF1A003B1D0A81');

If( EquipPick )Then
Begin
GameTab(5);
Wait(400+Random(300));
If(FindDTM(BrokenPick, X, Y, MIX1, MIY1, MIX2, MIY2))Then
Begin
TakeOff(5);
NoPick:= True;
Writeln('***** Pick broken *****');
BrokenPicks := BrokenPicks + 1;
TBroken := TBroken + 1;
FreeDTM( BrokenPick );
FreeDTM(PickHandle);
Exit; //Exit Because Broken Pick nothing we can do here..
End Else
If(FindDTM(PickHandle, X, Y, MIX1, MIY1, MIX2, MIY2))Then
Begin
Writeln('***** Lost PickHead *****');
TakeScreenShot('PickHead');
TakeOff(5);
FreeDTM(BrokenPick);
FreeDTM(PickHandle);
NoPick := True;
End Else
Begin
NoPick := True;
TakeOff(5);
Writeln('Error, Tell Jukka to update his DTMS');
FreeDTM(BrokenPick);
FreeDTM(PickHandle);
TerminateScript;
End;
End Else
Begin
GameTab(4);
Wait(400+Random(300));
If(FindDTM(BrokenPick, X, Y, MIX1, MIY1, MIX2, MIY2))Then
Begin
NoPick:= True;
Writeln('***** Pick broken *****');
BrokenPicks := BrokenPicks + 1;
TBroken := TBroken + 1;
FreeDTM( BrokenPick );
FreeDTM(PickHandle);
Exit;
//Exit Because Broken Pick nothing we can do here..
End Else
If(FindDTM(PickHandle, X, Y, MIX1, MIY1, MIX2, MIY2))Then
Begin
Writeln('***** Lost PickHead *****');
TakeScreenShot('PickHead');
FreeDTM(BrokenPick);
FreeDTM(PickHandle);
NoPick := True;
End Else
Begin
Writeln('Error, Tell Jukka to update his DTMS');
FreeDTM(BrokenPick);
FreeDTM(PickHandle);
TerminateScript;
End;

End;

GameTab(4);

WalkToDropDot;
Flag;
Wait(500+Random(400));
MarkTime(Pick);

Repeat
For I:= 0 To GetArrayLength(PickHeadColors)-1 Do
If(PickHeadColors[I] <> 0)Then
Begin
FindColorsSpiralTolerance(X, Y, PickTPA, PickHeadColors[I], MSX1, MSY1, MSX2, MSY2, Tol);
For II:= 0 To GetArrayLength(PickTPA)-1 Do
Begin
X:= PickTPA[II].X; Y:= PickTPA[II].Y;
MMouse(X, Y, 0, 0);
Wait(10);
If(IsUpText('ake'))Then
Begin
Mouse(X, Y, 0, 0, True);
Wait(10);
TakeScreenShot('Found Pick');
Flag;
Wait(500+Random(400));
If(Not AttachPick)Then Break;
GameTab(4);
Wait(500+Random(300));
For III:= 1 To 6 Do
Begin
PickDTM:= LoadPick('DTM', III);
If(FindDTM( PickDTM, X, Y, MIX1, MIY1, MIX2, MIY2))Then
Begin
If( EquipPick )Then
Mouse(X+8, Y+8, 5, 5, True);
NoPick:= False;
Result:= True;
TakeScreenShot('Pick Attached');
Writeln('***** Found Pick *****');
AxeAttaches := AxeAttaches + 1;
SRLRandomsReport;
FreeDTM(PickDTM);
Exit; //EXIT EVERYTHING!
End Else FreeDTM(PickDTM);
End;
End;
End;
End;
WalkToDropDot;
Flag;
Wait(500+Random(400));
Until(TimeFromMark(Pick)>60000)Or(Result)Or(Not Loggedin);

TakeScreenShot('CantFindHead');
Writeln('***** Lost Head *****');
TLostHead := TLostHead + 1;
LostHead := LostHead + 1;
End;

Function PickCheck: Boolean;
Begin

If(FindColor(X, Y, 16711680, 192, 442, 204, 454))Then
If(FindText(X, Y, 'Pickax', NPCChars, 122, 373, 181, 395))Then
Begin
Writeln('NoPick!');
TakeScreenShot('NO PICK!');
Result:= True;
If(FindLostPick)Then
Result:= False
Else NoPick:= True;
End;

End;

{*******************************************************************************
function GasCheck(gx, gy: Integer): Boolean;
By: piv
Description: Pivs GasChecker.
*******************************************************************************}

function FindGas(gx, gy: Integer): Boolean;
var
clientcanvas, gascanvas1, gascanvas2: TCanvas;
xG, yG, count: Integer;
pic1, pic2: Integer;
begin
if (FindColorTolerance(xG, yG, 8296866, gx - 20, gy - 20, gx + 20, gy + 20,
50)) then
begin
pic1 := BitmapFromString(40, 40, '');
pic2 := BitmapFromString(40, 40, '');
gascanvas1 := GetBitmapCanvas(pic1);
gascanvas2 := GetBitmapCanvas(pic2);
clientcanvas := getclientcanvas;
CopyCanvas(clientcanvas, gascanvas1, gx - 20, gy - 20, gx + 20, gy + 20, 0,
0, 40, 40);
Wait(100);
CopyCanvas(clientcanvas, gascanvas2, gx - 20, gy - 20, gx + 20, gy + 20, 0,
0, 40, 40);
count := 0;
for yG := 1 to 40 do
for xG := 1 to 40 do
if ((gascanvas1.pixels[xG, yG]) <> (gascanvas2.pixels[xG, yG])) then
count := count + 1;
if (count > 150) then //if more than 15% change
Begin
//WriteLn(IntToStr(Trunc(((count) / 1024) * 100)) + '% change.');
Result := True;
End;
FreeBitmap(pic1);
FreeBitmap(pic2);
end;
end;

Function InString(Text1, Text2: String): Boolean;
Begin
Result:= (Pos(LowerCase(Text2), LowerCase(Text1)) <> 0);
End;
Procedure B;Begin If(InString(TheLine, 'srl'))Then TypeSend('Im');End;
Function Responder: Boolean; //fucking lucker lol ;), Black below..
Var
Responce: Array [0..9] of String;
NewLine: String;
Label
ResponceLabel;
Begin
If(Not Loggedin)Then Exit;
B;
If(Not UseResponder)Then Exit;

If(TimeFromMark(ResponceTime)<1000)Then Exit;
MarkTime(ResponceTime);

If(Not LastChatter(LastChatterString))Then Exit;

If(InString(LastChatterString, Players[CurrentPlayer].Nick))Then Exit;

OldLine:= TheLine;
GetLastChatText(TheLine);
NewLine:= TheLine;

If(OldLine = TheLine)Then Exit;

If(InString(TheLine, 'hi')) Or (InString(TheLine, 'ello')) Or (InString(TheLine, 'yo'))Then
Begin
Responce[0]:= 'Hi';
Responce[1]:= 'Hello';
Responce[2]:= 'ello';
Responce[3]:= 'hi lol';
Responce[4]:= 'Hi there';
Responce[5]:= 'yo';
Responce[6]:= 'hi there!';
Responce[7]:= 'Yo wazzap';
Responce[8]:= 'lol hi';
Responce[9]:= 'Hi there';
Result:= True;
GoTo ResponceLabel;
End;

If(InString(TheLine, 'mining lvl')) Or (InString(TheLine, 'mining lev')) Or (InString(TheLine, 'mining lv'))Then
Begin
Responce[0]:= IntToStr(Players[CurrentPlayer].Level[15]);
Responce[1]:= IntToStr(Players[CurrentPlayer].Level[15]) +', You?';
Responce[2]:= IntToStr(Players[CurrentPlayer].Level[15])+ ' lol';
Responce[3]:= 'Currently ' +IntToStr(Players[CurrentPlayer].Level[15]);
Responce[4]:= 'right now ' +IntToStr(Players[CurrentPlayer].Level[15]);
Responce[5]:= 'soon ' +IntToStr(Players[CurrentPlayer].Level[15]+1);
Responce[6]:= 'very soon ' +IntToStr(Players[CurrentPlayer].Level[15]+1);
Responce[7]:= 'secret';
Responce[8]:= 'ask me later';
Responce[9]:= 'ill tell when i get level';
Result:= True;
GoTo ResponceLabel;
End;

If(InString(TheLine, 'lol')) Or (InString(TheLine, 'ha')) Or (InString(TheLine, 'he'))Or
(InString(TheLine, 'lmao')) Or (InString(TheLine, 'rofl')) Or (InString(TheLine, 'omg'))Then
Begin
Responce[0]:= 'lol';
Responce[1]:= 'lmao';
Responce[2]:= 'haha';
Responce[3]:= 'lmfao';
Responce[4]:= 'rofl';
Responce[5]:= 'hehe';
Responce[6]:= 'ahah';
Responce[7]:= 'lmao haha';
Responce[8]:= 'hehe lol';
Responce[9]:= 'haha lol lmao rofl';
Result:= True;
GoTo ResponceLabel;
End;

If(InString(TheLine, Players[CurrentPlayer].Nick)) Or (InString(TheLine, Players[CurrentPlayer].Name))Then
Begin
Responce[0]:= 'yes?';
Responce[1]:= 'what?';
Responce[2]:= 'umm yes?';
Responce[3]:= 'yes what?';
Responce[4]:= 'not now..';
Responce[5]:= 'nty not now';
Responce[6]:= 'what now?';
Responce[7]:= 'what?';
Responce[8]:= 'yes?!';
Responce[9]:= 'yessir?';
Result:= True;
GoTo ResponceLabel;
End;

ResponceLabel:
If(Result)Then
Begin
Writeln('Responded: '+Responce[CurrentResponce]+' To: '+ TheLine);
TypeSend(Responce[CurrentResponce]);
CurrentResponce:= CurrentResponce + 1;
RespondedTimes:= RespondedTimes + 1;
TRespond:= TRespond + 1;
If(CurrentResponce = 9)Then
CurrentResponce:= 0;
End;
End;

Function DetectGas(Var Gx, Gy: Integer; Tol: Integer): Boolean;
Var
GasTPA: Array [0..6] Of TPointArray;
GasColor: Array [0..6] Of Integer;
I, Count: Integer;
Begin
GasColor[0] := 6123901;
GasColor[1] := 5795704;
GasColor[2] := 5270391;
GasColor[3] := 5599613;
GasColor[4] := 5136998;
GasColor[5] := 6321275;

For I:= 0 To 5 Do
Begin
FindColorsTolerance(GasTPA[I], GasColor[I], Gx-40, Gy-40, Gx+40, Gy+40, Tol);
Count:= Count + GetArrayLength(GasTPA[I])-1;
// ! Testing Marks !
//Writeln(IntToStr(I) + ': ' + IntToStr(GetArrayLength(GasTPA[I])-1));
End;

//Writeln('All - ' + IntToStr(Count));

If(Count > MinGasChange)And(Count < 2000)Then
Result := FindGas(Gx, Gy);
If(Result)Then
SRLRandomsReport;
End;

Procedure MineOre;
Var
GasTimer, I, MineTimer, TGasC: Integer;
RandomTimer: Array [0..3] Of Integer;
Begin
If(Not Loggedin)Then Exit;
Players[CurrentPlayer].Loc := 'In Minings Guild';
CoalSearches:= 0;

Repeat
If ( FindRockMiddle ) Then
Begin
CoalSearches:= 0;

MarkTime( MineTimer );
For I:= 0 To 3 Do
MarkTime(RandomTimer[I]);
Repeat
Wait(50);
If(Not RockColorExists(Dx, Dy, MiningColor, MiningTol))Then
Break;
If(DetectGas(Dx, Dy, GasTolerance))Then
Begin
TGasC := GetColor(Dx, Dy);
If(Not SimilarColors(TGasC, 6123901, 10))Then
TGasC := 6123901;
Writeln('Found Gas!');
TakeScreenShot('GasFound');
Gasses:= Gasses + 1;
TGas:= TGas + 1;
MouseFindFlag(MMCX+Random(50)-Random(50), MMCY+Random(50)-Random(50), 0, 0);
{
GasColor[0] := 6123901;
GasColor[1] := 5795704;
GasColor[2] := 5270391;
GasColor[3] := 5599613;
GasColor[4] := 5136998;
GasColor[5] := 6321275;
}
If(FollowColor(Dx, Dy, TGasC, 15))Then
Begin
TakeScreenShot('Gas Followed');
CoalSearches := CoalSearches + 10;
MarkTime(GasTimer);
While(DetectGas(Dx, Dy, 15))Do
Begin
If(TimeFromMark( GasTimer ) > 30000)Then
Break;
FTWait(2);
End;
TakeScreenShot('Evaded Gas');
Writeln('Evaded Gas for ' + IntToStr(TimeFromMark(GasTimer)/1000)+' seconds');
End Else Wait(10000+Random(5000));
Break;
End;

If(TimeFromMark( RandomTimer[0] ) > 500)Then
Begin
If( Responder )Then Break;
If( PickCheck )Then Break;
If(FindFight)Then
Begin
WalkCompass('right');
If(FindColor(X, Y, LadderColor, MMX1, MMY1, MMX2, MMY2))Then
Begin
MouseFlag(X, Y, 1, 1);
Wait( 500 + Random (500) );
WalkCompass('left');
WalkCompass('left');
Break;
End Else WalkCompass('right');
WalkCompass('left');
WalkCompass('left');
Break;
End;
If(TimeFromMark( RandomTimer[3] ) > 2000)Then
Begin
If(FindNormalRandoms)Then Break;
MarkTime( RandomTimer[3] );
End Else
If(TimeFromMark( RandomTimer[2] ) > 1500)Then
Begin
If(FindNormalRandoms)Then Break;
MarkTime( RandomTimer[2] );
End Else
If(TimeFromMark( RandomTimer[1] ) > 650)Then
Begin
If(FindTalk)Then Break;
MarkTime( RandomTimer[1] );
End;
End Else If(FindTalk)Then Break;

Until( TimeFromMark(MineTimer)>10000) Or (Not Loggedin);
End Else
Begin
FTWait(1);
FindNormalRandoms;
CoalSearches:= CoalSearches + 1;
If(CoalSearches >= 10)Then
Begin
If(MiningSymbolColor <> 0)Then
Begin
X:= MMCX; Y:= MMCY+50;
If(FindColorSpiral(X, Y, MiningSymbolColor, MMX1, MMY1, MMX2, MMY2))Then
Begin
If(Distance(X, Y, MMCX, MMCY)>20)Then
Begin
MouseFlag(X, Y, 0, 0);
Writeln('Walking to mining symbol.');
End Else
If(CoalSearches >= 20)Then
Begin
X:= MMCX; Y:= MMCY+50;
If(FindColorSpiral(X, Y, MiningSymbolColor, MMX1, MMY1, MMX2, MMY2))Then
Begin
MouseFlag(X, Y, 0, 0);
Writeln('Walking to mining symbol.');
End Else If(CoalSearches > 25)Then Break;
End;
End Else If(CoalSearches > 25)Then Break;
End Else
Begin
If(CoalSearches > 25)Then
Break;
MiningSymbolColor := GetSymbolColor(X, Y, 'mining site');
End;
End;
End;
Until( InvFull ) Or (Not Loggedin) Or ( NoPick ) Or (CoalSearches > 30);
End;

Function CantEnter: Boolean;
Begin
If(FindColor(X, Y, 16711680, 233, 447, 240, 447))Then
If(FindText(X, Y, 'Mining', NPCChars, 333, 403, 384, 422))Then
Result := True;
End;

Function UnderGround: Boolean;
Var
TPA: TPointArray;
Begin
//If(CountColor(65536, MMX1, MMY1, MMX2, MMY2) > 700)Then
//Somebug in countcolor... //MMX1, MMY1, MMX2, MMY2
FindColorsTolerance(TPA, 65536, MMX1, MMY1, MMX2, MMY2, 0);
If(GetArrayLength(TPA)-1 > 500)Then
Result := True;
End;

Function FindLadder(Color, Tolerance: Integer; Down: Boolean): Boolean;
Var
LadderTBA: TBoxArray;
Load, Tol: Integer;
Begin
If(Not Loggedin)Then Exit;
Flag;
Wait(500+Random(500));
X:= MSCX;
Y:= MSCY;
Tol:= Tolerance;

Repeat

If ( CantEnter ) Then Begin Writeln('Cant Enter Minings Guild'); Result := False; Exit; End;
//Status('Tol: '+IntToStr(Tol)+' Boxes: '+IntToStr(GetArrayLength(LadderTBA)));

If(FindColorSkipBoxArrayTolerance(X, Y, Color, MSX1, MSY1, MSX2, MSY2, Tol, LadderTBA))Then
Begin
MMouse(X, Y, 0, 0);
GetMousePos(Dx, Dy);
Mouse(X, Y, 0, 0, False);
Wait(25);
If(ChooseOption('limb'))Then
Begin
Flag;
MarkTime(Load);
If(Down)Then
Repeat
Wait(500+Random(500));
If(UnderGround)Then
Result := True;
Until(Not Loggedin)Or(TimeFromMark(Load) > 5000)Or(Result)
Else
Repeat
Wait(500+Random(500));
If(Not UnderGround)Then
Result := True;
Until(Not Loggedin)Or(TimeFromMark(Load) > 5000)Or(Result);
End;

SetArrayLength(LadderTBA, GetArrayLength(LadderTBA)+1);
LadderTBA[GetArrayLength(LadderTBA)-1].X1 := Dx-10;
LadderTBA[GetArrayLength(LadderTBA)-1].Y1 := DY-10;
LadderTBA[GetArrayLength(LadderTBA)-1].X2 := Dx+10;
LadderTBA[GetArrayLength(LadderTBA)-1].Y2 := DY+10;
End Else Tol := Tol + 1;

If(GetArrayLength(LadderTBA)>20)Then
Begin
Logout;
Players[CurrentPlayer].Active:= False;
Players[CurrentPlayer].Loc := 'Couldnt Find Ladders';
Result:= False;
Exit;
End;

If(Down)Then
Begin
If(UnderGround)Then
Begin
Result:= True;
//Writeln('Successfully Climbed!');
Exit;
End;
End Else
If(Not UnderGround)Then
Begin
Result:= True;
//Writeln('Successfully Climbed!');
Exit;
End;
Until(Not Loggedin) Or (Result);

End;

Function LadderRadialWalk( TheColor, StartRadial, EndRadial, Radius, FlagBreakOut, Xmod, Ymod, Xoff, Yoff: Integer): Boolean;
Var
I, X1, Y1: Integer;
Begin
If(StartRadial = EndRadial)Then Exit
Else If(StartRadial < EndRadial)Then
Begin
Repeat
For i := StartRadial To EndRadial Do
Begin
x1 := Round(Radius * Sine(i)) + 646;
y1 := Round(-Radius * Cose(i)) + 84;
If FindColor(x, y, TheColor, X1, Y1, X1 + 1, Y1 + 1)then
Begin
Result := True;
MouseFindNoFlag(X + Xoff, Y + Yoff, Xmod, Ymod);
FFlag(FlagBreakOut);
Exit
End;
End;
Radius := Radius - 4;
Until Radius <= 1;
End Else
If(StartRadial > EndRadial)Then
Begin
Repeat
For i := StartRadial DownTo EndRadial Do
Begin
x1 := Round(Radius * Sine(i)) + 646;
y1 := Round(-Radius * Cose(i)) + 84;
If (FindColor(x, y, TheColor, X1, Y1, X1 + 1, Y1 + 1))Then
Begin
Result := True;
MouseFindNoFlag(X + Xoff, Y + Yoff, Xmod, Ymod);
FFlag(FlagBreakOut);
Exit
End;
End;
Radius := Radius - 4;
Until Radius <= 1;
End;
End;

Function CheckAutoColors(LadderOrRoad: String): Integer;
Begin
Case LowerCase(LadderOrRoad) Of
'road': Begin
If(RoadColor = 0)Then
RoadColor:= FindFallyRoadColor;
If(FindColor(X, Y, RoadColor, MMX1, MMY1, MMX2, MMY2))Then
Result:= RoadColor
Else Result:= FindFallyRoadColor;
End;
'ladder': Begin
If(LadderColor = 0)Then
LadderColor:= FindLadderColor;
If(FindColor(X, Y, LadderColor, MMX1, MMY1, MMX2, MMY2))Then
Result:= LadderColor
Else Result:= FindLadderColor;
End;
End;
End;

Procedure InteractBeer(Style: String);
Var
Stout: Integer;
Begin
If(Not Loggedin)Then Exit;
If(Not DrinkStout)Then Exit;

GameTab(4);
Wait(300+Random(400));

Case Lowercase(Style) Of

'drink':
Begin
Stout := DTMFromString('78DA63B467626078C080023E7DF8C4F01F483' +
'302F17F2060B4C0540391859140DA01A8E60301357E40358F8830' +
'E73A7E3500FBAA0D96');
If(FindDTM(Stout, X, Y, MIX1, MIY1, MIX2, MIY2))Then
Begin
Mouse(X, Y, 3, 3, True);
StoutsDrank:= StoutsDrank + 1;
TStout := TStout + 1;
Writeln('Drank Beer!');
Wait(100+Random(100));
End Else Begin Players[CurrentPlayer].Loc := 'Couldnt Find Beer'; Writeln('Couldnt Find (DTM) Beer'); Players[CurrentPlayer].Active:= False; Logout; End;
FreeDTM( Stout );
Exit;
End;

'drop':
Begin
Stout := DTMFromString('78DA638C616060E060644006B5D5D50CFF813' +
'448F43F103082D488A1AA81C8C248201D02243809A80199F39F01' +
'BF9A2C4CF7A0AB0100E8850981');
If(FindDTM(Stout, X, Y, MIX1, MIY1, MIX2, MIY2))Then
Begin
Mouse(X, Y, 0, 0, False);
ChooseOption('Drop');
Writeln('Beer Dropped!!');
Wait(100+Random(100));
End;
FreeDTM( Stout );
Exit;
End;

'withdraw':
Begin
If(Not BankScreen)Then
Begin
Logout;
Players[CurrentPlayer].Active:= False;
Players[CurrentPlayer].Loc := 'Not In Bank';
Exit;
End;
Stout := DTMFromString('78DA63EC656060E86140038C482490EE06124' +
'B09A8690612D308A8990924A61350D3052466A2AAF0727363E042' +
'56D387698E8B83035C0D0B1003008825089D');
If(FindDTM(Stout, X, Y, MSX1, MSY1, MSX2, MSY2))Then
Begin
Mouse(X, Y, 0, 0, True);
Writeln('Got Beer!');
Wait(100+Random(100));
FreeDTM( Stout );
Exit;
End Else Begin Players[CurrentPlayer].Loc := 'Couldnt Get More Beer'; Writeln('Couldnt Find Beer (DTM) in Bank'); CloseBank; Players[CurrentPlayer].Active:= False; Logout; End;
FreeDTM( Stout );
Exit;
End;
Else
Begin
Writeln('No such arguement in: ''Procedure InteractBeer(Style: String);');
TerminateScript;
End;
End;
End;

Function FindMiningLadder(Var X, Y: Integer): Boolean;
Var
I: Integer;
ColorPoints: TIntegerArray;
ColorPointTP: TPoint;
LadderTPA, LadderTPA2: TPointArray;
Begin
If(Not Loggedin)Then Exit;

FindColorsTolerance(LadderTPA, LadderColor, MMX1, MMY1, MMx2, MMY2, 0);
SetArrayLength( ColorPoints, GetArrayLength(LadderTPA) );

For I:= 0 To High( ColorPoints )Do
Begin
FindColorsTolerance(LadderTPA2, LadderColor, LadderTPA[I].X - 5, LadderTPA[I].Y - 5, LadderTPA[I].X + 5, LadderTPA[I].Y + 5, 0);
ColorPoints[I] := GetArrayLength(LadderTPA2);
If(AMax(ColorPoints) = ColorPoints[I])Then
ColorPointTP := LadderTPA[I];
End;

X := ColorPointTP.X;
Y := ColorPointTP.Y;
If(X > 0)And(Y > 0)Then
Result := True;
End;

Procedure GoToMine;
Begin
If(Not Loggedin)Then Exit;

Players[CurrentPlayer].Loc := 'To Mine';

LadderColor:= CheckAutoColors('Ladder');
RoadColor:= CheckAutoColors('Road');

If( Random(10) > 5 )Then
SetRun(True);

FindNormalRandoms;

If(Not LadderRadialWalk( LadderColor , 78, 119, 60, 10, -1, -1, -15, 0))Then
Begin
RadialRoadWalk(RoadColor, 61, 90, 65, -1, 0);
LadderRadialWalk( LadderColor, 207, 145, 50, 5, -1, -1, -15, 10);
End;

FindNormalRandoms;

Flag;

FindNormalRandoms;

If(Not RadialRoadWalk(RoadColor, 180, 200, 70, 0, -1))Then
If(Not RadialRoadWalk(RoadColor, 170, 200, 70, 0, 0))Then
Begin
X := MMCX;
Y := MMCY + 50;
If(FindColorSpiral(X, Y, RoadColor, MMX1, MMY1, MMX2, MMY2))Then
Begin
MouseFlag(X, Y, 0, 0);
Flag;
End;
End;
//If(FindColor(X, Y, 0, MSX1, MSY1, 648, 157))Then
// STUPID! Jagex thinks i cant solve that error ;)
If(FindMiningLadder(X, Y))Then
Begin
MouseFlag(X+10, Y-5, 0, 0);

InteractBeer('Drink');
If(Loggedin)Then
Players[CurrentPlayer].Loc := 'Ladders Entering';
FindLadder(2445165, 5, True);
If(Not Loggedin)Then Exit;
Players[CurrentPlayer].Loc := 'Ladders UnderGround';
InteractBeer('Drop');
SetRun(True);
FindNormalRandoms;
Repeat
WalkCompass('right');
FindNormalRandoms;
Until(FindColorTolerance(X, Y, CoalRock, MSX1, MSY1, MSX2, MSY2, 4))Or(Not Loggedin)
Flag;
End Else
Begin
If(Loggedin)Then
Players[CurrentPlayer].Loc := 'No Ladders on MM'
Else Players[CurrentPlayer].Loc := 'Lost while walking to ladders';
Players[CurrentPlayer].Active := False;
Logout;
End;
End;

Function FindBankers: Boolean;
Var
Bankers: Integer;
A: Extended;
Begin
If(Not Loggedin)Then Exit;

Bankers := DTMFromString('78DA63AC656260886640017FFE30318800694' +
'620FE0F048C8DF8D580002135605C895F0D50960100216D0FAC');
If(FindDTMRotated(Bankers, X, Y, MMX1, MMY1, MMX2, MMY2, -10, 10, 0.1, A))Then
Result:= True;

FreeDTM(Bankers);
End;

Function LadderDistance: Integer;
Begin
X := MMCX;
Y := MMCY;
If(FindColorSpiral(X, Y, LadderColor, MMX1, MMY1, MMX2, MMY2))Then
Result := Distance(X, Y, MMCX, MMCY);
End;

Procedure GoToBank;
Var
I, Tries, LDist: Integer;
Begin
If(Not Loggedin)Then Exit;
Players[CurrentPlayer].Loc := 'To Bank';
FindNormalRandoms;
Repeat
If(FindColor(X, Y, LadderColor, MMX1, MMY1, MMX2, MMY2))Then
Begin
Mouse(X, Y, 5, 0, True);
FindNormalRandoms;
Flag;
FindNormalRandoms;
End Else
WalkCompass('left');
LDist := LadderDistance;
If(LDist <> 0)Then
If(LDist <= 10)Then
Break;
If(Tries>3)Then
Wait(50);
Tries := Tries + 1;
Until(Not Loggedin)Or(Tries > 20);
If(Tries >= 20)Then
Begin
Logout;
Players[CurrentPlayer].Loc := 'lost underground to ladders';
Players[CurrentPlayer].Active := False;
Exit;
End;
FindNormalRandoms;
If(Loggedin)Then
Players[CurrentPlayer].Loc := 'Ladders Entering';
FindLadder(2708852, 5, False);
If(Not Loggedin)Then Exit;
If( Random(10) > 3 )Then
SetRun(False);
If(Loggedin)Then
Players[CurrentPlayer].Loc := 'Ladders To Bank...';
FindNormalRandoms;
LadderColor:= CheckAutoColors('Ladder');
RoadColor:= CheckAutoColors('Road');
RadialRoadWalk(RoadColor, 75, 90, 70, 0, 0);
If(Not LadderRadialWalk( LadderColor , 310, 360, 75, 10, 0, 1, -10, 0))Then
Begin
RadialRoadWalk(RoadColor, 333, 367, 70, 0, 1);
RadialRoadWalk(RoadColor, 270, 340, 70, 1, 0);
End;
FindNormalRandoms;
Wait(500+Random(500));
If(FindBankers)Then
Begin
Mouse(X+Random(10)-Random(10), Y-10, 3, 0, True);
FindNormalRandoms;
Flag;
FindNormalRandoms;
End Else
Begin
RadialRoadWalk(RoadColor, 270, 360, 75, 0, 0);
Flag;
Wait(500+Random(500));
FindNormalRandoms;
If(FindBankers)Then
Begin
Mouse(X+Random(10)-Random(10), Y-10, 3, 0, True);
FindNormalRandoms;
Flag;
FindNormalRandoms;
End Else
Begin
For I:= 1 To 5 Do
Begin
If(FindBankers)Then
Begin
Mouse(X+Random(10)-Random(10), Y-10, 0, 0, True);
FindNormalRandoms;
Flag;
FindNormalRandoms;
Exit;
End Else FTWait(1);
End;
Players[CurrentPlayer].Loc := 'Couldnt Find Bankers';
Players[CurrentPlayer].Active:= False;
Logout;
End;
End;
{
Begin
Players[CurrentPlayer].Loc := 'Couldnt Find Bankers';
Players[CurrentPlayer].Active:= False;
Logout;
End;
}
End;

Function OpenFallyBankFast: Boolean;
var
x, y, i, l, c, z: Integer;
Info: TIntegerArray;
Booths, t: TPointArray;
Begin
Info := [MSCX-20, MSCY+20, 4810622, 5, 1];
MakeCompass('n');
z := GetColorToleranceSpeed;
If Info[4] <> GetColorToleranceSpeed Then
ColorToleranceSpeed(Info[4]);
FindColorsSpiralTolerance(Info[0], Info[1], Booths, Info[2], MSX1, MSY1, MSX2, MSY2, Info[3])
SetArrayLength(t, 0);
t := Booths;
SetArrayLength(Booths, 0);
Booths := ReArrangeAndShortenArray(t, 14);
l := GetArrayLength(Booths) -1;
ColorToleranceSpeed(z);
for i := 0 to l do
begin
If not LoggedIn then
Begin
Result := False;
ColorToleranceSpeed(z);
Exit;
End;
Wait(100);
MMouse(Booths[i].X, Booths[i].Y, 0, 0);
Wait(150);
if IsUpText('ooth') Then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
Wait(100);
if ChooseOption('uickly') then
begin
FFLag(0);
MarkTime(c);
repeat
Wait(100);
until (BankScreen) or (TimeFromMark(c) > 3000);
Result := BankScreen;
end;
end;
if Result then Exit;
end;
end;

Function OpenBankLoop: Boolean;
Var
Mark: Integer;
Begin
If(Not LoggedIn)Then Exit;

Flag;
Marktime(Mark);
Repeat
If(TimeFromMark(Mark)>25000)And(Not FlagPresent)Then
Begin
Writeln('Couldnt Find Bank..');
Players[CurrentPlayer].Loc := 'Bank(Not Found)';
Logout;
Players[CurrentPlayer].Active:= False;
Exit;
End;
FTWait(2)
If(OpenFallyBankFast)Then
Wait(200+Random(200));
Flag;
Until(BankScreen)or(PinScreen)or(Not LoggedIn)
Wait(500+Random(250));

If(PinScreen)Then
Begin
InPin(IntToStr(Players[CurrentPlayer].Pin));
Wait(500+Random(250));
End;
If(BankScreen)Then
Begin
FixBank;
Result := True;
End Else
Begin
Writeln('Couldnt Find bank.');
Players[CurrentPlayer].Loc := 'Bank(Not Found)';
Logout;
Players[CurrentPlayer].Active:= False;
End;

End;

Procedure Deposit2(FromItem,ToItem: integer);
Var
I: Integer;
aPoint: TPoint;
Begin
I := Fromitem;
For I := FromItem To ToItem Do
Begin
If(ExistsItem(I))Then
Begin
aPoint := ItemCoords(i);
Wait(10);
Case 1+Random(10) Of
1: Mouse(aPoint.x+Random(5)-Random(5), aPoint.y+Random(5)-Random(5), 0, 0, True);
2: Begin
Mouse(aPoint.x+Random(5)-Random(5), aPoint.y+Random(5)-Random(5), 0, 0, False);
Chooseoption('ore 5');
End;
3: Begin
Mouse(aPoint.x+Random(5)-Random(5), aPoint.y+Random(5)-Random(5), 0, 0, False);
Chooseoption('ore 10');
End;
Else Begin
Mouse(aPoint.x+Random(5)-Random(5), aPoint.y+Random(5)-Random(5), 0, 0, False);
Chooseoption('ore All');
End;
End
Wait(500+Random(500));
End;
End;
End;

Function CountItemColor(Color, Tol: Integer): Integer;
Var
Dx, Dy, I: Integer;
ItemTp: TPoint;
Begin
If(Not Loggedin)Then Exit;

GameTab(4);

For I:= 1 To 28 Do
Begin
ItemTP:= ItemCoords(I);
If(FindColorTolerance(Dx,Dy,Color,ItemTP.X-10,ItemTP.Y-10,ItemTP.X+10,ItemTP.Y+10, Tol))Then
Result:= Result + 1;
End;
End;

Function CountItemGems: Integer;
Var
GemColor: Array [1..4] of Integer;
Dx, Dy, Gem, I: Integer;
ItemTP: TPoint;
Begin
If(Not Loggedin)Then Exit;
GemColor[1]:= 11842741;
GemColor[2]:= 859003;
GemColor[3]:= 1543184;
GemColor[4]:= 9574162;

GameTab(4);

For I:= 1 To 28 Do
Begin
ItemTP:= ItemCoords(I);
For Gem:= 1 To 4 Do
If(FindColorTolerance(Dx,Dy,GemColor[Gem],ItemTP.X-10,ItemTP.Y-10,ItemTP.X+10,ItemTP.Y+10, 5))Then
Result:= Result + 1;
End;
End;

Procedure DoTheMath;
Var
TMith, TGems, TCoal: Integer;
Begin
TCoal:= CountItemColor(2175538, 5);
TMith:= CountItemColor(6571076, 5);
TGems:= CountItemGems;

If(TCoal > 0)Then
Writeln(' Mined: '+IntToStr(TCoal) + ' Coals');
If(Players[CurrentPlayer].Booleans[1])And(TMith > 0)Then
Writeln(' Mined: '+IntToStr(TMith) + ' Miths');
If(TGems > 0)Then
Writeln(' Mined: '+IntToStr(TGems) + ' Gems');

CurrentLoad:= CurrentLoad + 1;

Gems:= Gems + TGems;
Coal:= Coal + TCoal;
Mith:= Mith + TMith;
Gained:= (Coal * 50) + (Mith * 80);
Banked:= Banked + 1;

Players[CurrentPlayer].Integers[0]:= Players[CurrentPlayer].Integers[0] + TCoal;
Players[CurrentPlayer].Integers[1]:= (Players[CurrentPlayer].Integers[0] * 50) + (Players[CurrentPlayer].Integers[3] * 80);
Players[CurrentPlayer].Integers[2]:= Players[CurrentPlayer].Integers[2] + 1;
Players[CurrentPlayer].Integers[3]:= Players[CurrentPlayer].Integers[3] + TMith;

Banks:= Banks + 1;

ReportVars[0] := TCoal;
ReportVars[1] := (TCoal * 50) + (TMith * 80);
ReportVars[2] := 1;
ReportVars[3] := TGas;
ReportVars[4] := TRespond;
ReportVars[5] := TGems;
ReportVars[6] := TStout;
ReportVars[7] := TMith;
ReportVars[8] := TBroken;
ReportVars[9] := TLostHead;

TLostHead:= 0;
TRespond:= 0;
TBroken:= 0;
TStout:= 0;
TGas:= 0;

If(TMith > 0)Then
Disguise('Coal:' +IntToStr(Coal)+ ' Mith:' +IntToStr(Mith)+ ' [' +IntToStr(CurrentLoad)+ '/' +IntToStr(HowManyLoads)+ ']')
Else Disguise('Coal:' +IntToStr(Coal)+ ' [' +IntToStr(CurrentLoad)+ '/' +IntToStr(HowManyLoads)+ ']');

SRLRandomsReport;
End;

Function FixProg(ST, Max: String): String;
Var
I, O, L: Integer;
Begin
L:= Length(ST);
I:= Length(Max);
L:= L - 1;
I:= I - 3;

For O:= L To I Do
Result:= Result + ' ';
Result:= Result + '|';
End;

Procedure ProgressReport;
Var
ActiveT, Longest: String;
Prog: Array [0..17] Of String;
Sec, I: Integer;
Begin
Sec := GetTimeRunning div 1000+1;

Writeln('/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\');
Writeln('| JuKKa''s Guild Miner Script v'+FloatToStr(Version)+'! |');
Longest:= ('|~~~~~~~~~~~~ Mining Report ~~~~~~~~~~~~~|');
Writeln(Longest);
Prog[0]:= ('| Worked: ' + TimeRunning + '');
Prog[1]:= ('| Mined : ' + IntToStr(Coal) + ' Coals');
Prog[2]:= ('| Mined : ' + IntToStr(Mith) + ' Miths');
Prog[3]:= ('| Gained: ' + IntToStr(Gained) + ' Exp');
Prog[4]:= ('| Banked: ' + IntToStr(Banked) + ' Loads');
Prog[5]:= ('|~~~~~~~~~~~~ Per Hour Report ~~~~~~~~~~~');
Prog[6]:= ('| Coals : ' + IntToStr(Round(3600*Coal/Sec)) + ' Per Hour');
Prog[7]:= ('| Miths : ' + IntToStr(Round(3600*Mith/Sec)) + ' Per Hour');
Prog[8]:= ('| Exp. : ' + IntToStr(Round(3600*Gained/Sec))+ ' Per Hour');
Prog[9]:= ('| Banked: ' + IntToStr(Round(3600*Banked/Sec))+ ' Per Hour');
Prog[10]:= ('|~~~~~~~~~~~~~ Misc Report ~~~~~~~~~~~~~~');
Prog[11]:= ('| Banked: ' + IntToStr(Gems) + ' Gems');
Prog[12]:= ('| Stouts: ' + IntToStr(StoutsDrank) + ' Drank');
Prog[13]:= ('| Found : ' + IntToStr(Gasses) + ' Gasses');
Prog[14]:= ('| Responded: ' +IntToStr(RespondedTimes)+ ' Times');
Prog[15]:= ('| Broken: ' +IntToStr(BrokenPicks) + ' Picks');
Prog[16]:= ('| Lost: ' + IntToStr(LostHead) + ' Heads');

For I:= 0 To 16 Do
Begin
Prog[I]:= FixProg(Prog[I], Longest);
Writeln(Prog[I]);
End;

If(Not Loggedin)Then
Begin
Players[CurrentPlayer].Active := False;
If(Players[CurrentPlayer].Rand = '')Then
Players[CurrentPlayer].Rand := 'Lost';
End;

Writeln('|~~~~~~~~~~~~ Players Report ~~~~~~~~~~~~|');

For I:= 0 To HowManyPlayers-1 Do
Begin
If(Players[I].Active)Then
ActiveT:= 'T'Else ActiveT:= 'F';
Prog[17]:= ('| #: '+IntToStr(I)+ ' Active: '+ActiveT+
' - Mining Level: '+IntToStr(Players[I].Level[15])+
'; Mined: '+IntToStr( Players[I].Integers[0] + Players[I].Integers[3])+
'; Coal: '+IntToStr(Players[I].Integers[0])+
'; Mith: '+IntToStr(Players[I].Integers[3])+
'; Gained: '+IntToStr(Players[I].Integers[1])+
'; Banked: '+IntToStr(Players[I].Integers[2])+
'; Location: '+Players[I].Loc +
'; Random: '+Players[I].Rand+';');
Writeln(Prog[17]);
End;
Writeln('\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/');

End;

Procedure GetBestPick;
Var
I, PickDTM: Integer;
Dx, Dy, BrokenPick: Integer;
Begin
If(Not Loggedin)Or(Not BankScreen)Then Exit;

For I:= 6 DownTo 1 Do
Begin
PickDTM := LoadPick('dtm',I);
If(FindDTM(PickDTM, X, Y, MSx1, MSy1, MSx2, MSy2))Then
Begin
BrokenPick := DTMFromString('78DA63DCCBC0C0D0CD800618914820BD1D48F' +
'412A166220135078830E73890984C849AA9F8D50000C33207EA');
If(Not FindDTM(BrokenPick, Dx, Dy, X-20, Y-20, X+20, Y+20))Then
Begin
Mouse(X, Y, 4, 4, True);
Wait(500+Random(300));
FreeDTM(PickDTM);
FreeDTM(BrokenPick);
Case I Of
1: Writeln('You Got Bronze pick axe');
2: Writeln('You Got Iron pick axe');
3: Writeln('You Got Steel pick axe');
4: Writeln('You Got Mith pick axe');
5: Writeln('You Got Addy pick axe');
6: Writeln('You Got Rune pick axe');
End
GotPick := I;
Exit;
End;
FreeDTM(BrokenPick);
End;
FreeDTM(PickDTM);
End;
End;

Procedure EquipBestPick;
Begin
If(Not Loggedin)Then Exit;
If(Not NoPick)Then Exit;

GameTab(4);
Wait(500+Random(500));

If(EquipPick)And(ExistsItem(1))And(AbleToEquipPick(GotPick))Then
Begin
MouseItem(1, True);
Wait(500+Random(300));
If(Not GetPickHeadColors)Then
Begin
Writeln('Couldnt get pick colors, Equip or have in inventory.');
Players[CurrentPlayer].Loc := 'No Pick, Colors';
Logout;
Players[CurrentPlayer].Active:= False;
End Else NoPick:= False;
End Else
If(Not EquipPick)Then
If(Not GetPickHeadColors)Then
Begin
Writeln('Couldnt get pick colors, Equip or have in inventory.');
Players[CurrentPlayer].Loc := 'No Pick, Colors';
Logout;
Players[CurrentPlayer].Active:= False;
Exit;
End Else NoPick:= False;

End;

Procedure Bank;
Begin
If(Not Loggedin)Then Exit;

DoTheMath;
Players[CurrentPlayer].Loc := 'Bank';

If(DrinkStout)Then
If(GetSkillInfo('mining', True) = 59)Then
DrinkStout:= True Else DrinkStout:= False;

If( OpenBankLoop )Then
Begin
If ( NoPick )Then
Begin
Deposit2(1, 28);
GetBestPick;
Wait(300+Random(300));
End Else
If(EquipPick)Then
Deposit2(1, 28)
Else Deposit2(2, 28);
InteractBeer('Withdraw');
CloseBank;
EquipBestPick;
End;
End;

Function LoadsDone: Boolean;
Begin
If(CurrentLoad >= HowManyLoads)Then
Result:= True;
End;

Begin
Setup;
Repeat
InitPlayer;
Repeat
GoToMine;
MineOre;
GoToBank;
Bank;
Until(Not Loggedin)Or(NoPick)Or(LoadsDone);
ProgressReport;
If(Loggedin)And(Not NoPick)Then
NextPlayer(True)Else NextPlayer(False);
Until(False);
End.

Markus

2008-02-05 16:25:53

Actually you are doing it right, it should work fine. What is the error?

nobody u kno

2008-02-05 16:35:36

Error =

Line 26: [Error] (12418:4): Identifier expected in script C:\Documents and Settings\HP_Administrator\Desktop\GuildMiner 20 Release.scar

Line 26=
end.

And also could this be a problem. When i see you guys type the Define Smart and IfDef Smart code on here its in green text. Well i copy and paste your text to my script and the text becomes black and italicized. I tried typing the text and it did the same thing???

footballjds

2008-02-05 16:48:54

yes, its s'posed to be black :D

radragon16

2008-02-05 16:55:06

I think this is the problem. Typo.

Program GuildMiner;
{.Include SRL/SRL/Misc/smart.scar}
{.Include SRL/SRL.Scar}
Begin
SetUpSrl;
end.

Should the "U" in Setup be capitalized? Its not in other scripts that I have used. Maybe thats the problem.

EDIT: Yeah Im pretty sure thats the problem. Just Make the U lowercase and it should work. I think lol

nobody u kno

2008-02-05 16:56:35

From: radragon16
I think this is the problem. Typo.

Program GuildMiner;
{.Include SRL/SRL/Misc/smart.scar}
{.Include SRL/SRL.Scar}
Begin
SetUpSrl;
end.

Should the "U" in Setup be capitalized? Its not in other scripts that I have used. Maybe thats the problem.


the only problem scar has compiling is line 26 which is end.

radragon16

2008-02-05 17:09:19

change SetupSrl and try it?

VivaLaRofl

2008-02-05 17:50:26

Edit: Nvm found it.

Should my FIRST LINE on SRL.scar be

{$IFDEF SMART}
SmartSetup({your prefix here}, false, {signed? true/false});
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
{$ENDIF}


? With begin before the {$IFDEF}?

simon11188

2008-02-05 18:18:32

i get this… can someone give me a hand?

Loaded all chars. (NPCChars, TradeChars, SmallChars, StatChars, UpChars)
Failed when compiling
Line 6: [Error] (12333:11): Duplicate identifier 'MOVEMOUSE' in script C:\Program Files\SCAR 3.13\includes\srl/srl/misc/smart.scar

radragon16

2008-02-05 18:24:12

Use SCAR 3.14 and make sure you have rev.13 and just replace the files below and then edit to your own needs as shown in previous post in THIS THREAD. just read :cartman: (refer to my post above if you need help on how to set it up for which world you want)

footballjds

2008-02-05 18:52:45

From: simon11188
i get this… can someone give me a hand?

Loaded all chars. (NPCChars, TradeChars, SmallChars, StatChars, UpChars)
Failed when compiling
Line 6: [Error] (12333:11): Duplicate identifier 'MOVEMOUSE' in script C:\Program Files\SCAR 3.13\includes\srl/srl/misc/smart.scar


Include sMART FIRST

simon11188

2008-02-05 18:54:05

ok i fixed it… thanks heaps radragon16,
i do however have another problem.. i want to go to a different world.. eg 107

i have changed the SRL.scar but it still seems to go to world 144…
here is what i have:

//----------------------------------------------------------------------------//
//-- Scar Standard Resource Library --//
//----------------------------------------------------------------------------//
//-- by: Azeroth, Bebemycat2, BenLand100, benleegt, Boreas, c0de, --//
//-- Cheesehunk, Dankness, driger1592, Flyboy, Freddy1990, --//
//-- inferno, Kernel Klink, Knightstreak, Krazy_Meerkat, Krichevskoy, --//
//-- Lorax, Mad Cow, masquerader, moparisthebest, Mutant Squirrle, --//
//-- nielsie95, phantombmx, pups, Pyro, realrune, Renax, Ron, RsN, --//
//-- Solemn wishes, Spky, SRL, Starblaster100, Stupid3ooo, Sumilion, --//
//-- tarajunky, Wizzup?, WT-Fakawi, XxKanexX, Yakman, _ChArMz....... --//
//-- --//
//-- ....... and the SRL Community. --//
//----------------------------------------------------------------------------//


//----------------------------------------------------------------------------//
// -- SRL Level 1 Includes --//
// -- --//
// -- Low Level SCAR Math, Mouse Movement and Color Clicking routines. --//
//----------------------------------------------------------------------------//

{.include SRL/SRL/Core/Globals.scar}
{.include SRL/SRL/Core/Math.scar}
{.include SRL/SRL/Core/Mouse.scar}
{.include SRL/SRL/Core/Color.scar}
{.include SRL/SRL/Core/Players.scar}

//----------------------------------------------------------------------------//
// -- SRL Level 2 Includes --//
// -- --//
// -- Interface, Object and OCR routines. --//
//----------------------------------------------------------------------------//

{.include SRL/SRL/Core/Timing.scar}
{.include SRL/SRL/Core/GameTab.scar}
{.include SRL/SRL/Core/Text.scar}
{.include SRL/SRL/Core/Inventory.scar}
{.include SRL/SRL/Core/Object.scar}

//----------------------------------------------------------------------------//
// -- SRL Level 3 Includes --//
// -- --//
// -- MapWalking, AntiRandoms, Bank, Symbol and many more... --//
//----------------------------------------------------------------------------//

{.include SRL/SRL/Core/FlagChat.scar}
{.include SRL/SRL/Core/Login.scar}
{.include SRL/SRL/Core/Mapwalk.scar}
{.include SRL/SRL/Core/Bitmap.scar}
{.include SRL/SRL/Core/DTM.scar}
{.include SRL/SRL/Core/Bank.scar}
{.include SRL/SRL/Core/Symbol.scar}
{.include SRL/SRL/Core/RC.scar}
{.include SRL/SRL/Core/AutoColor.scar}
{.include SRL/SRL/Core/AntiRandoms/Common.scar}
{.include SRL/SRL/Core/Globalstats.scar}
{.include SRL/SRL/Core/CAutoRespond.scar}
{.include SRL/SRL/Core/AntiRandoms/Box.scar}
{.include SRL/SRL/Core/AntiRandoms/Certer.scar}
{.include SRL/SRL/Core/AntiRandoms/Demon.scar}
{.include SRL/SRL/Core/AntiRandoms/Frog.scar}
{.include SRL/SRL/Core/AntiRandoms/Quiz.scar}
{.include SRL/SRL/Core/AntiRandoms/Sandwich.scar}
{.include SRL/SRL/Core/AntiRandoms/EvilBob.scar}
{.include SRL/SRL/Core/AntiRandoms/ChatRandoms.scar}
{.include SRL/SRL/Core/AntiRandoms/AntiRandoms.scar}
{.include SRL/SRL/Core/AntiBan.scar}
{.include SRL/SRL/Core/Amount.scar}

{*******************************************************************************
procedure SetupSRL;
by: SRL Dev Team
Description: Sets up all variables needed to run SRL.
*******************************************************************************}

procedure SetupSRL;
begin
{$IFDEF SMART}
SmartSetup('au1', false, true);
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
{$ENDIF}
MouseSpeed := 15;
CheckHPFirst := True;
Reincarnate := False;
TalkAfterRandoms := False;
RoadColor := 0;
WaterColor := 0;
BankColor := 0;
LampSkill := 'mining';
SetUpSRLReport;
SetMouseMode(false);
LoadCosineArrays;
SymbolAccuracy:= 0.8;
LoadNPCArray;
LoadSRLBitMaps;
SolveChatRandoms := True;
SetupSRLAutoResponder
UseSandWichSolver := True;
UseBoxSolver := True;
UseCerterSolver := True;
UseFindmod := True;
UseFindtrade := True;
Screenshots := False;
TheFile := RewriteFile(ScriptPath + 'ChatLog.txt', False);
Writeln ('SRL Compiled in '+ IntToStr(GetTimeRunning) + ' msec');
end;

Main

2008-02-05 18:55:58

thanks markus

EDIT: why don't srl developers add theses in the srl? save us time..

natea

2008-02-05 19:01:53

im sorry how do i replace files

radragon16

2008-02-05 19:02:42

If you want to do it by world numbers just replace it with this:

SmartSetupEx(107,True,True);



If you want to use the world prefix use this: (note thats not world 107 just one that was in there.)

SmartSetup('au1', false, true);


@natea place SMART.scar in the includes/srl/srl/misc/(place it here) when you do it will ask if you want to overwrite files hit yes.
place srl.scar in the includes/srl/(place here) will ask to overwrite, hit yes.

simon11188

2008-02-05 19:12:43

ok thanks, i worked out why it wasnt working….
turns out that i had more than one version of SRL.scar and i changed the wrong one :P
(sometimes im such a noob!!)

thanks for your help mate! :)

radragon16

2008-02-05 19:13:36

Np man. Thank you markus for shortcuts!

nobody u kno

2008-02-05 19:32:27

Finally got it to work! I cleaned out everything SRL and SCAR from my comp, redownloaded everything and then it worked. Thanks again everybody!

natea

2008-02-05 20:43:25

Ok i put both of them into the misc folder and try to run script and it dosent load SMART?

Sean[714]

2008-02-05 20:49:13

Okay, here we go,
For SRL.scar,

"Failed when compiling
Line 105: [Error] (12306:1): Unexpected end of file in script C:\Program Files\SCAR 3.14\includes\SRL\SRL.scar"

its probably something simple to solve but i am a n00b.:confused:

And Smart.scar, "Failed when compiling
[Error] (88:1): Unexpected end of file"
I've copied and pasted everything correctly, and it is italisised(sp?) and black font as it should be.

If somebody could help if they have some free time, i 'm not in a hurry. thanks.

BigJohn8742

2008-02-05 22:33:08

idk mine just seems to close everytime i try to run it do i need to have runescape open or just run scar im completely confused

radragon16

2008-02-05 23:07:32

From: radragon16
If you want to do it by world numbers just replace it with this:

SmartSetupEx(107,True,True);



If you want to use the world prefix use this: (note thats not world 107 just one that was in there.)

SmartSetup('au1', false, true);


@natea place SMART.scar in the includes/srl/srl/misc/(place it here) when you do it will ask if you want to overwrite files hit yes.

place srl.scar in the includes/srl/(place here) will ask to overwrite, hit yes.[/QUOTE


@natea please read my post CAREFULLY.

And on the previous page the files needed are already attached please read ALL of this thread before asking questions that have most likely already been answered.

~radragon16~

footballjds

2008-02-06 08:49:07

From: oo00o
Okay, here we go,
For SRL.scar,

"Failed when compiling
Line 105: [Error] (12306:1): Unexpected end of file in script C:\Program Files\SCAR 3.14\includes\SRL\SRL.scar"

its probably something simple to solve but i am a n00b.:confused:

And Smart.scar, "Failed when compiling
[Error] (88:1): Unexpected end of file"
I've copied and pasted everything correctly, and it is italisised(sp?) and black font as it should be.

If somebody could help if they have some free time, i 'm not in a hurry. thanks.


show code for both smart and srl. i belive you added it wrong :D

radragon16

2008-02-06 09:28:33

Ive already posted both files for them to download and they still can't find them LOL.

Sean[714]

2008-02-06 19:57:38

Radragon, i used yours.. and they still didnt work for me, but i will satisfy you and try again, and replace them.

omfg, stupid thing closed and i lost like, so much of typing.
anyways SRL.scar gave me :
Failed when compiling
Line 104: [Error] (12305:1): Unexpected end of file in script C:\Program Files\SCAR 3.14\includes\SRL\SRL.scar

and smart.scar gave me:
[Error] (88:1): Unexpected end of file

so basically the same ones, as before, and radragon i loaded these onto my desktop, i saved these over the old ones, in the respected folders.
So everything SHOULD work,

@football, i used radragon's files, but i will post them anyways, let me try to figure out how.

{$DEFINE SMART}
{
smart.scar overwrites the SCAR procedures.
You should always include this before any other include, even SRL.scar
}

procedure MoveMouse(x, y: Integer);
begin
SmartMoveMouse(x, y);
end;

procedure HoldMouse(x, y: Integer; left: Boolean);
begin
SmartHoldMouse(x, y, left);
end;

procedure ReleaseMouse(x, y: Integer; left: Boolean);
begin
SmartReleaseMouse(x, y, left);
end;

procedure KeyUp(key: Byte);
begin
If Key = 13 Then
Key := 10;
SmartReleaseKey(key);
end;


^that one is obvously Smart.scar and.

{.include SRL/SRL/Core/AntiRandoms/Demon.scar}
{.include SRL/SRL/Core/AntiRandoms/Frog.scar}
{.include SRL/SRL/Core/AntiRandoms/Quiz.scar}
{.include SRL/SRL/Core/AntiRandoms/Sandwich.scar}
{.include SRL/SRL/Core/AntiRandoms/EvilBob.scar}
{.include SRL/SRL/Core/AntiRandoms/ChatRandoms.scar}
{.include SRL/SRL/Core/AntiRandoms/AntiRandoms.scar}
{.include SRL/SRL/Core/AntiBan.scar}
{.include SRL/SRL/Core/Amount.scar}

{*******************************************************************************
procedure SetupSRL;
by: SRL Dev Team
Description: Sets up all variables needed to run SRL.
*******************************************************************************}

procedure SetupSRL;
begin
{$IFDEF SMART}
SmartSetupEx(144,True,True);
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
{$ENDIF}
MouseSpeed := 15;
CheckHPFirst := True;
Reincarnate := False;
TalkAfterRandoms := False;
RoadColor := 0;
WaterColor := 0;
BankColor := 0;
LampSkill := 'mining';
SetUpSRLReport;
SetMouseMode(false);
LoadCosineArrays;
SymbolAccuracy:= 0.8;
LoadNPCArray;
LoadSRLBitMaps;
SolveChatRandoms := True;
SetupSRLAutoResponder
UseSandWichSolver := True;
UseBoxSolver := True;
UseCerterSolver := True;
UseFindmod := True;
UseFindtrade := True;
Screenshots := False;
TheFile := RewriteFile(ScriptPath + 'ChatLog.txt', False);
Writeln ('SRL Compiled in '+ IntToStr(GetTimeRunning) + ' msec');
end;


^ that is SRL.scar,

i'm pretty sure i did it right. :S, i have no idea why it isnt working.

Dracody

2008-02-07 00:20:27

I try it and it keeps telling me this….even though I did what Marcus said , step by step.

Line 79: [Error] (12354:30): Syntax error in script C:\Program Files\SCAR 3.14\includes\SRL/SRL.Scar

radragon16

2008-02-07 00:43:18

1. Are you using 3.14 and Rev. 13?
2.Did you remember to put this include in the script you want to use BEFORE any other include?
{.include srl/srl/misc/Smart.scar}

3. If you are running vista run scar as administrator. (right click run as admin)

@dracody that line should look something like this:

    SmartSetupEx(144,True,True);
or
SmartSetup("put your world prefix here", True, True);



And just for the sake of it here is the whole smart.scar and srl.scar for you:


Smart.Scar
{$DEFINE SMART}
{
smart.scar overwrites the SCAR procedures.
You should always include this before any other include, even SRL.scar
}

procedure MoveMouse(x, y: Integer);
begin
SmartMoveMouse(x, y);
end;

procedure HoldMouse(x, y: Integer; left: Boolean);
begin
SmartHoldMouse(x, y, left);
end;

procedure ReleaseMouse(x, y: Integer; left: Boolean);
begin
SmartReleaseMouse(x, y, left);
end;

procedure KeyUp(key: Byte);
begin
If Key = 13 Then
Key := 10;
SmartReleaseKey(key);
end;

procedure KeyDown(key: Byte);
begin
If Key = 13 Then
Key := 10;
SmartHoldKey(key);
end;

procedure SendKeys(S: String);
begin
SmartSendKeys(S);
end;

procedure GetMousePos(var x, y: Integer);
begin
SmartGetMousePos(x, y);
end;

function GetColor(x, y: Integer): Integer;
begin
result:= SmartGetColor(x, y);
end;

procedure SmartSetTarget;
var
Smart_Bitmap: Integer;
begin
Smart_Bitmap:= BitmapFromString(765,503,'');
GetBitmapCanvas(Smart_Bitmap).Handle:= SmartGetDC;
SetTargetBitmap(Smart_Bitmap);
FreeBitmap(Smart_Bitmap);
end;

function FindWindow(Title: String): Boolean;
begin
result:= true;
end;

procedure ActivateClient;
begin
end;

function FindWindowBySize(Width, Height: Integer): Boolean;
begin
result:= true;
end;

procedure SmartSetupEx(worldnumber: integer; hiDetail, signed: boolean);
var
prefix: string;
begin
prefix := ReadINI('World' + IntToStr(worldnumber), 'Prefix', AppPath + 'includes\SRL\SCSS\worlds.ini');
if(prefix = '')then
begin
writeln('Invalid world number or corrupted world list. Please review your settings');
TerminateScript;
end;
SmartSetup(prefix, hiDetail, signed);
end;



SRL.Scar(note this is Srl Rev #13)
//----------------------------------------------------------------------------//
//-- Scar Standard Resource Library --//
//----------------------------------------------------------------------------//
//-- by: Azeroth, Bebemycat2, BenLand100, benleegt, Boreas, c0de, --//
//-- Cheesehunk, Dankness, driger1592, Flyboy, Freddy1990, --//
//-- inferno, Kernel Klink, Knightstreak, Krazy_Meerkat, Krichevskoy, --//
//-- Lorax, Mad Cow, masquerader, moparisthebest, Mutant Squirrle, --//
//-- nielsie95, phantombmx, pups, Pyro, realrune, Renax, Ron, RsN, --//
//-- Solemn wishes, Spky, SRL, Starblaster100, Stupid3ooo, Sumilion, --//
//-- tarajunky, Wizzup?, WT-Fakawi, XxKanexX, Yakman, _ChArMz....... --//
//-- --//
//-- ....... and the SRL Community. --//
//----------------------------------------------------------------------------//


//----------------------------------------------------------------------------//
// -- SRL Level 1 Includes --//
// -- --//
// -- Low Level SCAR Math, Mouse Movement and Color Clicking routines. --//
//----------------------------------------------------------------------------//

{.include SRL/SRL/Core/Globals.scar}
{.include SRL/SRL/Core/Math.scar}
{.include SRL/SRL/Core/Mouse.scar}
{.include SRL/SRL/Core/Color.scar}
{.include SRL/SRL/Core/Players.scar}

//----------------------------------------------------------------------------//
// -- SRL Level 2 Includes --//
// -- --//
// -- Interface, Object and OCR routines. --//
//----------------------------------------------------------------------------//

{.include SRL/SRL/Core/Timing.scar}
{.include SRL/SRL/Core/GameTab.scar}
{.include SRL/SRL/Core/Text.scar}
{.include SRL/SRL/Core/Inventory.scar}
{.include SRL/SRL/Core/Object.scar}

//----------------------------------------------------------------------------//
// -- SRL Level 3 Includes --//
// -- --//
// -- MapWalking, AntiRandoms, Bank, Symbol and many more... --//
//----------------------------------------------------------------------------//

{.include SRL/SRL/Core/FlagChat.scar}
{.include SRL/SRL/Core/Login.scar}
{.include SRL/SRL/Core/Mapwalk.scar}
{.include SRL/SRL/Core/Bitmap.scar}
{.include SRL/SRL/Core/DTM.scar}
{.include SRL/SRL/Core/Bank.scar}
{.include SRL/SRL/Core/Symbol.scar}
{.include SRL/SRL/Core/RC.scar}
{.include SRL/SRL/Core/AutoColor.scar}
{.include SRL/SRL/Core/AntiRandoms/Common.scar}
{.include SRL/SRL/Core/Globalstats.scar}
{.include SRL/SRL/Core/CAutoRespond.scar}
{.include SRL/SRL/Core/AntiRandoms/Box.scar}
{.include SRL/SRL/Core/AntiRandoms/Certer.scar}
{.include SRL/SRL/Core/AntiRandoms/Demon.scar}
{.include SRL/SRL/Core/AntiRandoms/Frog.scar}
{.include SRL/SRL/Core/AntiRandoms/Quiz.scar}
{.include SRL/SRL/Core/AntiRandoms/Sandwich.scar}
{.include SRL/SRL/Core/AntiRandoms/EvilBob.scar}
{.include SRL/SRL/Core/AntiRandoms/ChatRandoms.scar}
{.include SRL/SRL/Core/AntiRandoms/AntiRandoms.scar}
{.include SRL/SRL/Core/AntiBan.scar}
{.include SRL/SRL/Core/Amount.scar}

{*******************************************************************************
procedure SetupSRL;
by: SRL Dev Team
Description: Sets up all variables needed to run SRL.
*******************************************************************************}

procedure SetupSRL;
begin
{$IFDEF SMART}
SmartSetupEx(144,True,True);
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
{$ENDIF}
MouseSpeed := 15;
CheckHPFirst := True;
Reincarnate := False;
TalkAfterRandoms := False;
RoadColor := 0;
WaterColor := 0;
BankColor := 0;
LampSkill := 'mining';
SetUpSRLReport;
SetMouseMode(false);
LoadCosineArrays;
SymbolAccuracy:= 0.8;
LoadNPCArray;
LoadSRLBitMaps;
SolveChatRandoms := True;
SetupSRLAutoResponder
UseSandWichSolver := True;
UseBoxSolver := True;
UseCerterSolver := True;
UseFindmod := True;
UseFindtrade := True;
Screenshots := False;
TheFile := RewriteFile(ScriptPath + 'ChatLog.txt', False);
Writeln ('SRL Compiled in '+ IntToStr(GetTimeRunning) + ' msec');
end;

If you have everything setup correctly and when you hit start in scar and the whole thing closes scar and all that means that you do not have the required java. I believe the required version is 1.6.

Dracody

2008-02-07 00:55:23

oh lol thanks a lot :P that was quite an explanation :P thanks !! sorry for bothering :P i just didnt know i had to change the paremeters hehehe thanks for the help dude!!

radragon16

2008-02-07 03:24:43

Np man. Glad I could help. ;)

ChrisX

2008-02-07 16:51:46

Scar just disappears…. after compiling the script :s.

radragon16

2008-02-07 17:08:40

That means you don't have the required version of java. If you read above you would have seen that :/

Sean[714]

2008-02-07 19:00:29

The files SRL.scar and SMART.scar succesfully compile?
or do they have errors for everyone, i uninstalled SCAR 3.14, redownloaded it, over saved the code you had onto SRL.scar, they both still have the exact same errors, i tried both on rev 12, and 13(does it even exist?, it asked me to upgrade to 13…)




_______________________________________________________
whaattt the hell am i doing wrong?

Crunk_Muffin

2008-02-07 21:17:41

hey 0o000o are you running Scar on vista, and is it downloaded to program files?

Sean[714]

2008-02-07 23:25:41

Its in its respected folders, i uinstalled everything, then reinstalled everythign just to double check.
I copied and pasted your WHOLE code into the .scar files and i saved them, they were in the proper spot.
And i'm not running vista, i'm using Windows XP, and i'm Administrator.

radragon16

2008-02-07 23:34:03

From: oo00o
The files SRL.scar and SMART.scar succesfully compile?
or do they have errors for everyone, i uninstalled SCAR 3.14, redownloaded it, over saved the code you had onto SRL.scar, they both still have the exact same errors, i tried both on rev 12, and 13(does it even exist?, it asked me to upgrade to 13…)




_______________________________________________________
whaattt the hell am i doing wrong?



Dude you have to actually OPEN a script to run lol. You can't just run SMART.scar. thats why its doing that. Notice his pics :P save the files then open a bot and add the include in BEFORE any other and then start a BOT not one of the includes and it should run then. (h)

Sean[714]

2008-02-08 00:37:15

Lol thanks.. i'm an ass.

radragon16

2008-02-08 01:09:56

Hehe np mate :p

Sc00by22

2008-02-09 06:12:07

Thanks, Got mine working :)

AbsTrACt'^.|

2008-02-09 07:22:05

It crashes for me. Here is Smart.scar:

{$DEFINE SMART}
{
smart.scar overwrites the SCAR procedures.
You should always include this before any other include, even SRL.scar
}

procedure MoveMouse(x, y: Integer);
begin
SmartMoveMouse(x, y);
end;

procedure HoldMouse(x, y: Integer; left: Boolean);
begin
SmartHoldMouse(x, y, left);
end;

procedure ReleaseMouse(x, y: Integer; left: Boolean);
begin
SmartReleaseMouse(x, y, left);
end;

procedure KeyUp(key: Byte);
begin
If Key = 13 Then
Key := 10;
SmartReleaseKey(key);
end;

procedure KeyDown(key: Byte);
begin
If Key = 13 Then
Key := 10;
SmartHoldKey(key);
end;

procedure SendKeys(S: String);
begin
SmartSendKeys(S);
end;

procedure GetMousePos(var x, y: Integer);
begin
SmartGetMousePos(x, y);
end;

function GetColor(x, y: Integer): Integer;
begin
result:= SmartGetColor(x, y);
end;

procedure SmartSetTarget;
var
Smart_Bitmap: Integer;
begin
Smart_Bitmap:= BitmapFromString(765,503,'');
GetBitmapCanvas(Smart_Bitmap).Handle:= SmartGetDC;
SetTargetBitmap(Smart_Bitmap);
FreeBitmap(Smart_Bitmap);
end;

function FindWindow(Title: String): Boolean;
begin
result:= true;
end;

procedure ActivateClient;
begin
end;

function FindWindowBySize(Width, Height: Integer): Boolean;
begin
result:= true;
end;

procedure SmartSetupEx(worldnumber: integer; hiDetail, signed: boolean);
var
prefix: string;
begin
prefix := ReadINI('World' + IntToStr(worldnumber), 'Prefix', AppPath + 'includes\SRL\SCSS\worlds.ini');
if(prefix = '')then
begin
writeln('Invalid world number or corrupted world list. Please review your settings');
TerminateScript;
end;
SmartSetup(prefix, hiDetail, signed);
end;

And SRL.scar:

//----------------------------------------------------------------------------//
//-- Scar Standard Resource Library --//
//----------------------------------------------------------------------------//
//-- by: Azeroth, Bebemycat2, BenLand100, benleegt, Boreas, c0de, --//
//-- Cheesehunk, Dankness, driger1592, Flyboy, Freddy1990, --//
//-- inferno, Kernel Klink, Knightstreak, Krazy_Meerkat, Krichevskoy, --//
//-- Lorax, Mad Cow, masquerader, moparisthebest, Mutant Squirrle, --//
//-- nielsie95, phantombmx, pups, Pyro, realrune, Renax, Ron, RsN, --//
//-- Solemn wishes, Spky, SRL, Starblaster100, Stupid3ooo, Sumilion, --//
//-- tarajunky, Wizzup?, WT-Fakawi, XxKanexX, Yakman, _ChArMz....... --//
//-- --//
//-- ....... and the SRL Community. --//
//----------------------------------------------------------------------------//


//----------------------------------------------------------------------------//
// -- SRL Level 1 Includes --//
// -- --//
// -- Low Level SCAR Math, Mouse Movement and Color Clicking routines. --//
//----------------------------------------------------------------------------//

{.include SRL/SRL/Core/Globals.scar}
{.include SRL/SRL/Core/Math.scar}
{.include SRL/SRL/Core/Mouse.scar}
{.include SRL/SRL/Core/Color.scar}
{.include SRL/SRL/Core/Players.scar}

//----------------------------------------------------------------------------//
// -- SRL Level 2 Includes --//
// -- --//
// -- Interface, Object and OCR routines. --//
//----------------------------------------------------------------------------//

{.include SRL/SRL/Core/Timing.scar}
{.include SRL/SRL/Core/GameTab.scar}
{.include SRL/SRL/Core/Text.scar}
{.include SRL/SRL/Core/Inventory.scar}
{.include SRL/SRL/Core/Object.scar}

//----------------------------------------------------------------------------//
// -- SRL Level 3 Includes --//
// -- --//
// -- MapWalking, AntiRandoms, Bank, Symbol and many more... --//
//----------------------------------------------------------------------------//

{.include SRL/SRL/Core/FlagChat.scar}
{.include SRL/SRL/Core/Login.scar}
{.include SRL/SRL/Core/Mapwalk.scar}
{.include SRL/SRL/Core/Bitmap.scar}
{.include SRL/SRL/Core/DTM.scar}
{.include SRL/SRL/Core/Bank.scar}
{.include SRL/SRL/Core/Symbol.scar}
{.include SRL/SRL/Core/RC.scar}
{.include SRL/SRL/Core/AutoColor.scar}
{.include SRL/SRL/Core/AntiRandoms/Common.scar}
{.include SRL/SRL/Core/Globalstats.scar}
{.include SRL/SRL/Core/CAutoRespond.scar}
{.include SRL/SRL/Core/AntiRandoms/Box.scar}
{.include SRL/SRL/Core/AntiRandoms/Certer.scar}
{.include SRL/SRL/Core/AntiRandoms/Demon.scar}
{.include SRL/SRL/Core/AntiRandoms/Frog.scar}
{.include SRL/SRL/Core/AntiRandoms/Quiz.scar}
{.include SRL/SRL/Core/AntiRandoms/Sandwich.scar}
{.include SRL/SRL/Core/AntiRandoms/EvilBob.scar}
{.include SRL/SRL/Core/AntiRandoms/ChatRandoms.scar}
{.include SRL/SRL/Core/AntiRandoms/AntiRandoms.scar}
{.include SRL/SRL/Core/AntiBan.scar}
{.include SRL/SRL/Core/Amount.scar}

{*******************************************************************************
procedure SetupSRL;
by: SRL Dev Team
Description: Sets up all variables needed to run SRL.
*******************************************************************************}

procedure SetupSRL;
begin
{$IFDEF SMART}
SmartSetupEx(86,True,True);
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
{$ENDIF}
MouseSpeed := 15;
CheckHPFirst := True;
Reincarnate := False;
TalkAfterRandoms := False;
RoadColor := 0;
WaterColor := 0;
BankColor := 0;
LampSkill := 'mining';
SetUpSRLReport;
SetMouseMode(false);
LoadCosineArrays;
SymbolAccuracy:= 0.8;
LoadNPCArray;
LoadSRLBitMaps;
SolveChatRandoms := True;
SetupSRLAutoResponder
UseSandWichSolver := True;
UseBoxSolver := True;
UseCerterSolver := True;
UseFindmod := True;
UseFindtrade := True;
Screenshots := False;
TheFile := RewriteFile(ScriptPath + 'ChatLog.txt', False);
Writeln ('SRL Compiled in '+ IntToStr(GetTimeRunning) + ' msec');
end;

And maybe the part of the script I modified too:

{
Forefeathers [SRL4][#10)
by munk

}
program forefeathers;
{.include SRL/SRL/misc/Smart.scar}
{.include SRL/SRL.scar}

All I changed on the script was that.

When I try to run the script SCAR crashes. I use SCAR 3.14 and Rev #13.

Markus

2008-02-09 07:59:42

It shouldn't crash. You got Java 1.6 update 3+? Does it close without saying anything, or does it give you an error?

AbsTrACt'^.|

2008-02-09 08:05:51

EDIT: Updated Java and it works now. Thanks for the help.

Jakob S.

2008-02-09 11:50:44

what's smart then? i want to know what i need to fill in with the script
look: when i open the script you need to fil in your username, pass and nick.. whats the nick? and whats my ID?

Heavenzeyez1

2008-02-09 11:55:55

Tutorial Island.
Eerik.

XxXx Toxin XxXx

2008-02-09 15:54:24

Okay I know I'm a very big noob to scripting and everything, but I have a quick question.

Whenever I try to input

{$DEFINE SMART}

The "Green" colour of the font itself disappears to a black font, but I was experimenting with everything, I took out the "$" out of {$DEFINE SMART} and it turns green. Am I suppose to take out the "$" for it to work properly in the first place?

-Thanks in Advance-


EDIT: One more problem again -.-

Line 7: [Error] (14502:11): Duplicate identifier 'MOVEMOUSE' in script C:\Calin\SCAR\SCAR 3.14\includes\SRL/SRL/misc/Smart.scar

No clue what to do as I'm a noob :(


EDIT EDIT:
Thanks oo00o.
Now that I know that, under my Smart.scar i get the Line 7 Error… Any Ideas?

Sean[714]

2008-02-09 15:56:09

When i have SMART up and running, on the Runescape Log in Page,
and i have filled out my Character properly,
and the red dot goes to "log in"
and it moves down to "cancel" and quickly moves up to "username"
but it must have clicked on cancel, instead of username, so it goes back to the front page.

So its obvously lagging.
Can i do anything about that?
I cleaned up my computer, i have 28.5/38.2 GB's of memory.
And its still not working 100% properly.
After about 7 times of doing that, it finally works, or it just puts in my username and clicks "log in"

Is there any way to make it so it doesnt lag as much?
Anything i can do?

___________________________________________________

@Toxxin, it isnt suposed to be green, its suposed to be black color and italic.

mixster

2008-02-09 16:24:27

oo00o, no need to post in another topic when you already have a topic for your problem (I posted in there btw).

Toxin -
It should be black (the define) - I'm guessing the scar script on the forum just doesn't have that added. The (1st) error you get is caused because you need to put the smar.scar include before srl.scar. The second error is probably caused because you haven't done something properly - mind posting your first 7/8 lines of you smart.scar file so I/we can help better?

XxXx Toxin XxXx

2008-02-09 17:05:12

{$DEFINE SMART}
{
smart.scar overwrites the SCAR procedures.
You should always include this before any other include, even SRL.scar
}

procedure MoveMouse(x, y: Integer);
begin
SmartMoveMouse(x, y);
end;

procedure HoldMouse(x, y: Integer; left: Boolean);
begin
SmartHoldMouse(x, y, left);
end;

procedure ReleaseMouse(x, y: Integer; left: Boolean);
begin
SmartReleaseMouse(x, y, left);
end;

procedure KeyUp(key: Byte);
begin
If Key = 13 Then
Key := 10;
SmartReleaseKey(key);
end;

procedure KeyDown(key: Byte);
begin
If Key = 13 Then
Key := 10;
SmartHoldKey(key);
end;

procedure SendKeys(S: String);
begin
SmartSendKeys(S);
end;

procedure GetMousePos(var x, y: Integer);
begin
SmartGetMousePos(x, y);
end;

function GetColor(x, y: Integer): Integer;
begin
result:= SmartGetColor(x, y);
end;

procedure SmartSetTarget;
var
Smart_Bitmap: Integer;
begin
Smart_Bitmap:= BitmapFromString(765,503,'');
GetBitmapCanvas(Smart_Bitmap).Handle:= SmartGetDC;
SetTargetBitmap(Smart_Bitmap);
FreeBitmap(Smart_Bitmap);
end;

function FindWindow(Title: String): Boolean;
begin
result:= true;
end;

procedure ActivateClient;
begin
end;

function FindWindowBySize(Width, Height: Integer): Boolean;
begin
result:= true;
end;

procedure SmartSetupEx(worldnumber: integer; hiDetail, signed: boolean);
var
prefix: string;
begin
prefix := ReadINI('World' + IntToStr(worldnumber), 'Prefix', AppPath + 'includes\SRL\SCSS\worlds.ini');
if(prefix = '')then
begin
writeln('Invalid world number or corrupted world list. Please review your settings');
TerminateScript;
end;
SmartSetup(prefix, hiDetail, signed);
end;

There's my Smart.scar.

Now, this is my SRL.scar

//----------------------------------------------------------------------------//
//-- Scar Standard Resource Library --//
//----------------------------------------------------------------------------//
//-- by: Azeroth, Bebemycat2, BenLand100, benleegt, Boreas, c0de, --//
//-- Cheesehunk, Dankness, driger1592, Flyboy, Freddy1990, --//
//-- inferno, Kernel Klink, Knightstreak, Krazy_Meerkat, Krichevskoy, --//
//-- Lorax, Mad Cow, masquerader, moparisthebest, Mutant Squirrle, --//
//-- nielsie95, phantombmx, pups, Pyro, realrune, Renax, Ron, RsN, --//
//-- Solemn wishes, Spky, SRL, Starblaster100, Stupid3ooo, Sumilion, --//
//-- tarajunky, Wizzup?, WT-Fakawi, XxKanexX, Yakman, _ChArMz....... --//
//-- --//
//-- ....... and the SRL Community. --//
//----------------------------------------------------------------------------//


//----------------------------------------------------------------------------//
// -- SRL Level 1 Includes --//
// -- --//
// -- Low Level SCAR Math, Mouse Movement and Color Clicking routines. --//
//----------------------------------------------------------------------------//

{.include SRL/SRL/Core/Globals.scar}
{.include SRL/SRL/Core/Math.scar}
{.include SRL/SRL/Core/Mouse.scar}
{.include SRL/SRL/Core/Color.scar}
{.include SRL/SRL/Core/Players.scar}

//----------------------------------------------------------------------------//
// -- SRL Level 2 Includes --//
// -- --//
// -- Interface, Object and OCR routines. --//
//----------------------------------------------------------------------------//

{.include SRL/SRL/Core/Timing.scar}
{.include SRL/SRL/Core/GameTab.scar}
{.include SRL/SRL/Core/Text.scar}
{.include SRL/SRL/Core/Inventory.scar}
{.include SRL/SRL/Core/Object.scar}

//----------------------------------------------------------------------------//
// -- SRL Level 3 Includes --//
// -- --//
// -- MapWalking, AntiRandoms, Bank, Symbol and many more... --//
//----------------------------------------------------------------------------//

{.include SRL/SRL/Core/FlagChat.scar}
{.include SRL/SRL/Core/Login.scar}
{.include SRL/SRL/Core/Mapwalk.scar}
{.include SRL/SRL/Core/Bitmap.scar}
{.include SRL/SRL/Core/DTM.scar}
{.include SRL/SRL/Core/Bank.scar}
{.include SRL/SRL/Core/Symbol.scar}
{.include SRL/SRL/Core/RC.scar}
{.include SRL/SRL/Core/AutoColor.scar}
{.include SRL/SRL/Core/AntiRandoms/Common.scar}
{.include SRL/SRL/Core/Globalstats.scar}
{.include SRL/SRL/Core/CAutoRespond.scar}
{.include SRL/SRL/Core/AntiRandoms/Box.scar}
{.include SRL/SRL/Core/AntiRandoms/Certer.scar}
{.include SRL/SRL/Core/AntiRandoms/Demon.scar}
{.include SRL/SRL/Core/AntiRandoms/Frog.scar}
{.include SRL/SRL/Core/AntiRandoms/Quiz.scar}
{.include SRL/SRL/Core/AntiRandoms/Sandwich.scar}
{.include SRL/SRL/Core/AntiRandoms/EvilBob.scar}
{.include SRL/SRL/Core/AntiRandoms/ChatRandoms.scar}
{.include SRL/SRL/Core/AntiRandoms/AntiRandoms.scar}
{.include SRL/SRL/Core/AntiBan.scar}
{.include SRL/SRL/Core/Amount.scar}

{*******************************************************************************
procedure SetupSRL;
by: SRL Dev Team
Description: Sets up all variables needed to run SRL.
*******************************************************************************}

procedure SetupSRL;
begin
{$IFDEF SMART}
SmartSetupEx(86,True,True);
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
{$ENDIF}
MouseSpeed := 15;
CheckHPFirst := True;
Reincarnate := False;
TalkAfterRandoms := False;
RoadColor := 0;
WaterColor := 0;
BankColor := 0;
LampSkill := 'mining';
SetUpSRLReport;
SetMouseMode(false);
LoadCosineArrays;
SymbolAccuracy:= 0.8;
LoadNPCArray;
LoadSRLBitMaps;
SolveChatRandoms := True;
SetupSRLAutoResponder
UseSandWichSolver := True;
UseBoxSolver := True;
UseCerterSolver := True;
UseFindmod := True;
UseFindtrade := True;
Screenshots := False;
TheFile := RewriteFile(ScriptPath + 'ChatLog.txt', False);
Writeln ('SRL Compiled in '+ IntToStr(GetTimeRunning) + ' msec');
end;

The problem is, in the script that I want to use, which is BH's Edgeville Yew Chopper, I have this in the beggining, since his script you can't see anything because all of the script is hidden, I have this…:
program BHEYC;
{.include SRL/SRL.scar}
{.include SRL\SRL\Skill\Woodcutting.SCAR}
{.include SRL\SRL\misc\users.SCAR}
{.include SRL/SRL/Misc/Smart.scar}
{.include SRL/SRL.scar}
//This script is now free, but when SRL updates i prob wont fix.

Anyway, thanks alot for the help guys, I know I'm a noob and all, but I sort of understand what you mean oo00o, I read your post about World 144 or whatever your issue was, and I know how to fix that, thing is, after I try to compile the script, when I have tried to include SRL.scar, and Smart.scar, it won't compile…




IT WORKS:D:D:D:):):) YAY! Thanks a bunch oo00o, and mixter05. I greatly appreciate the help from the both of you:) Some rep might go up? :P Lol thanks again guys, greatly appreciated, and this thing is actually amazing, who would have thought something like this would be released for the public… one word can describe Smart, -AMAZING-

Sean[714]

2008-02-09 17:08:05

toxin, smart.scar and SRL.scar arent suposed to compile properly,
put "{.include srl/srl/misc/Smart.scar}" before even the include of SRL.scar, in the script that you would like to use with SMART
like as..

"________________________________________________}
{.include srl/srl/misc/Smart.scar}
{.include srl/srl.scar}
{.include srl/srl/skill/fighting.scar}
{.include srl/srl/skill/ranging.scar}
{.include srl/srl/skill/magic.scar}
{.include srl/srl/misc/Users.scar}
{———————————————"

So put it first, EVEN before srl.
In a script to make it work with SMART.

Unfortunately this is all the hlep i can give you,
All the knowledge i have is,
if the script had no SMART added on,
you will go to the default world for SMART.
Which unfortunately for me was a members world, and i got confused.
If you would like to change the world manually go to
SRL.scar,
and control "f" this
"procedure SetupSRL;
begin
{$IFDEF SMART}
SmartSetupEx(154,True,True);
wait(10000+random(5000));"

So basically the 154, is manually the default world.
so change that to the world you would like, if the script does not already have the option of what would you would like.

(my explaination is kinda messy, i'm sorry)

mixster

2008-02-09 17:10:14

It runs fine for me - are you actually running the script or just including it? Because the idea is to include the file in your/the script then use SmartSetup etc. inside the script to open up the SMART window.

Timer

2008-02-09 17:20:41

Crashing huh? Teminating scart before it pops-up then re-running? that casues the crash

Gold

2008-02-09 19:24:26

[Runtime Error] : Exception: Access violation at address 02CB10AB in module 'Embedded SMART.dll'. Read of address 000006DC in line 44 in script C:\Program Files\SCAR 3.14\includes\SRL/SRL/Misc/smart.scar


ummm… whats wrong i put all the things you told me to into Smart Scar folder and Srl folder??:fiery:


here is line 48

result:= SmartGetColor(x, y);

mixster

2008-02-09 20:04:35

Check your plugins folder (should be C:\Program files\scar 3.14\Plugins) for a smart.dll (or something like that file). If it's not there, then you have to go to tools-> options -> SRL download then press the 'move plugins' button.

Gold

2008-02-09 22:01:34

k i did that it didn't work and i think i screwed up my scar so urghh gotta fix

radragon16

2008-02-09 22:43:24

Everyone please read the WHOLE thread. Most of these questions have already been answered. ;)

Markus

2008-02-10 09:06:53

From: radragon16
Everyone please read the WHOLE thread. Most of these questions have already been answered. ;)


Added to first post ;)

Rikje

2008-02-10 09:21:04

From: goldrush655
[Runtime Error] : Exception: Access violation at address 02CB10AB in module 'Embedded SMART.dll'. Read of address 000006DC in line 44 in script C:\Program Files\SCAR 3.14\includes\SRL/SRL/Misc/smart.scar


ummm… whats wrong i put all the things you told me to into Smart Scar folder and Srl folder??:fiery:


here is line 48

result:= SmartGetColor(x, y);


Add
{$DEFINE SMART}
on the top of smart.scar

Sean[714]

2008-02-10 20:04:30

Okay, new question.

"Description: Sets up all variables needed to run SRL.

procedure SetupSRL;
begin
{$IFDEF SMART}
SmartSetupEx(154,True,True);
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
{$ENDIF}
MouseSpeed := 15;
CheckHPFirst := True;"

Basically its going to world 154 every time, with HighDetail, which is probably why SMART is extremly laggy for me.
It might not be the solution, but it will atleast help.
How do i change it to be high/low detail?
i'm sure that will be much more easy to explain instead of helping m ehow to make it so it changes at the request of one of these.

"//SMART setup
worldnumber = 80;
hiDetail = false;// true/false
signed = true; // true/false"

So basically, how can i modify MANUALLY SRL.scar OR SMART.scar to make it so it always goes to a Low detail world.

radragon16

2008-02-11 00:30:59

All I can say is ROFL. Still can't read but heres the fix anyway:




                                 Change this to false to use UNSIGNED
\/\/
SmartSetupEx(154,True,True);
/\/\
change this to false to use low detail

Sean[714]

2008-02-11 17:53:07

I don't give a damn if you think my questions are funny.
I am a beginner at SCAR, jeez..

The only way to learn is to ask questions.
and Thank-You..

benny999

2008-02-11 19:10:52

THANK YOU so much rep +++++ :) this is real nice

radragon16

2008-02-12 02:08:38

Yw ooOOo

Skepsis

2008-02-13 22:36:23

Markus. I've modified my smart.scar and setupsrl.scar like you said. But smart still does not open up. Using, 3.14, rev #13, latest Java, and computer rebooted. Any ideas?

After I press play, the status will say script running for about 10 seconds.
then, it will say File acess error, and bla bla bla. Here is the debug.

Successfully compiled
File access error
SRL Compiled in 10828 msec
Successfully executed

autoerforlife

2008-02-14 10:59:31

this tutorial helped a lot thanks :)

Sc00by22

2008-02-15 06:06:04

Have i done this correct, It should be Using world 144, Using Low Detail and Using the Unsigned Client

SmartSetupEx(144,True,True);

Markus

2008-02-15 07:10:56

From: Skepsis
Markus. I've modified my smart.scar and setupsrl.scar like you said. But smart still does not open up. Using, 3.14, rev #13, latest Java, and computer rebooted. Any ideas?

After I press play, the status will say script running for about 10 seconds.
then, it will say File acess error, and bla bla bla. Here is the debug.

Successfully compiled
File access error
SRL Compiled in 10828 msec
Successfully executed

That might be caused by having an invalid prefix.
Try running this:

program SMARTTest;
{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}
begin
SetupSRL;
if (SmartReady) then
writeln('You got everything correctly..')
else
writeln('There is an error somewhere =/');
end.
And give me the results

From: Sc00by22
Have i done this correct, It should be Using world 144, Using Low Detail and Using the Unsigned Client

SmartSetupEx(144,True,True);

Actually that is HighDetail signed ;) For Low detail and unsigned it should be SmartSetupEx(144, false, false);

Sc00by22

2008-02-15 08:21:05

Thanks

squnky

2008-02-16 01:40:07

:confused:
Line 79: [Error] (12416:30): Syntax error in script C:\Program Files\SCAR 3.14\includes\SRL/SRL.scar
that would be errr…
artSetup({your prefix here}, false, {signed? true/false});
my prefix? :confused:

fixed that one…
now to the new one lol
SmartSetup(77, false,true,;
Line 79: [Error] (12416:27): Syntax error in script C:\Program Files\SCAR 3.14\includes\SRL/SRL.scar

mixster

2008-02-16 13:59:26

Use 'SmartSetupEx(worldnumber: Integer; highdetail,signed: Boolean)' it's exactly the same except it uses a world number. SmartSetup uses world prefixes as found in SCSS's world prefixes (and somewhere in SRL… I think).

jakeyboy29

2008-02-16 16:20:28

Step 1.
Open SMART.scar and insert this line as the first line:

whats smart.scar, i dont understand this prosedure.

mixster

2008-02-16 16:32:48

'SMART.scar' is a file - you open it in scar. To find it, go to your root scar folder, then Includes->SRL->Misc->SMART.scar.

jakeyboy29

2008-02-16 16:52:09

From: mixster05
'SMART.scar' is a file - you open it in scar. To find it, go to your root scar folder, then Includes->SRL->Misc->SMART.scar.


cheers, but i dont have that file in my folder, any help?

mixster

2008-02-16 17:19:21

Update to rev 13 and it should be in there. If you don't know about rev's then install SVN (go to the main forum page, then 'Install SRL' link).

drizzt

2008-02-17 21:28:14

i do something like this, except i do..
SmartSetupEx(SmartWorld, false, SmartSigned);

and put the Global Variables in setupsrl, just call them in main loop, and i can change it depending on what i feel like doing while playing it

Dracody

2008-02-17 22:26:38

It keeps telling me this:

Line 79: [Error] (12374:27): Type mismatch in script C:\SCAR 3.14\includes\srl/srl.scar

This is what I got:

{$IFDEF SMART}
SmartSetup(118,false,true);
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
{$ENDIF}

I believe there is a problem with the Signed boolean…..Any suggestions please?

radragon16

2008-02-18 01:02:42

Damn apparently they still can't read. :duh:

mixster

2008-02-18 19:25:50

You can take a noob to a topic, but you can't make him read it

Dracody - use SmartSetupEx if you want to use a world number (scroll up to one of my last posts for more info on it)

Sjaakie37

2008-02-19 09:07:00

In the weekend, when i am by my dad, it works just fine (smart).
but now im with my mother, but it doesnt work!
i dont know what i did wrong? if I want to start a script he says:

Failed when compiling
Line 80: [Error] (12416:1): Type mismatch in script C:\Program Files\SCAR 3.14\includes\SRL/SRL.scar

(it is the SRL.Scar file,

procedure SetupSRL;
begin
{$IFDEF SMART}
SmartSetup(75,false,false)
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
{$ENDIF}



Just like what this tutorial says;) but it doesnt work!
Any1 knows what to do?
(sorry for my bad english, i'm dutch;))

Markus

2008-02-19 15:53:48

In SmartSetup you will need to use a prefix. If you are unsure, use SmartSetupEx, which wants a world number.
[dutch]
@Sjaakje37: Lezen van de drie posts boven je kan helpen *hint*
[/dutch]

Xterminator

2008-02-20 00:17:41

oo ben je van belgie? of van neederland? well anyways i got a little problem with SMART:
unknown identifier 'smartreleasekey' in script…
the procedure is called keyup (key: byte)
at first i thought the procedure was incorretly spelled but didnt work

mixster

2008-02-20 04:10:44

Sounds like an installation error (not your fault) - just try re-installing SRL and see if that fixes it (you will have to redo the script editing though).

Sjaakie37

2008-02-20 08:15:52

From: Markus
@Sjaakje37: Lezen van de drie posts boven je kan helpen *hint*
[/dutch]


Nu werkt ie wel:rolleyes: zat niet op te letten[/dutch]

Now I have an other problem, if I start running a script, he goes to Smart, logs in, and then it just freeze? its with every script I run?

mixster

2008-02-20 10:39:03

Does SMART freeze or does the script just not do anything? Also, have ou waited a bit (like a couple of minutes) just to make sure it isn't running slowly? Lastly, please post the script you edited and srl.scar (doesn't have to be all - only until just after the {ifdef smart} blah {endif} section).

Sjaakie37

2008-02-20 11:02:27

actually, the scripts doesn't do anything, just like smart;) i have that problem with every script i try to run.
i waited a couple of minutes, but my character just stands there doing nothing, then it logs out;)

this is my SRL.scar:

procedure SetupSRL;
begin
{$IFDEF SMART}
SmartSetup('sl4',false,false );
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
{$ENDIF}

I putted this in line 1 in Smart.srl:

{$DEFINE SMART}
just like that tutorial says;)

Xterminator

2008-02-20 11:25:48

mixster ur idea didnt work i still got the same error…
i really want to make this script work, i really need it

mixster

2008-02-20 20:21:02

Sjaakie37 - Try removing the 'repeat wait 100 until()' bit as the colours might have changed making it repeat forever. Also, there's the random wait between 10 and 15 seconds - have you made sure to wait atleast 20 seconds or so to make sure it sin't just lagging?

Xterminator - Mind posting your smart file and srl.scar (just the bit including SmartSetup/Ex), as it would be easier to help from there. Also, have you made sure to move your plugin (I think it causes a different error, but it might be causing this one)

Xterminator

2008-02-21 09:14:25

here is my smart.scar

sorry i cleaned my pc a bit so had a hard time findind the srl 1

mixster

2008-02-21 19:37:19

The files look fine - did you move the plugins again after re-installing as it seems to be an error in the dll rather than the scripts (try copying and pasting the smart plugin in scar core folder->includes->SRL->'place inside plugins folder' into your scar's plugin folder).

Xterminator

2008-02-22 02:13:59

tried that didnt work

procedure KeyDown(key: Byte);
begin
If Key = 13 Then
Key := 10;
SmartHoldKey(key);
the problem is in here : unknown identifier

Markus

2008-02-22 02:56:52

Please post a screenshot of your plugins folder.

Xterminator

2008-02-23 10:03:17

no need markus i found my error. but when i compile smart.scar, it says-> unexpected end of file. what should i do now?

exppo

2008-02-23 10:35:29

Thanks Markus - Does gurd.

mixster

2008-02-23 12:48:22

Xterminator - What was the problem in the end? And you don't run the smart.scar file, just include it (like you include srl).

piepolo

2008-02-23 14:54:21

[Runtime Error] : Exception: Access violation at address 023910AB in module 'Embedded SMART.dll'. Read of address 000006DC in line 47 in script C:\Program Files\SCAR 3.14\includes\SRL/SRL/Misc/smart.scar

boooobz

2008-02-23 22:07:16

if i try to run this with feathers then i get this error

Line 10: [Error] (12408:1): Identifier expected in script


and this is feathers ..


{
Forefeathers [SRL4][#10)
by munk

}
program forefeathers;
{.include srl/srl/misc/Smart.scar}
{.include srl/srl.scar}

const



if i try some other script ..then i get this


Identifier expected


how i fix it?..

Xterminator

2008-02-23 23:26:57

mixster idk what my error was my step dad has some experience in pascal, so he helped me out. but when i compile it, it says: (87:1) unexpected end of file the script only goes to line 86, what should i do?

Dracody

2008-02-24 02:54:02

Omfg whats wrong?
{$IFDEF SMART}
SmartSetup(117, false, false);
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
{$ENDIF}

And it keeps telling me the following…
Line 79: [Error] (12390:30): Type mismatch in script
It tells me that something is wrong with the signed boolean…what should I do??

Nevermind guys , it happened that I deleted a SRL folder and downloaded a new one, and with new one it didnt worked, but then I just restored the Old SRL folder and just edited the scripts I needed and now its running again..

mixster

2008-02-24 05:29:50

Dracody - You tried to use an integer (117) when SmartSetup takes strings (like 'ams1' for the prefix).

Xterminator - I'm guessing when he fixed it, he added a main loop or something like that, so look for an 'end.' in your smart.scar file. If you can't find a problem, then post it up again.

Torrent of Flame

2008-02-24 13:46:45

I tried it but it just instantly finishes without loading SMART up.

What do I do?

mixster

2008-02-24 13:50:55

Have you still remembered to include SMART as well as SRL? If you only include the one, then it won't work when using his method.

Hitman543

2008-02-26 11:56:19

I'm getting an error when I try to run a script…

Line 78: [Error] (12708:30): Syntax error in script C:\Program Files\SCAR 3.14\includes\SRL/SRL.scar


This is what I put in as you said… (Added more in to make sure it was in the right place :S)

procedure SetupSRL;
begin
{$IFDEF SMART}
SmartSetup({your prefix here}, false, {signed? true/false});
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
{$ENDIF}


Thanks,

–Hitman

Markus

2008-02-26 12:16:02

From: Hitman543
I'm getting an error when I try to run a script…



This is what I put in as you said… (Added more in to make sure it was in the right place :S)


Thanks,

–Hitman


Read the whole topic please. You need to fill in something in in the copied+pasted text, a prefix and signed/unsigned.

HellBoyz

2008-02-26 20:39:06

Thanks for the tut Markus, like it but hopefully can run flawless

Edit: Marvelous everything work perfectly

Dracody

2008-02-26 22:23:39

Again…whats wrong?? Mixter told me that im using an integer…but no it has a problem with the Signed or not boolean, and I dont understand why, somebody help??:confused::confused:

{$IFDEF SMART}
SmartSetup(117, false, false);
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
{$ENDIF}

And it keeps telling me the following…
Line 79: [Error] (12390:30): Type mismatch in script
It tells me that something is wrong with the signed boolean…what should I do??

EDIT : Nevermind I fixed it…:D:D:D

HellBoyz

2008-02-26 23:11:19


SmartSetup(117, false, false);


Try change the world number and follow the one from SCSS world.ini file or put a '117' in it as the world was declare as a char

TheChineseMan

2008-02-27 07:52:58

hey how come when i try to use ur tut and i copy and paste everything it comes up with this error
Include file C:\Program Files\SCAR 3.14\includes\SRL\SRL\Core\Bitmap.scar does not exist.
Include file C:\Program Files\SCAR 3.14\includes\SRL\SRL\Core\DTM.scar does not exist.
Failed when compiling

i installed all the include files and this is how my Smart.scar looks like first line
{$DEFINE SMART}
and my SRL.scar
procedure SetupSRL;
begin
{$IFDEF SMART}
SmartSetup({107}, false, {False});
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
{$ENDIF}
and i am trying to add smart on jukka guild miner anyone know any tips thx!

mixster

2008-02-27 11:35:22

Always use scar tags when posting scar scripts!!! Also try reading first.
Use SmartSetupEx to use a world number. You also need to un {} the 117 and 2nd false. After that, it should work.

lindstrom

2008-02-27 15:26:12

Ok Smart worked for me great before, then i updated srl cause some of my scripts wasnt working. After that i cant get Smart to work again.
This is in my Srl.scar:
{$IfDef SMART}
SmartSetup('swe5', False, False);
Wait(10000 + random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
{$EndIf}


and i added that line that u were sposed to add in Smart.scar too.

still i get this error:
[Runtime Error] : Exception: Access violation at address 02CE10AB in module 'Embedded SMART.dll'. Read of address 000006DC in line 47 in script W:\Program\Scar 3.14\includes\SRL/SRL/Misc/Smart.Scar

ive searched for help cant find. there is people with same problem but those solutions doenst work. thx in advance


EDIT! SOLVED!
solution:
i had put the {$DEFINE SMART} line in the wrong smart.scar, i had put it in the one that is in the includes folder, not the one in misc folder lol :D

dillbagz

2008-02-28 02:21:21

{$IFDEF SMART}
SmartSetupEx(86,False,True);
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
{$ENDIF}

thATS MINE AND MAKE SURE THAT EX IS THERE WITHOUT IT IT WONT RUN FOR ME I HAD TO ADD IT….

Torrent of Flame

2008-02-29 08:39:57

begin
{$IFDEF SMART}
SmartSetup(117, false, false);
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
{$ENDIF}

Line 78: [Error] (12682:30): Type mismatch in script

infested999

2008-02-29 09:04:07

i cant find smart.scar

mixster

2008-02-29 11:29:33

Torrent of Flame - Please try reading - the exact same question has been answered many times before. Use SmartSetupEx if you want to use a world number.
infested999 - It's in the scar core folder/Includes/SRL/SRL/Misc. If it's not in there, then you need to update to revision 13 or 14.

infested999

2008-02-29 15:40:09

Never mind, i have it… my srl is just being retarded

Torrent of Flame

2008-03-01 07:11:33

Thanks Mix :]

Torrent of Flame

2008-03-01 07:24:05

I have my script but I just CANT make it SMART compatible. Ive done this tut like 10 times and it just doesnt work..

TheChineseMan

2008-03-01 09:48:56

i tried editing it again and again but i get this error

Line 12: [Error] (154:1): Identifier expected in script C:\Program Files\SCAR 3.14\includes\SRL/SRL/Core/Globals.scar

any tips?

Iron Man

2008-03-01 11:27:30

From: thechineseman
i tried editing it again and again but i get this error

Line 12: [Error] (154:1): Identifier expected in script C:\Program Files\SCAR 3.14\includes\SRL/SRL/Core/Globals.scar

any tips?


Maybe restart scar? Because theres nothing wrong with globals.scar unless you messed with it. All line 12 is just "var". Just close and reopen scar, if it doesn't work i'll try to help you some more.

legoluke182

2008-03-01 12:37:12

I did it!!!!

thanks guys!!!

took me an hour. lol >.>

TheChineseMan

2008-03-02 01:00:42

can anyone show me their working smart.scar and Srl.scar please?!?!?!

shrubie1

2008-03-02 01:57:54

it wonk work for me

ZephyrsFury

2008-03-02 02:04:42

Why, whats the error?

gaetano

2008-03-04 19:57:08

omfg im so mad at this, i got everything right and it runs ok but when it loads up hy's script wont log in! help please!

mixster

2008-03-05 11:05:02

Have you tried the script without SMART and have you tried SMART with another script (built to work with SMART) as you can't say it doesn't work if it doesn't work with just 1 script. Also, don't post for help in one place then make a topic for it in another (and not even put all the info needed into the topic). I'm guessing though that the script isn't made for SMART, thus doesn't want to run, or you didn't install it properly, so it stops prematurely (I'm thinking you maybe put a . instead of a ; somewhere).

Rich

2008-03-09 11:21:43

NOTE: Fill in the SmartSetup line!


I've done the rest, but what do I put in the SmartSetup line?

bluedog

2008-03-09 14:44:00

Yes! My smart works, I've been trying for a week then I decided to go through all the pages here and solved all my errors. Thanks to verybody for posting their questions and answers=)

kor

2008-03-10 11:22:05

when i ran the script it started smart, then it like stopped and it said ''[Runtime Error] : Out Of Range in line 73 in script D:\Admin\SCAR 3.14\includes\SRL/SRL/Core/Login.scar''

so i guess somethings wrong :P

mixster

2008-03-10 14:28:35

That looks like an error with the script/scripts setup rather than SMART - have you made sure HowManyPlayers is correct to the amount of Player[]'s there are (and not just filled in ones)?

PvH

2008-03-12 12:43:21

awesome tut!
thanks a lot
rep+

dakisback

2008-03-14 16:08:03

so this lets us edit while they running?

link555

2008-03-14 17:15:08

What do u mean by SMART scar? if its a new type of scar plz show me where to download it

Preston8

2008-03-16 11:19:43

wow thanks i needed this:D :D :D :D :D :D :D :D :) :bart:

ConneX

2008-03-17 16:02:43

Working :e

mixster

2008-03-17 16:07:31

Try reading. All you have to do is uncomment the line and use Markus' setup method (you just posted in the tut that features it on the 1st page).

thebob142

2008-03-20 01:39:35

where do you find SMART.scar and srl.scar?

mixster

2008-03-21 18:03:18

open Scar and go to tools, explore folders and choose includes. Open the SRL folder and SRL.scar will be there. Smart.scar is in the same place, but go into SRL again then Misc and it'll be in there.

lilboy543

2008-03-21 22:42:17

I have everything else done but the smartsetup line. How do i do this? and what do add to it?

thebob142

2008-03-22 00:51:54

From: mixster05
open Scar and go to tools, explore folders and choose includes. Open the SRL folder and SRL.scar will be there. Smart.scar is in the same place, but go into SRL again then Misc and it'll be in there.


ok i downlaoded right subversion and di everythign i was told to do now i get this error

Line 78: [Error] (12646:19): Syntax error in script D:\Program Files\SCAR 3.15\includes\SRL/SRL.scar

what should i do?

mixster

2008-03-22 08:48:23

You didn't follow the tut properly then. Try removing what you added, running it then adding it in again taking extra care.

lilboy543

2008-03-22 09:22:33

From: lilboy543
I have everything else done but the smartsetup line. How do i do this? and what do add to it?


Can Anyone Help Me???

thebob142

2008-03-22 15:29:42

dang this is so confusing i rather just have someone teach me how oen on one

slayerkiller13

2008-03-23 03:38:11

works good me now thx to your tutorial :D

Zodia

2008-03-25 02:36:41

I press run all it does is do this…

Line 2: [Error] (5:1): 'BEGIN' expected in script C:\Program Files\SCAR 3.15\includes\SRL/SRL/Misc/Smart.Scar


Line 3: [Error] (6:1): Unknown identifier 'smart' in script C:\Program Files\SCAR 3.15\includes\SRL/SRL/Misc/Smart.Scar

trojan

2008-03-25 09:02:02

this is so confusing lol or im just a total noob at scripting lol i always get these unknown identifier errors
procedure SetupSRL;
begin
{$IFDEF SMART}
SmartSetup({your prefix here}, false, {signed? true/false});
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
{$ENDIF}

what do i need to edit in this?? and what is a prefix?

NosePicker

2008-03-25 12:14:56

Couple of questions:

Questions below refer to this line which is to go in the SRL.scar file:
SmartSetup({your prefix here}, false, {signed? true/false});

1. Is {your prefix here} supposed to be the world number you selected. If so then I am assuming all scripts you use then must login to that world?

2. Does {signed? true/false} mean is the player already logged in before starting the script? If so does that mean I must always either login first or never login first before starting my script based on the setting?

If I set the values to SmartSetup(33, false, false); then compile I get
————————-
Failed when compiling
Line 79: [Error] (12723:30): Type mismatch in script C:\Program Files\SCAR 3.14\includes\SRL/SRL.scar
————————

which is the above line of code.
If I then change that line to call SmartSetupEx like:
SmartSetupEx(33, false, false);
Then it will compile.

However when I browse to runescape, identify my client with scar and start my script then scar just hides and never seems to do anything. I wait for a long time and nothing ever happens. I just have to kill the process with Task Manager.
Any ideas.

mixster

2008-03-25 12:22:43

Zodia: You don't run the Smart.scar file, but the script you want to use with SMART and as long as you have set it up correctly and include Smart.scar above Srl.scar, you should be fine
trojan/nosepicker: Use SmartSetupEx to use a world number instead of the world prefix (so "SmartSetupEx(5,false,false)" for example). The first boolean is then HighDetail, which should always be false if using a Scar script. Lastly, the Signed boolean just means whether to use a signed or unsigned RS applet and not logged in or not. It is recommended to always have it set to false unless you plan on running multiple SMART's, but that is a different story.

trojan

2008-03-25 12:48:24

ty so much people

Zodia

2008-03-25 12:56:03

From: mixster05
Zodia: You don't run the Smart.scar file, but the script you want to use with SMART and as long as you have set it up correctly and include Smart.scar above Srl.scar, you should be fine
trojan/nosepicker: Use SmartSetupEx to use a world number instead of the world prefix (so "SmartSetupEx(5,false,false)" for example). The first boolean is then HighDetail, which should always be false if using a Scar script. Lastly, the Signed boolean just means whether to use a signed or unsigned RS applet and not logged in or not. It is recommended to always have it set to false unless you plan on running multiple SMART's, but that is a different story.


I tried that, I was trying to run A netter with smart and it gave me that and the smart.scar opened in another tab by itself.

mixster

2008-03-25 13:00:03

Post the first 10 or so lines of the script you're trying to run and the first 10 or so lines of your Smart.scar file and we'll go from there.

NosePicker

2008-03-25 15:11:16

so do you have any idea why scar will just hide and never seem to do anything?

mixster

2008-03-25 15:15:17

If you don't have anything other than SMART in the Scar script, then it won't do anything as it hasn't been told to, though if it auto-hides and doesn't do anything, then chances are it's a dodgy script/ out of date.

NosePicker

2008-03-25 15:41:16

Well the script is one that I wrote myself and use almost daily.
If I comment the following line out of my script it runs perfect.
{.include SRL/SRL/misc/SMART.scar}
Which by the way is the top most line in my script.

If I put that line in, then scar.exe will just hide when I run the script and never seems to do anything. I am running XP, logged in as an admin.
The first line in my script calls SetupSRL ;
I copied the top lines of code of that method below.
Could it be the version of Java or something?
I think my Java version is 1.4.1.
Also to be clear… when using SMART do you even have to open a web browser and navigate to the RS site and identify the client the same way you do when not using SMART?
This is so simple I can't understand why it just hides and does nothing.

——————————–
procedure SetupSRL;
begin

{$IFDEF SMART}
SmartSetupEx(33, false, false) ;
wait(10000+random(5000)) ;
SetTargetDC(SmartGetDC) ;
repeat
wait(100) ;
until( SmartGetColor(253, 233) <> 1118604 ) ;
{$ENDIF}

mixster

2008-03-25 15:46:26

You don't have to open up a browser when using SMART as that is what it is - a virtual client if you will. There doesn't seem to be anything wrong there - have you definitely added {$DEFINE SMART} to the Smart.scar file and include Smart.scar before SRL.scar?
Also, double check your Java version, though it's normally shown by Scar actually crashing - just put Java into google and check what the latest version there is.

NosePicker

2008-03-25 17:16:33

OK, I got it working. I updated Java from 1.4.1 to 1.6, so obviously that is a MUST. Thanks a million mixster05!!! Now my only question is if I click the "Stop Blocking" it will let me use the mouse to "help" the script if needed, but it will not let me use the arrow keys. Is it supposed to let you use the arrow keys after clicking "Stop Blocking"? Also it appears many of the scripts I use on a regular basis do not work well when using SMART. Some of them never completly login if the smart client window loses focus, which is what I thought was part of the purpose of smart to start with.

I know this sounds like I am complaining but I am not. I just want to know if that is what other people experience also or is it just me. Does RS seem to have major lag when using smart?

Thanks for all your help!

mixster

2008-03-25 17:22:10

Try toggling the second boolean to true and run the script for a bit. If it runs fine, then it may be your connection is to slow to be able to run RS smoothly on an unsigned client (unsigned = unsaved, kind of) and you can either risk it on a signed client (not much more risk, but if one account gets banned, all other accounts from the same IP will be 'flagged' which means they're monitored more closely) or try to get a faster connection. Fixing the lag should fix the scripts running

About the blocking, some people have issues where it won't let them input anything from the keyboard (aka type into SMART) and they fix it by mashing the Block/Unblock button for a few seconds or unblock, minimize, maximize and try to type, if you can, great, otherwise, block it, minimize, maximize, unblock and try to type and repeat until it works. It gets a bit annoying, but needing to help a script is rare when you have a set of decent scripts you use for autoing.

Jamiee

2008-03-28 20:39:38

IF THIS SHOULDN'T BE HERE SOMEONE PLEASE TELL ME


Anyone tell me if theres any problems with these files, because my SMART will NOT work :(

 //----------------------------------------------------------------------------//
//-- Scar Standard Resource Library --//
//----------------------------------------------------------------------------//
//-- by: Azeroth, Bebemycat2, BenLand100, benleegt, Boreas, c0de, --//
//-- Cheesehunk, Dankness, driger1592, Flyboy, Freddy1990, --//
//-- inferno, Kernel Klink, Knightstreak, Krazy_Meerkat, Krichevskoy, --//
//-- Lorax, Mad Cow, masquerader, moparisthebest, Mutant Squirrle, --//
//-- nielsie95, phantombmx, pups, Pyro, realrune, Renax, Ron, RsN, --//
//-- Solemn wishes, Spky, SRL, Starblaster100, Stupid3ooo, Sumilion, --//
//-- tarajunky, Wizzup?, WT-Fakawi, XxKanexX, Yakman, _ChArMz....... --//
//-- --//
//-- ....... and the SRL Community. --//
//----------------------------------------------------------------------------//


//----------------------------------------------------------------------------//
// -- SRL Level 1 Includes --//
// -- --//
// -- Low Level SCAR Math, Mouse Movement and Color Clicking routines. --//
//----------------------------------------------------------------------------//

{.include SRL/SRL/Core/Globals.scar}
{.include SRL/SRL/Core/Math.scar}
{.include SRL/SRL/Core/Mouse.scar}
{.include SRL/SRL/Core/Color.scar}
{.include SRL/SRL/Core/Players.scar}

//----------------------------------------------------------------------------//
// -- SRL Level 2 Includes --//
// -- --//
// -- Interface, Object and OCR routines. --//
//----------------------------------------------------------------------------//

{.include SRL/SRL/Core/Timing.scar}
{.include SRL/SRL/Core/GameTab.scar}
{.include SRL/SRL/Core/Text.scar}
{.include SRL/SRL/Core/Inventory.scar}
{.include SRL/SRL/Core/Object.scar}

//----------------------------------------------------------------------------//
// -- SRL Level 3 Includes --//
// -- --//
// -- MapWalking, AntiRandoms, Bank, Symbol and many more... --//
//----------------------------------------------------------------------------//

{.include SRL/SRL/Misc/Bitmaps.scar}
{.include SRL/SRL/Core/FlagChat.scar}
{.include SRL/SRL/Core/Login.scar}
{.include SRL/SRL/Core/Mapwalk.scar}
{.include SRL/SRL/Core/Bank.scar}
{.include SRL/SRL/Core/Symbol.scar}
{.include SRL/SRL/Core/RC.scar}
{.include SRL/SRL/Core/AutoColor.scar}
{.include SRL/SRL/Core/AntiRandoms/Common.scar}
{.include SRL/SRL/Core/Globalstats.scar}
{.include SRL/SRL/Core/CAutoRespond.scar}
{.include SRL/SRL/Core/AntiRandoms/Box.scar}
{.include SRL/SRL/Core/AntiRandoms/Certer.scar}
{.include SRL/SRL/Core/AntiRandoms/Demon.scar}
{.include SRL/SRL/Core/AntiRandoms/Frog.scar}
{.include SRL/SRL/Core/AntiRandoms/Quiz.scar}
{.include SRL/SRL/Core/AntiRandoms/Sandwich.scar}
{.include SRL/SRL/Core/AntiRandoms/EvilBob.scar}
{.include SRL/SRL/Core/AntiRandoms/ChatRandoms.scar}
{.include SRL/SRL/Core/AntiRandoms/AntiRandoms.scar}
{.include SRL/SRL/Core/AntiBan.scar}
{.include SRL/SRL/Core/Amount.scar}

{*******************************************************************************
procedure SetupSRL;
by: SRL Dev Team
Description: Sets up all variables needed to run SRL.
*******************************************************************************}

procedure SetupSRL;
begin
{$IFDEF SMART}
SmartSetupEx(82, false,false);
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
{$ENDIF}
MouseSpeed := 15;
CheckHPFirst := True;
Reincarnate := False;
TalkAfterRandoms := False;
RoadColor := 0;
WaterColor := 0;
BankColor := 0;
LampSkill := 'mining';
SetUpSRLReport;
LoadCosineArrays;
SymbolAccuracy:= 0.8;
LoadNPCArray;
LoadSRLBitMaps;
SolveChatRandoms := True;
SetupSRLAutoResponder
UseSandWichSolver := True;
UseBoxSolver := True;
UseCerterSolver := True;
UseFindmod := True;
UseFindtrade := True;
Screenshots := False;
TheFile := RewriteFile(ScriptPath + 'ChatLog.txt', False);
Writeln ('SRL Compiled in '+ IntToStr(GetTimeRunning) + ' msec');
end;
^^^^^ That's my SRL

{$DEFINE SMART}{
smart.scar overwrites the SCAR procedures.
You should always include this before any other include, even SRL.scar
}

procedure MoveMouse(x, y: Integer);
begin
SmartMoveMouse(x, y);
end;

procedure HoldMouse(x, y: Integer; left: Boolean);
begin
SmartHoldMouse(x, y, left);
end;

procedure ReleaseMouse(x, y: Integer; left: Boolean);
begin
SmartReleaseMouse(x, y, left);
end;

procedure KeyUp(key: Byte);
begin
If Key = 13 Then
Key := 10;
SmartReleaseKey(key);
end;

procedure KeyDown(key: Byte);
begin
If Key = 13 Then
Key := 10;
SmartHoldKey(key);
end;

procedure SendKeys(S: String);
begin
SmartSendKeys(S);
end;

procedure GetMousePos(var x, y: Integer);
begin
SmartGetMousePos(x, y);
end;

function GetColor(x, y: Integer): Integer;
begin
result:= SmartGetColor(x, y);
end;

procedure SmartSetTarget;
var
Smart_Bitmap: Integer;
begin
Smart_Bitmap:= BitmapFromString(765,503,'');
GetBitmapCanvas(Smart_Bitmap).Handle:= SmartGetDC;
SetTargetBitmap(Smart_Bitmap);
FreeBitmap(Smart_Bitmap);
end;

function FindWindow(Title: String): Boolean;
begin
result:= true;
end;

procedure ActivateClient;
begin
end;

function FindWindowBySize(Width, Height: Integer): Boolean;
begin
result:= true;
end;

procedure SmartSetupEx(worldnumber: integer; hiDetail, signed: boolean);
var
prefix: string;
begin
prefix := ReadINI('World' + IntToStr(worldnumber), 'Prefix', AppPath + 'includes\SRL\SCSS\worlds.ini');
if(prefix = '')then
begin
writeln('Invalid world number or corrupted world list. Please review your settings');
TerminateScript;
end;
SmartSetup(prefix, hiDetail, signed);
end;
^^^^ that's my SMART.
Anyone know what's wrong :(? (I have the latest Rev, Java, Scar and Subversion.)

NosePicker

2008-03-29 07:42:04

Just make sure in your script you include smart before srl like:

{.include SRL/SRL/MISC/SMART.scar}
{.include SRL/SRL.scar}

then in the beginning of your script make sure you call
SetupSRL first.
Other than that, as long as you are sure you have the latest files then you should be good. By the way, if this does not work try to give us some details behind the phrase "my SMART will NOT work".

By the way, once I got SMART working, I realized it is not very useful to me. I'm not knocking it, I'm just saying for me it didn't perform like I thought it would. I have a fast computer and cable internet connection. Using smart made it run very laggey and almost would never login properly. Anytime I would minimize the window it would almost always stop working, which kind of defeats the purpose. It may work great for you so by all means do try to get it working and in fact I would like to hear from you, when you do, to get your opinion but all I'm saying is don't get your hopes yoo high.

mixster

2008-03-29 08:24:04

Have you tried setting Scar to a higher priority Nosepicker as it may be that other programs are having preference over needed resources so SMART can't work properly.
Jamiee, have you tried just running a script with "SetupSmartEx(82, False, False);" and seeing if that launches fine? If it does, then it may the script or something else affecting the running of SMART. Otherwise, you may need to double-check Java versions and try re-installing the SMART plugin (just doing another Checkout then moving the plugins again). Also, I'm sure you've posted your problems in atleast 20 different threads (well, maybe not 20), but it makes it a lot harder to fix as information and support will be scattered around the forum.

Jamiee

2008-03-29 09:21:17

Sorry, it's just that no-one seems to reply on other threads.

slakan

2008-03-31 12:24:26

Include file C:\Program Files\SCAR 3.15\includes\SRL\SRL\Core\Bitmap.scar does not exist.
Include file C:\Program Files\SCAR 3.15\includes\SRL\SRL\Core\DTM.scar does not exist.


i get this error when i does that the tut says :S

slakan

2008-03-31 12:30:40

This is my srl, change to do smart..

//----------------------------------------------------------------------------//
//-- Scar Standard Resource Library --//
//----------------------------------------------------------------------------//
//-- by: Azeroth, Bebemycat2, BenLand100, benleegt, Boreas, c0de, --//
//-- Cheesehunk, Dankness, driger1592, Flyboy, Freddy1990, --//
//-- inferno, Kernel Klink, Knightstreak, Krazy_Meerkat, Krichevskoy, --//
//-- Lorax, Mad Cow, masquerader, moparisthebest, Mutant Squirrle, --//
//-- nielsie95, phantombmx, pups, Pyro, realrune, Renax, Ron, RsN, --//
//-- Solemn wishes, Spky, SRL, Starblaster100, Stupid3ooo, Sumilion, --//
//-- tarajunky, Wizzup?, WT-Fakawi, XxKanexX, Yakman, _ChArMz....... --//
//-- --//
//-- ....... and the SRL Community. --//
//----------------------------------------------------------------------------//


//----------------------------------------------------------------------------//
// -- SRL Level 1 Includes --//
// -- --//
// -- Low Level SCAR Math, Mouse Movement and Color Clicking routines. --//
//----------------------------------------------------------------------------//

{.include SRL/SRL/Core/Globals.scar}
{.include SRL/SRL/Core/Math.scar}
{.include SRL/SRL/Core/Mouse.scar}
{.include SRL/SRL/Core/Color.scar}
{.include SRL/SRL/Core/Players.scar}

//----------------------------------------------------------------------------//
// -- SRL Level 2 Includes --//
// -- --//
// -- Interface, Object and OCR routines. --//
//----------------------------------------------------------------------------//

{.include SRL/SRL/Core/Timing.scar}
{.include SRL/SRL/Core/GameTab.scar}
{.include SRL/SRL/Core/Text.scar}
{.include SRL/SRL/Core/Inventory.scar}
{.include SRL/SRL/Core/Object.scar}

//----------------------------------------------------------------------------//
// -- SRL Level 3 Includes --//
// -- --//
// -- MapWalking, AntiRandoms, Bank, Symbol and many more... --//
//----------------------------------------------------------------------------//

{.include SRL/SRL/Core/FlagChat.scar}
{.include SRL/SRL/Core/Login.scar}
{.include SRL/SRL/Core/Mapwalk.scar}
{.include SRL/SRL/Core/Bitmap.scar}
{.include SRL/SRL/Core/DTM.scar}
{.include SRL/SRL/Core/Bank.scar}
{.include SRL/SRL/Core/Symbol.scar}
{.include SRL/SRL/Core/RC.scar}
{.include SRL/SRL/Core/AutoColor.scar}
{.include SRL/SRL/Core/AntiRandoms/Common.scar}
{.include SRL/SRL/Core/Globalstats.scar}
{.include SRL/SRL/Core/CAutoRespond.scar}
{.include SRL/SRL/Core/AntiRandoms/Box.scar}
{.include SRL/SRL/Core/AntiRandoms/Certer.scar}
{.include SRL/SRL/Core/AntiRandoms/Demon.scar}
{.include SRL/SRL/Core/AntiRandoms/Frog.scar}
{.include SRL/SRL/Core/AntiRandoms/Quiz.scar}
{.include SRL/SRL/Core/AntiRandoms/Sandwich.scar}
{.include SRL/SRL/Core/AntiRandoms/EvilBob.scar}
{.include SRL/SRL/Core/AntiRandoms/ChatRandoms.scar}
{.include SRL/SRL/Core/AntiRandoms/AntiRandoms.scar}
{.include SRL/SRL/Core/AntiBan.scar}
{.include SRL/SRL/Core/Amount.scar}

{*******************************************************************************
procedure SetupSRL;
by: SRL Dev Team
Description: Sets up all variables needed to run SRL.
*******************************************************************************}

procedure SetupSRL;
begin
{$IFDEF SMART}
SmartSetupEx(144,True,True);
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
{$ENDIF}
MouseSpeed := 15;
CheckHPFirst := True;
Reincarnate := False;
TalkAfterRandoms := False;
RoadColor := 0;
WaterColor := 0;
BankColor := 0;
LampSkill := 'mining';
SetUpSRLReport;
SetMouseMode(false);
LoadCosineArrays;
SymbolAccuracy:= 0.8;
LoadNPCArray;
LoadSRLBitMaps;
SolveChatRandoms := True;
SetupSRLAutoResponder
UseSandWichSolver := True;
UseBoxSolver := True;
UseCerterSolver := True;
UseFindmod := True;
UseFindtrade := True;
Screenshots := False;
TheFile := RewriteFile(ScriptPath + 'ChatLog.txt', False);
Writeln ('SRL Compiled in '+ IntToStr(GetTimeRunning) + ' msec');
end;

This is my smart, change to do smart..

{$DEFINE SMART}
{
smart.scar overwrites the SCAR procedures.
You should always include this before any other include, even SRL.scar
}

procedure MoveMouse(x, y: Integer);
begin
SmartMoveMouse(x, y);
end;

procedure HoldMouse(x, y: Integer; left: Boolean);
begin
SmartHoldMouse(x, y, left);
end;

procedure ReleaseMouse(x, y: Integer; left: Boolean);
begin
SmartReleaseMouse(x, y, left);
end;

procedure KeyUp(key: Byte);
begin
If Key = 13 Then
Key := 10;
SmartReleaseKey(key);
end;

procedure KeyDown(key: Byte);
begin
If Key = 13 Then
Key := 10;
SmartHoldKey(key);
end;

procedure SendKeys(S: String);
begin
SmartSendKeys(S);
end;

procedure GetMousePos(var x, y: Integer);
begin
SmartGetMousePos(x, y);
end;

function GetColor(x, y: Integer): Integer;
begin
result:= SmartGetColor(x, y);
end;

procedure SmartSetTarget;
var
Smart_Bitmap: Integer;
begin
Smart_Bitmap:= BitmapFromString(765,503,'');
GetBitmapCanvas(Smart_Bitmap).Handle:= SmartGetDC;
SetTargetBitmap(Smart_Bitmap);
FreeBitmap(Smart_Bitmap);
end;

function FindWindow(Title: String): Boolean;
begin
result:= true;
end;

procedure ActivateClient;
begin
end;

function FindWindowBySize(Width, Height: Integer): Boolean;
begin
result:= true;
end;

procedure SmartSetupEx(worldnumber: integer; hiDetail, signed: boolean);
var
prefix: string;
begin
prefix := ReadINI('World' + IntToStr(worldnumber), 'Prefix', AppPath + 'includes\SRL\SCSS\worlds.ini');
if(prefix = '')then
begin
writeln('Invalid world number or corrupted world list. Please review your settings');
TerminateScript;
end;
SmartSetup(prefix, hiDetail, signed);
end;



When i open lets take Varrock_East_Smart_miner_By_MK_V12_rev14

and it have this on the top:

{.include SRL/SRL/Misc/Smart.scar}
{.include srl/srl.scar}
Var
RError, TotalLoadsDone, x, y, LogyIn, responds, attack, rx, ry, MDTM: integer;
IronMined, CombatLvl, TotalIronMined, bankers, howmany, counz, BankDTM: integer;
IronOreBFS, PRes, index, MineW, RespTime, FD, NumberOfResponds: Integer;
kkzf, OkiClick, PF, Wield, FSetup: boolean;
upzor, onezor, twozor: string;
randomminetext: array [0..14] of String;
Question: array of String;
RespondNo: array of array of String;

Ive read that u had to have the smart includes, but i still get this error: or bug idk

Include file C:\Program Files\SCAR 3.15\includes\SRL\SRL\Core\Bitmap.scar does not exist.
Include file C:\Program Files\SCAR 3.15\includes\SRL\SRL\Core\DTM.scar does not exist.
Failed when compiling

Now u see im missing files, when i go scar - tools - srl download and do check it get back at normal..

When i try the tut again i get the same problem xD i like change what i should change in smart and srl and when i load a smart script MADE off the pros i get this missing files..

Help?

Markus

2008-03-31 15:47:56

Your SRL is outdated, update it and try again :)

db0wpwn4g3

2008-03-31 15:52:04

how come i cant access my scripts yet?

I want to get the fight cave runner but every time i type it in it aint their can som1 tell me how come

slakan

2008-03-31 15:52:30

no its not, ive updates it..

db0wpwn4g3

2008-03-31 15:53:06

can som1 please help me?

slakan can u tell me the fight cave runner script?

TViYH

2008-03-31 16:36:47

Congratulations, db0wpwn4g3, on the amazing double-spam posting.

Thanks for the tutorial, mate.

slakan

2008-03-31 16:55:36

From: db0wpwn4g3
slakan can u tell me the fight cave runner script?


whut?

{$IFDEF SMART}
SmartSetup({your prefix here}, false, {signed? true/false});
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);

Line 78: [Error] (12646:30): Syntax error in script C:\Program Files\SCAR 3.15\includes\SRL/SRL.scar

what i write insted of youre prefixions and that stuf?

Oki now im going to show again why my dont work xD and im going to put in a example script for it 2 :D

procedure SetupSRL;
begin
{$IFDEF SMART}
SmartSetupEx(82, false,false);
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604); {$ENDIF}
MouseSpeed := 15;
CheckHPFirst := True;
Reincarnate := False;
TalkAfterRandoms := False;
RoadColor := 0;
WaterColor := 0;
BankColor := 0;
LampSkill := 'mining';
SetUpSRLReport;
LoadCosineArrays;
SymbolAccuracy:= 0.8;
LoadNPCArray;
LoadSRLBitMaps;
SolveChatRandoms := True;
SetupSRLAutoResponder
UseSandWichSolver := True;
UseBoxSolver := True;
UseCerterSolver := True;
UseFindmod := True;
UseFindtrade := True;
Screenshots := False;
TheFile := RewriteFile(ScriptPath + 'ChatLog.txt', False);
Writeln ('SRL Compiled in '+ IntToStr(GetTimeRunning) + ' msec');
end;

This is my srl.scar.. When i add the text

{$IFDEF SMART}
SmartSetupEx(82, false,false);
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
{$ENDIF}

here u see the {$IFDED SMART} are green, in my srl.scar its black and the numbers are blue, should it be that or green with blue numbers?


This is my smart.scar

{$DEFINE SMART}{
smart.scar overwrites the SCAR procedures.
You should always include this before any other include, even SRL.scar
}

Here u see the {DEFINE SMART} is green, same color as the text longer down, in my smart.scar when i look at it its black.. should it be black or green?


oki now lets take a scar without any smart in it.. lets say Munkz cicken fighter..

In the top under


program forefeathers;
{.include srl/srl.scar}

Now when i look at the other tutorial here i read that u got to add a text under program with the include..

Stole from " a tut that works perfect and simple to folo"

CODE
Program (name of script)
{.include SRL/SRL/Misc/Smart.scar}
{.include srl/srl.scar}

Now when i add this to munkz fighter i get this

{
Forefeathers [SRL4][#10)
by munk

}
program forefeathers;
{.include SRL/SRL/Misc/Smart.scar}
{.include srl/srl.scar}

Or should it be like this, the opisit way..:confused:

{
Forefeathers [SRL4][#10)
by munk

}
program forefeathers;
{.include srl/srl.scar}
{.include SRL/SRL/Misc/Smart.scar}
:confused:



WHEN i hit play i only get the logo from the script :D

   =  
=|= FFFFFf
==|== Ff
==|== FFFf
==|== Ff orefeathers
==|== Ff
=|= by munk
|
Successfully executed

Now if i change the way i wrote

{.include SRL/SRL/Misc/Smart.scar}
{.include srl/srl.scar}

to
{.include srl/srl.scar}
{.include SRL/SRL/Misc/Smart.scar}


I get a error :)

==|==    Ff  
==|== FFFf
==|== Ff orefeathers
==|== Ff
=|= by munk
|
Successfully executed
Failed when compiling
Line 6: [Error] (12601:11): Duplicate identifier 'MOVEMOUSE' in script C:\Program Files\SCAR 3.15\includes\SRL/SRL/Misc/Smart.scar


This is how its showen in scar the place its error


{$DEFINE SMART}{
smart.scar overwrites the SCAR procedures.
You should always include this before any other include, even SRL.scar
}

procedure MoveMouse(x, y: Integer);
begin
SmartMoveMouse(x, y);
end;

Now when i change it back to the right way the {.include srl/srl.scar}
{.include SRL/SRL/Misc/Smart.scar}is supose to be and i drag the crossair to runescape i get this, when i hit play :D


{.include SRL/SRL/Misc/Smart.scar}
{.include srl/srl.scar}

POOOOFF!!! its gone, it shutdown :D hoho this is funn xD


Now im asking nice and could some off you pros in this help me out :D or it it just not possible to make a non smart scar to smart with out change the whole shit?


It would be realy helpfull if this shows how NOT TO DO or HOW TO DO it :P

but i guess this shows how NOT to do :D




So if there is some out there who see my problem, or mabey know what the problem is, write it here or pm me!

The easy way of course is msn so send me a pm i give you my msn


TY guys/girls if there is any

ZephyrsFury

2008-04-01 06:44:00

When you have the compiler directives in SCAR (the IFDEF SMART stuff) it should be black and in italics. You should include SMART.scar before SRL.scar ie. the {.include SRL/SRL/misc/SMart.scar} before the {.include SRL/SRL.scar}.

What usually happens to me when I first run SMART on a comp is that it takes a while to load. I don't know why. Press run and wait a couple of seconds (maybe a minute or so). If nothing turns up after a minute stop the script. Restart SCAR (close the SCAR window and reopen it), and try again. Hopefully this time it might work.

slakan

2008-04-01 07:45:09

Oki now i tryed to wait for like 3-5 min with the munkz fighter, it just spams " 3 minutes have gone "

I quit it and open the i know works Varrock_East_Smart_miner_By_MK_V12_rev14.

I take some time before the popup comes, but it comes..


What did i do wrong with the other script?

i wrote the includes right at the top as u said..

mixster

2008-04-03 11:34:20

What general pc specs do you have? It may be that your pc has trouble handling SMART as it has a history of peculiar behaviour with older/low spec pc's.

Nava2

2008-04-04 17:31:55

Thanks for the Tut!

Nava2

2pacfan

2008-04-05 04:26:34

where is smart.scar?

runner732

2008-04-05 16:32:49

From: 2pacfan
where is smart.scar?


open up scar 3.15 (the folder), then open up "includes" then "srl" then "srl" (the folder, not the file) now you open up "misc" and it should be in there, smart.scar.


also i jsut wanted to say thanks for this great thread it helped so much, i couldnt even get smart working before this now its so easy. A+++++!

s33 teh pain

2008-04-08 06:23:40

i have got a problem :( what do i need to type here to make it work

procedure SetupSRL;
begin
{$IFDEF SMART}
SmartSetup(prefix, lowDetail, signed); //<<<< prefix ? i though this would work SmartSetup(53, false, signed); but this doenst work :( help me out.
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
{$ENDIF}

mixster

2008-04-11 14:25:08

Use SmartSetupEx if you want to use a world number :) Could you please try checking next time though as that exact same question has been answered atleast twice on every page if not more :)

vinny13

2008-04-13 15:44:45

Is it possible to add in multiple world numbers instead of constantly autoing in the same one? Like add in 3 worlds and it would randomly start one?

How would I do this?



*****

Oh ya, I forgot to say that the script edit works and now I can auto all day and night ;)

Although I probably shouldn't lol :P

mixster

2008-04-13 15:57:07

well, you can add the following line to the var section:
  SmartWorlds: array[0..2] of Integer;
then, replace SmartSetupEx with:
  SmartWorlds[0] := 1; // Replace with a world number
SmartWorlds[1] := 2; // Same as above
SmartWorlds[2] := 3; // Same as above
SmartSetupEx(SmartWorlds[Random(3)], False, False);

Or you can look for Prisoner's or my SMART function which returns different worlds most times - Prisoners returns a random world and mine returns the least populated world - and add them into srl.scar then make it use the function rather than a world number, so it would be:
  SmartSetupEx(MineOrPrionsersFunctionHere, False, False);
Of course, you replace MineOrPrionsersFunctionHere with the appropriate function filled out :)

vinny13

2008-04-13 16:15:09

What do you mean by "add to the var section"?

Where is this?

mixster

2008-04-14 09:01:29

near the top of the script, it should have a bolded var section, like this:

var
somethinghere:somethinghere;
blahblah:blahblah;
except instead of somethinghere or blahblah there will actually be meaningful words, so the line under var just add "SmartWorlds: array[0..2] of Integer;" so it becomes:

var
SmartWorlds: array[0..2] of Integer;
somethinghere:somethinghere;
blahblah:blahblah;

thedemonic19

2008-04-17 03:15:22

Right i think im jsut plain old stupid. can some1 pm me with all the files. coz i jst dont know lol. can u have it set up 4 world 108 or something plz plz plz. this would help a ton. plzzzzzzzz. Ty lol

Alasmic

2008-04-21 03:43:35

Line 78: [Error] (12732:27): Type mismatch in script C:\Program Files\SCAR 3.15\includes\srl/srl.scar

{*******************************************************************************
procedure SetupSRL;
by: SRL Dev Team
Description: Sets up all variables needed to run SRL.
*******************************************************************************}

procedure SetupSRL;
begin
{$IFDEF SMART}
SmartSetup(27,false,false);
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
{$ENDIF}
MouseSpeed := 15;
CheckHPFirst := True;
Reincarnate := False;
TalkAfterRandoms := False;
RoadColor := 0;
WaterColor := 0;
BankColor := 0;
LampSkill := 'mining';
SetUpSRLReport;
LoadCosineArrays;
SymbolAccuracy:= 0.8;
LoadNPCArray;
LoadSRLBitMaps;
SolveChatRandoms := True;
SetupSRLAutoResponder
UseSandWichSolver := True;
UseBoxSolver := True;
UseCerterSolver := True;
UseFindmod := True;
UseFindtrade := True;
Screenshots := False;
TheFile := RewriteFile(ScriptPath + 'ChatLog.txt', False);
Writeln ('SRL Compiled in '+ IntToStr(GetTimeRunning) + ' msec');
end;
SRL.Scar looks like that
im sure its easy to fix.. but i have tried 1000 ways.. and its 3:42Am here just wanna run some Script b4 i go to bed ya know

ZephyrsFury

2008-04-21 03:55:29


SmartSetupEx(27,false,false);

You need to use SmartSetupEx if you want to use world numbers instead of world prefixes.

only0nechris

2008-05-04 21:25:49

Hmm i'm going to try this out later tonight.

opensourcev2

2008-05-09 23:00:08

what is a prefix?

sk8terbitu

2008-05-11 19:48:17

a prefix is say world97.runescape.com/p1,j1,o1 or what ever

Markus

2008-05-13 13:03:32

Actually it is only the 'world97' part.

namo

2008-05-24 22:25:14

Nice tutorial.
Didn't know that this feature existed, thought I had to install vmware to run it minimized, lol. :P

(TIP! For those who needs to look up their worldprefix, it's found in "SCAR FOLDER\Includes\SRL\SCSS\worlds.ini" ;))

fyodor

2008-06-02 17:02:06

Zephyrs thanks for the " SmartSetupEx(27,false,false);" fix that worked well
but what are both of the falses for? is one of them signed and the other is?

FreakyMonkey

2008-06-07 15:35:35

Hey guys, I never really tried to setup SMART before, but I am trying now. I have the latest JAVA, all the plugins moved, etc but the error still occurs in SCAR itself as this….

[PHP][Error]: Define not closed[/PHP]

EDIT: Never mind works perfectly sorry just didnt put a "{" in front of $ENDIF}

Qarty

2008-06-28 18:11:16

Thanks for this, helped me alot;)

jose89

2008-07-22 18:34:05

does this still work now with rev 20 out?

s1cky

2008-07-28 19:40:20

I did all this, updated to rev 20, and when i try running a script, and little box shows up and says "keep blocking" what did i do wrong?

reddevil12312

2008-07-31 15:37:54

ive been wondering bout that. thanks for the tip

bennyman34

2008-09-06 12:29:45

im having a huge problem i fill in the form and click enter and its always saying that something doesnt make sense or anything and when i try to fix it itjust moves to another one from the script i got please post an snswer XD

pk ownage94

2008-11-30 11:42:04

Hey everyone this SMART client looks amazing but I just can't seem to get it working :(

Here's what my SRL.scar looks like…

procedure SetupSRL;
begin
{$IFDEF SMART}
SmartSetup(27,false,false);
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
{$ENDIF}
MouseSpeed := 15;
CheckHPFirst := True;
Reincarnate := False;
TalkAfterRandoms := False;
RoadColor := 0;
WaterColor := 0;
BankColor := 0;
LampSkill := 'mining';
SetUpSRLReport;
LoadCosineArrays;
SymbolAccuracy:= 0.8;
LoadNPCArray;
LoadSRLBitMaps;
SolveChatRandoms := True;
SetupSRLAutoResponder
UseSandWichSolver := True;
UseBoxSolver := True;
UseCerterSolver := True;
UseFindmod := True;
UseFindtrade := True;
Screenshots := False;
TheFile := RewriteFile(ScriptPath + 'ChatLog.txt', False);
Writeln ('SRL Compiled in '+ IntToStr(GetTimeRunning) + ' msec');
end;


Any help or tips would be greatly appriciated, thanks :)

nofkoff

2008-12-03 13:24:36

procedure SetupSRL;
begin
{$IFDEF SMART}
SmartSetupEx(134,false,false); This line
wait(10000+random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
{$ENDIF}






ERROR
Line 88: [Error] (16659:29): Invalid number of parameters in script C:\Program Files\SCAR 3.15\includes\SRL\SRL.scar

ideas? tried looking it

staffa

2008-12-05 05:54:41

When you say enter this code into this line I can't find the line.

staffa

2008-12-05 06:04:12

I don't get it, different tutorials have different ways to setting up S.M.A.R.T.
Is this the right tut to do it?
EDIT: Soz for double post

MadSlash

2009-02-15 17:14:48

Thanks a lot for this, really helped me.

Xtragicx

2009-02-16 20:48:42

So inside the smart.scar it should look like this?


{$DEFINE SMART}
function IsKeyDown(C:Char): Boolean;

begin
Result := SmartIsKeyDown(ord(c));
end;

dark bl00d23

2009-02-17 11:45:34

Nice job, I already kinda knew how to do this, but your way is better.Thanks for this