Simba Code:
program MapleStory;
{$DEFINE SMART}
{$i srl-6/srl.simba}
var
attackBox: TBox;
attackLeft, attackRight: string;
function HP: boolean;
var
x, y: integer;
begin
if FindColor(x, y, 15000804, 230, 614, 277, 621) then //searches for white color in hp bar
exit(true)
else exit(false);
end;
function MP: boolean;
var
x, y: integer;
begin
if FindColor(x, y, 15000804, 339, 614, 371, 621) then //searches for white color in hp bar
exit(true)
else exit(false);
end;
function charxy(key: byte): TBox;
var
x, y, lx1, lx2, rx1, rx2, ry1, ry2, ly1, ly2: integer;
begin
if findColoredAreaTolerance(x, y, 4573, 16, 38, 788, 550, 222, 39) then //searches for red on mark of beta hat to detect players location
lx1:= x - 391; //numbers are what I need my attack box range to be - however need it to be based off the given x, y coordinates of my characters location
lx2:= x + 12;
ly1:= y - 71;
ly2:= y + 135;
rx1:= x - 12;
rx2:= x + 391;
ry1:= y - 135;
ry2:= y + 71;
if isKeyDown(key) then
case key of
37: exit (IntToBox(lx1, ly1, lx2, ly2));
39: exit (IntToBox(rx1, ry1, rx2, ry2));
end;
end;
procedure mainLoop();
begin
if isKeyDown(37) then
begin
attackBox.setLimit(IntToBox(1, 1, 1006, 640));
attackBox := charxy(37)
end
else if isKeyDown(39) then
begin
attackBox.setLimit(IntToBox(1, 1, 1006, 640));
attackBox := charxy(39);
end
else if attackBox.colorExists(65535, 0) then
sendKeys('c', 10, 10)
else if HP = true then
begin
sendKeys('o', 10, 10); //sends key for hp pot
wait(600);
end
else if MP = true then
begin
sendKeys('p', 10, 10); //sends key for mp pot
wait(600);
end
else if not isKeyDown(43) then //checks if C key is down (attack key)
begin
sendKeys('z', 10, 10); //sends key for loot
wait(100);
end;
end;
begin
wait(3000); //pl tl br 673, 353 390,282 685, 488
repeat
while isKeyDown(116) do //waits while F5 is held
wait(1000);
mainLoop();
writeln(attackBox);
until false;
end.