SRL Archive - Outdated Tutorials

[#34/35] Smart/SRL


ZephyrsFury

2009-06-19 06:49:48

With the release of Rev #35 SMART is now fully integrated into SRL. This means the amount of work you must put in to make a script SMART-enabled is now minimised.

SmartSetupEx, SetTargetDC, etc have been added to SetupSRL and smart will be loaded if SMART.scar is included.

From Rev #35 onwards all that you need to do to enable smart is include it:
Just add this to the top of your script:

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

You not longer need to add SmartSetupEx or anything like that.

SetupSRL will load a random free world on a signed, standard detailed client by default.

You may however change this default by setting a few variables:

var
Smart_Server: Integer;
Smart_Members, Smart_Signed, Smart_SuperDetail: Boolean;

If these variables are set before you call SetupSRL those settings will be used instead of the default. Simplicity and flexibility….

There shouldn't be any major problems with compatibility but scripters are advised to update to this new system.

Thanks,
SRL Development Team.

noidea

2009-06-19 07:13:22

Cool. I'm glad you guys took to this :)

mormonman

2009-06-19 07:17:20

i like it…<3 devs!

TomTuff

2009-06-19 08:10:36

so uh to add this to a script, i take out the SmartSetupEx line and the SmartGetDC line and add
Smart_Server: Integer;
Smart_Members, Smart_Signed, Smart_SuperDetail: Boolean;
to the variables? then what?

E: nmd i got it, i added
  Smart_Server:= (SmartWorld);
Smart_Members:= (Members);
Smart_Signed:= (SignedC);
Smart_SuperDetail:= false;
before setupsrl

and put
  SmartWorld= 69;  //Smart World?
Members= True; //members world or no
SignedC= False; //use signed client?
in the const

ZephyrsFury

2009-06-19 08:47:10

From: tomtuff
so uh to add this to a script, i take out the SmartSetupEx line and the SmartGetDC line and add
Smart_Server: Integer;
Smart_Members, Smart_Signed, Smart_SuperDetail: Boolean;
to the variables? then what?

E: nmd i got it, i added
  Smart_Server:= (SmartWorld);
Smart_Members:= (Members);
Smart_Signed:= (SignedC);
Smart_SuperDetail:= false;
before setupsrl

and put
  SmartWorld= 69;  //Smart World?
Members= True; //members world or no
SignedC= False; //use signed client?
in the const


Yep thats correct. You may also leave it as default if you like by not setting those variables.

mormonman

2009-06-19 08:54:42

From: ZephyrsFury
Yep thats correct. You may also leave it as default if you like by not setting those variables.


except you occasionally get those stupid frenchie/german servers… its really annoying.(no offence hobbit)

Nose Smasher

2009-06-19 11:23:42

You not long need to add SmartSetupEx or anything like that.

"Not long need to" ~ No Longer Need to? :p

I like it, but I like loading it before SetUpSRL… :p

Markus

2009-06-19 11:53:32

Finally, lol. I've done this for over 18 months now manually xD (editting it into SRL)

The Little

2009-06-19 18:50:19

Hey,

I was just testing out this new release but ran into a problem. This is the code I'm using to test:

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

begin
ClearDebug;
SetupSRL;
end.

The problem is, Smart won't load. Also, Smart_Server/Members/Signed is not found. Smart loads fine when I manually add SetupSmartEx(…);.

I'm sure I'm doing something wrong, but I just can't figure it out.

PS: I've been around for a little while but my previous user name wasn't a clever idea…

EDIT: I'm sure I'm on rev #35, I just "updated" again.

ZephyrsFury

2009-06-19 18:56:20

From: The Little
Hey,

I was just testing out this new release but ran into a problem. This is the code I'm using to test:

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

begin
ClearDebug;
SetupSRL;
end.

The problem is, Smart won't load. Also, Smart_Server/Members/Signed is not found. Smart loads fine when I manually add SetupSmartEx(…);.

I'm sure I'm doing something wrong, but I just can't figure it out.

PS: I've been around for a little while but my previous user name wasn't a clever idea…

EDIT: I'm sure I'm on rev #35, I just "updated" again.


Mind checking something for me:

Run this:

program New;
{.include SRL/SRL.scar}

begin
Writeln(IntToStr(SRLVersionNumber));
end.

and tell me what it debugs. Thanks.

Runescapian321

2009-06-19 18:58:35

Is it just me or is this error:

Failed when compiling
Line 121: [Error] (18648:1): Unknown identifier 'SmartInitServer' in script C:\Program Files\SCAR 3.15\includes\srl/srl.scar


Existent in the latest Dev revision? :(

ZephyrsFury

2009-06-19 19:01:07

From: Runescapian
Is it just me or is this error:



Existent in the latest Dev revision? :(


You shouldn't be getting that if you've updated to the newest SRL.scar. Make sure you're updating the whole SRL folder and not just a subfolder.

Runescapian321

2009-06-19 19:05:38

I reinstalled SRL from scratch and now I'm getting this

Failed when compiling
Line 429: [Error] (11213:72): Unknown type 'TBooleanArray' in script C:\Program Files\SCAR 3.15\includes\SRL/SRL/Core/WorldSwitcher.scar


Do I need Scar 3.20? :\

The Little

2009-06-19 19:06:02

32
Successfully executed

SRL version = 32?

funny, I just updated srl, this appeared in my debug box:

SRL v4 #35 has been downloaded and installed.

Do I need to update using subversion?

ShowerThoughts

2009-06-19 19:06:25

SRLRandomReport should be fixed too.

ZephyrsFury

2009-06-19 19:09:48

From: Runescapian
I reinstalled SRL from scratch and now I'm getting this



Do I need Scar 3.20? :\


Yeah. It doesn't compile with 3.15b.

From: The Little
32
Successfully executed

SRL version = 32?

funny, I just updated srl, this appeared in my debug box:

SRL v4 #35 has been downloaded and installed.

Do I need to update using subversion?


Yeah I'm afraid theres some sort of problem with SCAR's SRL updater. I suggest you use TortoiseSVN to update your SRL. More info: http://www.villavu.com/wiki/index.php/Installing_and_Setting_up_SRL#Using_Subversion_with_Tortoise_SvN

The Little

2009-06-19 19:14:07

:(, Thanks alot for the quick responses :)

Gilbert

2009-06-20 04:41:29

So I guess I'm not the only one who gets the French/German servers also? Can something be done to remove this?

Daniel

2009-06-20 06:45:01

From: Runescapian
I reinstalled SRL from scratch and now I'm getting this



Do I need Scar 3.20? :\


TBooleanArray is in the WizzyPlugin. Are you sure you have that updated?

Runescapian321

2009-06-20 11:01:11

[QUOTE=Dan's The Man;588677]TBooleanArray is in the WizzyPlugin. Are you sure you have that updated?[/QUOTE]

Oh, probably not :p Oh well, after a fresh install everything is fine.

Claymore

2009-06-20 19:56:07

sexy! now i can do this

smart_server := someFormCrap;

hehe.

spicynachos2

2009-06-24 00:49:37

I just got this error using that…

Duplicate identifier 'RANDOMWORLD' in script C:\Program Files\SCAR 3.20\includes\SRL/SRL/Misc/SMART.scar

IDK how to fix…:duh:


fixed: i had smart included twice lols!