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

SMARTerizer?


Drunkenoldma

2007-12-06 11:32:21

Hy71194 posted a thread to release scripts SMARTerized, then I came to the idea to maybe make a script to smarterize a script (paste the script in the textbox, press submit, and u get the smarterized script…), for people who don't know how to use smart, or for people who are just lazy to put the peice of code in the script…

Why I made this post? To get your oppinion in making this, if I don't have enough support posts, I just won't make it…

Greetz
Drunkenoldma

Sp0rky

2007-12-06 11:35:15

I'm all for it. Just a convienance thing…

<3 Drunkenoldma

JuKKa

2007-12-06 11:37:01

Sure, pretty good idea actually!
In what language did u think you would make it in?
But sure, go ahead!

Sp0rky

2007-12-06 11:38:03

Drunkenoldma
PHP Master / SRL Member

In what langauge will he make it… hmmm…

What possible langauge would be perfect server-side execution on some text…

Drunkenoldma

2007-12-06 11:38:39

French?

JuKKa

2007-12-06 11:47:48

dutch, finnish or english? English so everyone can understand it o_O?

Markus

2007-12-06 11:57:03

Na Dutch, as it pwns.
But why a smarterizer? It takes one line to adjust the script, by the time you fired up the program you already typed that single line -.-

Sp0rky

2007-12-06 12:01:00

Fired up the program? Would be a php page with an edit box and a submit button >_>

It's just for laziness purposes. Just have to copy+Paste and your done, instead of finding the main loop, adding the code, then going up to the top, finding include srl and including smart before that.

Markus

2007-12-06 12:11:16

Let's see
crtl-a = 2
crtl-c = 2 + 2 = 4
alt-tab = 2 + 4 = 6
crtl-t = 2 + 6 = 8
Assuming you got the page saved, another 4, plus enter which makes 13
crtl-v = 2 + 13 = 15
tab = 1 + 15 = 16
enter = 1 + 16 = 17
crtl-a = 2 + 17 = 19
crtl-c = 2 + 19 = 21
alt-tab = 21 + 2 = 23
crtl-a = 2 + 23
crtl-v = 2 + 25 = 27

ok now {.include smart.scar} is 21 characters, if we include the shifts 23.
23 < 27….

Killerdou

2007-12-06 12:15:32

you also need setup smart in it?

JuKKa

2007-12-06 12:16:29

From: Markus
Let's see
crtl-a = 2
crtl-c = 2 + 2 = 4
alt-tab = 2 + 4 = 6
crtl-t = 2 + 6 = 8
Assuming you got the page saved, another 4, plus enter which makes 13
crtl-v = 2 + 13 = 15
tab = 1 + 15 = 16
enter = 1 + 16 = 17
crtl-a = 2 + 17 = 19
crtl-c = 2 + 19 = 21
alt-tab = 21 + 2 = 23
crtl-a = 2 + 23
crtl-v = 2 + 25 = 27

ok now {.include smart.scar} is 21 characters, if we include the shifts 23.
23 < 27….


You should use a timer instead!

Sp0rky

2007-12-06 13:55:55

Rofl, markus, too far? Yes. Much too far. This was meant to save time, not have you type out all the steps one by one and count how long it will take.

Drunkenoldma

2007-12-06 14:13:26

From: Markus

tab = 1 + 15 = 16


Tab won't work as it will be a textarea, you can't tab out of that, it will just put a tab in the text instead, so you WILL need to use your mouse, okay, way too much keys, won't make, thanks Markus :)

EDIT:
You have to put
SmartSetup(..., ..., ...); while not(SmartReady) do Wait(100); SetTargetDC(SmartGetDC);
in it also, which isn't only one line…

gerauchert

2007-12-06 14:25:26

From: Drunkenoldma


EDIT:
You have to put
SmartSetup(..., ..., ...); while not(SmartReady) do Wait(100); SetTargetDC(SmartGetDC);
in it also, which isn't only one line…


not if you edited your SRL.scar correctly all i have to do is put in the include and im good to go ;)

i dont think its worth it for one line of code imo :p

Drunkenoldma

2007-12-06 14:40:13

From: gerauchert
not if you edited your SRL.scar correctly all i have to do is put in the include and im good to go ;)

i dont think its worth it for one line of code imo :p


Okay, thanks for clearing that up

Problem solved, you may close this

Markus

2007-12-06 14:55:09

From: Drunkenoldma
Tab won't work as it will be a textarea, you can't tab out of that, it will just put a tab in the text instead, so you WILL need to use your mouse, okay, way too much keys, won't make, thanks Markus :)

EDIT:
You have to put
SmartSetup(..., ..., ...); while not(SmartReady) do Wait(100); SetTargetDC(SmartGetDC);
in it also, which isn't only one line…


I modded my SRL so I only need 21 characters. Tut on it can be found here.
And tabs won't work with a textarea?? Well, I'm typing this in a textarea, and if I press a few times tab and enter, it'll post this post :cartman:

edit: argh, I'm too slow :(

Dark_Sniper

2007-12-06 16:06:10

If people can't do it themselves (takes less than like 5 seconds) then they should not use smart :p.

legendaryhero90

2007-12-06 18:21:50

From: Dark_Sniper
If people can't do it themselves (takes less than like 5 seconds) then they should not use smart :p.


yeah, what sniper said.

and one or 2 lines really isnt that hard to type in is it?

