SRL Archive - Other Scripts

Screen Fun ( Pls Look )


XxKanexX

2006-03-19 08:42:59

This is a remake of my old "ScreenSaver" script. Uses TCanvas to create a text on a Debug Image Window and scroll it across the Image Wndow.

The position can be random. The text aswell as the debugs style, speeds, etc, can be changed.

Please atleast take 1 look, it took me a while to get this working. (Making it simple to understand).

Thanx, Kane.

Sdcit

2006-03-19 11:03:20

Omgawd, and you dont have time to make stuff for RS? :p

Great script kane!

papetowe

2006-03-20 01:30:29

Lol, good job.

-1 for greenday ;)

maxzzz

2006-03-23 10:19:50

Wow cool, I think you should make some scaperune scripts. I mean make them public :p

Xerxes

2006-03-24 16:09:37

Even yourself knows that no one cares about your scripts and you have to beg them to look at them, don't worry mate. One day you will be like me, cool, smart and handsome ;).

Xerxes

2006-03-24 16:11:01

Even you know yourself that no one cares nor looks at your scripts and that you have to beg them to look. It's ok mate, one day you will be like me, smart, cool and handsome.

Xerxes

2006-03-24 18:27:30

It's good that you know no one cares or looks at your scripts, that's why you have to beg them to look at them. It's ok mate, some day..you will be like me..cool, smart and handsome..

Xerxes

2006-03-27 09:48:23

The funny part is that even you know that no one looks at your rubbish scripts and you have to beg them to look "PLS LOOK PLS PLS". Don't worry mate, don't worry..some day you will be like me..cool , smart and handsome.

XxKanexX

2006-03-28 21:40:08

Don't worry, i hope to never be like you. A freak with no friends, and ugly as spikes on the chucky dolls.

I don't care if nobody looks, Atleast i do script and don't wander the forums being a nobody trying to get people to notice me.

'Mind spamming my thread aswell? 4 posts ey.

How would you know what a rubbish script is? Go make one better then.

Pwnd

2006-03-28 21:46:41

Try my edit:

Const

{ ------------------------------------ }

W = 140; //Width - The bigger the slower.
H = 140; //Height - The bigger the slower.

Text = 'GrEeN DaY SuCkS'; //Text.
Textmcolor = 'green'; //Text color.
Size = 10; //Text size.
Delay = 1; //Waits per frame.

Bold = true; //Bold text.
Italic = false; //Italic text.
Strikeout = false; //Strikeout text.
Underline = true; //Underline text.

Backgcolor = 'black'; //Background color.

RandomPos = true; //Random positions.

Statusf = true; //Display status. (Frames)..

{ ------------------------------------ }

var
ksW, ksH: integer;
c: tcanvas;

function correctcolor(back: boolean): integer;
var
s: string;
begin
if(back)then
s:= lowercase(backgcolor)
else
s:= lowercase(textmcolor);
result:= -1;
case copy(lowercase(s), 1, 3) of
'red': result:= clred;
'blu': result:= clblue;
'pur': result:= clpurple;
'bla': result:= clblack;
'whi': result:= clwhite;
'yel': result:= clyellow;
'gre': result:= clgreen;
end;
if(result = -1)then
result:= clblack;
end;

procedure SetCanvasDimensions(var a, b: integer; w, h: integer);
begin
a:= w;
b:= h;
end;

procedure SetCanvasDebug;
begin
Displaydebugimgwindow(ksW, ksH);
c:= getdebugcanvas;
end;

procedure maketext(x, y: integer; text: string);
begin
c.textout(x, y, text);
end;

procedure setbrushcolor(scolor: integer);
begin
c.brush.color:= scolor;
end;

procedure backcolor(scolor: integer);
begin
setbrushcolor(scolor);
c.rectangle(-1, -1, ksW + 1, ksH + 1);
end;

procedure textcolor(scolor: integer);
begin
c.font.color:= scolor;
end;

procedure setstyle(s: tfontstyles);
begin
c.font.style:= s;
end;

procedure setsize(size: integer);
begin
c.font.size := size;
end;

procedure canvastofront;
begin
if(findwindow('Debug Image'))then
activateclient;
end;

