SRL Archive - Research & Development Lounge

Radar?!


Negaal

2008-02-13 16:46:57

Well, it's not connected with rs, but looks fun:D

program New;

var
x, y, midx, midy, buffer, i : integer;
angle, radius : extended;
Canvas : TCanvas;
Colors : TIntegerArray;
begin
SetArrayLength(colors, 9);

Colors[0] := 2720044;
Colors[1] := 2322469;
Colors[2] := 2056481;
Colors[3] := 1592858;
Colors[4] := 1261076;
Colors[5] := 995600;
Colors[6] := 795405;
Colors[7] := 331781;
Colors[8] := 0;

MidX := 100;
MidY := 100;
Radius := 85;
BitmapFromString(200, 200,'')
FastDrawClear(Buffer, 0);
DisplayDebugImgWindow(200, 200);
Canvas := GetDebugCanvas;
SetClientPos(True);
Canvas.Pen.Width := 2;
repeat
angle := angle + 0.5;
X := MidX + Round((radius + 1) * Cos(Radians(Angle - 90)));
Y := MidY + Round((radius + 1) * Sin(Radians(Angle - 90)));
FastSetPixel(buffer,x,y,clgreen)
SafeDrawBitmap(Buffer, GetDebugCanvas, 0, 0);
until(Angle >= 360);
repeat
for i := 0 to 8 do
begin
angle := angle + 0.05;
Canvas.Pen.Color := colors[i];
X := MidX + Round(radius * Cos(Radians(Angle - 90-(i * 5))));
Y := MidY + Round(radius * Sin(Radians(Angle - 90-(i * 5))));
canvas.moveto(midx,midy)
canvas.lineto(x,y)
end;

until IsFKeyDown(8);
wait(1000);
canvas.free;
end.

Jason2gs

2008-02-13 17:55:26

*Copies it down and gets ready to start SCAR up when he remembers that it's not installed*

くそ!

I'll have to do that…

So what does this do?

MylesMadness

2008-02-13 18:27:25

It looks like a radar. That all. Very cool, Very usless

Dan Cardin

2008-02-13 18:47:29

very cool. almost useless.

unless u make some game with radar incorporated into it. Thatd be cool :)

i like stuff like this. Just because i know i dont know how to do it :p

HayHay89

2008-02-14 00:26:37

wow cool how u learn
i was messin with the script and came up with this

program New;

var
x, y, midx, midy, buffer, i : integer;
angle, radius : extended;
Canvas : TCanvas;
Colors : TIntegerArray;
begin
SetArrayLength(colors, 9);

Colors[0] := 2720044;
Colors[1] := 2322469;
Colors[2] := 2056481;
Colors[3] := 1592858;
Colors[4] := 1261076;
Colors[5] := 995600;
Colors[6] := 795405;
Colors[7] := 331781;
Colors[8] := 0;

MidX := 100;
MidY := 100;
Radius := 85;
BitmapFromString(200, 200,'')
FastDrawClear(Buffer, 0);
DisplayDebugImgWindow(200, 200);
Canvas := GetDebugCanvas;
SetClientPos(True);
Canvas.Pen.Width := 2;
repeat
angle := angle + 0.5;
X := MidX + Round((radius + 1) * Cos(Radians(Angle - 0)));
Y := MidY + Round((radius + 1) * Sin(Radians(Angle - 0)));
FastSetPixel(buffer,x,y,clgreen)
SafeDrawBitmap(Buffer, GetDebugCanvas, 0, 0);
until(Angle >= 360);
repeat
for i := 0 to 8 do
begin
angle := angle + 0.05;
Canvas.Pen.Color := colors;
X := MidX + Round(radius * Cos(Radians(Angle - 1-(i * 5))));
Y := MidY + Round(radius * Sin(Radians(Angle - 8000-(i * 5))));
canvas.moveto(midx,midy)
canvas.lineto(x,y)
end;

until IsFKeyDown(8);
wait(1000);
canvas.free;
end.

Bonfield

2008-02-14 01:37:14

good job, how did u learn to do that?

Dumpin

2008-02-14 01:45:01

lol nice… now make it work with the rs minimap and if it sees a yellow dot it will appear on it xD

mixster

2008-02-14 02:42:25

Very nice little random thing, but I want a red radar ;)
Anyway, it's going to be very useful when I get round to learning to abuse the debug image - I could make stick men in a whole new way!

mastaraymond

2008-02-14 13:42:57

Funny :D

osmm

