SRL Archive - SRL Archives

Music(off : boolean);


footballjds

2008-01-25 16:23:07

here you go!!!
this will turn the music on/off at the login screen :p!
function Music(off : boolean) : boolean;
var
MusicOff, MusicOn : integer;
begin
if LoggedIn then EXIT;
MusicOn := BitmapFromString(19, 3, 'beNqzt2dgYOzo6AUiIMPR3r6s' +
'rAaIgGwgioxODQmJACJ9fWMgd9bM2RAEZENE4BohCMgGmgBUD+FC9GLVCLcFy' +
'IWIwLUDEbKBQATR6AgAPe8r6g==');
MusicOff := BitmapFromString(13, 2, 'beNpLyiwrq2FgYNTXN46MT' +
'gUy2kREkBFQBIg6OnrhyrCqCQmJcLS3TwIAnB0QaA==');
if off then
begin
if FindBitmap(MusicOn, x, y) then
begin
Mouse(x, y, 8, 8, True);
wait(500 + random(1000));
Result := FindBitmap(MusicOff, x, y);
end else Result := FindBitmap(MusicOff, x, y);
end else
begin
if FindBitmap(MusicOff, x, y) then
begin
Mouse(x, y, 8, 8, True);
wait(500 + random(1000));
Result := FindBitmap(MusicOn, x, y);
end else Result := FindBitmap(MusicOn, x, y);
end;
FreeBitmap(MusicOn);
FreeBitmap(MusicOff);
end;
<–i hope you like it :)

bullzeye95

2008-01-25 16:48:40

procedure SetMusic(SetOn: Boolean);
begin
if(SetOn and (GetColor(738, 484) = 1315974)) or ((SetOn = False) and (GetColor(738, 484) = 4144961))then
Mouse(730, 469, 25, 25, True);
end;
Sorry, I just HAD to :)
GetColor is very useful when dealing with the interface.

footballjds

2008-01-25 17:32:04

you are the meanest:o ! well, bitmap still beats that :)

MylesMadness

2008-01-25 17:33:38

not really. If they both work the same why not use the shorter one?

P1nky

2008-01-25 17:41:15

sweeeeeeeett!

thanks h8 that song

footballjds

2008-01-25 21:46:27

heh, np p1nky :)

n3ss3s

2008-01-26 04:45:49

I hate the song too, not that this would be used for the legit player's comfort.

Gj, though bullzeye kinda pwnt :p

mastaraymond

2008-01-26 13:42:23

From: bullzeye95
procedure SetMusic(SetOn: Boolean);
begin
if(SetOn and (GetColor(738, 484) = 1315974)) or ((SetOn = False) and (GetColor(738, 484) = 4144961))then
Mouse(730, 469, 25, 25, True);
end;
Sorry, I just HAD to :)
GetColor is very useful when dealing with the interface.

procedure SetMusic(SetOn: Boolean);
begin
if SetOn xor (GetColor(738, 484) = 4144961) then
Mouse(730, 469, 25, 25, True);
end;

Pwned?


Still dizzy about how you got pwned?

Take this one!


procedure SetMusic(SetOn: Boolean);
begin
if (SetOn=(GetColor(738, 484) = 1315974)) then
Mouse(730, 469, 25, 25, True);
end;

Negaal

2008-01-26 13:53:05

Hah, Raymond just had to…:D:p

Haha lol'ed at this:)

Football, actually, the 1 reason why bullzeye's/mastaraymond's functions are better, is that bitmaps finding is slow, and makes lag.

n3ss3s

2008-01-26 14:23:55

Actually finding with that small bitmaps doesn't cause lagg, but Bullzeye's and Raymond's functions are still much faster…

bullzeye95

2008-01-26 16:32:20

From: mastaraymond
procedure SetMusic(SetOn: Boolean);
begin
if SetOn xor (GetColor(738, 484) = 4144961) then
Mouse(730, 469, 25, 25, True);
end;

Pwned?


Still dizzy about how you got pwned?

Take this one!


procedure SetMusic(SetOn: Boolean);
begin
if (SetOn=(GetColor(738, 484) = 1315974)) then
Mouse(730, 469, 25, 25, True);
end;


You owned me.

I thought I pwnt him enough. I would've eventually figured out the second one, but you absolutely pwnz0rd me with the first one.

Hacker.

EDIT: You don't have to xor it BTW.
procedure SetMusic(SetOn: Boolean);
begin
if SetOn <> (GetColor(738, 484) = 4144961) then
Mouse(730, 469, 25, 25, True);
end;
Just a <> would work.

n3ss3s

2008-01-26 16:36:56

Raymond, does xor tell whether or not the statements are "the same"?

I managed to figure out that False Xor False is False, True Xor True is False, False Xor True is True and True Xor False is True. Correct?

mastaraymond

2008-01-26 16:36:57

From: bullzeye95
You owned me.

I thought I pwnt him enough. I would've eventually figured out the second one, but you absolutely pwnz0rd me with the first one.

Hacker.

CSS Gives me the power :rolleyes:


From: n3ss3s
Raymond, does xor tell whether or not the statements are "the same"?

I managed to figure out that False Xor False is False, True Xor True is False, False Xor True is True and True Xor False is True. Correct?


Xor returns True when the values differ from eachother…
True xor false = true;
False Xor True = True;
False xor False = False;
True Xor True = False;

footballjds

2008-01-26 16:57:41

*crys for 10 days* well at least me doing this sparked someone to make a better one :)

still you didn't have to make em that small *Thinks about the pathetic procedure and crys again for 10 days* ha ha!