
Originally Posted by
Smarter Child
...
Just a few improvements to what you have there.
Simba Code:
program new;
{$DEFINE SMART}
{$i SRL\SRL.scar}
const
USERNAME = 'user';
PASSWORD = 'pass';
procedure Locate;
var
x, y, i: Integer;
CA: TIntegerArray;
begin
CA := [263362, 3239492, 7247300];
for i := 0 to High(CA) do
begin
if FindColorTolerance(x, y, CA[i], MSX1, MSY1, MSX2, MSY2, 15) then
begin
MMouse(x, y, 2, 2);
Wait(100 + Random(50)); // Best to have a wait before checking uptext
if IsUpText('NPC_NAME') then // Checking uptext of NPC, change this to their name
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
Wait(200 + Random(100)); // This will help
ChooseOption('Buy');
Break; // You need to break out of the loop or the script will try to find the color 3 times no matter what
end;
end;
end;
end;
begin
Smart_Signed := true;
Smart_Members := true;
Smart_Server := 96;
SetupSRL;
NumberOfPlayers(1);
CurrentPlayer := 0;
Players[0].Name := USERNAME;
Players[0].Pass := PASSWORD;
Players[0].Active:= True;
LogInPlayer;
ClickNorth(true);
Locate;
end.
Try both scripts out wantonman, if they don't work for you check your fonts. You should see this in the debug whenever you start up Simba.
Progress Report:
Loaded fonts: BigChars, CharsNPC, CharsTrade, FriendChars, LoginChars, SmallChars, StatChars, UpChars, XPChars
If not, your fonts might be outdated.