Simba Code:
program fishermansFriend;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/lib/SPS-RS3.Simba}
var
caliTimer,checkTimer: TTimeMarker;
GEready: Boolean;
workingPreset,gotTiara,soldShrimp,soldAnchovies,backToDraynor,gotFeathers,boughtFly,foundAnchovies,foundShrimp,foundSalmon,foundTrout: Boolean;
talkedToTutor: Boolean;
Cash,shrimpSlot,anchoviesSlot,troutSlot,SalmonSlot,Sal,T,S,A: Integer;
Location,lastSlotTries, rBurnt, oBurnt, wBurnt, Burnt, tutorTries,rChopped,oChopped,wChopped, vBanked, dBanked, noText: Integer;
procedure declarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := 'zezima';
password := '';
isActive := true;
isMember := false;
world := 8; // Best world don't change
end
currentPlayer := 0;
end;
function whatLevel(): integer;
begin
result := tabStats.getSkillLevel(SKILL_FISHING);
end;
{
function howManyDoWeHave(): integer;
var
searchArea,searchArea1stBankSlot: TBox;
begin
// Control of 100 returned 100
searchArea := [580,323,607,334]; // Sized for 3 digit using control value of 100 feathers, also returned correctly for 4 digit
searchArea1stBankSlot := [74,88,97,103];
writeln(Tesseract_GetText(searchArea1stBankSlot, TTesseractFilter([15, 15, [False, 15, TM_Mean]]),TESS_WHITELIST_NUMBERS));
end;
}
function bankResult(): boolean; // This was kind of a mistake when I made it, but when I used it in reverse order it serves it's purpose
var
searchArea: TBox;
begin
writeLn('Searching the middle of the bank screen to see if we have a No Matches Found result');
searchArea := [246,268,358,286];
writeln(Tesseract_GetText(searchArea, TTesseractFilter([15, 15, [False, 15, TM_Mean]]),TESS_WHITELIST_LETTERS));
if (Tesseract_GetText(searchArea, TTesseractFilter([15, 15, [False, 15, TM_Mean]]),TESS_WHITELIST_LETTERS) = 'No matches foundl') or (Tesseract_GetText(searchArea, TTesseractFilter([15, 15, [False, 15, TM_Mean]]),TESS_WHITELIST_LETTERS) = 'No matches found') or (Tesseract_GetText(searchArea, TTesseractFilter([15, 15, [False, 15, TM_Mean]]),TESS_WHITELIST_LETTERS) = 'No matches found!') then
begin
writeLn('Matching text found, there were no fish I guess');
result := false;
exit;
end else
begin
writeLn('No matching text was found');
result := true;
end;
writeLn('Result for BankResult: ' + toStr(result) + ' hopefully True');
writeLn(result);
end;
function outOfFeathers(): boolean;
var
searchArea: TBox;
begin
writeLn('We are searching the chatbox to see if we have run out of Feathers');
if conversationBox.isOpen(3000) then
begin
if conversationBox.findChat(['fishing rod and feathers']) then
//writeLn('We found the proper text we were looking for');
begin
writeLn('Matching text found in Chatbox, there are no more Feathers');
result := True;
exit;
end else
begin
writeLn('No matching text was found, must still have Feathers');
result := False;
end;
end;
writeLn('Result for outOfFeathers: ' + toStr(result));
end;
{function outOfFeathers(): boolean; // This was kind of a mistake when I made it, but when I used it in reverse order it serves it's purpose
var
searchArea: TBox;
begin
writeLn('We are searching the chatbox to see if we have run out of Feathers');
searchArea := [128,500,726,566];
writeln(Tesseract_GetText(searchArea, TTesseractFilter([20, 20, [True, 0, TM_Mean]]),TESS_WHITELIST_LETTERS));
if (Tesseract_GetText(searchArea, TTesseractFilter([20, 20, [True, 0, TM_Mean]]),TESS_WHITELIST_LETTERS) = 'You need a flyefishing rod and feathers to catch these fish') or (Tesseract_GetText(searchArea, TTesseractFilter([15, 15, [True, 0, TM_Mean]]),TESS_WHITELIST_LETTERS) = 'You need a flyefishing rod and feathers to catch these fish') or (Tesseract_GetText(searchArea, TTesseractFilter([10, 10, [False, 0, TM_Mean]]),TESS_WHITELIST_LETTERS) = 'You need a flyefishing rod and feathers to catch these fish') then
begin
writeLn('Matching text found in Chatbox, there are no more Feathers');
result := True;
exit;
end else
begin
writeLn('No matching text was found, must still have Feathers');
result := False;
end;
writeLn('Result for outOfFeathers: ' + toStr(result));
end;}
function randomBlindWalk(): Boolean; // GE points around Tutor
begin
case random(5) of
0: sps.blindWalk(Point(453, 229));
1: sps.blindWalk(Point(461, 218));
2: sps.blindWalk(Point(458, 203));
3: sps.blindWalk(Point(442, 191));
4: sps.blindWalk(Point(425, 216));
5: sps.blindWalk(Point(430, 230));
end;
writeLn('Using random blindWalk path');
end;
procedure tryToFix();
begin
exitTreasure();
claimTicket();
if bankScreen.isOpen() or grandExchange.isOpen() or not isLoggedIn() then
begin
if not isLoggedIn() then
begin
writeLn('We are not logged in, TryToFix caught it and is fixing');
players[currentPlayer].login();
end;
if bankScreen.isOpen() then
begin
writeLn('Bankscreen is open, TryToFix caught it and is fixing');
bankScreen.close();
end;
if grandExchange.isOpen() then
begin
writeLn('GE is open, TryToFix caught it and is fixing');
grandExchange.close();
end;
end;
end;
procedure getToTheSpotta();
var
path: TPointArray;
begin
wait((10000+random(3000)));
exitTreasure();
wait((1000+random(3000)));
mousecircle(498,488,3);
dragmouse(point(47,488));
mouseCircle(minimap.button[MM_BUTTON_LODESTONE].center.x, minimap.button[MM_BUTTON_LODESTONE].center.y,minimap.button[MM_BUTTON_LODESTONE].radius, MOUSE_LEFT);
if lodestoneScreen.isOpen(7000) then
begin
lodestoneScreen.teleportTo(LOCATION_LUMBRIDGE);
wait((30000+Random(750)));
//mousecircle(590,374,4, MOUSE_LEFT); stupid popup after teleport
end;
if not minimap.isRunEnabled() then
begin
writeLn('Run is not on, toggling');
minimap.toggleRun(True);
end;
writeln('This is the long haul. We are walking to Draynor! It will be lit');
//FMF1path := [Point(773, 1206), Point(752, 1188), Point(724, 1146), Point(711, 1115), Point(707, 1085), Point(707, 1067), Point(702, 1043), Point(694, 1018), Point(671, 998), Point(632, 992), Point(608, 981), Point(586, 973), Point(557, 962), Point(528, 965), Point(490, 960), Point(475, 959), Point(446, 937), Point(406, 934), Point(387, 929), Point(372, 930), Point(352, 926), Point(327, 916), Point(309, 922), Point(287, 929), Point(273, 945), Point(266, 965), Point(266, 978), Point(261, 990), Point(252, 1007), Point(252, 1024), Point(251, 1042), Point(248, 1056), Point(248, 1083), Point(247, 1105), Point(228, 1111), Point(207, 1112), Point(188, 1116), Point(174, 1134), Point(172, 1162), Point(178, 1177)]
// WORLDpath := [Point(1856, 1537), Point(1842, 1516), Point(1820, 1490), Point(1807, 1462), Point(1793, 1428), Point(1789, 1391), Point(1781, 1357), Point(1769, 1325), Point(1743, 1322), Point(1716, 1320), Point(1684, 1304), Point(1652, 1293), Point(1626, 1291), Point(1594, 1288), Point(1564, 1279), Point(1540, 1264), Point(1506, 1260), Point(1468, 1256), Point(1437, 1247), Point(1406, 1247), Point(1377, 1255), Point(1371, 1273), Point(1371, 1294), Point(1356, 1318), Point(1352, 1338), Point(1349, 1367), Point(1350, 1389), Point(1348, 1412), Point(1330, 1425), Point(1300, 1430), Point(1275, 1447), Point(1279, 1485), Point(1278, 1500)]
path := [Point(686, 1187), Point(681, 1169), Point(668, 1152), Point(651, 1140), Point(641, 1118), Point(637, 1107), Point(629, 1088), Point(627, 1076), Point(624, 1059), Point(622, 1044), Point(623, 1021), Point(617, 1010), Point(619, 996), Point(610, 976), Point(596, 976), Point(581, 972), Point(564, 975), Point(540, 971), Point(511, 960), Point(500, 953), Point(482, 947), Point(468, 944), Point(454, 944), Point(433, 942), Point(412, 939), Point(398, 931), Point(381, 919), Point(362, 905), Point(340, 914), Point(320, 907), Point(303, 909), Point(274, 903), Point(260, 893), Point(237, 902), Point(222, 909), Point(204, 908), Point(208, 930), Point(207, 943), Point(201, 961), Point(195, 972), Point(188, 990), Point(185, 1010), Point(179, 1025), Point(156, 1030), Point(143, 1051), Point(151, 1071), Point(149, 1082), Point(127, 1087), Point(115, 1102), Point(110, 1121), Point(111, 1147)]
if not sps.walkPath(path) then
begin
writeLn('walkPath() failed, trying blindWalk()');
sps.blindWalk(path[high(path)]);
end;
end;
procedure fromVBankToDraynor(); // Varrock bank to Draynor Fish spots
var
path: TPointArray;
begin
tryToFix;
writeln('walking to Draynor from Varrock Bank');
path := [Point(513, 360), Point(514, 386), Point(499, 391), Point(469, 391), Point(448, 396), Point(432, 405), Point(424, 421), Point(427, 443), Point(430, 472), Point(435, 500), Point(439, 522), Point(444, 550), Point(447, 572), Point(450, 601), Point(451, 633), Point(455, 658), Point(477, 669), Point(473, 700), Point(477, 741), Point(465, 774), Point(472, 796), Point(475, 825), Point(470, 858), Point(455, 880), Point(430, 902), Point(428, 932), Point(408, 943), Point(378, 920), Point(356, 908), Point(336, 916), Point(297, 910), Point(271, 901), Point(252, 893), Point(238, 903), Point(210, 908), Point(206, 932), Point(208, 953), Point(194, 971), Point(186, 991), Point(186, 1014), Point(184, 1037), Point(185, 1060), Point(175, 1084), Point(157, 1083), Point(140, 1089), Point(120, 1086), Point(112, 1105), Point(112, 1122), Point(111, 1146)]
if not sps.walkPath(path) then
begin
writeLn('walkPath() failed, trying blindWalk()');
sps.blindWalk(path[high(path)]);
end;
mainScreen.setAngle(MS_ANGLE_HIGH);
end;
procedure walkToDraynorTree(); // Single regular tree near Willows
var
path: TPointArray;
begin
tryToFix;
writeln('walking to Draynor Tree');
path := [Point(129, 1159)]
if not sps.walkPath(path) then
begin
writeLn('walkPath() failed, trying blindWalk()');
sps.blindWalk(path[high(path)]);
end;
mainScreen.setAngle(MS_ANGLE_HIGH);
end;
procedure walkToBarbarianTree(); // Three regular trees near Barbarian Village fishing spots
var
path: TPointArray;
begin
tryToFix;
writeln('walking to Barbarian Tree');
path := [Point(193, 371)]
if not sps.walkPath(path) then
begin
writeLn('walkPath() failed, trying blindWalk()');
sps.blindWalk(path[high(path)]);
end;
mainScreen.setAngle(MS_ANGLE_HIGH);
end;
procedure walkToDraynorBank();
var
tpa, path: TPointArray;
begin
writeln('walking to Draynor Bank');
tryToFix;
path := [Point(113, 1145), Point(111, 1135), Point(111, 1128), Point(110, 1115), Point(110, 1105), Point(112, 1096), Point(120, 1087), Point(129, 1087), Point(139, 1090), Point(135, 1105)]
if minimap.findSymbols(tpa, MM_SYMBOL_Bank, minimap.getBounds()) then
begin
writeLn('Found Bank symbol, clicking it now');
mouse(tpa[high(tpa)], MOUSE_LEFT); // Click farthest
wait((8000+random(1000)));
end;
if not minimap.findSymbols(tpa, MM_SYMBOL_BANK, minimap.getBounds()) then
begin
writeLn('No Bank symbol found in the minimap, attempting to walk to the bank');
if not sps.walkPath(path) then
begin
writeLn('walkPath() failed, trying blindWalk()');
sps.blindWalk(path[high(path)]);
end;
end;
end;
procedure walkToDFishSpot();
var
TPA,path: TPointArray;
begin
writeln('walking to Draynor Fish Spot');
tryToFix;
path := [Point(137, 1110), Point(140, 1090), Point(122, 1088), Point(113, 1092), Point(111, 1108), Point(110, 1121), Point(114, 1147)]
begin
if not minimap.findSymbols(tpa, MM_SYMBOL_FISHING, minimap.getBounds()) then
begin
writeLn('No Fishing spot symbol found in the minimap, attempting to walk to the fishing spot');
if not sps.walkPath(path) then
begin
writeLn('walkPath() failed, trying blindWalk()');
sps.blindWalk(path[high(path)]);
end;
end;
if minimap.findSymbols(tpa, MM_SYMBOL_FISHING, minimap.getBounds()) then
begin
writeLn('Found Fishing spot symbol, clicking it now');
mouse(tpa[high(tpa)], MOUSE_LEFT); // Click farthest
wait((5000+random(1000)));
end;
end;
mainScreen.setAngle(MS_ANGLE_HIGH);
minimap.setAngle(MM_DIRECTION_WEST);
mainScreen.setZoom(true,30);
end;
procedure walkToBFishSpot(); // From Varrock Bank
var
TPA,path: TPointArray;
begin
writeln('walking to Barbarian Village Fish Spot');
tryToFix;
path := [Point(514, 355), Point(517, 370), Point(513, 385), Point(480, 391), Point(460, 391), Point(440, 396), Point(429, 411), Point(418, 424), Point(403, 433), Point(377, 440), Point(351, 436), Point(330, 436), Point(313, 436), Point(291, 444), Point(266, 438), Point(250, 424), Point(232, 419), Point(206, 420), Point(182, 417), Point(193, 399), Point(208, 376)]
begin
if not minimap.findSymbols(tpa, MM_SYMBOL_FISHING, minimap.getBounds()) then
begin
writeLn('No Fishing spot symbol found in the minimap, attempting to walk to the fishing spot');
if not sps.walkPath(path) then
begin
writeLn('walkPath() failed, trying blindWalk()');
sps.blindWalk(path[high(path)]);
end;
end;
if minimap.findSymbols(tpa, MM_SYMBOL_FISHING, minimap.getBounds()) then
begin
writeLn('Found Fishing spot symbol, clicking it now');
mouse(tpa[high(tpa)], MOUSE_LEFT); // Click farthest
wait((5000+random(1000)));
end;
end;
mainScreen.setAngle(MS_ANGLE_HIGH);
minimap.setAngle(MM_DIRECTION_WEST);
mainScreen.setZoom(true,30);
end;
procedure walkToTutorFromDraynor();
var
path: TPointArray;
begin
writeln('Walking to GE Tutor from Draynor Village');
//FMF1path := [Point(175, 1169), Point(176, 1148), Point(176, 1123), Point(188, 1115), Point(215, 1112), Point(232, 1110), Point(248, 1097), Point(248, 1069), Point(251, 1053), Point(250, 1037), Point(249, 1024), Point(253, 1007), Point(259, 996), Point(266, 981), Point(266, 959), Point(274, 933), Point(288, 930), Point(304, 916), Point(321, 916), Point(339, 919), Point(357, 928), Point(372, 927), Point(392, 922), Point(403, 930), Point(431, 925), Point(447, 936), Point(467, 942), Point(482, 956), Point(497, 954), Point(500, 940), Point(504, 912), Point(512, 904), Point(519, 897), Point(530, 890), Point(539, 882), Point(543, 870), Point(540, 854), Point(540, 839), Point(545, 829), Point(545, 819), Point(541, 808), Point(531, 791), Point(535, 783), Point(542, 768), Point(546, 756), Point(542, 742), Point(542, 728), Point(542, 712), Point(543, 693), Point(544, 680), Point(529, 660), Point(509, 651), Point(509, 637), Point(507, 620), Point(498, 607), Point(490, 587), Point(485, 574), Point(485, 553), Point(486, 539), Point(488, 523), Point(492, 498), Point(494, 483), Point(498, 469), Point(501, 456), Point(499, 440), Point(500, 420), Point(504, 406), Point(515, 393), Point(525, 387), Point(531, 371), Point(535, 358), Point(542, 343), Point(549, 325), Point(557, 307), Point(545, 297), Point(531, 286), Point(526, 275), Point(517, 262), Point(513, 250), Point(514, 238), Point(511, 224), Point(505, 211)]
//WORLDpath := [Point(1276, 1476), Point(1276, 1458), Point(1279, 1431), Point(1308, 1429), Point(1331, 1426), Point(1347, 1415), Point(1349, 1387), Point(1349, 1367), Point(1348, 1347), Point(1351, 1324), Point(1364, 1309), Point(1368, 1288), Point(1373, 1263), Point(1390, 1254), Point(1411, 1241), Point(1454, 1252), Point(1488, 1250), Point(1523, 1252), Point(1550, 1270), Point(1577, 1282), Point(1593, 1282), Point(1595, 1253), Point(1611, 1230), Point(1629, 1215), Point(1633, 1186), Point(1637, 1162), Point(1630, 1130), Point(1635, 1109), Point(1643, 1081), Point(1639, 1054), Point(1641, 1023), Point(1636, 1007), Point(1618, 992), Point(1614, 963), Point(1619, 935), Point(1620, 910), Point(1613, 883), Point(1610, 857), Point(1608, 834), Point(1610, 806), Point(1613, 781), Point(1615, 763), Point(1620, 744), Point(1628, 725), Point(1632, 698), Point(1635, 683), Point(1633, 660), Point(1625, 643), Point(1612, 625), Point(1602, 613), Point(1597, 582), Point(1606, 559)]
path := [Point(119, 1138), Point(126, 1134), Point(137, 1128), Point(163, 1125), Point(178, 1123), Point(183, 1102), Point(179, 1069), Point(183, 1049), Point(185, 1018), Point(186, 998), Point(187, 984), Point(196, 968), Point(202, 962), Point(209, 942), Point(209, 923), Point(220, 905), Point(240, 904), Point(253, 896), Point(271, 905), Point(290, 908), Point(309, 907), Point(328, 909), Point(343, 912), Point(360, 905), Point(374, 919), Point(396, 929), Point(412, 944), Point(426, 942), Point(427, 920), Point(429, 895), Point(448, 881), Point(462, 873), Point(473, 862), Point(470, 845), Point(474, 828), Point(478, 816), Point(475, 803), Point(466, 792), Point(464, 781), Point(467, 764), Point(481, 750), Point(473, 739), Point(474, 724), Point(473, 703), Point(473, 688), Point(477, 676), Point(474, 664), Point(450, 648), Point(447, 628), Point(446, 610), Point(446, 589), Point(437, 565), Point(437, 544), Point(438, 516), Point(436, 490), Point(434, 470), Point(437, 452), Point(439, 435), Point(447, 411), Point(455, 395), Point(459, 375), Point(465, 353), Point(472, 335), Point(471, 313), Point(459, 293), Point(449, 274), Point(439, 238), Point(442, 222)]
if not sps.walkPath(path) then
begin
writeLn('walkPath() failed, trying blindWalk()');
sps.blindWalk(path[high(path)]);
end;
end;
procedure findTutor;
var
i, s, h: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
t: TTimeMarker;
p: Tpoint;
begin
writeln('Find Tutor');
FindColorsTolerance(TPA, 7956286,mainScreen.getBounds(), 7, ColorSetting(2, 0.5, 0.8));
if (Length(TPA) < 1) then
begin
Writeln('No GE Tutor in sight');
minimap.setAngle(round(minimap.getAngleDegrees() + 90));
tutorTries := tutorTries + 1;
end;
ATPA := TPA.ToATPA(20, 30);
ATPA.sortFromMidPoint(Mainscreen.playerPoint);
SortATPASize(atpa, true);
h := High(ATPA);
for i := 0 to h do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if IsMouseOverText(['xchange Tutor', 'utor'], 500) then
begin
fastclick(mouse_right);
chooseOption.select(['alk-to']);
writeLn('Clicked Tutor');
Exit;
end else
tutorTries := tutorTries + 1;
minimap.setAngle(round(minimap.getAngleDegrees() + 90));
writeLn('Faled to find Tutor: ' + intToStr(tutorTries) + ' times');
end;
if (tutorTries > 5) then
begin
writeLn('Failed to find GE Tutor, blindWalking to new position');
tutorTries := 0;
randomBlindWalk();
end;
end;
procedure talkToTutor;
var
x,y: Integer;
begin
tutorTries := 0;
repeat
findTutor;
until conversationBox.isOpen(5000);
if conversationBox.isOpen(5000) then
begin
repeat
conversationBox.continue(true, true);
until conversationBox.findOption(['teach']) or conversationBox.findOption(['basics']);
wait(2000);
typesend('1',false);
wait(2000);
if conversationBox.isOpen(5000) then
repeat
conversationBox.continue(true, true);
until not conversationBox.isOpen();
talkedToTutor := True;
end;
end;
procedure walkToTheExchange(); // From Varrock Bank
var
path: TPointArray;
begin
writeln('walking to the Exchange');
tryToFix;
path := [Point(513, 350), Point(514, 336), Point(509, 309), Point(477, 302), Point(459, 281), Point(439, 235), Point(408, 214), Point(390, 200)]
if not sps.walkPath(path) then
begin
writeLn('walkPath() failed, trying blindWalk()');
sps.blindWalk(path[high(path)]);
end;
end;
procedure fromExchangeToBank();
var
path: TPointArray;
begin
writeln('walking from the Exchange to the Bank');
path := [Point(396, 199), Point(405, 214), Point(417, 223), Point(430, 235), Point(435, 258), Point(442, 271), Point(449, 287), Point(464, 304), Point(486, 314), Point(499, 312), Point(512, 332), Point(514, 344)]
if not sps.walkPath(path) then
begin
writeLn('walkPath() failed, trying blindWalk()');
sps.blindWalk(path[high(path)]);
end;
end;
procedure walkToBank(); //From Barbarian Village
var
path: TPointArray;
begin
writeln('walking to Varrock Bank');
tryToFix;
path := [Point(187, 405), Point(186, 419), Point(209, 422), Point(220, 418), Point(237, 423), Point(264, 439), Point(290, 443), Point(319, 436), Point(339, 434), Point(358, 436), Point(391, 436), Point(412, 425), Point(429, 406), Point(452, 394), Point(470, 394), Point(488, 390), Point(507, 387), Point(513, 360)]
if not sps.walkPath(path) then
begin
writeLn('walkPath() failed, trying blindWalk()');
sps.blindWalk(path[high(path)]);
end;
mainScreen.setAngle(MS_ANGLE_HIGH);
end;
function openGE(bankType: Integer): Boolean;
var
i, x, y: Integer;
cols: T2DColorData;
TPA, ATPA: T2DPointArray;
begin
print('TRSBankscreen.__open()', TDebug.HEADER);
case bankType of
BANK_NPC_BLUE: cols := bankColors.__getProfileColor('BANK_NPC_BLUE');
BANK_NPC_GREY: cols := bankColors.__getProfileColor('BANK_NPC_GREY');
BANK_NPC_GREEN: cols := bankColors.__getProfileColor('BANK_NPC_GREEN');
BANK_NPC_DRAYNOR: cols := bankColors.__getProfileColor('BANK_NPC_DRAYNOR');
BANK_TABLE_BURTHORPE: cols := bankColors.__getProfileColor('BANK_TABLE_BURTHORPE');
BANK_CHEST_LUMBRIDGE: cols := bankColors.__getProfileColor('BANK_CHEST_LUMBRIDGE');
// I will update these ones when I have access to them
BANK_BOOTH: cols := [[3237496, 6, [2, [0.18, 0.68, 0.00]]]];
BANK_CHEST_SW: cols := [[8946555, 15, [2, [0.18, 0.18, 0.00]]], [5863053, 10, [2, [0.13, 0.10, 0.00]]]];
BANK_CHEST_SHANTAY: cols := [[4335674, 6, [2, [0.38, 1.96, 0.00]]], [7247287, 6, [2, [0.16, 1.41, 0.00]]]];
BANK_CHEST_DUEL: cols := [[11512192, 18, [2, [0.39, 0.57, 0.00]]], [6586289, 10, [2, [0.21, 1.00, 0.00]]]];
BANK_CHEST_CW: cols := [[8088922, 16, [2, [0.06, 0.17, 0.00]]], [4808312, 17, [2, [0.03, 0.17, 0.00]]]];
BANK_CHEST_GROTTO: cols := [[6842737, 6, [2, [0.31, 0.08, 0.00]]], [2570316, 4, [2, [0.15, 1.35, 0.00]]]];
BANK_CHEST_PRIFDDINAS: cols := [[2729983, 12, [1, [0.07, 0.00, 0.00]]], [7528447, 16, [2, [0.24, 0.00, 0.00]]]];
BANK_CHEST_BARB_OUTPOST: cols := [[10258280, 19, [2, [0.06, 0.49, 0.00]]], [3424082, 8, [2, [0.12, 0.21, 0.00]]]];
end;
setLength(TPA, length(cols));
for i := 0 to high(cols) do
begin
if cols[BANK_NPC_BLUE].gatherIn(TPA[BANK_NPC_BLUE], mainScreen.getBounds()) then
mainscreen.filterPointsPlayer(TPA[BANK_NPC_BLUE]);
if (length(TPA[BANK_NPC_BLUE]) < 10) then
begin
print('TRSBankScreen.__open(): Didn''t find enough bank color ' + toStr(BANK_NPC_BLUE), TDebug.FOOTER);
exit();
end;
end;
ATPA := TPA[high(cols)].cluster(10);
ATPA.filterBetween(1, 10);
if (length(ATPA) < 1) then
begin
print('No colors found for Exchange Banker', TDebug.FOOTER);
exit();
end;
ATPA.sortFromMidPoint(mainScreen.playerPoint);
for i := 0 to high(ATPA) do
if TPA[0].isPointNear(middleTPA(ATPA[BANK_NPC_BLUE]), 15) then
begin
mouse(ATPA[BANK_NPC_BLUE].getBounds().getGaussPoint());
if isMouseOverText(['xchange', 'rand', 'change', 'lerk']) then
begin
begin
fastClick(MOUSE_RIGHT);
if not chooseOption.select(['xchange','hange']) then continue();
end;
if minimap.isFlagPresent() then minimap.waitFlag(randomRange(12, 15));
if grandExchange.isOpen() then
begin
result := True;
break();
end;
end;
end;
print('Tried opening the Exchange, Result was: ' + boolToStr(result), TDebug.FOOTER);
// BTW this should count as working around a broken include function = bonus points :P
end;
procedure GEsetup;
var
symbolBox: TBox;
tpa: TPointArray;
begin
walkToTutorFromDraynor;
findTutor;
talkToTutor;
walkToTheExchange;
symbolBox := ([587,23,738,144]);
if not minimap.findSymbols(tpa, MM_SYMBOL_BANK, symbolbox) then
begin
writeLn('No bank symbol found in the minimap, attempting to walk to the Bank');
walkToTheExchange;
end;
if minimap.findSymbols(tpa, MM_SYMBOL_BANK, symbolbox) then
begin
writeLn('Found Bank symbol, clicking it now');
mouse(tpa[high(tpa)], MOUSE_LEFT); // Click farthest
wait((5000+random(1000)));
end;
openGE(BANK_NPC_BLUE);
wait((5000+random(2000)));
if grandExchange.isOpen() then
begin
writeLn('Successfully set up the GE');
mouseCircle(770,32,3,mouse_left); //Close exchange
wait((2000+random(1000)));
fromExchangeToBank;
GEready := True;
end;
end;
procedure buyTiara;
var
buyAmount,I: integer;
begin
if (gotTiara = False) then
begin
writeLn('gotTiara is False so we are buying a Tiara off the GE');
mouseCircle(268,225,10,mouse_left); // buy box on GE opening screen (middle)
wait((5000+random(500)));
typesend('tiara');
wait((8000+random(500)));
mouseCircle(118,414,15,mouse_left); // search result first box
wait((5000+random(500)));
mouseCircle(100,310,10,mouse_left); // +1 on buy screen
wait(1000);
mouseCircle(424,278,6,mouse_left); // Price box (text)
wait((5000+random(500)));
buyAmount := round(Cash / 2);
if (buyAmount > 500) then
begin
writeLn('We are rolling in the dough, sending high stacks through to buy the Tiara');
typesend(intToStr(buyAmount));
end;
if (buyAmount < 500) then
begin
writeLn('We are quite broke. We have: ' + intToStr(Cash) + ' geepeez and would spend: ' + intToStr(buyAmount) + ' on the Tiara');
typesend('300');
end;
wait((5000+random(500)));
mouseCircle(297,527,7,mouse_left); // Confirm box
wait((7000+random(500)));
mouseCircle(294,216,20,mouse_left); // Middle box on GE opening screen
wait((5000+random(500)));
mouseCircle(527,394,10,mouse_left); // Right side box on receiving
wait((5000+random(500)));
mouseCircle(477,396,10,mouse_left); // Left side box on receiving
// Close
mouseCircle(770,32,3,mouse_left); // Close Exchange interface
wait((2000+random(1000)));
// Mouse through first 6 slots for text
for I := 1 to 8 do
begin
tabBackpack.mouseSlot(I, MOUSE_MOVE);
wait((2000+random(1000)));
if isMouseOverText(['iara']) then
begin
tabBackpack.mouseSlot(I, MOUSE_RIGHT);
chooseOption.select(['']);
wait((3000+random(1000)));
gotTiara := True;
Break;
end;
end;
end;
end;
procedure withDrawFeathers;
var
I,Attempts, beforeCount, Count: Integer;
Slot: TBox;
begin
exitTreasure();
claimTicket();
if not bankScreen.isOpen() then
begin
writeLn('The Bank is not open!');
bankScreen.__open(BANK_BOOTH);
wait(3500+random(1500));
if not bankScreen.isOpen() then
repeat
WriteLn('Something messed up, retrying to open Bank by walking to the Bank and finding a Banker');
walkToBank;
bankScreen.__open(BANK_NPC_BLUE);
until bankScreen.isOpen();
end;
beforeCount := bankscreen.getPackCount();
if bankScreen.isOpen() then
begin
repeat
if bankScreen.isItemInPackSlot(2) then
begin
repeat
writeLn('Depositing everything from the inventory into the bank');
bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
wait(2000+random(500));
until bankScreen.isPackEmpty() or not bankScreen.isItemInPackSlot(28);
end;
bankScreen.searchBank('feather');
wait(1000+random(500));
if bankResult = False then
begin
WriteLn('Likely no results for Feathers, breaking from loop');
mouse(87,66,5,5,mouse_left);
gotFeathers := False;
Break;
end;
mouse(94,109,3,3,mouse_move); // First slot where searched item should be
Wait((3000+Random(500)));
if isMouseOverText(['eather']) then
begin
fastClick(mouse_right);
wait(1000+random(500));
chooseOption.select(['ithdraw-All']);
wait(2000+random(500));
mouse(94,109,3,3,mouse_move);
end;
wait((3000+random(2000)));
mouse(87,66,5,5,mouse_left);
wait((3000+random(2000)));
Count := bankscreen.getPackCount();
Slot := bankscreen.getPackSlotBox((Count));
mousebox(slot,mouse_move);
wait((3000+random(2000)));
if isMouseOverText(['eather']) then
begin
writeLn('We have feathers, changing gotFeathers to True');
gotFeathers := True;
end;
if not isMouseOverText(['eather']) then
begin
writeLn('We do not have feathers, changing gotFeathers to False');
gotFeathers := False;
end;
Attempts := (Attempts + 1);
until ((count > beforeCount) and (count < 20)) or (Attempts > 5) or (gotFeathers = True);
begin
writeln('Closing bank');
mouseCircle(527,22,3,mouse_left);
wait(5000);
if not bankscreen.close() then
begin
WriteLn('Bankscreen did not close, retrying');
bankScreen.close();
end;
end;
for I := 1 to 8 do
begin
tabBackpack.mouseSlot(I, MOUSE_MOVE);
wait((2000+random(1000)));
if isMouseOverText(['eather']) then
begin
if (I > 1) then
begin
writeLn('Feathers were in slot: ' + intToStr(I) + ' moving them to first slot for the sake of ease');
dragmouse(point(600,340));
end;
wait((3000+random(1000)));
gotFeathers := True;
Break;
end;
end;
Attempts := 0;
end;
end;
procedure theExchange;
var
Attempts,buyAmount,cash,I,x,y: Integer;
symbolBox: TBox;
tpa: TPointArray;
begin
if (GEready = False) then
repeat
begin
GEsetup
end;
until (GEready = True);
if (GEready = True) then
begin
walkToTheExchange;
symbolBox := ([587,23,738,144]);
if not minimap.findSymbols(tpa, MM_SYMBOL_BANK, symbolbox) then
begin
writeLn('No bank symbol found in the minimap, attempting to walk to the Bank');
walkToTheExchange;
end;
if minimap.findSymbols(tpa, MM_SYMBOL_BANK, symbolbox) then
begin
writeLn('Found Bank symbol, clicking it now');
mouse(tpa[high(tpa)], MOUSE_LEFT); // Click farthest
wait((5000+random(1000)));
end;
mainScreen.setAngle(MS_ANGLE_LOW);
mousecircle(649,487,15, MOUSE_move);
tabBackpack.mouseSlot(1, MOUSE_MOVE);
mainScreen.setAngle(MS_ANGLE_LOW); //For good measure lets not mess this up pL0x
wait((2000+random(1000)));
Cash := tabBackpack.getMoneyPouchAmount();
if isMouseOverText(['aw','nchovies','rimp','rout','almon']) or (tabBackpack.getMoneyPouchAmount() > 10000) then
begin
openGE(BANK_NPC_BLUE);
wait((5000+random(2000)));
if bankscreen.isOpen then
begin
writeLn('Bankscreen was open, dont know why but its not the first time- closing');
repeat
bankscreen.close();
until not (bankscreen.isOpen);
end;
if not grandExchange.isOpen(10000) then
begin
repeat
writeLn('Failed first time to open the Exchange, trying again');
walkToTheExchange;
minimap.findSymbols(tpa, MM_SYMBOL_BANK, symbolbox);
mouse(tpa[low(tpa)], MOUSE_LEFT);
wait((5000+random(1000)));
mainScreen.setAngle(MS_ANGLE_LOW);
mousecircle(649,487,15, MOUSE_move);
mainScreen.setAngle(MS_ANGLE_LOW);
openGE(BANK_NPC_BLUE);
wait((5000+random(500)));
until grandExchange.isOpen();
end;
if grandExchange.isOpen(10000) then
begin
grandExchange.sellItem(1, '1', 'all', true, 15000);
grandExchange.sellItem(2, '1', 'all', true, 15000);
grandExchange.sellItem(3, '1', 'all', true, 15000);
grandExchange.sellItem(4, '1', 'all', true, 15000);
grandExchange.sellItem(5, '1', 'all', true, 15000);
grandExchange.sellItem(6, '1', 'all', true, 15000);
grandExchange.sellItem(7, '1', 'all', true, 15000);
grandExchange.sellItem(8, '1', 'all', true, 15000);
grandExchange.sellItem(9, '1', 'all', true, 15000);
grandExchange.sellItem(10, '1', 'all', true, 15000);
grandExchange.sellItem(11, '1', 'all', true, 15000);
end;
if (gotFeathers = False) then
begin
mouseCircle(268,225,10,mouse_left); // buy box on GE opening screen (middle)
wait((5000+random(500)));
typesend('feather');
wait((5000+random(500)));
mouseCircle(295,419,11,mouse_left); // search result 2nd box
wait((5000+random(500)));
mouseCircle(167,279,5,mouse_left); // Enter item amount box
wait((5000+random(500)));
//Cash := tabBackpack.getMoneyPouchAmount();
buyAmount := round((Cash / 60) - 10);
if (cash > 90) then
begin
writeLn('We will be buying: ' + intToStr(buyAmount) + ' Feathers');
typesend(intToStr(buyAmount));
end;
if (cash < 90) then
begin
writeLn('Less than 90 gold in pouch or we did not get a result, purchasing 100 Feathers');
typesend('100');
end;
wait(1000);
mouseCircle(424,278,6,mouse_left); // Price box (text)
wait((5000+random(500)));
typesend('60');
wait((5000+random(500)));
mouseCircle(297,527,7,mouse_left); // Confirm box
wait((7000+random(500)));
mouseCircle(294,216,20,mouse_left); // Middle box on GE opening screen
wait((5000+random(500)));
mouseCircle(527,394,10,mouse_left); // Right side box on receiving
wait((5000+random(500)));
mouseCircle(477,396,10,mouse_left); // Left side box on receiving
wait(2000);
end;
BuyTiara; // Shouldn't cause an issue after you buy it because of the if statement being true from hereon out
if (grandExchange.isOpen) then
begin
writeLn('GE screen is open, Closing');
mouseCircle(770,32,3,mouse_left); // Close Exchange interface although buyFly also closes so not sure what will happen
wait((2000+random(1000)));
end;
for I := 1 to 8 do
begin
tabBackpack.mouseSlot(I, MOUSE_MOVE);
wait((2000+random(1000)));
if isMouseOverText(['eather']) then
begin
if (I > 1) then
begin
writeLn('Feathers were in slot: ' + intToStr(I) + ' moving them to first slot for the sake of ease');
dragmouse(point(600,340));
end;
wait((3000+random(1000)));
gotFeathers := True;
Break;
end;
end;
end;
if ((isMouseOverText([''],3000) and (tabBackpack.getMoneyPouchAmount() <= 10000))) or (gotFeathers = False) then
begin
repeat
writeLn('Apparently we do not have feathers, making a last resort to find some in the bank');
fromExchangeToBank;
withdrawFeathers;
Attempts := (Attempts + 1);
until (gotFeathers = True) or (Attempts >= 5);
end;
if (gotFeathers = False) or (Attempts >= 5) then
begin
writeLn('There is definitely something going on here, going back to Draynor for half an hour to fish');
backToDraynor := True;
end;
end;
mainScreen.setAngle(MS_ANGLE_HIGH);
end;
procedure getRawSlots();
begin
if (foundShrimp = False) and (Location = 1) then
begin
for S := 2 to 27 do
begin
if tabBackpack.isItemInSlot(S) then
begin
tabBackpack.mouseSlot((S), MOUSE_MOVE);
wait(250+random(250));
if isMouseOverText(['Raw shrimp'],500) then
begin
shrimpSlot := S;
writeLn('There is raw shrimp in slot: ' + intToStr(S) + ' saving slot number for BurnAndCook');
foundShrimp := True;
mousecircle(747,540,5, MOUSE_LEFT);
break;
end;
end;
end;
end;
if (foundAnchovies = False) and (Location = 1) then
begin
for A := S to 27 do
begin
if tabBackpack.isItemInSlot(A) then
begin
tabBackpack.mouseSlot((A), MOUSE_MOVE);
wait(250+random(250));
if isMouseOverText(['Raw anchovies'],500) then
begin
anchoviesSlot := A;
writeLn('There is raw anchovies in slot: ' + intToStr(A) + ' saving slot number for BurnAndCook');
foundAnchovies := True;
mousecircle(747,540,5, MOUSE_LEFT);
break;
end;
end;
end;
end;
if (foundTrout = False) and (Location = 2) then
begin
for T := 2 to 27 do
begin
if tabBackpack.isItemInSlot(T) then
begin
tabBackpack.mouseSlot((T), MOUSE_MOVE);
wait(250+random(250));
if isMouseOverText(['Raw trout'],500) then
begin
troutSlot := T;
writeLn('There is raw Trout in slot: ' + intToStr(T) + ' saving slot number for BurnAndCook');
foundTrout := True;
mousecircle(747,540,15, MOUSE_MOVE);
break;
end;
end;
end;
end;
if (foundSalmon = False) and (Location = 2) then
begin
for Sal := T to 27 do
begin
if tabBackpack.isItemInSlot(Sal) then
begin
tabBackpack.mouseSlot((Sal), MOUSE_MOVE);
wait(250+random(250));
if isMouseOverText(['Raw salmon'],500) then
begin
salmonSlot := Sal;
writeLn('There is raw Salmon in slot: ' + intToStr(Sal) + ' saving slot number for BurnAndCook');
foundSalmon := True;
mousecircle(747,540,15, MOUSE_Move);
break;
end;
end;
end;
end;
end;
procedure findFishingSpot();
var
i, s, h, slot, count: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
t: TTimeMarker;
p: Tpoint;
oakTimer: TTimeMarker;
change: boolean;
begin
tryToFix;
writeln('Fish');
noText := (noText + 1);
FindColorsTolerance(tpa, 14866123, mainscreen.getbounds(), 11, colorSetting(2, 0.9, 0.9))
if (Length(TPA) < 1) then
begin
Writeln('No fishing spots in sight');
//Turn;
noText := (noText + 1);
end;
ATPA := TPA.ToATPA(20, 30);
ATPA.sortFromMidPoint(Mainscreen.playerPoint);
SortATPASize(atpa, true);
h := High(ATPA);
for i := 0 to h do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if IsMouseOverText(['ishing', 'ishing spot'], 500) then
begin
fastclick(mouse_right);
chooseOption.select(['et','ure']);
noText := 0;
repeat // please give me a medal for this
//slot := tabBackpack.count();
count := tabBackpack.count();
//writeLn('Current count: ' + intToStr(slot) + ', waiting for shift in slot ' + intToStr(slot + 1));
//slot := slot + 1;
//tabBackpack.waitSlotPixelChange(slot, 10000);
tabBackpack.waitForShift(20000);
getRawSlots;
if (count < tabBackpack.count()) then
begin
change := True;
writeLn('Still fishing');
end;
if (count >= tabBackpack.count()) then
begin
change := False;
writeLn('Not fishing anymore');
end;
until (tabBackpack.isFull()) or (change = False) ;
WriteLn('Fished a spot, nice!');
end else
noText := (noText + 1);
writeLn('There was no MouseOverText: ' + intToStr(noText) + ' times');
end;
if (noText > 45) then
begin
noText := 0;
writeLn('no MouseOverText more than 10 times, walking back to fishing spot');
walkToDFishSpot;
end;
end;
procedure cutTree;
var
i, s, h: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
t: TTimeMarker;
p: Tpoint;
begin
tryToFix;
writeln('Tree');
FindColorsTolerance(tpa, 3429491, mainscreen.getbounds(), 7, colorSetting(2, 0.4, 0.2))
if (Length(TPA) < 1) then
begin
Writeln('No trees in sight');
noText := (noText + 1);
end;
ATPA := TPA.ToATPA(20, 30);
ATPA.sortFromMidPoint(Mainscreen.playerPoint);
SortATPASize(atpa, true);
h := High(ATPA);
for i := 0 to h do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if IsMouseOverText(['ree', 'down Tree'], 500) then
begin
fastclick(mouse_right);
chooseOption.select(['hop']);
noText := 0;
if tabBackpack.waitForShift(15000+Random(450)) then
WriteLn('Chopped Tree');
Exit();
end else
noText := (noText + 1);
writeLn('There was no MouseOverText: ' + intToStr(noText) + ' times');
end;
if (noText > 6) then
begin
noText := 0;
writeLn('No MouseOverText more than 6 times, walking back to Trees');
if (Location = 1) then
begin
writeLn('Particularly Draynor trees');
walkToDraynorTree;
end;
if (Location = 2) then
begin
writeLn('Particularly Barbarian Village trees');
walkToBarbarianTree;
end;
end;
end;
function findFire(): boolean;
var
i, s, h, slot, count: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
t: TTimeMarker;
p: Tpoint;
change : Boolean;
fireBox: TBox;
begin
tryToFix;
writeln('Find Fire');
fireBox := [18,20,461,381];
if (Location = 1) then
begin
writeLn('Looking for Draynor Village colors');
FindColorsTolerance(TPA, 5628156,fireBox, 7, ColorSetting(2, 0.5, 0.5));
end;
if (Location = 2) then
begin
writeLn('Looking for Barbarian Village colors');
FindColorsTolerance(TPA, 3850953,fireBox, 7, ColorSetting(2, 0.5, 0.5));
end;
if (Length(TPA) < 1) then
begin
Writeln('No fires around');
//Turn;
noText := (noText + 1);
end;
ATPA := TPA.ToATPA(20, 30);
ATPA.sortFromMidPoint(Mainscreen.playerPoint);
SortATPASize(atpa, true);
h := High(ATPA);
for i := 0 to h do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if IsMouseOverText(['ire'], 500) then
begin
result := True;
noText := 0;
Exit();
end else
noText := (noText + 1);
result := False;
writeLn('There was no MouseOverText: ' + intToStr(noText) + ' times');
end;
if (noText > 15) then
begin
noText := 0;
writeLn('no MouseOverText more than 15 times, walking back to Willows');
//walkToWillows;
end;
end;
procedure backupBnC;
var
i, count, fireFails: Integer;
change: Boolean;
begin
for I := 2 to 27 do
begin
if tabBackpack.isItemInSlot(I) then
begin
wait(750+random(500));
tabBackpack.mouseSlot((I), MOUSE_MOVE);
if isMouseOverText(['Raw'],3000) then
begin
fastClick(MOUSE_LEFT);
if tabBackpack.isSlotActivated(I) then
writeLn('Slot ' + intToStr(I) + ' is activated');
findFire;
if (findFire = True) then
begin
writeln('FindFire was True, clicking left');
fastClick(mouse_left);
wait(5000+random(1000));
mousecircle(395,339,5, MOUSE_LEFT);
wait(5000+random(1000));
break;
end;
if (findFire = False) then
begin
writeLn('FindFire was False, retrying alternate route');
if (tabBackpack.isFull()) then
begin
mousecircle(612,578,5, MOUSE_LEFT);
tabBackpack.mouseSlot((28), MOUSE_Right);
chooseOption.select(['rop']);
wait(500+random(500));
end;
if (Location = 1) then
begin
walkToDraynorTree;
end;
if (Location = 2) then
begin
walkToBarbarianTree;
end;
repeat
cutTree;
until (tabBackpack.isFull());
tabBackpack.mouseSlot((28), MOUSE_Right);
chooseOption.select(['ight']);
wait(5000+random(500));
tabBackpack.mouseSlot((I), MOUSE_LEFT);
repeat
findFire;
fireFails := (fireFails + 1);
until (isMouseOverText(['ire'],3000)) or (findFire = True) or (fireFails >= 5);
fastClick(mouse_left);
wait(5000+random(1000));
mousecircle(395,339,5, MOUSE_LEFT);
wait(5000+random(1000));
break;
end;
end;
end;
end;
end;
procedure BurnAndCook;
var
i, count, fireFails: Integer;
change: Boolean;
begin
begin
tabBackpack.mouseSlot((28), MOUSE_MOVE);
if isMouseOverText(['ogs'],3000) then
begin
fastClick(MOUSE_RIGHT);
chooseOption.select(['ight']);
wait((7000+random(1000)));
end;
end;
if (foundAnchovies = True) then
begin
if tabBackpack.isItemInSlot(A) then
begin
tabBackpack.mouseSlot((A), MOUSE_Move);
if isMouseOverText(['Raw'],500) then
begin
fastClick(MOUSE_LEFT);
if tabBackpack.isSlotActivated(A) then
writeLn('Slot ' + intToStr(A) + ' is activated');
findFire;
if (findFire = True) then
begin
writeln('FindFire was True, clicking left');
fastClick(mouse_left);
wait(5000+random(1000));
mousecircle(395,339,5, MOUSE_LEFT);
wait(5000+random(1000));
end else
begin
writeLn('findFire was False! Let us try backupBnC');
backupBnC;
end;
end;
end;
end;
if progressScreen.isOpen() or progressScreen.findButton(PROGRESS_BUTTON_CANCEL, 7000, FALSE) or (progressScreen.getSkill()= SKILL_cooking) then
begin
repeat
wait(500+random(1500));
until (progressScreen.getPercentDone() >= 98) or not progressScreen.isOpen();
wait(3500+random(500));
end;
if (foundShrimp = True) then
begin
if tabBackpack.isItemInSlot(S) then
begin
tabBackpack.mouseSlot((S), MOUSE_move);
if isMouseOverText(['Raw'],500) then
begin
fastClick(MOUSE_LEFT);
if tabBackpack.isSlotActivated(S) then
writeLn('Slot ' + intToStr(S) + ' is activated');
findFire;
if (findFire = True) then
begin
writeln('FindFire was True, clicking left');
fastClick(mouse_left);
wait(5000+random(1000));
mousecircle(395,339,5, MOUSE_LEFT);
wait(5000+random(1000));
end else
begin
writeLn('findFire was False! Let us try backupBnC');
backupBnC;
end;
end;
end;
end;
if progressScreen.isOpen() or progressScreen.findButton(PROGRESS_BUTTON_CANCEL, 7000, FALSE) or (progressScreen.getSkill()= SKILL_cooking) then
begin
repeat
wait(500+random(1500));
until (progressScreen.getPercentDone() >= 98) or not progressScreen.isOpen();
wait(3500+random(500));
end;
if (foundTrout = True) then
begin
if tabBackpack.isItemInSlot(T) then
begin
tabBackpack.mouseSlot((T), MOUSE_move);
if isMouseOverText(['Raw'],500) then
begin
fastClick(MOUSE_LEFT);
if tabBackpack.isSlotActivated(T) then
writeLn('Slot ' + intToStr(T) + ' is activated');
findFire;
if (findFire = True) then
begin
writeln('FindFire was True, clicking left');
fastClick(mouse_left);
wait(5000+random(1000));
mousecircle(395,339,5, MOUSE_LEFT);
wait(5000+random(1000));
end else
begin
writeLn('findFire was False! Let us try backupBnC');
backupBnC;
end;
end;
end;
end;
if progressScreen.isOpen() or progressScreen.findButton(PROGRESS_BUTTON_CANCEL, 7000, FALSE) or (progressScreen.getSkill()= SKILL_cooking) then
begin
repeat
wait(500+random(1500));
until (progressScreen.getPercentDone() >= 98) or not progressScreen.isOpen();
wait(3500+random(500));
end;
if (foundSalmon = True) then
begin
if tabBackpack.isItemInSlot(Sal) then
begin
tabBackpack.mouseSlot((Sal), MOUSE_move);
if isMouseOverText(['Raw'],500) then
begin
fastClick(MOUSE_LEFT);
if tabBackpack.isSlotActivated(Sal) then
writeLn('Slot ' + intToStr(Sal) + ' is activated');
findFire;
if (findFire = True) then
begin
writeln('FindFire was True, clicking left');
fastClick(mouse_left);
wait(5000+random(1000));
mousecircle(395,339,5, MOUSE_LEFT);
wait(5000+random(1000));
end else
begin
writeLn('findFire was False! Let us try backupBnC');
backupBnC;
end;
end;
end;
end;
if progressScreen.isOpen() or progressScreen.findButton(PROGRESS_BUTTON_CANCEL, 7000, FALSE) or (progressScreen.getSkill()= SKILL_cooking) then
begin
repeat
wait(500+random(1500));
until (progressScreen.getPercentDone() >= 98) or not progressScreen.isOpen();
wait(3500+random(500));
end;
foundTrout := False;
foundSalmon := False;
foundShrimp := False;
foundAnchovies := False;
end;
procedure draynorBangKing;
var
tpa: TPointArray;
begin
exitTreasure();
claimTicket();
begin
writeLn('Draynor Banking');
if not minimap.findSymbols(tpa, MM_SYMBOL_BANK, minimap.getBounds()) then
begin
writeLn('No bank symbol found in the minimap, attempting to walk to the Bank');
walkToDraynorBank;
end;
if minimap.findSymbols(tpa, MM_SYMBOL_BANK, minimap.getBounds()) then
begin
writeLn('Found Bank symbol, clicking it now');
mouse(tpa[high(tpa)], MOUSE_LEFT); // Click farthest
wait((5000+random(1000)));
end;
end;
bankScreen.__open(BANK_NPC_DRAYNOR);
if not bankScreen.isOpen() then
begin
bankScreen.__open(BANK_NPC_DRAYNOR);
end;
if bankScreen.isOpen() then
writeln('The bank is open! Lets start banking items!');
bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
if bankScreen.isItemInPackSlot(2) or not bankScreen.isPackEmpty() then
begin
bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
end;
if bankScreen.isPackEmpty() or not bankScreen.isItemInPackSlot(28) then
begin
writeln('Our bankscreen pack is empty!');
mouseCircle(527,22,3,mouse_left);
wait(5000);
if not bankscreen.close() and not tabBackpack.isFull() then
begin
writeLn('Bankscreen did not close first try, retrying');
bankScreen.close();
end;
if bankScreen.close() then
begin
writeln('Closed the bankscreen, walking back to Willows');
//backToWillows;
end;
end;
dBanked := (dBanked + 1);
//walkToDFishSpot;
end;
procedure withdrawFish;
var
attempts,beforeCount,count: integer;
slot: TBox;
begin
exitTreasure();
claimTicket();
bankScreen.__open(BANK_BOOTH);
if not bankScreen.isOpen() then
begin
repeat
WriteLn('Something messed up, retrying to open Bank by walking to the Bank and finding a Banker');
walkToBank;
bankScreen.__open(BANK_NPC_BLUE);
until bankScreen.isOpen();
end;
if bankScreen.isOpen() then
begin
repeat
writeLn('Depositing everything from the inventory into the bank');
bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
wait(2000+random(500));
until bankScreen.isPackEmpty() or not bankScreen.isItemInPackSlot(28);
BeforeCount := bankscreen.getPackCount();
repeat
Wait((700+Random(500)));
if not bankScreen.isButtonActive(BANK_BUTTON_NOTE)then
begin
//typeSend('n'); // Keybind for noting items
bankScreen.clickButton(BANK_BUTTON_NOTE);
end;
bankScreen.searchBank('raw');
wait(1000+random(500));
if bankResult = False then
begin
WriteLn('Likely no results for Raw fish, breaking from loop');
mouse(87,66,5,5,mouse_left);
Break;
end;
mouse(94,109,3,3,mouse_move); // First slot where searched item should be
Wait((3000+Random(500)));
if isMouseOverText(['aw']) then
begin
repeat
//mouse(94,109,3,3,mouse_move);
fastClick(mouse_right);
wait(1000+random(500));
chooseOption.select(['ithdraw-All']);
wait(2000+random(500));
mouse(94,109,3,3,mouse_move);
until not isMouseOverText(['aw']);
end;
wait((3000+random(2000)));
mouse(87,66,5,5,mouse_left);
wait((3000+random(2000)));
Count := bankscreen.getPackCount();
Slot := bankscreen.getPackSlotBox((Count));
wait((3000+random(2000)));
Attempts := (Attempts + 1);
until ((count > beforeCount) and (count < 20)) or (Attempts > 5);
Attempts := 0;
BeforeCount := bankscreen.getPackCount();
if (soldShrimp = False) then
begin
repeat
Wait((700+Random(500)));
if not bankScreen.isButtonActive(BANK_BUTTON_NOTE)then
begin
//typeSend('n'); // Keybind for noting items
bankScreen.clickButton(BANK_BUTTON_NOTE);
end;
bankScreen.searchBank('shrimp');
wait(2000+random(500));
if (bankResult = False) then
begin
WriteLn('Likely no results for Shrimp, breaking from loop');
mouse(87,66,5,5,mouse_left);
Break;
end;
mouse(94,109,3,3,mouse_move); // First slot where searched item should be
wait(2000+random(500));
if isMouseOverText(['urnt']) then
begin
mouse(135,108,3,3,mouse_move);
wait(2000+random(500));
if not (isMouseOverText([''],3000)) then
begin
writeLn('No mouseoverText for Shrimp in 2nd slot, breaking from loop');
soldShrimp := True;
break;
end;
end;
if isMouseOverText(['Raw shrimp']) then
begin
fastclick(Mouse_Right);
Wait((2000+Random(500)));
chooseOption.select(['ithdraw-All Raw shrimp']);
wait((3000+random(2000)));
mouse(94,109,3,3,mouse_move); // First slot where searched item should be
Wait((2000+Random(500)));
if isMouseOverText(['urnt']) then
begin
mouse(135,108,3,3,mouse_move);
wait(2000+random(500));
end;
end;
if isMouseOverText(['Shrimp']) then
begin
fastclick(Mouse_Right);
Wait((2000+Random(500)));
chooseOption.select(['ithdraw-All Shrimp']);
wait((3000+random(2000)));
mouse(87,66,5,5,mouse_left);
wait((3000+random(2000)));
SoldShrimp := True;
Count := bankscreen.getPackCount();
Slot := bankscreen.getPackSlotBox((Count));
end;
if isMouseOverText(['']) then
begin
writeLn('No mouseoverText, breaking from Shrimp loop');
SoldShrimp := False;
break;
end;
if (Attempts > 4) then
begin
SoldShrimp := False;
end;
Attempts := (Attempts + 1);
until ((count > beforeCount) and (count < 20)) or (Attempts > 5) or (soldShrimp = True);
writeLn('Out of Shrimp loop');
end;
Attempts := 0;
beforeCount := bankscreen.getPackCount();
if (soldAnchovies = False) then
begin
repeat
Wait((700+Random(500)));
if not bankScreen.isButtonActive(BANK_BUTTON_NOTE)then
begin
//typeSend('n'); // Keybind for noting items
bankScreen.clickButton(BANK_BUTTON_NOTE);
end;
bankScreen.searchBank('anchovies');
wait(2000+random(500));
if (bankResult = False) then
begin
WriteLn('Likely no results for Anchovies, breaking from loop');
mouse(87,66,5,5,mouse_left);
Break;
end;
mouse(94,109,3,3,mouse_move); // First slot where searched item should be
Wait((2000+Random(500)));
if isMouseOverText(['urnt']) then
begin
mouse(135,108,3,3,mouse_move);
wait(2000+random(500));
if not (isMouseOverText([''],3000)) then
begin
writeLn('No mouseoverText for Anchovies in 2nd slot, breaking from loop');
SoldShrimp := True;
break;
end;
end;
if isMouseOverText(['Raw anchovies']) then
begin
fastclick(Mouse_Right);
Wait((2000+Random(500)));
chooseOption.select(['ithdraw-All Raw anchovies']);
wait((3000+random(2000)));
mouse(94,109,3,3,mouse_move); // First slot where searched item should be
Wait((2000+Random(500)));
if isMouseOverText(['urnt']) then
begin
mouse(135,108,3,3,mouse_move);
wait(2000+random(500));
end;
end;
if isMouseOverText(['Anchovies']) then
begin
fastclick(Mouse_Right);
Wait((2000+Random(500)));
chooseOption.select(['ithdraw-All Anchovies']);
wait((3000+random(2000)));
soldAnchovies := True;
mouse(87,66,5,5,mouse_left);
wait((3000+random(2000)));
Count := bankscreen.getPackCount();
Slot := bankscreen.getPackSlotBox((Count));
end;
if isMouseOverText(['']) then
begin
writeLn('No mouseoverText, breaking from Anchovies loop');
SoldAnchovies := False;
break;
end;
Attempts := (Attempts + 1);
if (Attempts > 4) then
begin
soldAnchovies := False;
end;
until ((count > beforeCount) and (count < 20)) or (Attempts > 5);
writeLn('Out of Anchovies loop');
end;
Attempts := 0;
beforeCount := bankscreen.getPackCount();
repeat
Wait((700+Random(500)));
if not bankScreen.isButtonActive(BANK_BUTTON_NOTE)then
begin
//typeSend('n'); // Keybind for noting items
bankScreen.clickButton(BANK_BUTTON_NOTE);
end;
bankScreen.searchBank('trout');
wait(2000+random(500));
if (bankResult = False) then
begin
WriteLn('Likely no results for Trout, breaking from loop');
mouse(87,66,5,5,mouse_left);
Break;
end;
mouse(94,109,3,3,mouse_move); // First slot where searched item should be
Wait((2000+Random(500)));
if isMouseOverText(['urnt']) then
begin
mouse(135,108,3,3,mouse_move);
wait(2000+random(500));
if not (isMouseOverText([''],3000)) then
begin
writeLn('No mouseoverText for Trout in 2nd slot, breaking from loop');
break;
end;
end;
if isMouseOverText(['Raw trout']) then
begin
fastclick(Mouse_Right);
Wait((2000+Random(500)));
chooseOption.select(['ithdraw-All Raw trout']);
wait((3000+random(2000)));
mouse(94,109,3,3,mouse_move); // First slot where searched item should be
Wait((2000+Random(500)));
if isMouseOverText(['urnt']) then
begin
mouse(135,108,3,3,mouse_move);
wait(2000+random(500));
end;
end;
if isMouseOverText(['Trout']) then
begin
fastclick(Mouse_Right);
Wait((2000+Random(500)));
chooseOption.select(['ithdraw-All Trout']);
wait((3000+random(2000)));
mouse(87,66,5,5,mouse_left);
wait((3000+random(2000)));
Count := bankscreen.getPackCount();
Slot := bankscreen.getPackSlotBox((Count));
end;
Attempts := (Attempts + 1);
until ((count > beforeCount) and (count < 20)) or (Attempts > 5);
Attempts := 0;
beforeCount := bankscreen.getPackCount();
repeat
Wait((700+Random(500)));
if not bankScreen.isButtonActive(BANK_BUTTON_NOTE)then
begin
//typeSend('n'); // Keybind for noting items
bankScreen.clickButton(BANK_BUTTON_NOTE);
end;
bankScreen.searchBank('salmon');
wait(2000+random(500));
if (bankResult = False) then
begin
WriteLn('Likely no results for Salmon, breaking from loop');
mouse(87,66,5,5,mouse_left);
Break;
end;
mouse(94,109,3,3,mouse_move); // First slot where searched item should be
Wait((2000+Random(500)));
if isMouseOverText(['urnt']) then
begin
mouse(135,108,3,3,mouse_move);
wait(2000+random(500));
end;
if isMouseOverText(['Raw salmon']) then
begin
fastclick(Mouse_Right);
Wait((2000+Random(500)));
chooseOption.select(['ithdraw-All Raw salmon']);
wait((3000+random(2000)));
mouse(94,109,3,3,mouse_move); // First slot where searched item should be
Wait((2000+Random(500)));
if isMouseOverText(['urnt']) then
begin
mouse(135,108,3,3,mouse_move);
wait(2000+random(500));
if not (isMouseOverText([''],3000)) then
begin
writeLn('No mouseoverText for Salmon in 2nd slot, breaking from loop');
break;
end;
end;
end;
if isMouseOverText(['Salmon']) then
begin
fastclick(Mouse_Right);
Wait((2000+Random(500)));
chooseOption.select(['ithdraw-All Salmon']);
wait((3000+random(2000)));
mouse(87,66,5,5,mouse_left);
wait((3000+random(2000)));
Count := bankscreen.getPackCount();
Slot := bankscreen.getPackSlotBox((Count));
end;
Attempts := (Attempts + 1);
until ((count > beforeCount) and (count < 20)) or (Attempts > 5);
mouseCircle(527,22,3,mouse_left);
wait(5000);
if not bankscreen.close() then
begin
WriteLn('Bankscreen did not close, retrying');
bankScreen.close();
end;
end;
end;
procedure make1stPreset;
var
beforeCount,Attempts,I: integer;
tpa: TpointArray;
Count: Integer;
Slot: Tbox;
begin
walkToBank;
withDrawFeathers;
gameTabs.openTab(TAB_EQUIPMENT);
if gameTabs.openTab(TAB_EQUIPMENT) then
begin
mouseBox([673,349,701,375],mouse_move); // Head slot in equipped items
wait(2000+random(500));
if isMouseOverText(['tiara']) then
begin
writeLn('We are wearing the tiara, must have set up the GE and have Feathers');
gotTiara := True;
tabBackpack.open();
wait(1500+random(500));
end;
if tabBackpack.isOpen() then
begin
for I := 1 to 8 do
begin
tabBackpack.mouseSlot(I, MOUSE_MOVE);
wait((2000+random(1000)));
if isMouseOverText(['eather']) then
begin
if (I > 1) then
begin
writeLn('Feathers were in slot: ' + intToStr(I) + ' moving them to first slot for the sake of ease');
dragmouse(point(600,340));
end;
wait((3000+random(1000)));
gotFeathers := True;
Break;
end;
end;
end;
end;
if (gotFeathers = True) then
begin
writeLn('We have all the necessary requirements to make our bank preset');
begin
writeLn('Making Preset...');
if not minimap.findSymbols(tpa, MM_SYMBOL_BANK, minimap.getBounds()) then
begin
writeLn('No bank symbol found in the minimap, attempting to walk to the Bank');
walkToBank;
end;
if minimap.findSymbols(tpa, MM_SYMBOL_BANK, minimap.getBounds()) then
begin
writeLn('Found Bank symbol, clicking it now');
mouse(tpa[high(tpa)], MOUSE_LEFT); // Click farthest
wait((5000+random(1000)));
end;
end;
bankScreen.__open(BANK_NPC_BLUE);
if not bankScreen.isOpen() then
begin
repeat
tryToFix;
walkToBank;
bankScreen.__open(BANK_NPC_BLUE);
bankScreen.__open(BANK_BOOTH);
writeLn('Banking is hard right now');
until bankScreen.isOpen();
end;
if bankScreen.isOpen() then
begin
if (gotTiara = False) then
begin
writeLn('Getting the Tiara out of the Bank since we were not wearing it');
BeforeCount := bankscreen.getPackCount();
repeat
bankScreen.searchBank('tiara');
wait(1000+random(500));
if bankResult = False then
begin
WriteLn('Likely no results for Tiara, breaking from loop');
mouse(87,66,5,5,mouse_left);
gotTiara := False;
Break;
end;
mouse(94,109,3,3,mouse_move); // First slot where searched item should be
Wait((3000+Random(500)));
if isMouseOverText(['iara']) then
begin
//mouse(94,109,3,3,mouse_move);
fastClick(mouse_right);
wait(1000+random(500));
chooseOption.select(['ithdraw-All']);
wait(2000+random(500));
end;
wait((3000+random(2000)));
mouse(87,66,5,5,mouse_left);
wait((3000+random(2000)));
Count := bankscreen.getPackCount();
Slot := bankscreen.getPackSlotBox((Count));
wait((3000+random(2000)));
Attempts := (Attempts + 1);
mouseBox(Slot,mouse_move);
wait(1500+random(500));
if isMouseOverText(['iara']) then
begin
fastClick(mouse_right);
chooseOption.select(['ear']);
gotTiara := True;
end;
until ((count > beforeCount) and (count < 20)) or (Attempts > 5) or (gotTiara = True);
Attempts := 0;
end;
end;
if (gotTiara = True) and (gotFeathers = True) then
begin
writeLn('Clicking Preset Setup button in the Bank interface');
mouseBox([135,563,162,585],mouse_LEFT); // Preset box in bankscreen that should bring up heroscreen
wait(4000+random(500));
if not heroScreen.isOpen() then
begin
writeLn('Hero screen did not show up first try, clicking box again');
mouseBox([135,563,162,585],mouse_LEFT); // Preset box in bankscreen that should bring up heroscreen
//mousecircle(150,577,5, MOUSE_LEFT);
wait(4000+random(500));
end;
if heroScreen.isOpen() then
begin
writeLn('Setting up preset in the Hero Screen');
mouseBox([77,216,204,231],mouse_Left);
wait(1500+random(500));
mouseBox([229,214,239,230],mouse_left);
wait(1500+random(500));
mouseBox([132,506,157,523],mouse_left);
wait(1500+random(500));
mouseBox([122,359,205,374],mouse_left);
wait(1500+random(500));
mouseBox([367,220,373,225],mouse_left);
wait(1500+random(500));
mouseBox([767,29,774,37],mouse_left); // Close
end;
end;
if bankscreen.isOpen() and not bankScreen.isItemInPackSlot(5) then
begin
writeln('Our bankscreen pack is empty!');
mouseCircle(527,22,3,mouse_left);
wait (5000);
if not bankscreen.close() then
begin
WriteLn('Bankscreen did not close, retrying');
bankScreen.close();
wait(5000);
end;
end;
// Test to see if preset works
bankScreen.__open(BANK_NPC_BLUE);
if not bankScreen.isOpen() then
begin
repeat
tryToFix;
walkToBank;
bankScreen.__open(BANK_NPC_BLUE);
bankScreen.__open(BANK_BOOTH);
writeLn('Banking is hard right now');
until bankScreen.isOpen();
end;
if bankscreen.isOpen() then
begin
writeLn('Testing the Bank Preset 1');
bankScreen.clickButton(BANK_BUTTON_PRESET_1);
wait(2500+random(1000));
tabBackpack.mouseSlot(1,mouse_MOVE);
wait(1500+random(500));
if isMouseOverText(['eather']) then
begin
writeLn('Preset 1 has been successfully set');
workingPreset := True;
end;
end;
end;
if (workingPreset = True) then
begin
writeLn('Well that has probably never been done before...');
end;
if (workingPreset = False) then
begin
writeLn('We were not successfull in setting up Bank Preset 1');
if (gotTiara = False) then
begin
writeLn('Probably failed to make a preset because we do not have a Tiara, and likely no Feathers either');
end;
end;
end;
procedure bangKing;
var
tpa: TPointArray;
begin
repeat
exitTreasure();
claimTicket();
begin
writeLn('Banking logs');
if not minimap.findSymbols(tpa, MM_SYMBOL_BANK, minimap.getBounds()) then
begin
writeLn('No bank symbol found in the minimap, attempting to walk to the Bank');
walkToBank;
end;
if minimap.findSymbols(tpa, MM_SYMBOL_BANK, minimap.getBounds()) then
begin
writeLn('Found Bank symbol, clicking it now');
mouse(tpa[high(tpa)], MOUSE_LEFT); // Click farthest
wait((5000+random(1000)));
end;
end;
bankScreen.__open(BANK_NPC_BLUE);
if not bankScreen.isOpen() then
begin
repeat
tryToFix;
walkToBank;
bankScreen.__open(BANK_NPC_BLUE);
bankScreen.__open(BANK_BOOTH);
writeLn('Banking is hard right now');
until bankScreen.isOpen();
end;
if bankScreen.isOpen() then
begin
writeln('The bank is open! Lets start banking items!');
{bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
if bankScreen.isItemInPackSlot(2) or not bankScreen.isPackEmpty()then
begin
writeLn('We did not deposit items first try, retrying');
bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
end; }
begin
writeLn('Getting the feathers out of the bank');
if (workingPreset = False) then
begin
writeLn('We do no have our Preset 1 set up, doing that now');
make1stPreset;
end;
if (workingPreset = True) then
begin
writeLn('Our Preset 1 is ready to use, clicking to refresh inventory');
bankScreen.clickButton(BANK_BUTTON_PRESET_1);
end;
end;
if not bankScreen.isItemInPackSlot(2) then
begin
writeln('Our bankscreen pack is empty!');
mouseCircle(527,22,3,mouse_left);
wait (5000);
if not bankscreen.close() then
begin
WriteLn('Bankscreen did not close, retrying');
bankScreen.close();
end;
end;
vBanked := (vBanked +1);
//Progress;
end;
until (tabBackpack.isItemInSlot(1)) and (workingPreset = True) and not (tabBackpack.isItemInSlot(3))
end;
procedure keepFishingDraynor;
begin
tryToFix;
walkToDFishSpot;
repeat
findFishingSpot;
until tabBackpack.isFull();
if tabBackpack.isFull() then
begin
wChopped := (wChopped + 1);
repeat
tabBackpack.mouseSlot((28), MOUSE_Right);
chooseOption.select(['rop']);
wait(750+random(500));
until not tabBackpack.isFull();
walkToDraynorTree;
repeat
cutTree;
until tabBackpack.isFull();
writeLn('Inventory full or at least not empty, attempting to cook');
BurnAndCook;
walkToDraynorBank;
draynorBangKing;
end;
writeLn('End of Draynor Fishing loop');
end;
procedure keepFishingBarbarian;
begin
tryToFix;
walkToBFishSpot;
repeat
findFishingSpot;
if (outOfFeathers = True) then
begin
writeLn('No feathers left in the inventory');
gotFeathers := False;
Exit;
end;
until (tabBackpack.isFull()) or (gotFeathers = False);
if tabBackpack.isFull() then
begin
wChopped := (wChopped + 1);
repeat
tabBackpack.mouseSlot((28), MOUSE_Right);
chooseOption.select(['rop']);
wait(500+random(500));
until not tabBackpack.isFull();
walkToBarbarianTree;
repeat
cutTree;
until tabBackpack.isFull();
writeLn('Inventory full or at least not empty, attempting to cook');
BurnAndCook;
walkToBank;
BangKing;
end;
writeLn('End of Barbarian Fishing loop');
end;
procedure progress;
begin
tryToFix;
writeLn('**************************************************************');
writeLn('************* ! Wu-Tang Clan Ground Up Chopper ! *************');
writeLn('**************************************************************');
//writeLn(intToStr(dBanked) + ': Times banked in Draynor, which is: ' + intToStr(dBanked * 28) + ' Willow Logs, which is: ' + intToStr(dBanked * 1876) + ' XP');
writeLn(intToStr(vBanked) + ': Times banked in Varrock, which is: ' + intToStr(vBanked * 28) + ' Logs');
writeLn(timeRunning + ': Time Running');
writeLn(toStr(talkedToTutor) + ': Have talked to the GE Tutor (Used Exchange)');
writeLn(intToStr(burnt) + ': Inventories of logs (All types) burnt');
writeLn(intToStr(rChopped * 28) + ': Regular Logs chopped, which is: ' +intToStr(rChopped * 700) + ' XP');
writeLn(intToStr(rBurnt * 28) + ': Regular Logs burnt, which is: ' +intToStr(rBurnt * 1120) + ' XP');
writeLn(intToStr(oChopped * 28) + ': Oak Logs chopped, which is: ' +intToStr(oChopped * 1036) + ' XP');
writeLn(intToStr(oBurnt * 28) + ': Oak Logs burnt, which is: ' +intToStr(oBurnt * 1680) + ' XP');
writeLn(intToStr(wChopped * 28) + ': Willow Logs chopped, which is: ' +intToStr(wChopped * 1876) + ' XP');
writeLn(intToStr(wBurnt * 28) + ': Willow Logs burnt, which is: ' +intToStr(wBurnt * 2520) + ' XP');
writeLn('Woodcutting Level is: ' + intToStr(whatLevel));
writeLn('**************************************************************');
writeLn('**************************************************************');
end;
procedure backToCali;
begin
if (backToDraynor = True) then
begin
caliTimer.start();
soldShrimp := False;
soldAnchovies := False;
writeLn('Going going back back to Draynor Draynor');
getToTheSpotta;
Location := 1;
repeat
keepFishingDraynor;
until (checkTimer.getTime() > 1800000); // Half an hour
backToDraynor := False;
writeLn('Should be done with fishing in Draynor');
end;
caliTimer.reset();
caliTimer.pause();
end;
procedure repeatLoop();
begin
checkTimer.start();
tryToFix;
whatLevel();
if not minimap.isRunEnabled() then
begin
minimap.toggleRun(True);
end;
if (whatLevel <= 0) or (whatLevel = -1)then
begin
tryToFix;
writeLn('Skill icon was blinking when trying to find Woodcutting Level, retyring');
tabStats.open()
repeat
tabStats.getSkillLevel(SKILL_FISHING);
until not (whatLevel = -1);
writeLn('Fishing Level is: ' + intToStr(whatLevel));
end;
writeLn('Entered repeatLoop');
if (whatLevel >= 20) and (GEready = False) then
begin
writeLn('We are Fishing level 20 or higher and havent bought Feathers yet');
tabBackpack.mouseSlot(1, MOUSE_MOVE);
wait(2000+random(500));
if isMouseOverText(['eather']) then
begin
writeLn('We have Feathers in the first inventory slot- this means we have gone to the GE, may as well go fishing');
gotFeathers := True;
GEready := True;
end;
if (GEready = False) then
begin
repeat
GEsetup;
until (GEready = True);
end;
//Something here about buying the cape to check on cold start if we have been to the GE (Iron armor maybe?)
mainScreen.setAngle(MS_ANGLE_high);
Progress;
end;
if (whatLevel >= 20) and (GEready = True) and (gotFeathers = False) then
begin
repeat
writeLn('Selling fish and buying feathers from the Grand Exchange');
walkToBank;
withDrawFeathers;
if (gotFeathers = True) then
begin
writeLn('There were Feathers in the bank, exiting the loop');
Break;
end;
writeLn('Likely no Feathers in the bank, selling Raw Fish to buy Feathers');
withdrawFish;
theExchange;
until (gotFeathers = True);
end;
if (whatLevel >= 20) and (GEready = True) and (gotFeathers = True) then
begin
writeLn('Fishing level 20+ and the GE is set up, fishing Trout and Salmon in Barbarian Village');
repeat
Location := 2;
keepFishingBarbarian;
until (checkTimer.getTime() > 300000) or (gotFeathers = False);
Progress;
end;
if (whatLevel < 20) and (GEready = False) then
begin
writeLn('No other options available, fishing Shrimp and Anchovies in Draynor');
repeat
Location := 1;
keepFishingDraynor;
until (checkTimer.getTime() > 300000);
Progress;
end;
checkTimer.reset();
clearDebug();
writeln('Timer reset');
Progress;
end;
procedure testPaths;
begin
getToTheSpotta;
walkToDraynorTree;
walkToDraynorBank;
walkToDFishSpot;
walkToTutorFromDraynor;
walkToTheExchange;
fromExchangeToBank;
walkToTheExchange;
fromExchangeToBank;
walkToBFishSpot;
walkToBarbarianTree;
walkToBank;
walkToTheExchange;
end;
procedure homeOpener;
var
I: integer;
begin
wait(15000);
if (whatLevel <= 0) or (whatLevel = -1)then
begin
tryToFix;
writeLn('Skill icon was blinking when trying to find Fishing Level, retyring');
tabStats.open()
repeat
tabStats.getSkillLevel(SKILL_FISHING);
until not (whatLevel = -1);
writeLn('Fishing Level is: ' + intToStr(whatLevel));
end;
if (whatLevel >= 20) then
begin
gameTabs.openTab(TAB_EQUIPMENT);
if gameTabs.openTab(TAB_EQUIPMENT) then
begin
mouseBox([673,349,701,375],mouse_move); // Head slot in equipped items
wait(2000+random(500));
if isMouseOverText(['tiara']) then
begin
writeLn('We are wearing the tiara, must have set up the GE and have Feathers');
gotTiara := True;
tabBackpack.open();
wait(1500+random(500));
end;
if tabBackpack.isOpen() then
begin
for I := 1 to 8 do
begin
tabBackpack.mouseSlot(I, MOUSE_MOVE);
wait((2000+random(1000)));
if isMouseOverText(['eather']) then
begin
if (I > 1) then
begin
writeLn('Feathers were in slot: ' + intToStr(I) + ' moving them to first slot for the sake of ease');
dragmouse(point(600,340));
end;
wait((3000+random(1000)));
gotFeathers := True;
Break;
end;
end;
end;
end;
end;
if (gotTiara = True) then
begin
writeLn('We have a Tiara, so that means we have set up the Exchange!');
GEready := True;
end;
if (gotTiara = False) then
begin
writeLn('We do not have a Tiara, this is likely because the GE is not set up');
end;
writeLn('--HomeOpener results--');
writeLn('Do we have a Tiara? ' + ToStr(gotTiara));
writeLn('Do we have Feathers? ' + ToStr(gotFeathers));
end;
procedure MAINLOOP;
begin
setupSRL();
declareplayers;
players[currentPlayer].login();
sps.setup('FishermansFriend2', RUNESCAPE_OTHER);
checkTimer.start();
getToTheSpotta;
homeOpener;
repeat
repeatLoop;
until False;
end;
begin MAINLOOP end.
Simba Code:
program DraynorFisher;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/lib/SPS-RS3.Simba}
var
checkTimer: TTimeMarker;
foundAnchovies,foundShrimp: Boolean;
FireLVL, FireWait,shrimpSlot,anchoviesSlot,S,A: Integer;
Inventories, lastSlotTries, dBanked, noText: Integer;
procedure declarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := '';
password := '';
isActive := true;
isMember := false;
world := 8; // Best world don't change
end
currentPlayer := 0;
end;
function whatLevel(): integer;
begin
result := tabStats.getSkillLevel(SKILL_FISHING);
end;
procedure adjustFireWait;
begin
repeat
FireLVL := tabStats.getSkillLevel(SKILL_FIREMAKING);
writeLn('Firemaking Level is: ' + intToStr(tabStats.getSkillLevel(SKILL_FISHING)) + ' what will our wait time for lighting fires be?');
if (FireLVL <= 0) then
begin
writeLn('Skill icon must have been blinking, trying again');
end;
until (FireLVL >= 1) or not (FireLVL = -1);
if (FireLVL > 30) then
begin
FireWait := 7000;
writeLn('Our Firemaking is above 30 so our fireWait is: ' + intToStr(fireWait));
end;
if (FireLVL <= 30) then
begin
FireWait := 7000;
writeLn('Our Firemaking is below 30 so our fireWait is: ' + intToStr(fireWait));
end;
if (FireLVL <= 20) then
begin
FireWait := 10000;
writeLn('Our Firemaking is below 20 so our fireWait is: ' + intToStr(fireWait));
end;
if (FireLVL <= 10) then
begin
FireWait := 15000;
writeLn('Our Firemaking below 10 so our fireWait is: ' + intToStr(fireWait));
end;
if (FireLVL < 5) then
begin
FireWait := 20000;
writeLn('Our Firemaking is below 5 so our fireWait is: ' + intToStr(fireWait));
end;
end;
procedure tryToFix();
begin
exitTreasure();
claimTicket();
if bankScreen.isOpen() or grandExchange.isOpen() or not isLoggedIn() then
begin
if not isLoggedIn() then
begin
writeLn('We are not logged in, TryToFix caught it and is fixing');
players[currentPlayer].login();
end;
if bankScreen.isOpen() then
begin
writeLn('Bankscreen is open, TryToFix caught it and is fixing');
bankScreen.close();
end;
if grandExchange.isOpen() then
begin
writeLn('GE is open, TryToFix caught it and is fixing');
grandExchange.close();
end;
end;
end;
procedure Turn;
begin
case random(3) of
0:
begin
keyDown(VK_RIGHT);
wait((250 + Random(50)));
keyup(VK_right);
if (isKeyDown(VK_RIGHT)) then
begin
keyup(VK_RIGHT);
end;
end;
1:
begin
keyDown(VK_LEFT);
wait((250 + Random(50)));
keyup(VK_LEFT);
if (isKeyDown(VK_LEFT)) then
begin
keyUp(VK_LEFT);
end;
end;
2:
begin //Was VK_UP but that was just stupid why do I do stupid things
keyDown(VK_RIGHT);
wait((250 + Random(1000)));
keyup(VK_RIGHT);
if (isKeyDown(VK_RIGHT)) then
begin
keyUp(VK_RIGHT);
end;
end;
end;
end;
procedure getToTheSpotta();
var
path: TPointArray;
begin
wait((10000+random(3000)));
exitTreasure();
wait((1000+random(3000)));
mousecircle(498,488,3);
dragmouse(point(47,488));
mouseCircle(minimap.button[MM_BUTTON_LODESTONE].center.x, minimap.button[MM_BUTTON_LODESTONE].center.y,minimap.button[MM_BUTTON_LODESTONE].radius, MOUSE_LEFT);
if lodestoneScreen.isOpen(7000) then
begin
lodestoneScreen.teleportTo(LOCATION_LUMBRIDGE);
wait((30000+Random(750)));
//mousecircle(590,374,4, MOUSE_LEFT); stupid popup after teleport
end;
if not minimap.isRunEnabled() then
begin
writeLn('Run is not on, toggling');
minimap.toggleRun(True);
end;
writeln('This is the long haul. We are walking to Draynor! It will be lit');
//FMF1path := [Point(773, 1206), Point(752, 1188), Point(724, 1146), Point(711, 1115), Point(707, 1085), Point(707, 1067), Point(702, 1043), Point(694, 1018), Point(671, 998), Point(632, 992), Point(608, 981), Point(586, 973), Point(557, 962), Point(528, 965), Point(490, 960), Point(475, 959), Point(446, 937), Point(406, 934), Point(387, 929), Point(372, 930), Point(352, 926), Point(327, 916), Point(309, 922), Point(287, 929), Point(273, 945), Point(266, 965), Point(266, 978), Point(261, 990), Point(252, 1007), Point(252, 1024), Point(251, 1042), Point(248, 1056), Point(248, 1083), Point(247, 1105), Point(228, 1111), Point(207, 1112), Point(188, 1116), Point(174, 1134), Point(172, 1162), Point(178, 1177)]
// WORLDpath := [Point(1856, 1537), Point(1842, 1516), Point(1820, 1490), Point(1807, 1462), Point(1793, 1428), Point(1789, 1391), Point(1781, 1357), Point(1769, 1325), Point(1743, 1322), Point(1716, 1320), Point(1684, 1304), Point(1652, 1293), Point(1626, 1291), Point(1594, 1288), Point(1564, 1279), Point(1540, 1264), Point(1506, 1260), Point(1468, 1256), Point(1437, 1247), Point(1406, 1247), Point(1377, 1255), Point(1371, 1273), Point(1371, 1294), Point(1356, 1318), Point(1352, 1338), Point(1349, 1367), Point(1350, 1389), Point(1348, 1412), Point(1330, 1425), Point(1300, 1430), Point(1275, 1447), Point(1279, 1485), Point(1278, 1500)]
path := [Point(686, 1187), Point(681, 1169), Point(668, 1152), Point(651, 1140), Point(641, 1118), Point(637, 1107), Point(629, 1088), Point(627, 1076), Point(624, 1059), Point(622, 1044), Point(623, 1021), Point(617, 1010), Point(619, 996), Point(610, 976), Point(596, 976), Point(581, 972), Point(564, 975), Point(540, 971), Point(511, 960), Point(500, 953), Point(482, 947), Point(468, 944), Point(454, 944), Point(433, 942), Point(412, 939), Point(398, 931), Point(381, 919), Point(362, 905), Point(340, 914), Point(320, 907), Point(303, 909), Point(274, 903), Point(260, 893), Point(237, 902), Point(222, 909), Point(204, 908), Point(208, 930), Point(207, 943), Point(201, 961), Point(195, 972), Point(188, 990), Point(185, 1010), Point(179, 1025), Point(156, 1030), Point(143, 1051), Point(151, 1071), Point(149, 1082), Point(127, 1087), Point(115, 1102), Point(110, 1121), Point(111, 1147)]
if not sps.walkPath(path) then
begin
writeLn('walkPath() failed, trying blindWalk()');
sps.blindWalk(path[high(path)]);
end;
end;
procedure walkToDraynorTree(); // Single regular tree near Willows
var
path: TPointArray;
begin
tryToFix;
writeln('walking to Draynor Tree');
path := [Point(129, 1159)]
if not sps.walkPath(path) then
begin
writeLn('walkPath() failed, trying blindWalk()');
sps.blindWalk(path[high(path)]);
end;
mainScreen.setAngle(MS_ANGLE_HIGH);
end;
procedure walkToDraynorBank();
var
tpa, path: TPointArray;
begin
writeln('walking to Draynor Bank');
tryToFix;
path := [Point(113, 1145), Point(111, 1135), Point(111, 1128), Point(110, 1115), Point(110, 1105), Point(112, 1096), Point(120, 1087), Point(129, 1087), Point(139, 1090), Point(135, 1105)]
if minimap.findSymbols(tpa, MM_SYMBOL_Bank, minimap.getBounds()) then
begin
writeLn('Found Bank symbol, clicking it now');
mouse(tpa[high(tpa)], MOUSE_LEFT); // Click farthest
wait((8000+random(1000)));
end;
if not minimap.findSymbols(tpa, MM_SYMBOL_BANK, minimap.getBounds()) then
begin
writeLn('No Bank symbol found in the minimap, attempting to walk to the bank');
if not sps.walkPath(path) then
begin
writeLn('walkPath() failed, trying blindWalk()');
sps.blindWalk(path[high(path)]);
end;
end;
end;
procedure walkToDFishSpot();
var
TPA,path: TPointArray;
begin
writeln('walking to Draynor Fish Spot');
tryToFix;
path := [Point(137, 1110), Point(140, 1090), Point(122, 1088), Point(113, 1092), Point(111, 1108), Point(110, 1121), Point(114, 1147)]
begin
if not minimap.findSymbols(tpa, MM_SYMBOL_FISHING, minimap.getBounds()) then
begin
writeLn('No Fishing spot symbol found in the minimap, attempting to walk to the fishing spot');
if not sps.walkPath(path) then
begin
writeLn('walkPath() failed, trying blindWalk()');
sps.blindWalk(path[high(path)]);
end;
end;
if minimap.findSymbols(tpa, MM_SYMBOL_FISHING, minimap.getBounds()) then
begin
writeLn('Found Fishing spot symbol, clicking it now');
mouse(tpa[high(tpa)], MOUSE_LEFT); // Click farthest
wait((5000+random(1000)));
end;
end;
mainScreen.setAngle(MS_ANGLE_HIGH);
minimap.setAngle(MM_DIRECTION_WEST);
mainScreen.setZoom(true,30);
end;
procedure getRawSlots();
begin
if (foundShrimp = False) then
begin
for S := 2 to 27 do
begin
if tabBackpack.isItemInSlot(S) then
begin
tabBackpack.mouseSlot((S), MOUSE_MOVE);
wait(250+random(250));
if isMouseOverText(['Raw shrimp'],500) then
begin
shrimpSlot := S;
writeLn('There is raw shrimp in slot: ' + intToStr(S) + ' saving slot number for BurnAndCook');
foundShrimp := True;
mousecircle(747,540,5, MOUSE_LEFT);
break;
end;
end;
end;
end;
if (foundAnchovies = False) then
begin
for A := S to 27 do
begin
if tabBackpack.isItemInSlot(A) then
begin
tabBackpack.mouseSlot((A), MOUSE_MOVE);
wait(250+random(250));
if isMouseOverText(['Raw anchovies'],500) then
begin
anchoviesSlot := A;
writeLn('There is raw anchovies in slot: ' + intToStr(A) + ' saving slot number for BurnAndCook');
foundAnchovies := True;
mousecircle(747,540,5, MOUSE_LEFT);
break;
end;
end;
end;
end;
end;
procedure getRawShrimpSlot();
begin
if (foundShrimp = False) then
begin
for S := 2 to 27 do
begin
if tabBackpack.isItemInSlot(S) then
begin
tabBackpack.mouseSlot((S), MOUSE_MOVE);
wait(250+random(250));
if isMouseOverText(['Raw shrimp'],500) then
begin
shrimpSlot := S;
writeLn('There is raw shrimp in slot: ' + intToStr(S) + ' saving slot number for BurnAndCook');
foundShrimp := True;
mousecircle(747,540,5, MOUSE_LEFT);
break;
end;
end;
end;
end;
end;
procedure findFishingSpot();
var
i, s, h, slot, count: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
t: TTimeMarker;
p: Tpoint;
oakTimer: TTimeMarker;
change: boolean;
begin
tryToFix;
writeln('Fish');
noText := (noText + 1);
FindColorsTolerance(tpa, 14866123, mainscreen.getbounds(), 11, colorSetting(2, 0.9, 0.9))
if (Length(TPA) < 1) then
begin
Writeln('No fishing spots in sight');
//Turn;
noText := (noText + 1);
end;
ATPA := TPA.ToATPA(20, 30);
ATPA.sortFromMidPoint(Mainscreen.playerPoint);
SortATPASize(atpa, true);
h := High(ATPA);
for i := 0 to h do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if IsMouseOverText(['ishing', 'ishing spot'], 500) then
begin
fastclick(mouse_right);
chooseOption.select(['et']);
noText := 0;
repeat // please give me a medal for this
//slot := tabBackpack.count();
count := tabBackpack.count();
//writeLn('Current count: ' + intToStr(slot) + ', waiting for shift in slot ' + intToStr(slot + 1));
//slot := slot + 1;
//tabBackpack.waitSlotPixelChange(slot, 10000);
tabBackpack.waitForShift(20000);
getRawSlots;
if (count < tabBackpack.count()) then
begin
change := True;
writeLn('Still fishing');
end;
if (count >= tabBackpack.count()) then
begin
change := False;
writeLn('Not fishing anymore');
end;
until (tabBackpack.isFull()) or (change = False) ;
WriteLn('Fished a spot, nice!');
end else
noText := (noText + 1);
writeLn('There was no MouseOverText: ' + intToStr(noText) + ' times');
end;
if (noText > 20) then
begin
noText := 0;
writeLn('no MouseOverText more than 10 times, walking back to fishing spot');
walkToDFishSpot;
end;
end;
procedure findShrimpingSpot();
var
i, s, h, slot, count: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
t: TTimeMarker;
p: Tpoint;
oakTimer: TTimeMarker;
change: boolean;
begin
tryToFix;
writeln('Fish');
noText := (noText + 1);
FindColorsTolerance(tpa, 14866123, mainscreen.getbounds(), 11, colorSetting(2, 0.9, 0.9))
if (Length(TPA) < 1) then
begin
Writeln('No fishing spots in sight');
//Turn;
noText := (noText + 1);
end;
ATPA := TPA.ToATPA(20, 30);
ATPA.sortFromMidPoint(Mainscreen.playerPoint);
SortATPASize(atpa, true);
h := High(ATPA);
for i := 0 to h do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if IsMouseOverText(['ishing', 'ishing spot'], 500) then
begin
fastclick(mouse_right);
chooseOption.select(['et']);
noText := 0;
repeat // please give me a medal for this
//slot := tabBackpack.count();
count := tabBackpack.count();
//writeLn('Current count: ' + intToStr(slot) + ', waiting for shift in slot ' + intToStr(slot + 1));
//slot := slot + 1;
//tabBackpack.waitSlotPixelChange(slot, 10000);
tabBackpack.waitForShift(20000);
getRawShrimpSlot;
if (count < tabBackpack.count()) then
begin
change := True;
writeLn('Still fishing');
end;
if (count >= tabBackpack.count()) then
begin
change := False;
writeLn('Not fishing anymore');
end;
until (tabBackpack.isFull()) or (change = False) ;
WriteLn('Fished a spot, nice!');
end else
noText := (noText + 1);
writeLn('There was no MouseOverText: ' + intToStr(noText) + ' times');
end;
if (noText > 20) then
begin
noText := 0;
writeLn('no MouseOverText more than 10 times, walking back to fishing spot');
walkToDFishSpot;
end;
end;
procedure cutTree;
var
i, s, h: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
t: TTimeMarker;
p: Tpoint;
begin
tryToFix;
writeln('Tree');
FindColorsTolerance(tpa, 3429491, mainscreen.getbounds(), 7, colorSetting(2, 0.4, 0.2))
if (Length(TPA) < 1) then
begin
Writeln('No trees in sight');
noText := (noText + 1);
end;
ATPA := TPA.ToATPA(20, 30);
ATPA.sortFromMidPoint(Mainscreen.playerPoint);
SortATPASize(atpa, true);
h := High(ATPA);
for i := 0 to h do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if IsMouseOverText(['ree', 'down Tree'], 500) then
begin
fastclick(mouse_right);
chooseOption.select(['hop']);
noText := 0;
if tabBackpack.waitForShift(20000+Random(450)) then
WriteLn('Chopped Tree');
Exit();
end else
noText := (noText + 1);
writeLn('There was no MouseOverText: ' + intToStr(noText) + ' times');
end;
if (noText > 6) then
begin
noText := 0;
writeLn('No MouseOverText more than 6 times, walking back to Trees');
begin
writeLn('Particularly Draynor trees');
walkToDraynorTree;
end;
end;
end;
function findFire(): boolean;
var
i, s, h, slot, count: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
t: TTimeMarker;
p: Tpoint;
change : Boolean;
fireBox: TBox;
begin
tryToFix;
writeln('Find Fire');
fireBox := [18,20,461,381];
writeLn('Looking for Draynor Village colors');
FindColorsTolerance(TPA, 5628156,fireBox, 7, ColorSetting(2, 0.5, 0.5));
if (Length(TPA) < 1) then
begin
Writeln('No fires around');
//Turn;
noText := (noText + 1);
end;
ATPA := TPA.ToATPA(20, 30);
ATPA.sortFromMidPoint(Mainscreen.playerPoint);
SortATPASize(atpa, true);
h := High(ATPA);
for i := 0 to h do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if IsMouseOverText(['ire'], 500) then
begin
result := True;
noText := 0;
Exit();
end else
noText := (noText + 1);
result := False;
writeLn('There was no MouseOverText: ' + intToStr(noText) + ' times, turning camera');
Turn;
end;
if (noText > 15) then
begin
noText := 0;
writeLn('no MouseOverText more than 15 times, turning camera');
Turn;
end;
end;
procedure backupBnC;
var
tries, i, count, fireFails: Integer;
change: Boolean;
begin
for I := 2 to 27 do
begin
if tabBackpack.isItemInSlot(I) then
begin
wait(750+random(500));
tabBackpack.mouseSlot((I), MOUSE_MOVE);
if isMouseOverText(['Raw'],3000) then
begin
fastClick(MOUSE_LEFT);
wait(1500+random(500));
if not tabBackpack.isSlotActivated(I) then
begin
repeat
writeLn('Did not activate slot, clicking again');
tabBackpack.mouseSlot((I), MOUSE_LEFT);
wait(1500+random(500));
Tries := Tries + 1;
until tabBackpack.isSlotActivated(I) or (Tries >= 5);
end;
if tabBackpack.isSlotActivated(I) then
writeLn('Slot ' + intToStr(I) + ' is activated');
//mainScreen.setZoom(False,30);
findFire;
if (findFire = True) then
begin
writeln('FindFire was True, clicking left');
fastClick(mouse_right);
chooseOption.select(['ire'],2500);
wait(5000+random(1000));
mousecircle(395,339,5, MOUSE_LEFT);
wait(5000+random(1000));
break;
end;
if (findFire = False) then
begin
writeLn('FindFire was False, retrying alternate route');
if (tabBackpack.isFull()) then
begin
mousecircle(612,578,5, MOUSE_LEFT);
tabBackpack.mouseSlot((28), MOUSE_Right);
chooseOption.select(['rop']);
wait(500+random(500));
end;
walkToDraynorTree;
repeat
cutTree;
until (tabBackpack.isFull());
tabBackpack.mouseSlot((28), MOUSE_Right);
chooseOption.select(['ight']);
wait((FireWait)+random(500));
//mainscreen.setZoom(False,30);
tabBackpack.mouseSlot((I), MOUSE_LEFT);
repeat
findFire;
fireFails := (fireFails + 1);
until (isMouseOverText(['ire'],3000)) or (findFire = True) or (fireFails >= 5);
fastClick(mouse_right);
chooseOption.select(['ire'],2500);
wait(5000+random(1000));
mousecircle(395,339,5, MOUSE_LEFT);
wait(5000+random(1000));
break;
end;
end;
end;
end;
end;
procedure BurnAndCook;
var
Tries,i, count, fireFails: Integer;
change: Boolean;
begin
begin
tabBackpack.mouseSlot((28), MOUSE_MOVE);
if isMouseOverText(['ogs'],3000) then
begin
fastClick(MOUSE_RIGHT);
chooseOption.select(['ight']);
wait((FireWait)+random(1000));
end;
end;
if (foundAnchovies = True) then
begin
if tabBackpack.isItemInSlot(A) then
begin
tabBackpack.mouseSlot((A), MOUSE_Move);
if isMouseOverText(['Raw'],500) then
begin
fastClick(MOUSE_LEFT);
wait(1500+random(500));
if not tabBackpack.isSlotActivated(A) then
begin
repeat
writeLn('Did not activate slot, clicking again');
tabBackpack.mouseSlot((A), MOUSE_LEFT);
wait(1500+random(500));
Tries := Tries + 1;
until tabBackpack.isSlotActivated(A) or (Tries >= 5);
Tries := 0;
end;
if tabBackpack.isSlotActivated(A) then
writeLn('Slot ' + intToStr(A) + ' is activated');
findFire;
if (findFire = True) then
begin
writeln('FindFire was True, clicking left');
fastClick(mouse_right);
chooseOption.select(['ire'],2500);
wait(5000+random(1000));
mousecircle(395,339,5, MOUSE_LEFT);
wait(5000+random(1000));
end else
begin
writeLn('findFire was False! Let us try backupBnC');
backupBnC;
end;
end;
end;
end;
if progressScreen.isOpen() or progressScreen.findButton(PROGRESS_BUTTON_CANCEL, 7000, FALSE) or (progressScreen.getSkill()= SKILL_cooking) then
begin
repeat
wait(500+random(1500));
until (progressScreen.getPercentDone() >= 98) or not progressScreen.isOpen();
wait(3500+random(500));
end;
if (foundShrimp = True) then
begin
if tabBackpack.isItemInSlot(S) then
begin
tabBackpack.mouseSlot((S), MOUSE_move);
if isMouseOverText(['Raw'],500) then
begin
fastClick(MOUSE_LEFT);
wait(1500+random(500));
if not tabBackpack.isSlotActivated(S) then
begin
repeat
writeLn('Did not activate slot, clicking again');
tabBackpack.mouseSlot((S), MOUSE_LEFT);
wait(1500+random(500));
Tries := Tries + 1;
until tabBackpack.isSlotActivated(S) or (Tries >= 5);
Tries := 0;
end;
if tabBackpack.isSlotActivated(S) then
writeLn('Slot ' + intToStr(S) + ' is activated');
findFire;
if (findFire = True) then
begin
writeln('FindFire was True, clicking left');
fastClick(mouse_right);
chooseOption.select(['ire'],2500);
wait(5000+random(1000));
mousecircle(395,339,5, MOUSE_LEFT);
wait(5000+random(1000));
end else
begin
writeLn('findFire was False! Let us try backupBnC');
backupBnC;
end;
end;
end;
end;
if progressScreen.isOpen() or progressScreen.findButton(PROGRESS_BUTTON_CANCEL, 7000, FALSE) or (progressScreen.getSkill()= SKILL_cooking) then
begin
repeat
wait(500+random(1500));
until (progressScreen.getPercentDone() >= 98) or not progressScreen.isOpen();
wait(3500+random(500));
end;
foundShrimp := False;
foundAnchovies := False;
end;
procedure draynorBangKing;
var
tpa: TPointArray;
begin
exitTreasure();
claimTicket();
begin
writeLn('Draynor Banking');
if not minimap.findSymbols(tpa, MM_SYMBOL_BANK, minimap.getBounds()) then
begin
writeLn('No bank symbol found in the minimap, attempting to walk to the Bank');
walkToDraynorBank;
end;
if minimap.findSymbols(tpa, MM_SYMBOL_BANK, minimap.getBounds()) then
begin
writeLn('Found Bank symbol, clicking it now');
mouse(tpa[high(tpa)], MOUSE_LEFT); // Click farthest
wait((5000+random(1000)));
end;
end;
bankScreen.__open(BANK_NPC_DRAYNOR);
if not bankScreen.isOpen() then
begin
bankScreen.__open(BANK_NPC_DRAYNOR);
end;
if bankScreen.isOpen() then
writeln('The bank is open! Lets start banking items!');
bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
if bankScreen.isItemInPackSlot(2) or not bankScreen.isPackEmpty() then
begin
bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
end;
if bankScreen.isPackEmpty() or not bankScreen.isItemInPackSlot(28) then
begin
writeln('Our bankscreen pack is empty!');
mouseCircle(527,22,3,mouse_left);
wait(5000);
if not bankscreen.close() and not tabBackpack.isFull() then
begin
writeLn('Bankscreen did not close first try, retrying');
bankScreen.close();
end;
if bankScreen.close() then
begin
writeln('Closed the bankscreen, walking back to Willows');
//backToWillows;
end;
end;
dBanked := (dBanked + 1);
//walkToDFishSpot;
end;
procedure keepFishingDraynor;
begin
tryToFix;
walkToDFishSpot;
repeat
findFishingSpot;
until tabBackpack.isFull();
if tabBackpack.isFull() then
begin
Inventories := (Inventories + 1);
repeat
tabBackpack.mouseSlot((28), MOUSE_Right);
chooseOption.select(['rop']);
wait(750+random(500));
until not tabBackpack.isFull();
walkToDraynorTree;
repeat
cutTree;
until tabBackpack.isFull();
writeLn('Inventory full or at least not empty, attempting to cook');
BurnAndCook;
walkToDraynorBank;
draynorBangKing;
end;
writeLn('End of Draynor Fishing loop');
end;
procedure keepFishingShrimp;
begin
tryToFix;
walkToDFishSpot;
repeat
findShrimpingSpot;
until tabBackpack.isFull();
if tabBackpack.isFull() then
begin
Inventories := (Inventories + 1);
repeat
tabBackpack.mouseSlot((28), MOUSE_Right);
chooseOption.select(['rop']);
wait(750+random(500));
until not tabBackpack.isFull();
walkToDraynorTree;
repeat
cutTree;
until tabBackpack.isFull();
writeLn('Inventory full or at least not empty, attempting to cook');
BurnAndCook;
walkToDraynorBank;
draynorBangKing;
end;
writeLn('End of Shrimp loop');
end;
procedure progress;
begin
tryToFix;
writeLn('***************************************************************');
writeLn('**************** ! Wu-Tang Clan Shrimp Gumbo ! ****************');
writeLn('***************************************************************');
writeLn(intToStr(dBanked) + ': Times banked in Draynor, which is: ' + intToStr(Inventories * 28) + ' of Fish');
writeLn('Time Running: ' + timeRunning);
writeLn('Fishing Level is: ' + intToStr(whatLevel));
writeLn('***************************************************************');
writeLn('***************************************************************');
end;
procedure repeatLoop();
begin
checkTimer.start();
tryToFix;
whatLevel();
if not minimap.isRunEnabled() then
begin
minimap.toggleRun(True);
end;
if (whatLevel <= 0) or (whatLevel = -1)then
begin
tryToFix;
writeLn('Skill icon was blinking when trying to find Woodcutting Level, retyring');
tabStats.open()
repeat
tabStats.getSkillLevel(SKILL_FISHING);
until not (whatLevel = -1);
writeLn('Fishing Level is: ' + intToStr(whatLevel));
end;
writeLn('Entered repeatLoop');
adjustFireWait;
if (whatLevel >= 15) then
begin
writeLn('Fishing Shrimp and Anchovies in Draynor');
repeat
keepFishingDraynor;
until (checkTimer.getTime() > 300000);
Progress;
end;
if (whatLevel < 15) then
begin
writeLn('Fishing level below 15, fishing only Shrimp in Draynor');
repeat
keepFishingShrimp;
until (checkTimer.getTime() > 300000);
Progress;
end;
checkTimer.reset();
clearDebug();
writeln('Timer reset');
Progress;
end;
procedure MAINLOOP;
begin
setupSRL();
declareplayers;
players[currentPlayer].login();
sps.setup('FishermansFriend2', RUNESCAPE_OTHER);
checkTimer.start();
//getToTheSpotta;
repeat
repeatLoop;
until False;
end;
begin MAINLOOP end.
Simba Code:
program fishermansFriend;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/lib/SPS-RS3.Simba}
const
Cook = False; // Chop Logs (for Cooking fire) and Cook fish (make sure you have the right Cooking level!)
Bank = False; // Bank or Drop fish (Can Bank after cooking or Drop after cooking)
FirstPreset = True; // Have you made a Bank Preset 1 with only Feathers in the inventory? Or ran the script until it made one?
// If you already have the Preset 1 it will save you a little time, but the script can make one and test it
SetKeys = False; // Do you already have preset Mousekeys for RAW FISH? If true enter them for the following:
Salmon = '';
Trout = '';
var
checkTimer: TTimeMarker;
setupTrout, setupSalmon, successKeys,workingPreset,gotFeathers,foundSalmon,foundTrout: Boolean;
troutSlot,SalmonSlot,Sal,T: Integer;
inventories,lastSlotTries, vBanked, dBanked, noText: Integer;
TroutBox, SalmonBox: TBox;
procedure declarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := 'RIP';
password := 'restinpeace';
isActive := true;
isMember := false;
world := 8; // Best world don't change
end
currentPlayer := 0;
end;
function whatLevel(): integer;
begin
result := tabStats.getSkillLevel(SKILL_FISHING);
end;
function outOfFeathers(): boolean;
var
searchArea: TBox;
begin
writeLn('We are searching the chatbox to see if we have run out of Feathers');
if conversationBox.isOpen(3000) then
begin
if conversationBox.findChat(['fishing rod and feathers']) then
//writeLn('We found the proper text we were looking for');
begin
writeLn('Matching text found in Chatbox, there are no more Feathers');
result := True;
exit;
end else
begin
writeLn('No matching text was found, must still have Feathers');
result := False;
end;
end;
writeLn('Result for outOfFeathers: ' + toStr(result));
end;
function fullInv(): boolean;
var
searchArea: TBox;
begin
writeLn('We are searching the chatbox to see if we have run out of Feathers');
if conversationBox.isOpen(1000) then
begin
if conversationBox.findChat(['carry any more fish']) then
//writeLn('We found the proper text we were looking for');
begin
writeLn('Matching text found in Chatbox, Inventory is full');
result := True;
typeSend(' ',false);
wait(1000+random(500));
if conversationBox.isOpen(1000) then
begin
typeSend(' ',false);
end;
exit;
end else
begin
writeLn('No matching text was found, must still be room in the Inventory');
result := False;
end;
end;
writeLn('Result for FullInv: ' + toStr(result));
end;
function bankResult(): boolean; // This was kind of a mistake when I made it, but when I used it in reverse order it serves it's purpose
var
searchArea: TBox;
begin
writeLn('Searching the middle of the bank screen to see if we have a No Matches Found result');
searchArea := [246,268,358,286];
writeln(Tesseract_GetText(searchArea, TTesseractFilter([15, 15, [False, 15, TM_Mean]]),TESS_WHITELIST_LETTERS));
if (Tesseract_GetText(searchArea, TTesseractFilter([15, 15, [False, 15, TM_Mean]]),TESS_WHITELIST_LETTERS) = 'No matches foundl') or (Tesseract_GetText(searchArea, TTesseractFilter([15, 15, [False, 15, TM_Mean]]),TESS_WHITELIST_LETTERS) = 'No matches found') or (Tesseract_GetText(searchArea, TTesseractFilter([15, 15, [False, 15, TM_Mean]]),TESS_WHITELIST_LETTERS) = 'No matches found!') then
begin
writeLn('Matching text found, there were no fish I guess');
result := false;
exit;
end else
begin
writeLn('No matching text was found');
result := true;
end;
writeLn('Result for BankResult: ' + toStr(result) + ' hopefully True');
writeLn(result);
end;
procedure Turn;
begin
case random(3) of
0:
begin
keyDown(VK_RIGHT);
wait((250 + Random(50)));
keyup(VK_right);
if (isKeyDown(VK_RIGHT)) then
begin
keyup(VK_RIGHT);
end;
end;
1:
begin
keyDown(VK_LEFT);
wait((250 + Random(50)));
keyup(VK_LEFT);
if (isKeyDown(VK_LEFT)) then
begin
keyUp(VK_LEFT);
end;
end;
2:
begin //Was VK_UP but that was just stupid why do I do stupid things
keyDown(VK_RIGHT);
wait((250 + Random(1000)));
keyup(VK_RIGHT);
if (isKeyDown(VK_RIGHT)) then
begin
keyUp(VK_RIGHT);
end;
end;
end;
end;
procedure tryToFix();
begin
exitTreasure();
claimTicket();
if bankScreen.isOpen() or grandExchange.isOpen() or not isLoggedIn() then
begin
if not isLoggedIn() then
begin
writeLn('We are not logged in, TryToFix caught it and is fixing');
players[currentPlayer].login();
end;
if bankScreen.isOpen() then
begin
writeLn('Bankscreen is open, TryToFix caught it and is fixing');
bankScreen.close();
end;
if grandExchange.isOpen() then
begin
writeLn('GE is open, TryToFix caught it and is fixing');
grandExchange.close();
end;
end;
end;
procedure walkToBarbarianTree(); // Three regular trees near Barbarian Village fishing spots
var
path: TPointArray;
begin
tryToFix;
writeln('walking to Barbarian Tree');
path := [Point(193, 371)]
if not sps.walkPath(path) then
begin
writeLn('walkPath() failed, trying blindWalk()');
sps.blindWalk(path[high(path)]);
end;
mainScreen.setAngle(MS_ANGLE_HIGH);
end;
procedure walkToBFishSpot(); // From Varrock Bank
var
TPA,path: TPointArray;
begin
writeln('walking to Barbarian Village Fish Spot');
tryToFix;
path := [Point(514, 355), Point(517, 370), Point(513, 385), Point(480, 391), Point(460, 391), Point(440, 396), Point(429, 411), Point(418, 424), Point(403, 433), Point(377, 440), Point(351, 436), Point(330, 436), Point(313, 436), Point(291, 444), Point(266, 438), Point(250, 424), Point(232, 419), Point(206, 420), Point(182, 417), Point(193, 399), Point(208, 376)]
begin
if not minimap.findSymbols(tpa, MM_SYMBOL_FISHING, minimap.getBounds()) then
begin
writeLn('No Fishing spot symbol found in the minimap, attempting to walk to the fishing spot');
if not sps.walkPath(path) then
begin
writeLn('walkPath() failed, trying blindWalk()');
sps.blindWalk(path[high(path)]);
end;
end;
if minimap.findSymbols(tpa, MM_SYMBOL_FISHING, minimap.getBounds()) then
begin
writeLn('Found Fishing spot symbol, clicking it now');
mouse(tpa[high(tpa)], MOUSE_LEFT); // Click farthest
wait((5000+random(1000)));
end;
end;
mainScreen.setAngle(MS_ANGLE_HIGH);
minimap.setAngle(MM_DIRECTION_WEST);
//mainScreen.setZoom(true,30);
end;
procedure walkToBank(); //From Barbarian Village
var
path: TPointArray;
begin
writeln('walking to Varrock Bank');
tryToFix;
path := [Point(187, 405), Point(186, 419), Point(209, 422), Point(220, 418), Point(237, 423), Point(264, 439), Point(290, 443), Point(319, 436), Point(339, 434), Point(358, 436), Point(391, 436), Point(412, 425), Point(429, 406), Point(452, 394), Point(470, 394), Point(488, 390), Point(507, 387), Point(513, 360)]
if not sps.walkPath(path) then
begin
writeLn('walkPath() failed, trying blindWalk()');
sps.blindWalk(path[high(path)]);
end;
mainScreen.setAngle(MS_ANGLE_HIGH);
end;
procedure getRawSlots();
begin
if (foundTrout = False) then
begin
for T := 2 to 27 do
begin
if tabBackpack.isItemInSlot(T) then
begin
tabBackpack.mouseSlot((T), MOUSE_MOVE);
wait(250+random(250));
if isMouseOverText(['Raw trout'],500) then
begin
troutSlot := T;
writeLn('There is raw Trout in slot: ' + intToStr(T) + ' saving slot number for BurnAndCook');
foundTrout := True;
mousecircle(747,540,15, MOUSE_MOVE);
break;
end;
end;
end;
end;
if (foundSalmon = False) then
begin
for Sal := T to 27 do
begin
if tabBackpack.isItemInSlot(Sal) then
begin
tabBackpack.mouseSlot((Sal), MOUSE_MOVE);
wait(250+random(250));
if isMouseOverText(['Raw salmon'],500) then
begin
salmonSlot := Sal;
writeLn('There is raw Salmon in slot: ' + intToStr(Sal) + ' saving slot number for BurnAndCook');
foundSalmon := True;
mousecircle(747,540,15, MOUSE_Move);
break;
end;
end;
end;
end;
end;
procedure getTroutSlot();
begin
if (foundTrout = False) then
begin
for T := 2 to 27 do
begin
if tabBackpack.isItemInSlot(T) then
begin
tabBackpack.mouseSlot((T), MOUSE_MOVE);
wait(250+random(250));
if isMouseOverText(['Raw trout'],500) then
begin
troutSlot := T;
writeLn('There is raw Trout in slot: ' + intToStr(T) + ' saving slot number for BurnAndCook');
foundTrout := True;
mousecircle(747,540,15, MOUSE_MOVE);
break;
end;
end;
end;
end;
end;
procedure setupMousekeys; // Uses last 2 slots of ability bar
var
x,y: Tpoint;
begin
typeSend(' ',False);
if (setKeys = True) then
begin
writeLn('We already have preset Mousekeys, no need to set up new ones');
Exit;
end;
if (setKeys = False) then
begin
writeLn('We are going to make our own Mousekeys on the ability bar now');
actionBar.clearSlot(10);
writeLn('Cleared slot 10');
wait(1500+random(500));
actionBar.clearSlot(9);
writeLn('Cleared slot 9');
wait(1500+random(500));
if actionBar.isEmpty() then
begin
writeln('There is nothing in any of the slots');
end;
if actionBar.isSlotEmpty(9) and actionBar.isSlotEmpty(10) then
begin
writeLn('Slot 9 and 10 are empty');
end;
TroutBox := actionBar.getSlotBox(10);
SalmonBox := actionBar.getSlotBox(9);
getRawSlots;
if (FoundTrout = True) and (SetupTrout = False) then
begin
writeLn('Setting Trout Mousekey');
tabBackpack.mouseSlot((T), MOUSE_MOVE);
wait(1000);
dragMouse(troutBox.getMiddle);
wait(2000+random(500));
if actionBar.isSlotEmpty(10) then
begin
writeln('There is nothing in the Trout slot even after we just tried');
repeat
writeLn('Trying again');
tabBackpack.mouseSlot((T), MOUSE_MOVE);
wait(1000);
dragMouse(TroutBox.getMiddle);
wait(2000+random(500));
until not actionBar.isSlotEmpty(10);
end;
mouseBox(TroutBox,Mouse_move);
if isMouseOverText(['trout'],2500) then
begin
WriteLn('Trout slot on the Action Bar is set up! Setting SetupTrout to True');
setupTrout := True;
end;
end;
if (FoundSalmon = True) and (SetupSalmon = False) then
begin
writeLn('Setting Salmon Mousekey');
tabBackpack.mouseSlot((Sal), MOUSE_MOVE);
wait(1000);
dragMouse(salmonBox.getMiddle);
wait(2000+random(500));
if actionBar.isSlotEmpty(9) then
begin
writeln('There is nothing in the Salmon slot even after we just tried');
repeat
writeLn('Trying again');
tabBackpack.mouseSlot((Sal), MOUSE_MOVE);
wait(1000);
dragMouse(salmonBox.getMiddle);
wait(2000+random(500));
until not actionBar.isSlotEmpty(9);
end;
mouseBox(SalmonBox,Mouse_move);
if isMouseOverText(['salmon'],2500) then
begin
WriteLn('Salmon slot on the Action Bar is set up! Setting SetupSalmon to True');
setupSalmon := True;
end;
end;
end;
if (foundSalmon = False) and ((foundTrout = True) and (setupTrout = True)) then
begin
writeLn('No Salmon in the inventory, but Trout key set up successfully');
SuccessKeys := True;
end;
if (setupSalmon = True)and (setupTrout = True) then
begin
writeLn('SetupSalmon is True and SetupTrout is True, setting SuccessKeys to True as well');
SuccessKeys := True;
end;
end;
procedure dropFish;
var
beforeCount, afterCount,I: Integer;
// Cooked fish need to be dropped manually
// Raw fish can be dropped keybind
begin
if (Bank = False) then
begin
writeLn('Trying to drop fish!');
beforeCount := tabBackpack.count();
if (Cook = False) then
begin
writeLn('We are not cooking these fish, using Mousekeys to Drop them');
if (SuccessKeys = False) then
repeat
setupMousekeys;
until (SuccessKeys = True);
if (SetKeys = True) then
begin
writeLn('Using your preset Mousekeys to drop Raw Fish');
fullInv;
repeat
if (foundTrout = True) then
begin
typeSend((ToStr(Trout)),False);
end;
if (foundSalmon = True) then
begin
typeSend((ToStr(Salmon)),False);
end;
afterCount := tabBackpack.count();
until (afterCount <= 3);
end;
if (setKeys = False) and (SuccessKeys = True) then // Should randomise these
begin
fullInv;
repeat
if (foundSalmon = True) and (setupSalmon = True) then
begin
typeSend('9', False);
typeSend('9', False);
end;
if (foundTrout = True) and (setupTrout = True) then
begin
typeSend('0', False);
typeSend('0', False);
typeSend('0', False);
end;
afterCount := tabBackpack.count();
until (afterCount <= 3);
end;
writeLn('Should be finished with dropping Raw fish');
end;
if (Cook = True) then
begin
writeLn('We cooked these fish, need to use mouse to drop them');
for I := 2 to 28 do
begin
if tabBackpack.isItemInSlot(I) then
begin
tabBackpack.mouseSlot(I, MOUSE_MOVE);
wait((2000+random(1000)));
if isMouseOverText(['rout','almon','urnt']) then
begin
if (I > 1) then
begin
fastclick(mouse_right);
chooseOption.select(['rop'],3000);
end;
wait((3000+random(1000)));
end;
end;
end;
afterCount := tabBackpack.count();
writeLn('Should be finished dropping Cooked fish');
end;
if (beforeCount <= afterCount) then
begin
writeLn('Mousekeys not working, resetting SuccessKeys');
SuccessKeys := False;
SetupTrout := False;
SetupSalmon := False;
end;
if (beforeCount > afterCount) or (tabBackpack.count() <= 3) then
begin
writeLn('Mousekeys were successful');
end;
end;
end;
procedure withDrawFeathers;
var
I,Attempts, beforeCount, Count: Integer;
Slot: TBox;
begin
exitTreasure();
claimTicket();
if not bankScreen.isOpen() then
begin
writeLn('The Bank is not open!');
bankScreen.__open(BANK_BOOTH);
wait(3500+random(1500));
if not bankScreen.isOpen() then
repeat
WriteLn('Something messed up, retrying to open Bank by walking to the Bank and finding a Banker');
walkToBank;
bankScreen.__open(BANK_NPC_BLUE);
until bankScreen.isOpen();
end;
beforeCount := bankscreen.getPackCount();
if bankScreen.isOpen() then
begin
repeat
if bankScreen.isItemInPackSlot(2) then
begin
repeat
writeLn('Depositing everything from the inventory into the bank');
bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
wait(2000+random(500));
until bankScreen.isPackEmpty() or not bankScreen.isItemInPackSlot(28);
end;
bankScreen.searchBank('feather');
wait(1000+random(500));
if bankResult = False then
begin
WriteLn('Likely no results for Feathers, breaking from loop');
mouse(87,66,5,5,mouse_left);
gotFeathers := False;
Break;
end;
mouse(94,109,3,3,mouse_move); // First slot where searched item should be
Wait((3000+Random(500)));
if isMouseOverText(['eather']) then
begin
fastClick(mouse_right);
wait(1000+random(500));
chooseOption.select(['ithdraw-All']);
wait(2000+random(500));
mouse(94,109,3,3,mouse_move);
end;
wait((3000+random(2000)));
mouse(87,66,5,5,mouse_left);
wait((3000+random(2000)));
Count := bankscreen.getPackCount();
Slot := bankscreen.getPackSlotBox((Count));
mousebox(slot,mouse_move);
wait((3000+random(2000)));
if isMouseOverText(['eather']) then
begin
writeLn('We have feathers, changing gotFeathers to True');
gotFeathers := True;
end;
if not isMouseOverText(['eather']) then
begin
writeLn('We do not have feathers, changing gotFeathers to False');
gotFeathers := False;
end;
Attempts := (Attempts + 1);
until ((count > beforeCount) and (count < 20)) or (Attempts > 5) or (gotFeathers = True);
begin
writeln('Closing bank');
mouseCircle(527,22,3,mouse_left);
wait(5000);
if not bankscreen.close() then
begin
WriteLn('Bankscreen did not close, retrying');
bankScreen.close();
end;
end;
for I := 1 to 8 do
begin
tabBackpack.mouseSlot(I, MOUSE_MOVE);
wait((2000+random(1000)));
if isMouseOverText(['eather']) then
begin
if (I > 1) then
begin
writeLn('Feathers were in slot: ' + intToStr(I) + ' moving them to first slot for the sake of ease');
dragmouse(point(600,340));
end;
wait((3000+random(1000)));
gotFeathers := True;
Break;
end;
end;
Attempts := 0;
end;
end;
procedure findFishingSpot();
var
i, s, h, slot, count: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
t: TTimeMarker;
p: Tpoint;
oakTimer: TTimeMarker;
change: boolean;
begin
tryToFix;
writeln('Fish');
noText := (noText + 1);
FindColorsTolerance(tpa, 14866123, mainscreen.getbounds(), 11, colorSetting(2, 0.9, 0.9))
if (Length(TPA) < 1) then
begin
Writeln('No fishing spots in sight');
//Turn;
noText := (noText + 1);
end;
ATPA := TPA.ToATPA(20, 30);
ATPA.sortFromMidPoint(Mainscreen.playerPoint);
SortATPASize(atpa, true);
h := High(ATPA);
for i := 0 to h do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if IsMouseOverText(['ishing', 'ishing spot'], 500) then
begin
fastclick(mouse_right);
chooseOption.select(['et','ure']);
noText := 0;
repeat // please give me a medal for this
//slot := tabBackpack.count();
count := tabBackpack.count();
//writeLn('Current count: ' + intToStr(slot) + ', waiting for shift in slot ' + intToStr(slot + 1));
//slot := slot + 1;
//tabBackpack.waitSlotPixelChange(slot, 10000);
tabBackpack.waitForShift(20000);
getRawSlots;
if (count < tabBackpack.count()) then
begin
change := True;
writeLn('Still fishing');
end;
if (count >= tabBackpack.count()) then
begin
change := False;
writeLn('Not fishing anymore');
end;
until (tabBackpack.isFull()) or (change = False) or (fullInv = True);
WriteLn('Fished a spot, nice!');
end else
noText := (noText + 1);
writeLn('There was no MouseOverText: ' + intToStr(noText) + ' times');
end;
if (noText > 45) then
begin
noText := 0;
writeLn('no MouseOverText more than 10 times, walking back to fishing spot');
walkToBFishSpot;
end;
end;
procedure findTroutingSpot();
var
i, s, h, slot, count: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
t: TTimeMarker;
p: Tpoint;
oakTimer: TTimeMarker;
change: boolean;
begin
tryToFix;
writeln('Fish');
noText := (noText + 1);
FindColorsTolerance(tpa, 14866123, mainscreen.getbounds(), 11, colorSetting(2, 0.9, 0.9))
if (Length(TPA) < 1) then
begin
Writeln('No fishing spots in sight');
//Turn;
noText := (noText + 1);
end;
ATPA := TPA.ToATPA(20, 30);
ATPA.sortFromMidPoint(Mainscreen.playerPoint);
SortATPASize(atpa, true);
h := High(ATPA);
for i := 0 to h do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if IsMouseOverText(['ishing', 'ishing spot'], 500) then
begin
fastclick(mouse_right);
chooseOption.select(['et','ure']);
noText := 0;
repeat // please give me a medal for this
//slot := tabBackpack.count();
count := tabBackpack.count();
//writeLn('Current count: ' + intToStr(slot) + ', waiting for shift in slot ' + intToStr(slot + 1));
//slot := slot + 1;
//tabBackpack.waitSlotPixelChange(slot, 10000);
tabBackpack.waitForShift(20000);
getTroutSlot;
if (count < tabBackpack.count()) then
begin
change := True;
writeLn('Still fishing');
end;
if (count >= tabBackpack.count()) then
begin
change := False;
writeLn('Not fishing anymore');
end;
until (tabBackpack.isFull()) or (change = False) or (fullInv = True);
WriteLn('Fished a spot, nice!');
end else
noText := (noText + 1);
writeLn('There was no MouseOverText: ' + intToStr(noText) + ' times');
end;
if (noText > 45) then
begin
noText := 0;
writeLn('no MouseOverText more than 10 times, walking back to fishing spot');
walkToBFishSpot;
end;
end;
procedure cutTree;
var
i, s, h: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
t: TTimeMarker;
p: Tpoint;
begin
tryToFix;
writeln('Tree');
FindColorsTolerance(tpa, 3429491, mainscreen.getbounds(), 7, colorSetting(2, 0.4, 0.2))
if (Length(TPA) < 1) then
begin
Writeln('No trees in sight');
noText := (noText + 1);
end;
ATPA := TPA.ToATPA(20, 30);
ATPA.sortFromMidPoint(Mainscreen.playerPoint);
SortATPASize(atpa, true);
h := High(ATPA);
for i := 0 to h do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if IsMouseOverText(['ree', 'down Tree'], 500) then
begin
fastclick(mouse_right);
chooseOption.select(['hop']);
noText := 0;
if tabBackpack.waitForShift(15000+Random(450)) then
WriteLn('Chopped Tree');
Exit();
end else
noText := (noText + 1);
writeLn('There was no MouseOverText: ' + intToStr(noText) + ' times');
//Turn;
end;
if (noText > 6) then
begin
noText := 0;
writeLn('No MouseOverText more than 6 times, walking back to Trees');
begin
writeLn('Particularly Barbarian Village trees');
walkToBarbarianTree;
//Turn;
end;
end;
end;
function findFire(): boolean;
var
i, s, h, slot, count: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
t: TTimeMarker;
p: Tpoint;
change : Boolean;
fireBox: TBox;
begin
tryToFix;
writeln('Find Fire');
fireBox := [18,20,461,381];
writeLn('Looking for Barbarian Village colors');
FindColorsTolerance(TPA, 3850953,fireBox, 7, ColorSetting(2, 0.5, 0.5));
if (Length(TPA) < 1) then
begin
Writeln('No fires around');
//Turn;
noText := (noText + 1);
end;
ATPA := TPA.ToATPA(20, 30);
ATPA.sortFromMidPoint(Mainscreen.playerPoint);
SortATPASize(atpa, true);
h := High(ATPA);
for i := 0 to h do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if IsMouseOverText(['ire'], 500) then
begin
result := True;
noText := 0;
Exit();
end else
noText := (noText + 1);
result := False;
writeLn('There was no MouseOverText: ' + intToStr(noText) + ' times, turning camera');
Turn;
end;
if (noText > 15) then
begin
noText := 0;
writeLn('no MouseOverText more than 15 times, turning camera');
Turn;
end;
end;
procedure backupBnC;
var
tries, i, count, fireFails: Integer;
change: Boolean;
begin
for I := 2 to 27 do
begin
if tabBackpack.isItemInSlot(I) then
begin
wait(750+random(500));
tabBackpack.mouseSlot((I), MOUSE_MOVE);
if isMouseOverText(['Raw'],3000) then
begin
fastClick(MOUSE_LEFT);
wait(1500+random(500));
if not tabBackpack.isSlotActivated(I) then
begin
repeat
writeLn('Did not activate slot, clicking again');
tabBackpack.mouseSlot((I), MOUSE_LEFT);
wait(1500+random(500));
Tries := Tries + 1;
until tabBackpack.isSlotActivated(I) or (Tries >= 5);
end;
if tabBackpack.isSlotActivated(I) then
writeLn('Slot ' + intToStr(I) + ' is activated');
//mainScreen.setZoom(False,30);
findFire;
if (findFire = True) then
begin
writeln('FindFire was True, clicking left');
fastClick(mouse_right);
chooseOption.select(['ire'],2500);
wait(5000+random(1000));
mousecircle(395,339,5, MOUSE_LEFT);
wait(5000+random(1000));
break;
end;
if (findFire = False) then
begin
writeLn('FindFire was False, retrying alternate route');
if (tabBackpack.isFull()) then
begin
mousecircle(612,578,5, MOUSE_LEFT);
tabBackpack.mouseSlot((28), MOUSE_Right);
chooseOption.select(['rop']);
wait(500+random(500));
end;
walkToBarbarianTree;
repeat
cutTree;
until (tabBackpack.isFull());
tabBackpack.mouseSlot((28), MOUSE_Right);
chooseOption.select(['ight']);
wait(5000+random(500));
//mainscreen.setZoom(False,30);
tabBackpack.mouseSlot((I), MOUSE_LEFT);
repeat
findFire;
fireFails := (fireFails + 1);
until (isMouseOverText(['ire'],3000)) or (findFire = True) or (fireFails >= 5);
fastClick(mouse_right);
chooseOption.select(['ire'],2500);
wait(5000+random(1000));
mousecircle(395,339,5, MOUSE_LEFT);
wait(5000+random(1000));
break;
end;
end;
end;
end;
end;
procedure BurnAndCook;
var
Tries, i, count, fireFails: Integer;
cookedTrout,cookedSalmon,change: Boolean;
begin
begin
tabBackpack.mouseSlot((28), MOUSE_MOVE);
if isMouseOverText(['ogs'],3000) then
begin
fastClick(MOUSE_RIGHT);
chooseOption.select(['ight']);
wait((7000+random(1000)));
end;
end;
//mainScreen.setZoom(False,30);
if (foundTrout = True) and (cookedTrout = False) then
begin
if tabBackpack.isItemInSlot(T) then
begin
tabBackpack.mouseSlot((T), MOUSE_move);
if isMouseOverText(['Raw'],500) then
begin
fastClick(MOUSE_LEFT);
wait(1500+random(500));
if not tabBackpack.isSlotActivated(T) then
begin
repeat
writeLn('Did not activate slot, clicking again');
tabBackpack.mouseSlot((T), MOUSE_LEFT);
wait(1500+random(500));
Tries := Tries + 1;
until tabBackpack.isSlotActivated(T) or (Tries >= 5);
Tries := 0;
end;
if tabBackpack.isSlotActivated(T) then
writeLn('Slot ' + intToStr(T) + ' is activated');
findFire;
if (findFire = True) then
begin
writeln('FindFire was True, clicking left');
fastClick(mouse_right);
chooseOption.select(['ire'],2500);
wait(5000+random(1000));
mousecircle(395,339,5, MOUSE_LEFT);
wait(5000+random(1000));
end else
begin
writeLn('findFire was False! Let us try backupBnC');
backupBnC;
end;
end;
end;
end;
if progressScreen.isOpen() or progressScreen.findButton(PROGRESS_BUTTON_CANCEL, 7000, FALSE) or (progressScreen.getSkill()= SKILL_cooking) then
begin
repeat
wait(500+random(1500));
until (progressScreen.getPercentDone() >= 98) or not progressScreen.isOpen();
wait(3500+random(500));
end;
if (tabBackpack.isItemInSlot(T)) then
begin
tabBackpack.mouseSlot((T), MOUSE_Move);
if isMouseOverText(['Trout'],750) then
begin
writeLn('We have cooked the Trout');
cookedTrout := True;
end;
end;
if (foundSalmon = True) and (cookedSalmon = False) then
begin
if tabBackpack.isItemInSlot(Sal) then
begin
tabBackpack.mouseSlot((Sal), MOUSE_move);
if isMouseOverText(['Raw'],500) then
begin
fastClick(MOUSE_LEFT);
wait(1500+random(500));
if not tabBackpack.isSlotActivated(Sal) then
begin
repeat
writeLn('Did not activate slot, clicking again');
tabBackpack.mouseSlot((Sal), MOUSE_LEFT);
wait(1500+random(500));
Tries := Tries + 1;
until tabBackpack.isSlotActivated(Sal) or (Tries >= 5);
Tries := 0;
end;
if tabBackpack.isSlotActivated(Sal) then
writeLn('Slot ' + intToStr(Sal) + ' is activated');
findFire;
if (findFire = True) then
begin
writeln('FindFire was True, clicking left');
fastClick(mouse_right);
chooseOption.select(['ire'],2500);
wait(5000+random(1000));
mousecircle(395,339,5, MOUSE_LEFT);
wait(5000+random(1000));
end else
begin
writeLn('findFire was False! Let us try backupBnC');
backupBnC;
end;
end;
end;
end;
if progressScreen.isOpen() or progressScreen.findButton(PROGRESS_BUTTON_CANCEL, 7000, FALSE) or (progressScreen.getSkill()= SKILL_cooking) then
begin
repeat
wait(500+random(1500));
until (progressScreen.getPercentDone() >= 98) or not progressScreen.isOpen();
wait(3500+random(500));
end;
if (tabBackpack.isItemInSlot(Sal)) then
begin
tabBackpack.mouseSlot((Sal), MOUSE_Move);
if isMouseOverText(['Salmon'],750) then
begin
writeLn('We have cooked the Trout');
cookedTrout := True;
end;
end;
//mainScreen.setZoom(True,30);
foundTrout := False;
foundSalmon := False;
end;
procedure make1stPreset;
var
beforeCount,Attempts,I: integer;
tpa: TpointArray;
Count: Integer;
Slot: Tbox;
begin
if (FirstPreset = True) then
begin
writeLn('No need to make a Preset 1 because you have already set one up');
Exit;
end;
walkToBank;
withDrawFeathers;
if tabBackpack.isOpen() then
begin
for I := 1 to 8 do
begin
tabBackpack.mouseSlot(I, MOUSE_MOVE);
wait((2000+random(1000)));
if isMouseOverText(['eather']) then
begin
if (I > 1) then
begin
writeLn('Feathers were in slot: ' + intToStr(I) + ' moving them to first slot for the sake of ease');
dragmouse(point(600,340));
end;
wait((3000+random(1000)));
gotFeathers := True;
Break;
end;
end;
end;
if (gotFeathers = True) then
begin
writeLn('We have all the necessary requirements to make our bank preset');
begin
writeLn('Making Preset...');
if not minimap.findSymbols(tpa, MM_SYMBOL_BANK, minimap.getBounds()) then
begin
writeLn('No bank symbol found in the minimap, attempting to walk to the Bank');
walkToBank;
end;
if minimap.findSymbols(tpa, MM_SYMBOL_BANK, minimap.getBounds()) then
begin
writeLn('Found Bank symbol, clicking it now');
mouse(tpa[high(tpa)], MOUSE_LEFT); // Click farthest
wait((5000+random(1000)));
end;
end;
bankScreen.__open(BANK_NPC_BLUE);
if not bankScreen.isOpen() then
begin
repeat
tryToFix;
walkToBank;
bankScreen.__open(BANK_NPC_BLUE);
bankScreen.__open(BANK_BOOTH);
writeLn('Banking is hard right now');
until bankScreen.isOpen();
end;
if (gotFeathers = True) and (bankScreen.isOpen()) then
begin
writeLn('Clicking Preset Setup button in the Bank interface');
mouseBox([135,563,162,585],mouse_LEFT); // Preset box in bankscreen that should bring up heroscreen
wait(4000+random(500));
if not heroScreen.isOpen() then
begin
writeLn('Hero screen did not show up first try, clicking box again');
mouseBox([135,563,162,585],mouse_LEFT); // Preset box in bankscreen that should bring up heroscreen
//mousecircle(150,577,5, MOUSE_LEFT);
wait(4000+random(500));
end;
if heroScreen.isOpen() then
begin
writeLn('Setting up preset in the Hero Screen');
mouseBox([77,216,204,231],mouse_Left);
wait(1500+random(500));
mouseBox([229,214,239,230],mouse_left);
wait(1500+random(500));
mouseBox([132,506,157,523],mouse_left);
wait(1500+random(500));
mouseBox([122,359,205,374],mouse_left);
wait(1500+random(500));
mouseBox([367,220,373,225],mouse_left);
wait(1500+random(500));
mouseBox([767,29,774,37],mouse_left); // Close
end;
end;
if bankscreen.isOpen() and not bankScreen.isItemInPackSlot(5) then
begin
writeln('Our bankscreen pack is empty!');
mouseCircle(527,22,3,mouse_left);
wait (5000);
if not bankscreen.close() then
begin
WriteLn('Bankscreen did not close, retrying');
bankScreen.close();
wait(5000);
end;
end;
// Test to see if preset works
bankScreen.__open(BANK_NPC_BLUE);
if not bankScreen.isOpen() then
begin
repeat
tryToFix;
walkToBank;
bankScreen.__open(BANK_NPC_BLUE);
bankScreen.__open(BANK_BOOTH);
writeLn('Banking is hard right now');
until bankScreen.isOpen();
end;
if bankscreen.isOpen() then
begin
writeLn('Testing the Bank Preset 1');
bankScreen.clickButton(BANK_BUTTON_PRESET_1);
wait(2500+random(1000));
tabBackpack.mouseSlot(1,mouse_MOVE);
wait(1500+random(500));
if isMouseOverText(['eather']) then
begin
writeLn('Preset 1 has been successfully set');
workingPreset := True;
end;
end;
end;
if (workingPreset = True) then
begin
writeLn('Well that has probably never been done before...');
end;
if (workingPreset = False) then
begin
writeLn('We were not successfull in setting up Bank Preset 1');
end;
end;
procedure bangKing;
var
tpa: TPointArray;
begin
if (Bank = True) then
begin
repeat
exitTreasure();
claimTicket();
begin
writeLn('Banking logs');
if not minimap.findSymbols(tpa, MM_SYMBOL_BANK, minimap.getBounds()) then
begin
writeLn('No bank symbol found in the minimap, attempting to walk to the Bank');
walkToBank;
end;
if minimap.findSymbols(tpa, MM_SYMBOL_BANK, minimap.getBounds()) then
begin
writeLn('Found Bank symbol, clicking it now');
mouse(tpa[high(tpa)], MOUSE_LEFT); // Click farthest
wait((5000+random(1000)));
end;
end;
//mainScreen.setZoom(True,30);
bankScreen.__open(BANK_NPC_BLUE);
if not bankScreen.isOpen() then
begin
repeat
tryToFix;
walkToBank;
bankScreen.__open(BANK_NPC_BLUE);
bankScreen.__open(BANK_BOOTH);
writeLn('Banking is hard right now');
until bankScreen.isOpen();
end;
if bankScreen.isOpen() then
begin
writeln('The bank is open! Lets start banking items!');
{bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
if bankScreen.isItemInPackSlot(2) or not bankScreen.isPackEmpty()then
begin
writeLn('We did not deposit items first try, retrying');
bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
end; }
begin
writeLn('Getting the feathers out of the bank');
if (workingPreset = False) then
begin
repeat
writeLn('We do no have our Preset 1 set up, doing that now');
make1stPreset;
until (workingPreset = True) or (gotFeathers = False);
end;
if (workingPreset = True) or (FirstPreset = True) then
begin
writeLn('Our Preset 1 is ready to use, clicking to refresh inventory');
bankScreen.clickButton(BANK_BUTTON_PRESET_1);
end;
end;
if not bankScreen.isItemInPackSlot(2) then
begin
writeln('Our bankscreen pack is empty!');
mouseCircle(527,22,3,mouse_left);
wait (5000);
if not bankscreen.close() then
begin
WriteLn('Bankscreen did not close, retrying');
bankScreen.close();
end;
end;
vBanked := (vBanked +1);
//Progress;
end;
until (tabBackpack.isItemInSlot(1)) and (workingPreset = True) and not (tabBackpack.isItemInSlot(3))
end;
end;
procedure keepFishingBarbarian;
begin
tryToFix;
walkToBFishSpot;
repeat
findFishingSpot;
until (tabBackpack.isFull());
if tabBackpack.isFull() then
begin
Inventories := (Inventories + 1);
if (Cook = True) then
begin
writeLn('We are cooking the fish, since Cook = True');
repeat
tabBackpack.mouseSlot((28), MOUSE_Right);
chooseOption.select(['rop']);
wait(500+random(500));
until not tabBackpack.isFull();
walkToBarbarianTree;
repeat
cutTree;
until tabBackpack.isFull();
writeLn('Inventory full or at least not empty, attempting to cook');
BurnAndCook;
end;
if (Bank = True) then
begin
writeLn('We are Banking the fish, since Bank = True');
walkToBank;
BangKing;
end;
if (Bank = False) then
begin
writeLn('We are Dropping the fish, since Bank = False');
if (Cook = False) and ((setupSalmon = False) or (setupTrout = False)) then
begin
writeLn('Either Salmon or Trout mousekeys are no set up, setting up now');
setupMousekeys;
end;
dropFish;
end;
end;
writeLn('End of Barbarian Fishing loop');
end;
procedure keepFishingTrout;
begin
tryToFix;
walkToBFishSpot;
repeat
findTroutingSpot;
if (outOfFeathers = True) then
begin
writeLn('No feathers left in the inventory');
gotFeathers := False;
Exit;
end;
until (tabBackpack.isFull()) or (gotFeathers = False);
if tabBackpack.isFull() then
begin
Inventories := (Inventories + 1);
if (Cook = True) then
begin
writeLn('We are cooking the fish, since Cook = True');
repeat
tabBackpack.mouseSlot((28), MOUSE_Right);
chooseOption.select(['rop']);
wait(500+random(500));
until not tabBackpack.isFull();
walkToBarbarianTree;
repeat
cutTree;
until tabBackpack.isFull();
writeLn('Inventory full or at least not empty, attempting to cook');
BurnAndCook;
end;
if (Bank = True) then
begin
writeLn('We are Banking the fish, since Bank = True');
walkToBank;
BangKing;
end;
if (Bank = False) then
begin
writeLn('We are Dropping the fish, since Bank = False');
if (Cook = False) and (setupTrout = False) then
begin
WriteLn('No Mousekey setup for Trout. Setting up now');
setupMouseKeys;
end;
dropFish;
end;
end;
writeLn('End of Barbarian Fishing loop');
end;
procedure progress;
begin
tryToFix;
writeLn('***************************************************************');
writeLn('**************** ! Wu-Tang Clan Fly AF Gumbo ! ****************');
writeLn('***************************************************************');
writeLn(intToStr(dBanked) + ': Times banked in Draynor, which is: ' + intToStr(Inventories * 28) + ' of Fish');
writeLn(timeRunning + ': Time Running');
writeLn('Fishing Level is: ' + intToStr(whatLevel));
writeLn('***************************************************************');
writeLn('***************************************************************');
end;
procedure repeatLoop();
begin
checkTimer.start();
tryToFix;
//whatLevel();
if not minimap.isRunEnabled() then
begin
minimap.toggleRun(True);
end;
if (whatLevel <= 0) or (whatLevel = -1)then
begin
tryToFix;
writeLn('Skill icon was blinking when trying to find Woodcutting Level, retyring');
tabStats.open()
repeat
tabStats.getSkillLevel(SKILL_FISHING);
until not (whatLevel = -1);
writeLn('Fishing Level is: ' + intToStr(whatLevel));
end;
writeLn('Entered repeatLoop');
if (whatLevel >= 30) then
begin
writeLn('Fishing level 30+, fishing Trout and Salmon in Barbarian Village');
repeat
keepFishingBarbarian;
Progress;
until (checkTimer.getTime() > 300000);
end;
if (whatLevel <= 29) then
begin
writeLn('Fishing level below 30, fishing only Trout in Barbarian Village');
repeat
keepFishingTrout;
Progress;
until (checkTimer.getTime() > 300000);
end;
checkTimer.reset();
//clearDebug();
writeln('Timer reset');
end;
procedure MAINLOOP;
begin
setupSRL();
declareplayers;
players[currentPlayer].login();
sps.setup('FishermansFriend2', RUNESCAPE_OTHER);
checkTimer.start();
repeat
repeatLoop;
until False;
end;
begin MAINLOOP end.