2008-02-14 20:01:11

VERY fun to mess around and play with :D. Nice job. That'd be awesome if it was like a runescape mod detectore (haha yea right).

Negaal

2008-02-15 00:56:56

I made game with this, please look into "other scripts" for "the radar"

ShowerThoughts

2008-02-15 01:36:56

hey good thing man looks cool ;)

Da 0wner

2008-02-15 01:50:38

someone said they wanted a red radar. well here ya go =]

edit: it was mixster :P
From: mixster05
Very nice little random thing, but I want a red radar ;)
Anyway, it's going to be very useful when I get round to learning to abuse the debug image - I could make stick men in a whole new way!



program New;

var
x, y, midx, midy, buffer, i : integer;
angle, radius : extended;
Canvas : TCanvas;
Colors : TIntegerArray;
begin
SetArrayLength(colors, 9);

Colors[0] := 4937456;
Colors[1] := 4937456;
Colors[2] := 4937456;
Colors[3] := 4937456;
Colors[4] := 4937456;
Colors[5] := 4937456;
Colors[6] := 4937456;
Colors[7] := clRed;
Colors[8] := 0;

MidX := 100;
MidY := 100;
Radius := 85;
BitmapFromString(200, 200,'')
FastDrawClear(Buffer, 0);
DisplayDebugImgWindow(200, 200);
Canvas := GetDebugCanvas;
SetClientPos(True);
Canvas.Pen.Width := 2;
repeat
angle := angle + 0.5;
X := MidX + Round((radius + 1) * Cos(Radians(Angle - 90)));
Y := MidY + Round((radius + 1) * Sin(Radians(Angle - 90)));
FastSetPixel(buffer,x,y,clred)
SafeDrawBitmap(Buffer, GetDebugCanvas, 0, 0);
until(Angle >= 360);
repeat
for i := 0 to 8 do
begin
angle := angle + 0.05;
Canvas.Pen.Color := colors[i];
X := MidX + Round(radius * Cos(Radians(Angle - 90-(i * 5))));
Y := MidY + Round(radius * Sin(Radians(Angle - 90-(i * 5))));
canvas.moveto(midx,midy)
canvas.lineto(x,y)
end;

until IsFKeyDown(8);
wait(1000);
canvas.free;
end.

autoerforlife

2008-02-15 02:18:12

Haha it looks cool but indeed its useless for me :p but nice job !

mixster

2008-02-15 02:51:15

From: Da 0wner
someone said they wanted a red radar. well here ya go =]


I was joking :p. Ahwell, thanks anyway :) . The next radar I want is a gaydar (handheld version is best).

Negaal

2008-02-15 06:43:36

From: mixster05
I was joking :p. Ahwell, thanks anyway :) . The next radar I want is a gaydar (handheld version is best).


g*yradar?
No idea how to make that:confused:

actually…hmmm…

Make the script to show *cute pictures*, and if runner doesn't watch to the end, then it means hes not intrested about girls, and hes g*y.

I know, i'm genius
Edit: it was joke, im not genius…im very stupid…

Da 0wner

2008-02-16 15:48:24

Hey Mixster, how do I get that notepad thing you have by your name? That avatar or whatever?

MylesMadness

2008-02-16 16:55:02

It means he's a useful poster.

Edit:Just messing around with it I got this:
program New;
var
x, y, midx, midy, buffer, i : integer;
angle, radius : extended;
Canvas : TCanvas;
Colors : TIntegerArray;
begin
SetArrayLength(colors, 9);

Colors[0] := 2720044;
Colors[1] := 2322469;
Colors[2] := 2056481;
Colors[3] := 1592858;
Colors[4] := 1261076;
Colors[5] := 995600;
Colors[6] := 795405;
Colors[7] := 331781;
Colors[8] := 0;

MidX := 75;
MidY := 75;
Radius := 85;
BitmapFromString(150, 150,'')
FastDrawClear(Buffer, 0);
DisplayDebugImgWindow(150, 150);
Canvas := GetDebugCanvas;
Canvas.Pen.Width := 2;
repeat
for i := 0 to 8 do
begin
angle := angle + 0.50;
Canvas.Pen.Color := colors[i];
X := MidX + Round(radius * Cos(Radians(Angle - 90-(i * 5))));
Y := MidY + Round(radius * Sin(Radians(Angle - 90-(i * 5))));
canvas.lineto(x+Random(20),y+Random(20))
end;
until IsFKeyDown(8);
wait(1000)
canvas.free;
end.