marc2333
2012-12-17 00:22:26
I made a script to check if i was in the second page of a trade (the confirmation page) and then, if it is, take a screenshot and save it in a folder on my desktop. However, SMART never has to take control of my mouse.
The problem is that i WANT to be able to play when running this script and if i click disable SMART to use my mouse, SMART will not send the bot the live screen to the bot. It sends the script the screen of when I disabled SMART so my script keep seeing the same this and wont work.
So my question is : Is there a way i CAN use SMART and be able to use my mouse.
Here is my script :
The problem is that i WANT to be able to play when running this script and if i click disable SMART to use my mouse, SMART will not send the bot the live screen to the bot. It sends the script the screen of when I disabled SMART so my script keep seeing the same this and wont work.
So my question is : Is there a way i CAN use SMART and be able to use my mouse.
Here is my script :
program TradeChecker;
{$Define Smart}
{$i srl/srl.simba}
procedure DeclarePlayers;
Begin
HowManyPlayers := 1; //SETUP!!!!!
NumberOfPlayers(HowManyPlayers); //FILL IN EVERYTHING MARKED WITH FRACTIONS
CurrentPlayer := 0;
Players[0].Name := ' '; //Username Here! 1/4
Players[0].Pass := ' '; //Password Here! 2/4
Players[0].Nick := ' '; //3 Lowercase Letters From Your Characters Name Here! 3/4
Players[0].Active := True;
Players[0].Pin := ' '; //Bank Pin here! (Or leave Blank if You ain't got'un) 4/4
Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
End;
function CheckSecondTradePage: boolean;
var
X,Y,M,N:integer;
begin
if FindColor(X, Y, 192, 264, 300, 323, 321)then // Red color on second trade page
begin
if FindColor(M, N, 49152, 201, 300, 245, 321)then // Green color on second trade page
begin
result:= true;
end else
result:= false;
end;
end;
Procedure ScreenAndSave(const FilePath : String);
var
fileName : String;
Year, Month, Day : Word;
i : Integer;
begin
if (CheckSecondTradePage=true) then
begin
Writeln('This is second page of trade');
Takescreen('Trading');
DecodeDate(Date,Year,Month,Day);
i := 0;
repeat
i := i+1;
FileName := ToStr(Year) + '-' + ToStr(Month) + '-' + ToStr(Day) + ' (' + IntToStr(i) + ').jpg';
until not FileExists(FilePath + FileName)
SaveScreenShot(FilePath + FileName);
wait(5000);
end;
end;
Begin
ClearDebug;
SetupSRL;
Declareplayers;
LoginPlayertoLob();
SelectWorld(1);
LoginPlayer;
Activateclient;
wait(randomrange(500, 700));
Repeat
ScreenAndSave('C:\Users\Administrator\Desktop\TradeScreen\hi');
wait(500);
Until(False);
end.