procedure setcertain(var rset: string; b: boolean; s, es: string);
begin
if(b)then
rset:= rset+s
else
rset:= rset+es;
end;

function correctstyle: string;
begin
setcertain(result, bold, '1', '0');
setcertain(result, italic, '1', '0');
setcertain(result, strikeout, '1', '0');
setcertain(result, underline, '1', '0');
end;

function find(s, f: string): integer;
var
i: integer;
begin
for i:= 1 to length(s) do
if(copy(s, i, 1)=f)then
result:= result+1;
end;

function posnumb(s, f: string): integer;
var
i: integer;
begin
if(find(s, f)>1)then
exit;
for i:= 1 to length(s) do
if(copy(s, i, 1)=f)then
begin
result:= i;
exit;
end;
end;

procedure setupcanvas;
var
style: string;
i: integer;
begin
ClearDebug;
i:= min(w, h);
SetCanvasDimensions(ksW, ksH, i, i);
SetCanvasDebug;
if(size < 1)then
setsize(1)
else
setsize(size);
textcolor(correctcolor(false));
style:= correctstyle;
c.font.name:= 'verdana';
setstyle([]);
if(find(style, '1')=1)then
begin
case posnumb(style, '1') of
1: setstyle([fsbold]);
2: setstyle([fsitalic]);
3: setstyle([fsstrikeout]);
4: setstyle([fsunderline]);
end;
end else
begin
case style of
'1100': setstyle([fsbold, fsitalic]);
'1110': setstyle([fsbold, fsitalic, fsstrikeout]);
'1111': setstyle([fsbold, fsitalic, fsstrikeout, fsunderline]);
'0011': setstyle([fsstrikeout, fsunderline]);
'0111': setstyle([fsitalic, fsstrikeout, fsunderline]);
{}
'1010': setstyle([fsbold, fsstrikeout]);
'0101': setstyle([fsitalic, fsunderline]);
{}
'1001': setstyle([fsbold, fsunderline]);
'0110': setstyle([fsitalic, fsstrikeout]);
{}
'1011': setstyle([fsbold, fsstrikeout, fsunderline]);
'1101': setstyle([fsbold, fsitalic, fsunderline]);
end;
end;
CanvasToFront;
end;

var
pos: tpointarray;
Csize, countframes, frame, ending: integer;
begin
SetupCanvas;
Setarraylength(pos, 1);
ending:= -10 * (length(text) + (size-(size/2)))
repeat
frame:= 0;
pos[0].x:= ksW;
if(randompos)then
pos[0].y:= ksH-(random(ksH-(size*4))+(ksW/4))
else
pos[0].y:= ksW/2-(size)+(size/4);
repeat
ClearDebug;
if(statusf)then
begin
if(countframes > 0)then
begin
writeln('Total frames: '+inttostr(countframes));
writeln(' ');
writeln('Ending in: '+inttostr(countframes-frame)+' frames');
end;
writeln('Playing frame: '+inttostr(frame));
end;
BackColor(correctcolor(true));
MakeText(pos[0].x, pos[0].y, text);
pos[0].x:= pos[0].x - 1;
if(delay < 0)then
wait(1)
else
wait(delay);
frame:= frame+1;
until(pos[0].x <= ending) or
(ismousebuttondown(false));
if(countframes < 1)then
begin
CanvasToFront;
countframes:= frame;
end;
until(ismousebuttondown(false));
Hidedebugimgwindow;
end.

Just play it.. don't even worry about editting anything.

XxKanexX

2006-03-29 05:54:59

From: Pwnd
Try my edit:

Const

{ ------------------------------------ }

W = 140; //Width - The bigger the slower.
H = 140; //Height - The bigger the slower.

Text = 'GrEeN DaY SuCkS'; //Text.
Textmcolor = 'green'; //Text color.
Size = 10; //Text size.
Delay = 1; //Waits per frame.

Bold = true; //Bold text.
Italic = false; //Italic text.
Strikeout = false; //Strikeout text.
Underline = true; //Underline text.

Backgcolor = 'black'; //Background color.

RandomPos = true; //Random positions.

Statusf = true; //Display status. (Frames)..

{ ------------------------------------ }