i also like it like this because people (noobie leechers*COUGH*) who got SMART wont know how to set it up.

R0b0t1

2007-12-06 20:15:37

Hey! Look! Its that drunk person!


SRL should be modded before hand. Like you've said, its a laziness thing.

gerauchert

2007-12-06 20:18:42

From: R0b0t1
Hey! Look! Its that drunk person!


*stumbles in* i Dont no wat yoo takn bout but ther b some thing tha yoo cant say me, i SwEAR to drunk im not GOD

legendaryhero90

2007-12-06 20:20:26

From: gerauchert
*stumbles in* i Dont no wat yoo takn bout but ther b some thing tha yoo cant say me, i SwEAR to drunk im not GOD


what? :spongebob:

hes talking about drunkenoldma…

gerauchert

2007-12-06 20:43:18

From: legendaryhero90
what? :spongebob:

hes talking about drunkenoldma…


ha i just caught that! i just wanted to talk drunk i think :D

Widget

2007-12-06 20:52:00

program Smarter;

// By Widget
// Just Press Run


var Open: TOpenDialog;
Path, WorldPrefix, TheFile, TheLowercaseFile: String;
HighDetail, Signed:Boolean;
i, TheScript{file}:integer;
begin
Open := TOpenDialog.Create(Open); // Yes, it can be its own parent..
Open.InitialDir := AppPath+'\Scripts';
Open.Filter := 'SCAR Files|*.scar|Text Files |*.txt';
if Open.Execute then
Path := Open.FileName
else
TerminateScript;
Writeln('Smarterizing '+Path);
Signed := GetApplication.MessageBox('Use Signed?','Widget is your God',4)=6;
HighDetail := GetApplication.MessageBox('Use High Detail?','Widget is your God',4)=6;
WorldPrefix := Readln('Enter the world prefix:');
TheScript := OpenFile(Path,False);
ReadFileString(TheScript,TheFile,FileSize(TheScript));
CloseFile(TheScript);
TheLowercaseFile := Lowercase(TheFile);
i := Pos('{.include',TheLowercaseFile);
if i>5 then
Insert('{.include srl/srl/misc/smart.scar}'+#10,TheFile,i-1);
TheLowercaseFile := Lowercase(TheFile);
i := Pos('setupsrl',TheLowercaseFile);
if i>5 then
Insert('SetUpSMART('''+WorldPrefix+''','+BoolToStr(HighDetail)+','+BoolToStr(Signed)+
')'+#10+'while not(SmartReady) do'+#10+' Sleep(100);'+#10+'SetTargetDC(SmartGetDC);',
TheFile,i-1);
Writeln('Done SMARTerizing =)');
TheScript := RewriteFile(Path,False);
WriteFileString(TheScript,TheFile);
CloseFile(TheScript);
end.

Should it get it's own topic? :p

R0b0t1

2007-12-06 21:30:21

I lost the game!

Widget

2007-12-06 21:52:21

From: R0b0t1
I lost the game!


Because that is completely relevant…

(There should be a rule that you can't lose the game on here..:))

legendaryhero90

2007-12-06 22:18:27

From: Widget
program Smarter;

// By Widget
// Just Press Run


var Open: TOpenDialog;
Path, WorldPrefix, TheFile, TheLowercaseFile: String;
HighDetail, Signed:Boolean;
i, TheScript{file}:integer;
begin
Open := TOpenDialog.Create(Open); // Yes, it can be its own parent..
Open.InitialDir := AppPath+'\Scripts';
Open.Filter := 'SCAR Files|*.scar|Text Files |*.txt';
if Open.Execute then
Path := Open.FileName
else
TerminateScript;
Writeln('Smarterizing '+Path);
Signed := GetApplication.MessageBox('Use Signed?','Widget is your God',4)=6;
HighDetail := GetApplication.MessageBox('Use High Detail?','Widget is your God',4)=6;
WorldPrefix := Readln('Enter the world prefix:');
TheScript := OpenFile(Path,False);
ReadFileString(TheScript,TheFile,FileSize(TheScript));
CloseFile(TheScript);
TheLowercaseFile := Lowercase(TheFile);
i := Pos('{.include',TheLowercaseFile);
if i>5 then
Insert('{.include srl/srl/misc/smart.scar}'+#10,TheFile,i-1);
TheLowercaseFile := Lowercase(TheFile);
i := Pos('setupsrl',TheLowercaseFile);
if i>5 then
Insert('SetUpSMART('''+WorldPrefix+''','+BoolToStr(HighDetail)+','+BoolToStr(Signed)+
')'+#10+'while not(SmartReady) do'+#10+' Sleep(100);'+#10+'SetTargetDC(SmartGetDC);',
TheFile,i-1);
Writeln('Done SMARTerizing =)');
TheScript := RewriteFile(Path,False);
WriteFileString(TheScript,TheFile);
CloseFile(TheScript);
end.

Should it get it's own topic? :p


it probably should…

though its kind of redundant to run a script to make another script run when you can just add a couple of lines and still make the regular script use SMART,

but ok…

Drunkenoldma

2007-12-07 11:09:58

Ok, it's a stupid idea, I wont make it, besides Widget made the thing already, so lazy people…

king vash

2008-03-02 23:22:43

From: Widget
Because that is completely relevant…

(There should be a rule that you can't lose the game on here..:))


darn you people, i made it a whole 10 second thinking how did he loss runescape? ohh shit!

BTW I lost