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

[UPDATED] How to add S.M.A.R.T. to any script!


Coh3n

2009-07-22 08:39:50

How to add S.M.A.R.T. to any script!


Now that SMART is built into SRL it is very simple to add to scripts. It is your choice on how simple you want to make it. There is only one thing you need to do to make SMART work properly, but I'm going to add another two optional things that can be handy for both you, and the person using your script.

1: All you need to do is add this line to the top of you script:


{$DEFINE SMART}

Make sure you put this line before SRL, otherwise it won't work. The top of your script should now look like this:


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

Now, by only doing this step, your script will load a random F2P signed world in safe mode.

There, simple as that, now you know how to add SMART to any script! Yay! :)

2: This and the next option are completely optional, it's just something I, as well as a lot of other people, find handy. With these few lines you can choose whether you want to load high or low detail and whether you want to use a signed or unsigned client. These four lines will do the trick:


Smart_Server := 10;
Smart_Members := False;
Smart_Signed := True; // Signed client?
Smart_SuperDetail := False; // SMART high detail?
SetupSRL;
As of right now, Smart_Server and Smart_Members don't do anything, since the world (and members) are chosen when you log your player in. If you're getting an error loading SMART, you may need to change Smart_Server to another number.

Make sure you call those lines before SetupSRL, like I did above, otherwise it won't work.

There, now you can choose all the different SMART details right in your script. :)

3: This is mainly for your own, and the people who uses your script's convenience. You can setup constants at the top of your script so the user doesn't have to scroll all the way down to change the settings. You can do something like this:


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

const
SMART_SIGNED = true;
SMART_HIGHDETAIL = false;

//The rest of your script goes here.

begin
Smart_Server := 10;
Smart_Members := false;
Smart_Signed := SMART_SIGNED;
Smart_SuperDetail := SMART_HIGHDETAIL;
SetupSRL;
end.

There, now you know everything I know about setting up SMART to run on any script. If you have any questions, don't hesitate to ask, and I, or someone else will get back to you as soon as possible. Also, suggestions and criticism is always appreciated.

Yush Dragon

2009-08-11 00:08:21

i need a personal teacher on msn.

if someone wants to help me, please add [email]kennyschellings@hotmail.com[/email]
(on msn:p)

ThankYou

Coh3n

2009-08-11 03:43:51

From: Yush Dragon
i need a personal teacher on msn.

if someone wants to help me, please add [email]kennyschellings@hotmail.com[/email]
(on msn:p)

ThankYou


Yeah I can help you out if someone hasn't already. I added you. :)

If there was a part of the guide that you didn't understand please tell me so I can make it understandable for future readers.

Yush Dragon

2009-08-11 16:35:43

Thank You:)

Coh3n

2009-08-11 19:42:07

From: Yush Dragon
Thank You:)


No problem, glad I'll be able to help you out. :)

burnin

2009-08-12 00:21:42

thank you :)

Darkcorn

2009-08-12 06:04:16

thx dude u helped a lot =)

Coh3n

2009-08-12 07:29:09

No problem to both of you, glad I could help you guys out. :)

Nava2

2009-08-12 07:32:45

Typo if -> of in second or third paragraph.

It's nice, gave me an idea for a better system.

It's third.

Coh3n

2009-08-12 09:16:33

From: Nava2
Typo if -> of in second or third paragraph.

It's nice, gave me an idea for a better system.

It's third.


Haha thanks. :D

And what kind of system? :rolleyes:

Nava2

2009-08-13 07:41:11

I'll have to be un- lazy if I'm going to make that.


Mehhhhhhh.

Coh3n

2009-08-13 08:37:48

From: Nava2
I'll have to be un- lazy if I'm going to make that.


Mehhhhhhh.


Haha well I can try and help you out with it if I get time. :p It's not like I have a job or anything right now. Lol.

chriz001

2009-08-15 09:50:55

thanks for this guide, very helpful!

tico2

2009-08-17 09:14:17

Thanks for the quide but why won't it enter the right world?

Coh3n

2009-08-17 17:23:29

From: tico2
Thanks for the quide but why won't it enter the right world?


I honestly have no idea. :confused: It seems to work fine for me. But it does load F2P/P2P properly, right?

tico2

2009-08-17 17:36:09

From: Coh3n
I honestly have no idea. :confused: It seems to work fine for me. But it does load F2P/P2P properly, right?


Well it loads a random world. I don't know if it loads a random members world or the system logs you in a members automaticly if you have credit. :)

