SRL Archive - Other Scripts

Annoying...


A G E N T

2008-12-03 20:18:43

This is probably a case study in why i shouldn't have internet access when I get bored.
Just make sure you enable API calls in SCAR. Laugh in triumph as your hapless victim switches off his speakers only to find that the sound is coming from inside the computer!

program Beep;

//Enable Script > Allow API Calls for this to work

//Range of freq is 37 (strange clicking/whirring noise) to 32767 (inaudible, only hear clicking of speaker)
//the most annoying one is about 14000 - 15000
//time setting is self-explanatory

function Beep(freq, dur : LongInt):boolean; external 'Beep@Kernel32.dll stdcall';
var
i : integer;
Begin
GetSelf.hide;
repeat
//confusion mode
writeln(booltostr(Beep(RandomRange(37, 32767), RandomRange(500, 750))));
//annoyance mode (use with care ;] )
//writeln(booltostr(Beep(14500, 2000)));
i := i + 1;
until(i = 5);
GetSelf.Show;
End.

noidea

2008-12-03 20:27:18

Lol! This is pretty Cool. What exactly are API calls though?

A G E N T

2008-12-03 20:31:07

The Windows API is basically the set of functions that are available to programs in Windows, and they are stored in/called from all the DLLs in WINDOWS/system32.
So an API call is basically just using a premade function from Windows.

Runescapian321

2008-12-03 21:25:19

Gah, is there any way to stop it after it starts? I 'accidentally' set the duration for like 99999999 now it won't stop :(

Pretty cool though :)

EDIT: Oh, you can just execute another one :)

Crap, nevermind -_-

EDIT: Ah, you can just close SCAR :)