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

The COMPLETE S.M.A.R.T Tutorial


pwnaz0r

2007-11-19 00:02:44

The Complete S.M.A.R.T Tutorial

by Pwnaz0r



Setting up S.M.A.R.T. in your SCAR/SRL.


I need to get this out of my other tutorial…



Using S.M.A.R.T. in scripts


ok, now let me say some things while we are here at the beginning.

  • You do not have to replace anything in SRL except change take out the code in FindRS so it doesn't do anything
  • You don't have to use all of S.M.A.R.T.'s functions like SMARTFindColor, just include SMART.scar first off
  • Please get in the habit of saving SMART.scar in the misc folder if you havent already
  • The way I will describe to setup SMART here is not the only way, nor are you required to do it this way. I find it easier, however, if you do it this way.

Now, if you do not understand defining things in SCAR, just copy the code. I like to define SMART in my scripts, that way I only have to edit one line of my script if I want to use SCAR. Now, you can define anything in SCAR with the "$Define" command


{$Define SMART}



now, you can take that line out if you want to don't want to use SMART or you can keep that line in if you want to use. The best place to define SMART is just after the "Program" line. (I will use tarajunkies chicken killer as an example).





program ChickenKiller;
{$Define SMART}




now, you can use the "{IfDef}" command to call certain things if that is "Defined". Please remember to ALWAYS include smart.scar before SRL/SRL.scar.






program ChickenKiller;
{$Define SMART} // This is where I defined SMART. If you don't want to use SMART, take out this line.
{$IfDef SMART} // In the next 3 lines, it will only include SMART.scar if you have defined SMART.
{.include SRL/SRL/Misc/Smart.scar}
{$EndIf}
{.include SRL\SRL.scar} //This will be included even if you did not define SMART





now, you must and i mean MUST open SMART before you do ANYTHING. Use the following procedure to set it up perfectly. It will not start the script without the whole login procedure being there. Put this on the FIRST lines of your mainloop.






{$IfDef SMART}
SmartSetup('ams3', False, false);
while not(SmartReady) do Wait(100);
SetTargetDC(SmartGetDC);
if not(LoggedIn) then
while not(SmartGetColor(386, 249) = 65535) do Wait(100);
{$EndIf}

you can always find a list of prefixes in FAWG or the SCSS.ini file.

BenLand100

2007-11-19 00:13:09

Don't forget to mention that SetupSmart is rather important. As in it won't work at all unless its called each time you run the script. Somehow that little morsel of information was omitted :p

HyperSecret

2007-11-19 00:43:44

