SRL Archive - Research & Development Lounge

SetChat Fixes


Tim0suprem0

2007-08-10 11:57:35

Here it is, wouldn't compile with Chooseoption, so I used exact coords and added Clan Chat. Hopefully isn't too detectable, but I doubt chat will give you away.
procedure SetChat(State: String; WhatChat: Integer);
Var
x1, y1, x2, y2, x, y, Color: Integer;

Begin
State := LowerCase(State);
Case WhatChat Of
1:
Begin
x1 := 164;
y1 := 490;
End;

2:
Begin
x1 := 230;
y1 := 490;
End;

3:
Begin
x1 := 295;
y1 := 490;
End;

4:
Begin
x1 := 362;
y1 := 490;
End;
End;

Case State Of
'on':
Begin
if WhatChat = 1 then
begin
x2 := 146;
y2 := 434;
end else
begin
x2 := x1-19;
y2 := y1-42;
end;
Color := 65280;
End;

'friends':
Begin
if WhatChat = 1 then
begin
x2 := 144;
y2 := 449;
end else
begin
x2 := x1-12;
y2 := y1-25;
end;
Color := 65535;
End;

'off':
Begin
if WhatChat = 1 then
Begin
x2:= 145;
y2:= 462;
end else
begin
x2 := x1-12;
y2 := y1-12;
end;
Color := 255;
End;
'hide':
Begin
x2:= 152;
y2:= 478;
If WhatChat = 1 Then Color := 16776960
Else Begin WriteLn('HIDE IMPOSSIBLE, EXIT'); Exit; End;
End;
End;
Begin
If Not (GetColor(427, 486) = 16777215) Then Exit;
If Not FindColor(x, y, Color, x1, y1, x1 + 40, y1 + 20) Then
Begin
Mouse(x1 , y1 , 2, 2, False);
Mouse(x2+random(10),y2+random(3),2,2,true);
end;
end;
End;

Enjoy! Tell me if it doesn't work please.