SRL Archive - SRL Archives

ChatButton


The_Shermanator

2008-10-01 22:04:59

Well this clicks the button of your choice in the Bottom Left part of the RS screen. Very simple but better than than donating nothing :D

Numbers are as Follows…


Procedure ChatButton(ChatNumber: Integer; LeftClick: Boolean);
var
muL: Integer;

begin
if ((ChatNumber < 0) or (ChatNumber > 6)) then
begin
srl_Warn('ChatButton', IntToStr(ChatNumber) + ' is a invalid ChatButton', warn_AllVersions);
Exit;
end;
muL := 56 * ChatNumber;
Case LeftClick of
True: MouseBox(5 + muL, 482, 58 + muL, 500, 1);
False:
begin
MouseBox(5 + muL, 482, 58 + muL, 500, 2);
Wait(100+random(300));
ChooseOption('View');
end;
end;
muL := 0;
end;

Used Like..
ChatButton(1, True);
OR
ChatButton(1, False);

Nava2

2008-10-02 23:51:17

These functions are already in SRL. Thanks for contributing though.

Clean code!

Use InRange though instead of the < > thing! :)