also i noticed the worlds file for SmartSetupEx is outdated…many of the runescape servers have changed their prefixes ran FAWG and got them, but may want to add that in there maybe a list of the prefixes…
{List generated by Freddy1990's Advanced World Generator}

[Worlds]
Count=144

[World1]
Prefix=ul7
Type=Free
Flag=usflag
Location=US West 1

[World2]
Prefix=ul8
Type=Members
Flag=usflag
Location=US West 1

[World3]
Prefix=sl1
Type=Free
Flag=usflag
Location=US Central 2

[World4]
Prefix=po4
Type=Free
Flag=usflag
Location=US West 2

[World5]
Prefix=po5
Type=Free
Flag=usflag
Location=US West 2

[World6]
Prefix=sl10
Type=Members
Flag=usflag
Location=US Central 2

[World7]
Prefix=above2
Type=Free
Flag=usflag
Location=US West 3

[World8]
Prefix=above3
Type=Free
Flag=usflag
Location=US West 3

[World9]
Prefix=above4
Type=Members
Flag=usflag
Location=US West 3

[World10]
Prefix=me5
Type=Free
Flag=nlflag
Location=Netherlands 2

[World11]
Prefix=jolt8
Type=Free
Flag=ukflag
Location=UK 2

[World12]
Prefix=jolt9
Type=Members
Flag=ukflag
Location=UK 2

[World13]
Prefix=nl3
Type=Free
Flag=usflag
Location=US West 5

[World14]
Prefix=nl4
Type=Free
Flag=usflag
Location=US West 5

[World15]
Prefix=mn2
Type=Free
Flag=ukflag
Location=UK 1

[World16]
Prefix=mn3
Type=Free
Flag=ukflag
Location=UK 1

[World17]
Prefix=nav1
Type=Free
Flag=caflag
Location=Canada East

[World18]
Prefix=nav2
Type=Members
Flag=caflag
Location=Canada East

[World19]
Prefix=nl7
Type=Free
Flag=usflag
Location=US West 5

[World20]
Prefix=nl8
Type=Free
Flag=usflag
Location=US West 5

[World21]
Prefix=nl11
Type=Free
Flag=usflag
Location=US West 5

[World22]
Prefix=nl1
Type=Members
Flag=usflag
Location=US West 5

[World23]
Prefix=mn4
Type=Members
Flag=ukflag
Location=UK 1

[World24]
Prefix=mn5
Type=Members
Flag=ukflag
Location=UK 1

[World25]
Prefix=me6
Type=Free
Flag=nlflag
Location=Netherlands 2

[World26]
Prefix=ul5
Type=Members
Flag=usflag
Location=US West 1

[World27]
Prefix=nl5
Type=Members
Flag=usflag
Location=US West 5

[World28]
Prefix=nl6
Type=Members
Flag=usflag
Location=US West 5

[World29]
Prefix=ul6
Type=Free
Flag=usflag
Location=US West 1

[World30]
Prefix=po7
Type=Free
Flag=usflag
Location=US West 2

[World31]
Prefix=po8
Type=Members
Flag=usflag
Location=US West 2

[World32]
Prefix=ul1
Type=Free
Flag=usflag
Location=US West 1

[World33]
Prefix=at1
Type=Free
Flag=usflag
Location=US East 2

[World34]
Prefix=at2
Type=Free
Flag=usflag
Location=US East 2

[World35]
Prefix=at3
Type=Free
Flag=usflag
Location=US East 2

[World36]
Prefix=at4
Type=Members
Flag=usflag
Location=US East 2

[World37]
Prefix=nav3
Type=Free
Flag=caflag
Location=Canada East

[World38]
Prefix=ny9
Type=Free
Flag=usflag
Location=US East 1

[World39]
Prefix=ny10
Type=Members
Flag=usflag
Location=US East 1

[World40]
Prefix=ny11
Type=Free
Flag=usflag
Location=US East 1

[World41]
Prefix=ny12
Type=Free
Flag=usflag
Location=US East 1

[World42]
Prefix=po2
Type=Members
Flag=usflag
Location=US West 2

[World43]
Prefix=sl11
Type=Free
Flag=usflag
Location=US Central 2

[World44]
Prefix=at6
Type=Members
Flag=usflag
Location=US East 2

[World45]
Prefix=ny13
Type=Members
Flag=usflag
Location=US East 1

[World46]
Prefix=ny14
Type=Members
Flag=usflag
Location=US East 1

[World47]
Prefix=above5
Type=Free
Flag=usflag
Location=US West 3

[World48]
Prefix=above6
Type=Members
Flag=usflag
Location=US West 3

[World50]
Prefix=ams2
Type=Free
Flag=nlflag
Location=Netherlands 1

[World51]
Prefix=ams3
Type=Free
Flag=nlflag
Location=Netherlands 1

[World52]
Prefix=ams4
Type=Free
Flag=nlflag
Location=Netherlands 1

[World53]
Prefix=ams5
Type=Members
Flag=nlflag
Location=Netherlands 1

[World54]
Prefix=me10
Type=Members
Flag=nlflag
Location=Netherlands 2

[World55]
Prefix=ch1
Type=Free
Flag=usflag
Location=US Central 1

[World56]
Prefix=nl10
Type=Members
Flag=usflag
Location=US West 5

[World57]
Prefix=ch3
Type=Free
Flag=usflag
Location=US Central 1

[World58]
Prefix=ch4
Type=Members
Flag=usflag
Location=US Central 1

[World59]
Prefix=ch5
Type=Members
Flag=usflag
Location=US Central 1

[World61]
Prefix=se1
Type=Free
Flag=usflag
Location=US West 4

[World62]
Prefix=se2
Type=Free
Flag=usflag
Location=US West 4

[World63]
Prefix=se3
Type=Free
Flag=usflag
Location=US West 4

[World64]
Prefix=se4
Type=Members
Flag=usflag
Location=US West 4

[World65]
Prefix=se5
Type=Members
Flag=usflag
Location=US West 4

[World66]
Prefix=se6
Type=Members
Flag=usflag
Location=US West 4

[World67]
Prefix=jolt10
Type=Free
Flag=ukflag
Location=UK 2

[World68]
Prefix=jolt11
Type=Free
Flag=ukflag
Location=UK 2

[World69]
Prefix=jolt12
Type=Members
Flag=ukflag
Location=UK 2

[World70]
Prefix=po6
Type=Members
Flag=usflag
Location=US West 2

[World71]
Prefix=mn7
Type=Members
Flag=ukflag
Location=UK 1

[World72]
Prefix=nav9
Type=Free
Flag=caflag
Location=Canada East

[World74]
Prefix=sl3
Type=Free
Flag=usflag
Location=US Central 2

[World75]
Prefix=sl4
Type=Free
Flag=usflag
Location=US Central 2

[World76]
Prefix=sl5
Type=Members
Flag=usflag
Location=US Central 2

[World77]
Prefix=sl6
Type=Members
Flag=usflag
Location=US Central 2

[World78]
Prefix=sl7
Type=Members
Flag=usflag
Location=US Central 2

[World79]
Prefix=sl8
Type=Members
Flag=usflag
Location=US Central 2

[World80]
Prefix=jolt1
Type=Free
Flag=ukflag
Location=UK 2

[World81]
Prefix=jolt2
Type=Free
Flag=ukflag
Location=UK 2

[World82]
Prefix=jolt3
Type=Members
Flag=ukflag
Location=UK 2

[World83]
Prefix=jolt4
Type=Members
Flag=ukflag
Location=UK 2

[World84]
Prefix=jolt5
Type=Members
Flag=ukflag
Location=UK 2

[World85]
Prefix=ny1
Type=Free
Flag=usflag
Location=US East 1

[World86]
Prefix=ny2
Type=Free
Flag=usflag
Location=US East 1

[World87]
Prefix=ny4
Type=Free
Flag=usflag
Location=US East 1

[World88]
Prefix=ny5
Type=Members
Flag=usflag
Location=US East 1

[World89]
Prefix=ny6
Type=Members
Flag=usflag
Location=US East 1

[World90]
Prefix=ny7
Type=Free
Flag=usflag
Location=US East 1

[World91]
Prefix=ny8
Type=Members
Flag=usflag
Location=US East 1

[World92]
Prefix=nl9
Type=Members
Flag=usflag
Location=US West 5

[World93]
Prefix=mi1
Type=Free
Flag=usflag
Location=US East 3

[World94]
Prefix=mi2
Type=Free
Flag=usflag
Location=US East 3

[World95]
Prefix=mi3
Type=Free
Flag=usflag
Location=US East 3

[World96]
Prefix=mi4
Type=Free
Flag=usflag
Location=US East 3

[World97]
Prefix=mi5
Type=Members
Flag=usflag
Location=US East 3

[World98]
Prefix=mi6
Type=Members
Flag=usflag
Location=US East 3

[World99]
Prefix=mi7
Type=Members
Flag=usflag
Location=US East 3

[World100]
Prefix=ul3
Type=Members
Flag=usflag
Location=US West 1

[World101]
Prefix=at7
Type=Free
Flag=usflag
Location=US East 2

[World102]
Prefix=at8
Type=Free
Flag=usflag
Location=US East 2

[World103]
Prefix=at9
Type=Members
Flag=usflag
Location=US East 2

[World104]
Prefix=at10
Type=Members
Flag=usflag
Location=US East 2

[World105]
Prefix=mn8
Type=Free
Flag=ukflag
Location=UK 1

[World106]
Prefix=mn9
Type=Free
Flag=ukflag
Location=UK 1

[World107]
Prefix=au1
Type=Free
Flag=auflag
Location=Australia

[World108]
Prefix=au2
Type=Free
Flag=auflag
Location=Australia

[World109]
Prefix=au3
Type=Free
Flag=auflag
Location=Australia

[World110]
Prefix=au4
Type=Members
Flag=auflag
Location=Australia

[World111]
Prefix=au5
Type=Members
Flag=auflag
Location=Australia

[World112]
Prefix=au6
Type=Members
Flag=auflag
Location=Australia

[World113]
Prefix=nav4
Type=Free
Flag=caflag
Location=Canada East

[World114]
Prefix=nav5
Type=Members
Flag=caflag
Location=Canada East

[World115]
Prefix=nav6
Type=Members
Flag=caflag
Location=Canada East

[World116]
Prefix=nav8
Type=Members
Flag=caflag
Location=Canada East

[World117]
Prefix=swe1
Type=Free
Flag=sweflag
Location=Sweden

[World118]
Prefix=swe2
Type=Free
Flag=sweflag
Location=Sweden

[World119]
Prefix=swe3
Type=Free
Flag=sweflag
Location=Sweden

[World120]
Prefix=swe4
Type=Members
Flag=sweflag
Location=Sweden

[World121]
Prefix=swe5
Type=Members
Flag=sweflag
Location=Sweden

[World123]
Prefix=swe7
Type=Free
Flag=sweflag
Location=Sweden

[World124]
Prefix=swe8
Type=Members
Flag=sweflag
Location=Sweden

[World125]
Prefix=jlv9
Type=Free
Flag=caflag
Location=Canada West

[World126]
Prefix=jlv2
Type=Free
Flag=caflag
Location=Canada West

[World127]
Prefix=jlv3
Type=Free
Flag=caflag
Location=Canada West

[World128]
Prefix=jlv4
Type=Free
Flag=caflag
Location=Canada West

[World129]
Prefix=jlv5
Type=Members
Flag=caflag
Location=Canada West

[World130]
Prefix=jlv6
Type=Members
Flag=caflag
Location=Canada West

[World131]
Prefix=jlv7
Type=Members
Flag=caflag
Location=Canada West

[World132]
Prefix=jlv8
Type=Members
Flag=caflag
Location=Canada West

[World133]
Prefix=hel1
Type=Free
Flag=finflag
Location=Finland

[World134]
Prefix=hel2
Type=Free
Flag=finflag
Location=Finland

[World136]
Prefix=hel4
Type=Free
Flag=finflag
Location=Finland

[World137]
Prefix=hel5
Type=Members
Flag=finflag
Location=Finland

[World138]
Prefix=hel6
Type=Members
Flag=finflag
Location=Finland

[World141]
Prefix=me1
Type=Free
Flag=nlflag
Location=Netherlands 2

[World142]
Prefix=me2
Type=Free
Flag=nlflag
Location=Netherlands 2

[World143]
Prefix=me3
Type=Members
Flag=nlflag
Location=Netherlands 2

[World144]
Prefix=me4
Type=Members
Flag=nlflag
Location=Netherlands 2

Hugolord

2007-11-19 02:09:34

I would like to thank everyone involved in making smart including Ben

Dark_Sniper

2007-11-19 02:35:00

pwnaz0r if you need any help ask me on msn :p

Santa_Clause

2007-11-19 02:54:28

Hooray! I really need this…

HellBoyz

2007-11-19 03:06:30

Thanks in advance and happy birthday

P1nky

2007-11-19 11:51:20

yeah i need this BADLY lol =p i get the error code pop up and followed the direction still aint working

pwnaz0r

2007-11-19 16:44:48

alright time to get to work. Any questions post here.

Hugolord

2007-11-19 16:45:54

abit more help on running multiples? please

Timer

2007-11-19 16:58:32

i cant get my smart to work… wont open up a client..

pwnaz0r

2007-11-19 17:10:06

there, that should answer alot of questions. I need the first part of the tutorial before I go any farther.

Timer

2007-11-19 17:13:20

my question!!!! please above your post im replying this too… lol

pwnaz0r

2007-11-19 17:15:33

read the tutorial, you must call smartsetup first. It takes a second. btw I will make this much more organized soon.

Timer

2007-11-19 17:17:45

i have all dat, i play, scar minimizes, a SMARt client never opens up?

Metagen

2007-11-22 07:25:11

So this goes IN my main loop or before it?

Swift

2007-11-25 16:52:44

Awesome, glad you updated the tutorial. Works great :)!