Coh3n

2009-08-17 17:37:25

From: tico2
Well it loads a random world. I don't know if it loads a random members world or the system logs you in a members automaticly if you have credit. :)


Lol, well that's odd. I'm sorry I couldn't answer your question, but I honestly don't have a clue why it would do that. :confused:

tico2

2009-08-17 17:50:50

From: Coh3n
Lol, well that's odd. I'm sorry I couldn't answer your question, but I honestly don't have a clue why it would do that. :confused:


Thanks anyway :p

Here are some more details:

I order it to fo to world: 160
It say this: Loaded: Server 116, Members: True, Signed: True,
It goes to world: 54

XD

Coh3n

2009-08-17 17:51:58

From: tico2
Thanks anyway :P

Here are some more details:

I order it to fo to world: 160
It say this: Loaded: Server 116, Members: True, Signed: True,
It goes to world: 54

XD


Fail. :duh:

In that case, that's just a problem with SMART in SRL. :p

Nava2

2009-08-17 17:56:34

You cannot load worlds anymore. That's why SRL changed WorldSwitcher.scar to Core. Just toss in a SelectWorld if you want to load that world.

tico2

2009-08-17 17:57:26

From: Coh3n
Fail. :duh:

In that case, that's just a problem with SMART in SRL. :p


Do you mean my SMART file? Well i don't think that would be the problem :p, I defenetly have the right file, but if this is only failing for me there has to be something I have done wrong. I'll check it later.

Edit: Ok lol, thanks Nava2 and Coh3n

Coh3n

2009-08-17 17:59:01

From: tico2
Do you mean my SMART file? Well i don't think that would be the problem :p, I defenetly have the right file, but if this is only failing for me there has to be something I have done wrong. I'll check it later.

Edit: Ok lol, thanks Nava2 and Coh3n


No, you most likely did nothing wrong. And, no problem. :p

XRaye

2009-08-17 19:29:32

I thought you had to put {$DEFINE SRL_SMART} before the SMART include?
And if you want to add it to your tutorial:
Will only select specified world when signed is false.
When signed is true, or false with world 0, it will auto select the world.
Make sure member is correct no matter what.

Coh3n

2009-08-26 04:19:01

From: XRaye
I thought you had to put {$DEFINE SRL_SMART} before the SMART include?
And if you want to add it to your tutorial:
Will only select specified world when signed is false.
When signed is true, or false with world 0, it will auto select the world.
Make sure member is correct no matter what.


You don't HAVE to put {$DEFINE SMART} before the SMART include. To be quite honest, I don't know exactly what the {$DEFINE} commands do.

And I don't really know what you mean by the rest of the stuff you said.

CorbLimey

2009-09-03 15:58:27

Hi Coh3n,

I am working through your scripting tuorial at the moment - great work and quite easy to understand for a noobie like me thanks.

The question I have is - is it simply a matter of including SMART as per your tutorial here in order to have a script use it rather than SCAR? and if so, would you recommend writing scripts for SMART from the outset or to move to SMART after being happy with SCAR?

Best regards

Coh3n

2009-09-03 17:09:00

From: CorbLimey
Hi Coh3n,

I am working through your scripting tuorial at the moment - great work and quite easy to understand for a noobie like me thanks.

The question I have is - is it simply a matter of including SMART as per your tutorial here in order to have a script use it rather than SCAR? and if so, would you recommend writing scripts for SMART from the outset or to move to SMART after being happy with SCAR?

Best regards


Hey that's great to hear, I'm glad it's easy to understand. If you see any spelling/grammar mistakes, or something is unclear, don't be afraid to post on that thread so I can edit it to make it easier for you. :)

And for your question - Your script will always use SCAR, so don't get SCAR and SMART confused. When you add SMART to your script, SCAR will use it as the client, making it so you don't have to drag the crosshairs. However, following yesterdays RuneScape game engine update, I am pretty sure SMART is broken, so you should stay away from it for now.

Also, it's up to you whether you use SMART from the beginning of writing your script, or simply add it in the end. When you add SMART, you don't have to change your procedures/functions in any way so using/not using SMART won't effect the way your script runs.

I would suggest not using SMART while writing/testing small parts of your script, simply because sometimes it can be laggy, and when you're stopping and running your script multiple times in a few minutes, it can be a pain.

I hope that answers you question, if you have anymore, don't be afraid to ask. :)

Coh3n

Nava2

2009-09-03 17:55:50