var
ksW, ksH: integer;
c: tcanvas;

function correctcolor(back: boolean): integer;
var
s: string;
begin
if(back)then
s:= lowercase(backgcolor)
else
s:= lowercase(textmcolor);
result:= -1;
case copy(lowercase(s), 1, 3) of
'red': result:= clred;
'blu': result:= clblue;
'pur': result:= clpurple;
'bla': result:= clblack;
'whi': result:= clwhite;
'yel': result:= clyellow;
'gre': result:= clgreen;
end;
if(result = -1)then
result:= clblack;
end;

procedure SetCanvasDimensions(var a, b: integer; w, h: integer);
begin
a:= w;
b:= h;
end;

procedure SetCanvasDebug;
begin
Displaydebugimgwindow(ksW, ksH);
c:= getdebugcanvas;
end;

procedure maketext(x, y: integer; text: string);
begin
c.textout(x, y, text);
end;

procedure setbrushcolor(scolor: integer);
begin
c.brush.color:= scolor;
end;

procedure backcolor(scolor: integer);
begin
setbrushcolor(scolor);
c.rectangle(-1, -1, ksW + 1, ksH + 1);
end;

procedure textcolor(scolor: integer);
begin
c.font.color:= scolor;
end;

procedure setstyle(s: tfontstyles);
begin
c.font.style:= s;
end;

procedure setsize(size: integer);
begin
c.font.size := size;
end;

procedure canvastofront;
begin
if(findwindow('Debug Image'))then
activateclient;
end;

procedure setcertain(var rset: string; b: boolean; s, es: string);
begin
if(b)then
rset:= rset+s
else
rset:= rset+es;
end;

function correctstyle: string;
begin
setcertain(result, bold, '1', '0');
setcertain(result, italic, '1', '0');
setcertain(result, strikeout, '1', '0');
setcertain(result, underline, '1', '0');
end;

function find(s, f: string): integer;
var
i: integer;
begin
for i:= 1 to length(s) do
if(copy(s, i, 1)=f)then
result:= result+1;
end;

function posnumb(s, f: string): integer;
var
i: integer;
begin
if(find(s, f)>1)then
exit;
for i:= 1 to length(s) do
if(copy(s, i, 1)=f)then
begin
result:= i;
exit;
end;
end;

procedure setupcanvas;
var
style: string;
i: integer;
begin
ClearDebug;
i:= min(w, h);
SetCanvasDimensions(ksW, ksH, i, i);
SetCanvasDebug;
if(size < 1)then
setsize(1)
else
setsize(size);
textcolor(correctcolor(false));
style:= correctstyle;
c.font.name:= 'verdana';
setstyle([]);
if(find(style, '1')=1)then
begin
case posnumb(style, '1') of
1: setstyle([fsbold]);
2: setstyle([fsitalic]);
3: setstyle([fsstrikeout]);
4: setstyle([fsunderline]);
end;
end else
begin
case style of
'1100': setstyle([fsbold, fsitalic]);
'1110': setstyle([fsbold, fsitalic, fsstrikeout]);
'1111': setstyle([fsbold, fsitalic, fsstrikeout, fsunderline]);
'0011': setstyle([fsstrikeout, fsunderline]);
'0111': setstyle([fsitalic, fsstrikeout, fsunderline]);
{}
'1010': setstyle([fsbold, fsstrikeout]);
'0101': setstyle([fsitalic, fsunderline]);
{}
'1001': setstyle([fsbold, fsunderline]);
'0110': setstyle([fsitalic, fsstrikeout]);
{}
'1011': setstyle([fsbold, fsstrikeout, fsunderline]);
'1101': setstyle([fsbold, fsitalic, fsunderline]);
end;
end;
CanvasToFront;
end;