Smartzkid

2007-11-25 22:04:25

From: metagen
So this goes IN my main loop or before it?


Before, SMART requires no changes to your mainloop.

RudeBoiAlex

2007-11-27 12:09:48

I always get this when im extracting to plugins folder

! C:\Users\Alex\Desktop\Embedded SMART.7z: Cannot open Embedded SMART.dll
! C:\Users\Alex\Desktop\Embedded SMART.7z: Error - operation failed

n3ss3s

2007-11-27 12:42:05

Ben… *whisper: its SmartSetup *

Pwnaz0r you are going to continue this, right?

Because otherwise this is a Def tutorial :p

RudeBoiAlex

2007-11-27 13:48:18

Stupid errors Line 3: [Error] (35:1): Unknown identifier 'SmartMoveMouse' in script C:\Program Files\SCAR 3.12\includes\SRL/SRL/Misc/Smart.scar ive downloaded smart to my misc folder and downloaded the plugin to my plugins folder ive got the updated version of taras chickin killer the one he sent to me with the smart version

Markus

2007-11-27 14:21:19

Well obviously you didn't copy the plugin correctly. Try restarting scar and reinstalling the plugin.

Swift

2007-11-27 15:34:45

Rudeboi, you have to extract the plugin from the .7z file you downloaded. Use WinRAR

