SRL Archive - SRL Archives

Change login music and updated loggedin


danrox2004

2007-03-06 09:40:10

The login screen has changed, there is now an option of enabling or disabling sound:
Function LoginMusicOn:Boolean;
begin
Result:=(GetColor(748,477)=65536)
end;

Function ChangeLoginMusic(yes :Boolean):Boolean;
begin
if(not LoginMusicOn=yes) then
begin
Mouse(744, 480, 10, 10, True);
ChangeLoginMusic(yes);
end
end;

Killerdou

2007-03-06 10:01:53

thanks:), i wanted to do this lol

WT-Fakawi

2007-03-06 10:05:12

Nope, LoggedIn hasnt changed. Keep it as it is.


function LoggedIn: Boolean;
begin
Result := (GetColor(422, 480) = 16777215);
end;

Dark_Sniper

2007-03-06 11:09:31

lawl i got bored and made on :p

Function LoginMusic( S : String) : Boolean;
Begin
If LowerCase(S) = 'off' Then Begin
if (GetColor(745, 480) = 1315974) Then Begin
Result:= False;
Exit;
End;
Mouse(730, 466, 25, 25, True)
Result:= False;
End;
If LowerCase(S) = 'on' Then Begin
if not (GetColor(745, 480) = 1315974) Then Begin
Result:= True;
Exit;
End;
Mouse(730, 466, 25, 25, True)
Result:= True;
End;
End;


soooo much bigger :p

WT-Fakawi

2007-03-06 11:11:09

Result = Always False, no need to set it. In Delphi every non set variable is evaluated to nill, 0, False.

Dark_Sniper

2007-03-06 11:19:21

I know that :p

I just want to make sure the code it self knows that it is false XD

but i guesse to make it shorter :p

Function LoginMusic( S : String ) : Boolean;
Begin
If LowerCase(S) = 'off' Then Begin
If (GetColor(745, 480) = 1315974) Then Begin
Exit;
End;
Mouse(730, 466, 25, 25, True)
End;
If LowerCase(S) = 'on' Then Begin
If Not (GetColor(745, 480) = 1315974) Then Begin
Result:= True;
Exit;
End;
Mouse(730, 466, 25, 25, True)
Result:= True;
End;
End;

TOB

2007-03-06 15:05:54

Dark, here you are. :)

function LoginMusic(OnOff: Boolean): Boolean;
begin
if(not(OnOff)) then
begin
if(GetColor(745, 480) = 1315974) then
Exit;
Mouse(730, 466, 25, 25, True)
end
else
begin
Result:= not(GetColor(745, 480) = 1315974);
if(Result = True) then
Exit;
Mouse(730, 466, 25, 25, True)
Result:= True;
end;
end;

danrox2004

2007-03-06 17:59:37

From: WT-Fakawi
Nope, LoggedIn hasnt changed. Keep it as it is.


function LoggedIn: Boolean;
begin
Result := (GetColor(422, 480) = 16777215);
end;


Really? Im sure last night when i tested it it kept on saying it was logged in =S Oh well i will check again tonight…

Edit: Oops it LoggedIn not LoggedOut