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

What Is The Simplest Way To Add Smart To A Non-smart Script?


shrubie1

2008-03-02 01:39:41

hey i got some scripts that i wanna make SMART but im not sure how to. can anyone help me out on how to add SMART?:confused:

ZephyrsFury

2008-03-02 01:54:09

How about searching? How about looking in the section that you just posted in? :rolleyes:

Harry

2008-03-02 22:08:29

@katana: Do not use language like that around here…

PriSoner

2008-03-03 09:36:19

Step 1:
{.include SRL\SRL\Misc\Smart.scar} // <<--- Add this line
{.include SRL\SRL.scar} // <<--- Before This line

Step 2:
Add this procedure.
procedure SetupSMART;
begin
SmartSetupEX(2, false, false); // <<-- Change 2 for the world you want to use.
SetTargetDC(SmartGetDC);
end;

Step 3:
begin
SetupSMART; // <<--- Add this here
SetupSRL; // <<--- just before this here


Easy Peazy lemon squeazy… Job Done.. :D

Matt6233

2008-03-03 18:14:30

From: PriSoner
Step 1:
{.include SRL\SRL\Misc\Smart.scar} // <<--- Add this line
{.include SRL\SRL.scar} // <<--- Before This line

Step 2:
Add this procedure.
procedure SetupSMART;
begin
SmartSetupEX(2, false, SignedClient); // <<-- Change 2 for the world you want to use.
SetTargetDC(SmartGetDC);
end;

Step 3:
begin
SetupSMART; // <<--- Add this here
SetupSRL; // <<--- just before this here


Easy Peazy lemon squeazy… Job Done.. :D


Where I do I put each of these codes?

SRL.SCAR?
SMART.SCAR?

PriSoner

2008-03-03 18:33:54

SRL.SCAR is already be in the script. you place the SMART.SCAR line just before it as detailed in the above example.

Given the question I would possibly suggest that you may be better off learning some of the basics first.

Matt6233

2008-03-03 21:20:49

Yeah I know where step 1 goes but what about step 2 and 3

PriSoner

2008-03-03 21:43:14

Every Script should have SetupSRL; in it.. As it shown in Step 3 SetupSMART; should go on the line before that.

The whole of the procedure in step 2 should go before the word begin which is just before SetupSRL; in most scripts.

don't try to skip steps.. read a few tutorials..

stampede10343

2008-03-04 06:51:30

how about you just go here: http://www.villavu.com/forum/showthread.php?t=21279 Markus has a good tut on it if you cant figure it out then learn more scripting, anyways it copy and paste as long as you can read

loopster

2008-03-08 18:49:31

Read

L3ss Than 33

2008-03-09 16:44:55

From: PriSoner
Step 1:
{.include SRL\SRL\Misc\Smart.scar} // <<--- Add this line
{.include SRL\SRL.scar} // <<--- Before This line

Step 2:
Add this procedure.
procedure SetupSMART;
begin
SmartSetupEX(2, false, SignedClient); // <<-- Change 2 for the world you want to use.
SetTargetDC(SmartGetDC);
end;

Step 3:
begin
SetupSMART; // <<--- Add this here
SetupSRL; // <<--- just before this here


Easy Peazy lemon squeazy… Job Done.. :D



Good guide, but
For step 2, I think this line:
SmartSetupEX(2, false, SignedClient);
should be:
SmartSetupEX(2, false, false);

It won't recognize SignedClient for me, but I think "true" is signed and "false" is unsigned. It compiles & runs this way for me.

infested999

2008-03-09 17:12:33

Nice l3ss than 33. Even better than Markus's tutorial lol.

mixster

2008-03-09 18:13:47

Actually prisoner posted it, l3ss than 33 just quoted it. Also, I think prisoner left it as signedClient because he has a const at the beginning of his scripts (and forgot to mention) or he wants you to add it yourself to what you want.
Also, Markus's tutorial is easier if you have a lot of scripts you want to use SMART for or you don't want to have to add it every time.

PriSoner

2008-03-09 18:19:25

From: L3ss Than 33
Good guide, but
For step 2, I think this line:
SmartSetupEX(2, false, SignedClient);
should be:
SmartSetupEX(2, false, false);

It won't recognize SignedClient for me, but I think "true" is signed and "false" is unsigned. It compiles & runs this way for me.


Whoops yes.. My mistake.. as mixster05 correctly points out I have it defined as a constant at the begining of my script so that users can set it themselves. :duh:

I've gone back and edited it so that I don't look like a numpty to future readers and they don't get caught by the same mistake..

Also please make sure you set it to false if your running multiple players..

Dracody

2008-03-09 18:37:33

From: shrubie1
hey i got some scripts that i wanna make SMART but im not sure how to. can anyone help me out on how to add SMART?:confused:


Use the search button instead of making people answer this to waste time…thanks a lot PriSoner as always you are so helpfull :p , and Shrubie…search!:google: :google:

shrubie1

2008-05-28 23:36:31

wtf is with all the insults at the start? jesus christ i thought srl was nice.

but i learned how and now im scripting so bleh.

TViYH

2008-05-29 15:00:02

I use this:

program New;
{.include SRL\SRL\Misc\Smart.scar}
{.include SRL\SRL.scar}

begin
SetupSRL;
SmartSetupEx(133, False, True);
while not SmartReady do Wait(100);
SmartSetTarget;