Timer

2007-12-25 16:17:01

what the fu*k???

Failed when compiling
Line 4: [Error] (54:1): Unknown identifier 'SmartMoveMouse' in script C:\Program Files\SCAR 3.13\includes\smart.scar

JuKKa

2007-12-25 16:43:34

From: Timer
what the fu*k???

U didnt copy the plugin?

Timer

2007-12-25 16:44:34

did =/

footballjds

2008-01-10 00:29:26

im still lost, help please? =l…

Killerdou

2008-01-10 01:05:10

maybe point out what is not working, thats a little bit more usefull^^

footballjds

2008-01-10 10:25:06

i didn't get anything to work, =p.

Markus

2008-01-11 11:05:42

From: footballjds
i didn't get anything to work, =p.


1. Can you copy a plugin? If not, go to 'Windows XP for beginners lesson 1'
2. Can you extract a .7z file? If not, get Winrar and do so.
3. Can you download the newest java? If not, 'Windows XP for beginners, lesson 2'
4. Can you download a file to your scar directory? If not, Win XP, lesson 1
5. If you did this all, please RUN some scar script, and POST THE EXACT ERROR PL0X.

footballjds

2008-01-11 11:49:10

im not a compleat idiot.
i get this error when i put smart in my script. when its left out it compiles no problem:
[Runtime Error] : Out Of Range in line 123 in script C:\Program Files\SCAR 3.13\includes\SRL/SRL/Core/Login.scar

Sp0rky

2008-01-11 11:52:00

@footballjds: Paste the script here. I think you're not calling smartsetup before the mainloop/login procedure or you've set the number of players wrong >_>

footballjds

2008-01-11 12:16:56

thanks
program Footballjds_ANY_LONGBOW_STRINGER;
{$Define SMART} // This is where I defined SMART. If you don't want to use SMART, take out this line.
{$IfDef SMART} // In the next 3 lines, it will only include SMART.scar if you have defined SMART.
{.include SRL/SRL/Misc/Smart.scar}
{$EndIf}
{=========================================================================]<--Credit to WT-Fakawi For this layout.
[ NAME : Any Longbow Stringer ]
[ WRITER : Footballjds ]
[ CATEGORY : Fletching ]
[ DESCRIPTION : Strings And Banks Any Longbow ]
[ USAGE : To Raise Your Fletching Level ]
[ AUTOCOLOR : Yes ]
[ CONTACT : Pm Or Footballjds2000 On AIM ]
[=========================================================================]
[ Instructions. ]
[=========================================================================]
[ 1. USE Runescape With Low Detail, Very Bright. ]
[ 2. Set your Screen To 32 bit TRUE color. ]
[ 3. Position Players In Bank ]
[ 4. Set Playernames And Passwords / SRL Id And Pass in Player Setup ]
[ 5. You Do Not Have To Drag Cross Hair Over Client! Amazing Aint It? ]
[ 6. Start Logged Out ]
[ 7. Please Post Proggies/Bugs ]
[=========================================================================}

{.include srl/srl.scar}
{.include /srl/srl/misc/MusicLocation.scar}
{.include /srl/srl/skill/Magic.scar}

var
Loads, EXPFactor, BankLBU, IvinLBU, BankBS, IvinBS, RespondedToLevel, x, y, LevelsGained, LogoutLoads : integer;
WhatBank, WhichLongbow, Your_SRL_ID, Your_SRL_Pass : string; FirstTimeAround : boolean;

procedure PlayerSetup;
begin
LampSkill := 'fletching'//If It Finds Lamp What SKill?
ReinCarnate := True; //[True / False]Use DeathWalkback?
Your_SRL_ID := ''; //Don't have this? Go to:
Your_SRL_Pass := ''; //http://www.stats.srl-forums.com/
WhichLongbow := 'Yew'; //Normal, Oak, Willow, Maple, Yew, Magic
CurrentPlayer := 0; //Int!
HowManyPlayers := 1; //Int!
WhatBank := 'veb'; //See list below!
NumberOfPlayers(HowManyPlayers);
{*******************************************************************************
Valid arguments are:
'akb' = Al Kharid /|\ 'lb' = Lumbridge /|\ 'veb' = Varrock East /|\ 'vwb' = Varrock West
'feb' = Falador East /|\ 'fwb' = Falador West /|\ 'db' = Draynor /|\ 'eb' = Edgeville Bank
*******************************************************************************}
Players[0].Name := 'Username'; //UserName
Players[0].Pass := 'Password'; //Password
Players[0].Nick := 'sern'; //Nick Name
Players[0].Active := True; //Use This Player [ True / False ]
Players[0].Integers[0] := 4; //Number Of Loads
Players[0].Strings[0] := ''; //BankPin [If Any]
Players[0].Booleans[0] := True; //Use Walkback if Lost? [True / False]
Players[0].Integers[1] := 25; //Logout Every How many loads?
Players[0].Integers[2] := 5; //Stay Logged Out for how many minutes?
Players[0].Integers[3] := 1; //How Many Extra Random minutes to stay logged out?

