Simba Code:
program new;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}
procedure antiBan(); //So far all it does is move the mouse into a random area of one of 3 TBoxes.
var
antiBanNum : integer;
begin
antiBanNum := randomRange(0, 4);
case antiBanNum of //random(3) = 0, 1, 2.
0:begin
writeLn('Antiban Method 1');
if randomRange(0, 2) = 1 then
begin
writeLn('Rotation of Method 1');
minimap.setAngle(randomRange(0, 275));
End
else
begin
mouseBox(intToBox(35, 336, 269, 501), MOUSE_MOVE);
end;
end;
1:begin
writeLn('Antiban Method 2');
if randomRange(0, 2) = 1 then
begin
mouseBox(intToBox(421, 55, 706, 227), MOUSE_MOVE);
End
else
begin
writeLn('Rotation of Method 2');
minimap.setAngle(randomRange(0, 360));
end;
end;
2:begin
writeLn('Antiban Method 3');
if randomRange(0, 2) = 1 then
begin
mouseBox(intToBox(491, 461, 783, 589), MOUSE_MOVE);
End
else
begin
writeLn('Rotation of Method 3');
minimap.setAngle(randomRange(100, 200));
end;
end;
3:begin
writeLn('No Antiban this round');
end;
4:begin
writeLn('Antiban Method 4');
mouseBox(intToBox(17, 12, 539, 260), MOUSE_MOVE);
end;
end;
end;
procedure clickEnemy();
var
x, y, i: integer;
TPA: TPointArray;
ATPA: T2DPointArray;
hpDTM: integer;
begin
hpDTM := DTMFromString('mbQAAAHicY2VgYFBhZWBQBmI1IFYFYiUg3gwUXw/EG4B4GxTbCAsz/D/NynB3AwuYDtMRZJAEiqNjRiwYDADI8wr3');
findColorsSpiralTolerance(x, y, TPA, 3434850, mainScreen.getBounds(), 22, colorSetting(2, 0.07, 0.11));
if length (TPA) < 1 then //If there are no monsters found it will terminate and rerun.
begin
exit;
end;
ATPA := TPA.toATPA(30, 30);
ATPA.sortFromMidPoint(mainscreen.playerPoint); //Chooses the closest monster to you.
smartImage.debugATPA(ATPA);
for i := 0 to high(ATPA) do //Finds and draws all the monsters a debug box.
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(['ttack'], 500) then
begin
fastClick(MOUSE_LEFT); // attacks mob
smartImage.clear();
if findDTM(hpDTM, x, y, mainScreen.getBounds()) then //If the number "0" is found in the goblins hp bar the fight will end
begin
writeLn('DTM found!!!!!');
exit;
End
else if not findDTM(hpDTM, x, y, mainScreen.getBounds()) then // If it is not found then we will use the first ability.
begin
writeLn('Slicing');
actionBar.clickSlot(1);
End
else
begin
writeLn('Dicing');
actionBar.clickSlot(2);
end;
wait(randomRange(500, 800));
antiBan();
wait(randomRange(5000, 5800));
break;
end;
if isMouseOverText(['pen Gate of War']) then // keeps you from stepping through the door
begin
writeLn('Gate of War found');
break;
end;
end;
end;
procedure pickUpBones();
var
x, y, i : integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
findColorsSpiralTolerance(x, y, TPA, 9015205, mainScreen.getBounds(), 21, colorSetting(2, 0.08, 0.43));
if length (TPA) < 1 then //If there are no bones found it will terminate and rerun.
begin
exit;
end;
ATPA := TPA.toATPA(30, 30);
ATPA.sortFromMidPoint(mainscreen.playerPoint); //Chooses the closest drop to you.
smartImage.debugATPA(ATPA);
for i := 0 to high(ATPA) do
begin
wait(1000);
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(['ake'], 500) then
begin
mouse(middleTPA(ATPA[i]), MOUSE_RIGHT); // picks up the bones at the closest point to you.
chooseOption.select(['ake Bones']);
tabBackPack.waitForShift(10000);
smartImage.clear();
break;
end;
end;
end;
procedure buryBones();
var
slotNum, i : integer;
begin
slotNum := 28;
for i := 1 to slotNum do //for every time "i" is not equal to slotNum
begin //keep clicking the bones in the next box over.
tabBackPack.mouseSlot(i, MOUSE_LEFT);
wait(randomRange(1500, 2300)); //wait until the bones are out of the inventory
i + 1;
end;
end;
procedure checkAngle();
var
angle : extended;
begin
angle := minimap.getAngleRadians();
if angle <> MM_DIRECTION_NORTH and MS_ANGLE_HIGH then // checks to see if the camera is in the correct position. If its not it will put it there.
begin
mainScreen.setAngle(MS_ANGLE_HIGH);
minimap.setAngle(MM_DIRECTION_NORTH);
end;
end;
procedure monsterHealthDTM();
var
hpDTM: integer;
begin
hpDTM := DTMFromString('mbQAAAHicY2VgYFBhZWBQBmI1IFYFYiUg3gwUXw/EG4B4GxTbCAsz/D/NynB3AwuYDtMRZJAEiqNjRiwYDADI8wr3');
end;
begin
clearDebug();
smartEnableDrawing := true;
setupSRL();
mainScreen.setAngle(MS_ANGLE_HIGH);
minimap.setAngle(MM_DIRECTION_NORTH);
repeat
repeat
//checkAngle();
clickEnemy();
//checkAngle();
wait(randomRange(3000, 3500));
pickUpBones();
until tabBackPack.isFull();
buryBones();
until(false);
end.