You may want to but a header in about SMART being broken at this point. :)

Coh3n

2009-09-18 06:47:21

From: Nava2
You may want to but a header in about SMART being broken at this point. :)


Yeah. :p

I updated my "How to setup…SCAR", but not this one. Thanks for reminding me. :)

moody

2009-10-08 10:51:26

yo cohen id really appreaciate if u would help me aswell cause im totally lost with this whole smart scar thing nothing is working for me and ive read and watched every tutorial my msn is [email]moodyfac99@hotmail.com[/email]

Coh3n

2009-10-08 15:08:27

From: moody
yo cohen id really appreaciate if u would help me aswell cause im totally lost with this whole smart scar thing nothing is working for me and ive read and watched every tutorial my msn is [email]moodyfac99@hotmail.com[/email]

I'll add you, but I doubt I'll have any time to help you out. Post your specific problems, that way other people will be able to help you out also.

moody

2009-10-09 21:02:02

thanks for helping me :) cohens really helpfull. for those who didnt know. i got confused with the declare players and color picking. even though i looked at every tutorial and guide, there all outdated but thanks cohen :)

Coh3n

2009-10-10 00:08:18

From: moody
thanks for helping me :) cohens really helpfull. for those who didnt know. i got confused with the declare players and color picking. even though i looked at every tutorial and guide, there all outdated but thanks cohen :)

That's what I'm here for. ;)

uncfan1119

2009-10-10 14:07:03

Following this guide I get an error:duh:

Line 96: [Error] (167:197): Invalid number of parameters in script C:\Documents and Settings\User\Desktop\scarprerelease\includes\SRL\SRL\misc\SMART.SCAR
  SmartSetup('http://'+prefix+'.runescape.com/', 'plugin.js?param=o0,a' + IntToStr((Integer(not(Signed)) + 1) * Integer(not((SuperDetail and Signed)))) + ',m' + IntToStr(Integer(Members)), 765, 503);


:confused::confused:

Coh3n

2009-10-11 10:19:24

Hmm, make sure you have the latest version of SRL.

uncfan1119

2009-10-11 11:42:26

I assure you my srl is setup correctly. I've even tried setting the S.M.A.R.T. to unsigned.

Coh3n

2009-10-11 12:58:30

From: uncfan1119
I assure you my srl is setup correctly. I've even tried setting the S.M.A.R.T. to unsigned.

Okay, well then I'm guessing something is wrong with SMART at this time. You aren't the only one that's come to me with this problem. You may just have to be patient until SRL gets updated, or just don't use SMART for now. Sorry I can't be of more help. :(

TomTuff

2009-10-11 14:40:08

nice guide. heres a typo i found:

first line:
is very simple too add SMART

too should be to

edit:

From: uncfan1119
Following this guide I get an error:duh:

Line 96: [Error] (167:197): Invalid number of parameters in script C:\Documents and Settings\User\Desktop\scarprerelease\includes\SRL\SRL\misc\SMART.SCAR
Code:
[LEFT]SmartSetup('http://'+prefix+'.runescape.com/', 'plugin.js?param=o0,a' + IntToStr((Integer(not(Signed)) + 1) * Integer(not((SuperDetail and Signed)))) + ',m' + IntToStr(Integer(Members)), 765, 503);
[/LEFT]



:confused::confused:


i had the same problem. My solution: I was using the embedded_smart.dll that came with reflection. I put the one from SRL in instead, and ref still works, and it doesn't give me this error.

also, if all of that sounds like gibberish…. move your plugins

Coh3n

2009-10-11 15:11:26

Thanks Tom! I'm going to trust you that that solution works, I'll add it to the first page. :)

uncfan1119

2009-10-12 16:39:15

Your fix works :D

Although it gets stuck at the "connecting to update" screen, nothing we can do.

Coh3n

2009-10-13 20:21:18

From: uncfan1119
Your fix works :D

Although it gets stuck at the "connecting to update" screen, nothing we can do.


Thanks for the confirmation! :smarty:

nickrules

2009-10-17 08:57:46

i feel extremely noob right now. smart STILL doesn't work.
im using the SRL plugin, not the ref version. and the first lines on the master loop are:
begin
Smart_Server := 5;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
Includes
  {.include SRL\SRL\misc\smart.SCAR}
{.include SRL\SRL.scar}


When i run this, SMART doesn't pop up, and the mouse moves around the screen as if i didn't even include smart or anything:confused::confused: help?