// Never logging out is not smart, but if you don't want to logout
// change Integers[1] to something above 99999.

////////////////////////////////////////////////////////////////////////////////
case WhichLongbow of
'Normal' : EXPFactor := 10 ;
'Oak' : EXPFactor := 25 ;
'Willow' : EXPFactor := 41 ;
'Maple' : EXPFactor := 58 ;
'Yew' : EXPFactor := 75 ;
'Magic' : EXPFactor := 91 ;
end;
end;
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
procedure Setup;
begin
if (not(LoggedIn)) Then
EXIT;
if (not(FirstTimeAround)) then
EXIT;
GameTab(4);
SetChat('Off', 2);
wait(189+random(90));
HighestAngle;
MakeCompass('N');
end;
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
procedure LevelRespond;
Var
Chats: TStringArray;
I, L: Integer;
begin
Chats := ['letching l', 'hing lv', 'hing lev'];
for I := 0 To 2 Do
begin
if InChat(Chats[i]) then
begin
RespondedToLevel := RespondedToLevel + 1;
L := GetSkillLevel('fletching');
case Random(9) of
0: TypeSend(IntToStr(L));
1: TypeSend('Me '+IntToStr(L));
2: TypeSend(IntToStr(L) + ' here');
3: TypeSend('...'+IntToStr(L));
4: TypeSend('Im ' + IntToStr(L));
5: TypeSend('only ' + IntToStr(L));
6: TypeSend('Pfft, only ' + IntToStr(L));
7: begin
TypeSend('onky ' + IntToStr(L));
TypeSend('only*');
end;
8: TypeSend('My Fletching is only ' + IntToStr(L) + ' ...lol');
end;
wait(1000 + Random(500));
Exit;
end;
end;
end;
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
function LogoutSleepLogin(SleepTimeInMin, RandSleepTimeInMin : integer): boolean;
begin
Result := False;
if (not(LoggedIn)) or (SleepTimeInMin <= 0) then
begin
Writeln('Error Occurred, Either You''re Already Logged Out Or');
Writeln('You Set TimeToSleepInMinutes To Zero Or Below.');
EXIT;
end;
if (RandSleepTimeInMin <= 0) then
begin
Writeln('WARNING RandSleepTimeInMin Shouldn''t Be Zero Or Less!');
RandSleepTimeInMin := 1;
Writeln('I Changed RandSleepTimeInMin To 1 For You.');
end;
if (Logout) then
begin
Writeln('Logged Out');
Writeln('Waiting: ' + (IntToStr(SleepTimeInMin)) + 'Minutes Plus Random: ' + (IntToStr(RandSleepTimeInMin)) + ' Minutes');
wait(60000 * SleepTimeInMin + random(RandSleepTimeInMin * 60000));
LogInPlayer;
Result := True;
end else
begin
Writeln('Error Occured While Logging Out, Script Terminated');
TerminateScript;
end;
end;
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
function HomeTeleport : boolean;
var
DoneWaited : integer;
begin
Result := False;
if (CastSpell(1)) then
begin
wait(700+random(200));
if (InBlackChat('minutes')) then
begin
Writeln('Sorry But Couldn''t Home Tele');
EXIT;
end else
begin
repeat
Wait(1000+random(500));
DoneWaited := DoneWaited + 1;
until (not(LoggedIn)) or (DoneWaited >= 14);
if (DoneWaited >= 12) and (LoggedIn) and (IsMusicLocation('Lumbridge Area')) then
Result := True;
end;
end;
end;
////////////////////////////////////////////////////////////////////////////////

