So the code I am trying to use now looks like this.
Code:
//=========================================\\
// \\
// GPS \\
// by Sjoe \\
//=========================================\\
function GPS(): String;
var
p: Tpoint;
begin
if (minimap.findSymbol(p, MM_SYMBOL_BANK, minimap.getBounds)) and distance(minimap.getCenterPoint(), p) < 5 then
Result := 'Bank';
exit;
if (minimap.findSymbol(p, MM_SYMBOL_SHOP_MAGIC, minimap.getBounds)) and distance(minimap.getCenterPoint(), p) < 5 then
Result := 'Shop';
exit;
if not (minimap.findSymbol(p, MM_SYMBOL_BANK, minimap.getBounds)) and not (minimap.findSymbol(p, MM_SYMBOL_SHOP_MAGIC, minimap.getBounds)) then
Result := 'Cave';
exit;
end;
Is checking the distance from the symbol unnecessary?
This is how I am trying to use it. Is this incorrect?
Code:
procedure mainLoop;
begin
repeat
if not isLoggedIn then
playerSetup;
//A SPACE GOES HERE!!!!!!!!!!!!
GPS; //EDIT! Remember kids, scripting is a black-hearted siren.
if (GPS = 'Bank') and (tabBackpack.isFull()) then
begin
findBanker;
depositEss;
end;
if (GPS = 'Bank') and (not tabBackpack.isFull()) then
begin
walkToAubury;
end;