Coh3n

2009-10-17 11:26:47

@nick:

That looks right, but that has happened to me before. I just restarted SCAR, and it worked.

nickrules

2009-10-17 13:05:50

From: Coh3n
@nick:

That looks right, but that has happened to me before. I just restarted SCAR, and it worked.


ehh… this has been going on for a week. SMART wont work for me on 3.20 or 3.21.

And yes, in the course of a week, i have closed and opened scar many times

Coh3n

2009-10-17 14:02:02

From: nickrules
ehh… this has been going on for a week. SMART wont work for me on 3.20 or 3.21.

And yes, in the course of a week, i have closed and opened scar many times

That's really weird. It works fine for me. Have you tried reinstalling SCAR?

nickrules

2009-10-18 08:54:09

From: Coh3n
That's really weird. It works fine for me. Have you tried reinstalling SCAR?


Well, yes and no. i have used both portable 3.20 and portable 3.21, and then a day or two ago, i got non portable 3.21, however when it installed, there were no DLL files, so i just copied portable 3.21's, because fixscar didn't do anything.

Once i got scar 3.21 (non portable) running, i downloaded SRL using the built in feature (i HATE SVN then), i coppied the plugins just in case.

Then I Used the Reflection downloader and got reflection. i copppied the plugins over, but then learned about the bug that the reflection smart has, so i downloaded the regular smart, and the error went away. But smart still wont pop up. :mad:

Now, im going to copy all the reg plugins over to the plugins folder, remove the reflection ones, and get back to you on what happened.
EDIT: nope, still doesn't work. I'm gonna try truly reinstalling….

Coh3n

2009-10-18 16:01:33

From: nickrules
Well, yes and no. i have used both portable 3.20 and portable 3.21, and then a day or two ago, i got non portable 3.21, however when it installed, there were no DLL files, so i just copied portable 3.21's, because fixscar didn't do anything.

Once i got scar 3.21 (non portable) running, i downloaded SRL using the built in feature (i HATE SVN then), i coppied the plugins just in case.

Then I Used the Reflection downloader and got reflection. i copppied the plugins over, but then learned about the bug that the reflection smart has, so i downloaded the regular smart, and the error went away. But smart still wont pop up. :mad:

Now, im going to copy all the reg plugins over to the plugins folder, remove the reflection ones, and get back to you on what happened.
EDIT: nope, still doesn't work. I'm gonna try truly reinstalling….


Yeah, reinstalled seems to fix a lot of people's problems for some reason.

nickrules

2009-10-19 07:49:42

it worked- after two tries, but now im stuck with scar on my desktop :duh:. oh well, lol.
Thanks for the help rep+

Coh3n

2009-10-20 17:47:32

From: nickrules
it worked- after two tries, but now im stuck with scar on my desktop :duh:. oh well, lol.
Thanks for the help rep+

No problem, and you can simply click and drag to whatever folder you wish if you don't want it on you desktop.

m4r1us

2009-10-30 10:06:36

thanks. added to mine first script :)

Coh3n

2009-11-12 16:45:24

From: m4r1us
thanks. added to mine first script :)

Awesome, I'm glad it worked for you! :smile:

iden1050

2009-12-11 05:02:05

thanks, this is really useful! I'm trying to make a basic script using smart :D

Coh3n

2010-03-21 21:26:03

From: iden1050
thanks, this is really useful! I'm trying to make a basic script using smart :D

No problem at all, I'm glad people still use this. :)

Yush Dragon

2010-07-21 12:01:41

corblimey add me on msn maybe i can help you out :)

[email]kennyschellings@hotmail.com[/email]

alucard123

2010-12-14 22:46:21

thx again coh3n lot of ur post are useful

wantonman

2011-04-16 21:13:21

i entered this

program New;
{.include SRL\SRL\misc\SMART.SCAR}
{.include SRL\SRL.scar}



got this


compiling error line 5 SMART.SCAR unknown identifier 'smartIskeydown'


i am running scar 3.25 alpha

KingKong

2011-04-16 23:16:02

dont wory about scar, run it in simba, i had the same problem too, and in the future scar isn't going to be supported, so might as well switch now

Coh3n

2011-04-17 20:52:44

Yeah sorry, I'm not sure how to make SMART with with Scar.

sm0k3

2011-04-18 16:37:27

If you need any help with SMARTchat then i can help .. :)
Just PM me ..

Coh3n

2012-01-29 02:00:38

Updated this tutorial. :)