{Function Origanly Made By: Jukka, it clicked in the middle of the two fountains in
lumby. Then I(Footballjds) edited it and added auto color along with some other things}
function FindLumbyCenter(ToleranceLvl : Integer; Click: Boolean): Boolean;
var
aPoint: TPoint;
TPA: TPointArray;
tmpTPA: array of TPointArray;
I, tmpLength, FountColor, FountColorTol: Integer;
begin
Result := False;
repeat
if FindColorTolerance(x, y, 10375772, MMX1, MMY1, MMX2, MMY2, FountColorTol) then
Break;
FountColorTol := FountColorTol + 1;
until (FountColorTol >= ToleranceLvl) or (Not(loggedIn));
if (Not(LoggedIn)) then
EXIT;
if (FountColorTol >= ToleranceLvl) then
begin
Writeln('Unable To Get The Fountain Color');
Writeln('The Max ToleranceLvl To Use Was Set At: ' + IntToStr(ToleranceLvl));
EXIT;
end;
FountColor := GetColor(x, y);
WriteLn('We Found The FountainColor: ' + IntToStr(FountColor));
WriteLn('With A Tolerance Lvl Of: ' + IntToStr(FountColorTol));
if (FindColorsTolerance(Tpa, FountColor, MMX1, MMy1, MMx2, MMy2, 0)) then
begin
tmpTPA := TPAtoATPA(TPA, 10);
tmpLength := getarraylength(tmpTPA);
setarraylength(Tpa, tmpLength);
for I := 0 to tmpLength - 1 do
Tpa[i] := MiddleTPA(tmpTPA[i]);
aPoint := MiddleTPA( TPA );
if( aPoint.X > 0)and( aPoint.Y > 0)then
begin
if(Click)then
begin
Mouse( aPoint.X, aPoint.Y, 5, 5, True);
Result := True;
CountFlag(0);
end else
MMouse( aPoint.X, aPoint.Y, 5, 5 );
end;
end;
end;
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
function RWalkToBank : boolean;
var
StairCaseTol, StairCaseColor : integer;
RandomMMDirection : string;
begin
Result := False;
case random(3) of
0: RandomMMDirection := 'E';
1: RandomMMDirection := 'W';
2: RandomMMDirection := 'S';
end;
MakeCompass(RandomMMDirection);
wait(random(1000));
PerfectNorth;
wait(random(1000));
HighestAngle;
if (RadialRoadWalk(FindRoadColor, 300, 257, 27, 1, 1)) then
begin
CountFlag(0);
wait(random(1000));
if (RadialRoadWalk(RoadColor, 206, 198, 35, 1, 1)) then
begin
CountFlag(0);
wait(random(1000));
if (RadialRoadWalk(RoadColor, 280, 265, 32, 1, 1)) then
begin
CountFlag(0);
wait(500 + random(1000));
repeat
if FindColorTolerance(x, y, 737374, 4, 181, 232, 335, StairCaseTol) then
Break;
StairCaseTol := StairCaseTol + 1;
until (StairCaseTol >= 12);
if (StairCaseTol >= 12) then
EXIT;
MMouse(x, y, 5, 5);
wait(200+random(200));
if (IsUpTextMultiCustom(['limb', 'up', 'b-', '-u'])) then
begin
StairCaseColor := GetColor(x, y);
Mouse(x, y, 0, 0, True);
CountFlag(0);
Wait(2000+random(1500));
if (FindObjCustom(x, y, (['limb', 'up', 'b-', '-u']), [StairCaseColor], 0)) then
begin
Mouse(x, y, 5, 2, False);
Wait(300+random(100));
if (ChooseOption('up')) then
begin
Wait(2500+random(1500));
if (RadialWalk( 195836, -10, 30, 65, 1, 1)) then
Result := True;
end;
end;
end;
end;
end;
end;
end;
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
function WalkBack : boolean;
var
Tries2 : integer;
begin
Result := False;
if (NoGameTab) then
begin
Writeln('Must have been a random, No Game Tabs Found.');
Exit;
end;
if (not(HomeTeleport)) then
EXIT;
if (not(FindLumbyCenter(25, True))) then
EXIT;
if (RWalkToBank) then
begin
repeat
LevelRespond;
OpenBankFast('lb');
Wait(1000+random(100));
Tries2 := Tries2 + 1;
until (BankScreen) Or (PinScreen) Or (Tries2 >= 10);
if (BankScreen) or (PinScreen) then
begin
Result := True;
Writeln('W00T Walk Back Worked!');
WhatBank := 'lb';
end else Writeln('WalkBack Phailed, Sorry, ;-(');
end;
end;
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
function SetUpForBank : boolean;
begin
Result := False;
if (bankScreen) then
begin
BankLBU := GetColor(149, 83);
BankBS := GetColor(92, 78);
Result := True;
end;
end;
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
function SetupForIvin : boolean;
var
Tries : integer;
begin
Result := False;
if (NoGameTab) then
Exit;
FirstTimeAround := False;
gameTab(4);
repeat
wait(100+random(50));
if ExistsItem(17) then
break;
until (Tries >= 100);
if (Tries >= 100) then
EXIT;
Tries := 0;
wait(random(500));
MMouseItem(RandomRange(1, 15));
wait(300+random(200));
if(IsUpTextMultiCustom(['owstr', 'wst', 'ow', 'stri', 'tring'])) then
begin
IvinLBU := getColor(707, 442);
IvinBS := GetColor(579, 229);
wait(100+random(40));
Result := True;
end else
begin
Writeln('unfound');
LogOut;
LogoutLoads := 0;
end;
end;
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
procedure BankError;
begin
Writeln('No Longbows Were Found In Bank.');
CloseBank;
LogOut;
Players[CurrentPlayer].Active := False;
CurrentPlayer := 0;
LogoutLoads := 0;
end;
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
{*******************************************************************************
function InvCount: Integer;
By: RsN, Edited by Footballjds to fit his purepose(in this script)
Description: Returns amount of items in your inventory
*******************************************************************************}
function InvenCount: Integer;
var
i: Integer;
begin
for i := 1 to 28 do
if (ExistsItem(i)) then
Result := Result + 1;
end;
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
function GetIvinStoof : boolean;
begin
Result := False;
Deposit(15, 28, 1);
if (InvenCount = 14) then
Result := True;
end;
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
function OpenUpBank : boolean;
Var
Tries : Integer;
begin
Result := False;
if not (LoggedIn) then
EXIT;
if (FindNormalRandoms) then SRLRandomsReport;
repeat
MakeCompass('N');
LevelRespond;
OpenBankFast(WhatBank);
Wait(1000+random(400));
Tries := Tries + 1;
until (BankScreen) Or (PinScreen) Or (Tries >= 5);
If Tries > 4 Then
begin
Writeln('Bank Not Found, Using Walkback.');
if (Players[CurrentPlayer].Booleans[0] = False) or (not(WalkBack)) then
begin
LogOut;
Players[CurrentPlayer].Active := False;
CurrentPlayer := 0;
LogoutLoads := 0;
FirstTimeAround := True;
EXIT;
end;
FirstTimeAround := True;
end;
Tries := 0;
Result := True;
if PinScreen Then
InPin(Players[CurrentPlayer].Strings[0]);
FixBank;
end;
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
function WithdrawFromBank1st : boolean;
var
Tries : integer;
begin
Result := False;
If Not LoggedIn Then
EXIT;
if not(BankScreen) then
EXIT;
DepositAll;
SetupForBank;
if (FindColorTolerance (x, y, BankBS, 92, 78, 92, 78, 5)) then
begin
MouseBox(79, 72, 103, 86, 2);
wait(223 + random(145));
if (ChooseOption('X')) then
begin
repeat
wait(20+random(30));
Tries := Tries + 1;
until (FindColorTolerance (x, y, 8388608, 251, 423, 266, 435, 15)) or (Tries >= 100)
if (Tries>99) then
BankError;
Tries := 0;
wait(random(100));
TypeSend('14');
Wait(200+random(400));
if (FindColorTolerance (x, y, BankLBU, 149, 83, 149, 83, 5)) then
begin
MouseBox(131, 67, 151, 88, 2);
wait(323 + random(245));
ChooseOption('All');
wait(300 + random(305));
if (CloseBank) then
Result := True;
wait(200+random(100));
LevelRespond;
end else BankError;
end else BankError;
end else BankError;
end;
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
function WithdrawFromBank : boolean;
var
Waited : integer;
begin
Result := False;
if (FirstTimeAround) then
begin
if (WithdrawFromBank1st) then
Result := True;
EXIT;
end;
if (not(GetIvinStoof)) or (not(BankScreen)) then
EXIT;
if (FindColorTolerance (x, y, BankLBU, 149, 83, 149, 83, 5)) then
begin
MouseBox(131, 67, 151, 88, 2);
repeat
wait(50+random(20));
inc(Waited);
until (ChooseOption('All')) or (Waited >= 50);
if (Waited >= 50) then
BankError;
Waited := 0;
wait(200+random(50));
Deposit(1, 1, 2);
wait(150+random(76));
if (FindColorTolerance (x, y, BankBS, 92, 78, 92, 78, 5)) then
begin
MouseBox(79, 72, 103, 86, 2);
repeat
wait(50+random(20));
inc(Waited);
until (ChooseOption('All')) or (Waited >= 50);
if (Waited >= 50) then
EXIT;
Waited := 0;
wait(155+random(200));
if (CloseBank) then
Result := True;
end else BankError;
end else BankError;
end;
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
procedure AntiBanRandom; forward;
procedure ProgressReport; forward;
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
function StringThem(RRange1, RRange2, RRange3, RRange4 : integer) : boolean;
var
Tries, NumberOfItem : integer;
begin
Result := False;
if (not(FirstTimeAround)) then
begin
Tries := 0;
repeat
wait(50+random(50));
inc(Tries);
until (FindColorTolerance(x, y, IvinBS, 579, 229, 579, 229, 5)) or (Tries >= 100);
if (Tries >= 100) then EXIT;
end else SetupForIvin;
GameTab(4);
NumberOfItem := RandomRange(RRange1, RRange2);
MouseItem(NumberOfItem, True);
wait(65+random(34));
if not(FindColor(x, y, IvinLBU, 707, 442, 707, 442)) then EXIT;
NumberOfItem := RandomRange(RRange3, RRange4);
MouseItem(NumberOfItem, True);
repeat
wait(50 + random(50));
Tries := Tries + 1;
until(FindColorTolerance(x, y, 128, 136, 361, 170, 381, 2)) Or (Tries >= 100)
if (Tries > 99) then
begin
Writeln('Error While Waiting For String Bows Option');
Writeln('Please Report This Error');
Logout;
Players[CurrentPlayer].Active := False;
CurrentPlayer := 0;
LogoutLoads := 0;
Exit;
end;
Tries := 0;
MouseBox(182, 393, 341, 455, 2);
wait(200+random(100));
if not(ChooseOption('ll')) then EXIT;
Result := True;
end;
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
procedure WaitWhileString;
var
RunBackX, RunBackY : integer;
begin
repeat
wait(1000 + Random(500));
AntiBanRandom;
LevelRespond;
if FindNpcChatText('vel') then
begin
inc(LevelsGained);
ClickToContinue;
wait(200+random(100));
StringThem(14, 15, 28, 29);
end;
if FindFight then
begin
RunAwayDirection(RunBackX, RunBackY, 'W');
Wait(5000+random(5000));
RunBack(RunBackX, RunBackY);
SRLRandomsReport;
wait(200+random(100));
StringThem(14, 15, 28, 29);
end;
if FindNormalRandoms then
begin
SRLRandomsReport;
wait(200+random(100));
StringThem(14, 15, 28, 29);
end;
until (not ExistsItem(28)) or (not(LoggedIn));
if (not(LoggedIn)) then EXIT;
Writeln('Compleated 1 load');
Loads := Loads + 1;
LogoutLoads := LogoutLoads + 1;
ReportVars[0] := ReportVars[0] + 14;
ReportVars[1] := ReportVars[1] + (EXPFactor * 14);
ProgressReport;
if (LogoutLoads >= (Players[CurrentPlayer].Integers[1] + Random(7))) and (not( Loads >= Players[CurrentPlayer].Integers[0] )) then
begin
FirstTimeAround := True;
LogoutLoads := 0;
LogoutSleepLogin(Players[CurrentPlayer].Integers[2], Players[CurrentPlayer].Integers[3]);
end;
end;
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
procedure AntiBanRandom;
begin
case random(500) of
1, 2, 3: Begin
KeyDown(VK_Down);
Wait(random(1000));
KeyUp(VK_Down);
end;
5, 6, 7: Begin
KeyDown(VK_Left);
Wait(random(1000));
KeyUp(VK_Left);
end;
9, 10, 11: Begin
KeyDown(VK_Right);
Wait(random(1000));
KeyUp(VK_Right);
end;
13, 14, 15: Begin
KeyDown(VK_Up);
KeyDown(VK_Left);
Wait(random(1000));
KeyUp(VK_Up);
Wait(random(800));
KeyUp(VK_Left);
end;
17, 18: Begin
HoverSkill('random', False);
end;
19, 20, 21, 22: Begin
PickUpMouse;
end;
24: Begin
AlmostLogout;
end;
26: Begin
BoredHuman;
end;
28, 29, 30, 31: Begin
HoverSkill('fletching', False);
end;
end;
end;
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
Var LRT : Integer;