var
pos: tpointarray;
Csize, countframes, frame, ending: integer;
begin
SetupCanvas;
Setarraylength(pos, 1);
ending:= -10 * (length(text) + (size-(size/2)))
repeat
frame:= 0;
pos[0].x:= ksW;
if(randompos)then
pos[0].y:= ksH-(random(ksH-(size*4))+(ksW/4))
else
pos[0].y:= ksW/2-(size)+(size/4);
repeat
ClearDebug;
if(statusf)then
begin
if(countframes > 0)then
begin
writeln('Total frames: '+inttostr(countframes));
writeln(' ');
writeln('Ending in: '+inttostr(countframes-frame)+' frames');
end;
writeln('Playing frame: '+inttostr(frame));
end;
BackColor(correctcolor(true));
MakeText(pos[0].x, pos[0].y, text);
pos[0].x:= pos[0].x - 1;
if(delay < 0)then
wait(1)
else
wait(delay);
frame:= frame+1;
until(pos[0].x <= ending) or
(ismousebuttondown(false));
if(countframes < 1)then
begin
CanvasToFront;
countframes:= frame;
end;
until(ismousebuttondown(false));
Hidedebugimgwindow;
end.

Just play it.. don't even worry about editting anything.

You're so talented. :p

Pwnd

2006-03-29 07:25:46

From: XxKanexX
You're so talented. :p

I know, right? That took exactly 15 hours and 2 minutes to code, even though I posted it in less time, I believe.

XxKanexX

2006-03-29 07:54:06

From: Pwnd
I know, right? That took exactly 15 hours and 2 minutes to code, even though I posted it in less time, I believe.

Time machine. :)

Xerxes

2006-03-29 09:54:41

From: XxKanexX
Don't worry, i hope to never be like you. A freak with no friends, and ugly as spikes on the chucky dolls.

I don't care if nobody looks, Atleast i do script and don't wander the forums being a nobody trying to get people to notice me.

'Mind spamming my thread aswell? 4 posts ey.

How would you know what a rubbish script is? Go make one better then.


Well, It's funny how you know I have no friends, but you know wrong anyway.

And I have never posted a pic of myself so how do I know I am ugly?

JUST NO! If you want to TRY (but you will fail) to kick my ass, atleast do it right and don't say stuff like 5 years old kids says.

You are jealous that I am cool and youre not.

I have made alot of leet scripts and the 4 posts are because of moderationg posts shit.

XxKanexX

2006-03-29 09:58:32

From: Xerxes
Well, It's funny how you know I have no friends, but you know wrong anyway.

And I have never posted a pic of myself so how do I know I am ugly?

JUST NO! If you want to TRY (but you will fail) to kick my ass, atleast do it right and don't say stuff like 5 years old kids says.

You are jealous that I am cool and youre not.

I have made alot of leet scripts and the 4 posts are because of moderationg posts shit.

I have seen one script of yours. It got the birthdays on Kaitnieks. And it didn't even work.

5 year olds arn't that intelligent either. Although they could still own you. :) Again, where have i mentioned or implied i'm jelous? You keep mentioning it?

I'm not trying to kick your ass. I'm simply replying to your idiotic posts. :) k?

Xerxes

2006-03-29 10:16:18

From: XxKanexX
I have seen one script of yours. It got the birthdays on Kaitnieks. And it didn't even work.

5 year olds arn't that intelligent either. Although they could still own you. :) Again, where have i mentioned or implied i'm jelous? You keep mentioning it?

I'm not trying to kick your ass. I'm simply replying to your idiotic posts. :) k?


I have done more scripts but youre stupid. You never own me. Everything works, but youre stupid.

I am smarte than you. And you never implied youre jelous but you are jealous.

I kick your ass.

XxKanexX

2006-03-29 10:25:51

From: Xerxes
I have done more scripts but youre stupid. You never own me. Everything works, but youre stupid.

I am smarte than you. And you never implied youre jelous but you are jealous.

I kick your ass.

If i'm not implying i'm jelous, or showing any signs of it, then how can i be jelous?

You're not powerful enough to play God. ;)

Xerxes

2006-03-29 11:23:44

From: XxKanexX
If i'm not implying i'm jelous, or showing any signs of it, then how can i be jelous?

You're not powerful enough to play God. ;)


Powerful enough to be someone at kaitnieks when you were nothing.

XxKanexX

2006-03-29 23:14:35

From: Xerxes
Powerful enough to be someone at kaitnieks when you were nothing.

Talking to you is like talking to a brick wall. You bring up the same points and never shutup either.

I'm leaving this here, and ignoring you in every post. :)

