Okay so the mouse will for whatever reason not click on the chat region of the client.(Runique)
Simba Code:
procedure Mouse(T:TPoint;fuckyou:string)overload;
begin
moveMouse(T);
wait(100);
clickMouse(T.X, T.Y, 1);
end;
function teleportTo(place:TLOCATION):boolean;
begin
wait(50);
mouse(Point(504, 512), '');
wait(500);
case place of
SWBANK : sendKeys('MS', 100, 100);
DUNGEON: sendKeys('DB', 100, 100);
end;
end;
I have no idea why it refuses to click inside that red square, all it does it move the mouse there and type 'MS' (I am aware it does not press enter yet I want to resolve this clicking issue first..)
If anyone would like to test it yourself, here is the code you don't need to download anything other than the RSPS (runique)
Simba Code:
{$I srl-6/srl.simba}
const
USERNAME = '';
CLIENTNAME = 'Runique';
CLIENTWIDTH = 765;
CLIENTHEIGHT = 525;
type
TLOCATION = (SWBANK, NEWSPOT, DUNGEON, LOST);
var
rsClient:TSysProc;
procedure Mouse(T:TPoint;fuckyou:string)overload;
begin
moveMouse(T);
wait(100);
clickMouse(T.X, T.Y, 1);
end;
function findBank():boolean;
begin
end;
function teleportTo(place:TLOCATION):boolean;
begin
wait(50);
mouse(Point(504, 512), '');
wait(500);
case place of
SWBANK : sendKeys('MS', 100, 100);
DUNGEON: sendKeys('DB', 100, 100);
end;
end;
function string.contains(s:string):boolean;
var
i:integer;
begin
for i := 1 to length(self) do
if (Pos(s[i], self) > 0) then
exit(true);
end;
function activateRsClient(firstTime:boolean):boolean;
var
processes: TSysProcArr;
i: integer;
begin
result := false;
processes := GetProcesses();
if (firstTime) then
writeln('Scanning for ' , CLIENTNAME , 'Client..');
for i := 0 to high(processes) do
if (processes[i].title.contains(CLIENTNAME)) and (processes[i].width = CLIENTWIDTH) and (processes[i].height = CLIENTHEIGHT) then
begin
if (firstTime) then
begin
writeln('Found client');
writeln('Target set to: ' , toStr(processes[i]));
end;
rsClient := processes[i];
setTarget(processes[i]);
ActivateClient();
exit(true);
end;
end;
function getClientName():string;
begin
activateRsClient(false);
result := rsClient.title;
end;
function isLoggedIn():boolean; override;
begin
if (USERNAME = '') then
begin
writeln('Please enter a username at the top of the script');
terminateScript();
end else
result := getClientName().contains(USERNAME);
end;
begin
activateRsClient(true);
Mouse(Point(334, 216), ''); // clicks the main screen...
teleportTo(SWBANK); // does not click the chat region..
end.