procedure ProgressReport;
Begin
ClearDebug;
Writeln('==========================================');
Writeln('-§ Any Longbow Stringer By: FootBalljds §-');
Writeln('- Thanks SRL Team!!! -');
Writeln('==========================================');
Writeln('Been Making Bows For You For');
Writeln(TimeRunning);
Writeln('Gained ' + IntToStr(Loads*14*EXPFactor) + ' Exp');
Writeln('Strung ' + IntToStr(Loads*14) + ' ' + WhichLongbow + ' Longbows');
Writeln('Did ' + IntToStr(Loads) + ' Loads');
if (LevelsGained > 0) then
Writeln('Gained ' + IntToStr(LevelsGained) + ' Levels');
Writeln('Level Responded ' + IntToStr(RespondedToLevel) + ' Times');
Writeln('==========================================');
If LRT >= 315000 Then
Begin
SendSRLReport;
MarkTime(LRT);
end;
end;
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
Procedure MainLoop;
begin
if not LoggedIn then
LoginPlayer;
repeat
MouseSpeed := 16 + random(1);
if (OpenUpBank) then
begin
wait(100+random(50));
if (WithdrawFromBank) then
begin
wait(100+random(50));
if StringThem(1, 15, 15, 29) then WaitWhileString;
end;
if not LoggedIn then
LoginPlayer;
end;
until ( Loads >= Players[CurrentPlayer].Integers[0] );
If LoggedIn Then
begin
LogOut;
LogoutLoads := 0;
FirstTimeAround := True;
end;
Players[CurrentPlayer].Active := False;
CurrentPlayer := 0;
while Players[CurrentPlayer].Active = False do
begin
CurrentPlayer := CurrentPlayer + 1;
if CurrentPlayer > HowManyPlayers - 1 then
begin
Writeln('No More Active Players');
Writeln('Terminating');
TerminateScript;
end;
end;
CurrentPlayer := 0;
NextPlayer(False);
if not LoggedIn then
LoginPlayer;
Loads := 0;
end;
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
begin
{$IfDef SMART}
SmartSetup('ams3', False, false);
while not(SmartReady) do Wait(100);
SetTargetDC(SmartGetDC);
if not(LoggedIn) then
while not(SmartGetColor(386, 249) = 65535) do Wait(100);
{$EndIf}
SetupSRL;
SRLID := Your_SRL_ID;
SRLPassword := Your_SRL_Pass;
ScriptId := '537';
FirstTimeAround := True;
MarkTime(LRT);
//if FindRs then
//begin
// ActivateClient;
//end else
//Begin
// Writeln('No RS');
// TerminateScript;
//end;
Wait(500 + Random(500));
repeat
Setup;
MainLoop;
until False;
end.
////////////////////////////////////////////////////////////////////////////////