cause

2006-03-30 14:32:19

wow this is a real tossup for whether xerxes or kane gets teh best basher icon… i dunno exerxes has got some nice comeback, all though kanes are definatly a close 20th…oops sry, close 2nd. :p

Flyboy

2006-03-30 14:46:10

From: XxKanexX
This is a remake of my old "ScreenSaver" script. Uses TCanvas to create a text on a Debug Image Window and scroll it across the Image Wndow.

The position can be random. The text aswell as the debugs style, speeds, etc, can be changed.

Please atleast take 1 look, it took me a while to get this working. (Making it simple to understand).

Thanx, Kane.


Nice job. It bogs down my computer… but what dosn't :p

Is this your own original? or did you get idea from web/other source? either way great idea

XxKanexX

2006-03-30 20:00:42

From: Flyboy
Nice job. It bogs down my computer… but what dosn't :p

Is this your own original? or did you get idea from web/other source? either way great idea

When i was absolutely bored, (Nothing new), my screen saver came on, and i'd just learnt about TCanvas.

So i thought i'd give it a shot. The first couple of times, timing wasn't to good. But after a while, it was perfect. :)

Now, this ones alot better and everything fits in fine.

It would probably go slow on slow computers to ;) Hense the speed constance.

Mutant Squirrle

2006-03-30 20:17:52

haha looks good kane

rofl im fairly sure kane pwned him in the 3rd? round i guess you could call it AND was that english? you type worse then i do :D (you stupid stupid)

XxKanexX

2006-03-30 20:21:55

From: Mutant Squirrle
you type worse then i do :D (you stupid stupid)

Who are you talking to, rofl ?

BenLand100

2006-03-30 20:41:37

I don't care who wins or looses but one of you give it up. I'm tired of stupidity. :mad:

AND, nice. Now all that you need to do is make the older words fade out (like a shadow trail ;)). That might be hard unless you have control over the alpha chanel though :p (the 24-32 bits in a RGBA color)

XxKanexX

2006-03-30 21:10:07

From: BenLand100
I don't care who wins or looses but one of you give it up. I'm tired of stupidity. :mad:

AND, nice. Now all that you need to do is make the older words fade out (like a shadow trail ;)). That might be hard unless you have control over the alpha chanel though :p (the 24-32 bits in a RGBA color)

I stopped ages ago. And i don't care who wins or looses, i wasn't even playing for anything. ;)

If he continues, it just goes to show how much of an attention seeker he really is.

And a shadow trail? Oh good lord. I'm not God of scripting like you, Ben. :p

BenLand100

2006-03-31 00:09:20

From: XxKanexX
And a shadow trail? Oh good lord. I'm not God of scripting like you, Ben. :p

If you know how the bit shifts work and how a RGB value is formed it should be no problem… might be slow though :p

XxKanexX

2006-03-31 00:38:44

From: BenLand100
If you know how the bit shifts work and how a RGB value is formed it should be no problem… might be slow though :p

I havn't really learnt about the color functions in scar yet. All i need to know is that. Then just make a copy minus (5?) from the position with that color, and so forth but going darker ;)

BenLand100

2006-03-31 10:49:07

From: XxKanexX
I havn't really learnt about the color functions in scar yet. All i need to know is that. Then just make a copy minus (5?) from the position with that color, and so forth but going darker ;)
Since it appears there is no alpha chanel to work with… This is how you extract the chanels from a RBG value ;) Since you will have to work with individual colors to make it darker
R:= (RGB and $FF0000) shr 16
G:= (RGB and $FF00) shr 8
B:= RGB and $FF
and to put them back into a color:
RGB:= (R shl 16) or (G shl 8) or B
Some people might not know how or works and may do this:
RGB:= (R shl 16) + (G shl 8) + B
The first one is faster though ;)
BUT if you had an alpha chanel you could do somthing like this to each pixel's color to make it darker:
PixelColor:= ((PixelColor and $FF000000) div 2) or (PixelColor and $FFFFFF)

XxKanexX

2006-03-31 18:36:50

Thanx Ben ;) <3

JiveTonto@Gmail.com

2006-04-01 18:26:16

looks kool =]