Markus

2008-01-11 15:12:00

[Runtime Error] : Out Of Range in line 123 in script C:\Program Files\SCAR 3.13\includes\SRL/SRL/Core/Login.scar

Numberofplayers(1); anyone pl0x?

edit: you got that one, but line 123 is if (not(players[0].active)) then

Killerdou

2008-01-11 15:22:22

you cant get that error, cause it only calls that part of login.scar if your current player isnt active, so scar just hates you…

footballjds

2008-01-11 15:30:48

^^?^^
I do not comprehend.:eek:

Killerdou

2008-01-11 15:52:51

-
if (not (Players[CurrentPlayer].Active)) then// <---line 123
begin
WriteLn('Current player is not Active...');
LastPlayer := CurrentPlayer;
repeat
CurrentPlayer := Random(HowManyPlayers);
Wait(100);
until (Players[CurrentPlayer].Active);
end;//<---line 131
its only called if your current player isnt active, so it really is your script that fucks up lol(i doubt smart randomly sets players inactive), you know, try reading the area where it says the error is located?

edit:
ok, think i found the error, you should have told us however, you get the error after the first load was finished?

Players[CurrentPlayer].Active := False;//<---line 736
CurrentPlayer := 0;
while Players[CurrentPlayer].Active = False do
begin
CurrentPlayer := CurrentPlayer + 1;
At the last line you can see it will use a higher currentplayer then 0, and the highest that wouldnt give an error is 0…. and i dont see how this multiplayer would work out XD

OMG THIS IS SO SAD XD, you dont call declare players right?
credits to wizzup btw(he guessed it without looking the script lol)

From: Markus
1. Can you copy a plugin? If not, go to 'Windows XP for beginners lesson 1'
2. Can you extract a .7z file? If not, get Winrar and do so.
3. Can you download the newest java? If not, 'Windows XP for beginners, lesson 2'
4. Can you download a file to your scar directory? If not, Win XP, lesson 1
5. If you did this all, please RUN some scar script, and POST THE EXACT ERROR PL0X.

completely wrong, its http://www.villavu.com/forum/showthread.php?t=6413

footballjds

2008-01-11 16:25:21

OK it works now.
and yes, when i implemented SMART i Somehow deleted my declare players. :o
it works great!:)

Markus

2008-01-11 17:02:30

@Killerdou: if someone says, nothing works, and if you ask 'post the error' they won't post anything, only thing you can do is guess.

Rambozin

2008-01-13 12:49:41

How can i solve this error?

Line 3: [Error] (3:1): Unknown identifier 'SmartMoveMouse' in script C:\Program Files\SCAR 3.13\includes\SRL\SRL\Misc\Smart.scar

Jackrawl

2008-01-20 12:27:26

From: Rambozin
How can i solve this error?


Guess.