Thank you very much for this script!
There were some problems, and I've made some really dirty quick fixes for a couple of them. The first problem was that the script wouldn't withdraw my sharks properly, so I used aerolib's withdrawItem function instead like this:
Code:
procedure sharkFix(); //Declare this wherever you want, eg. in SetUp
begin
sharks.Name := 'Shark';
sharks.DTM := DTMFromString('mlwAAAHicY2dgYDjPxMBwDIhPAvENIL4DZd8E4lmMDAzLgXgyEE8B4sVAPJsRIp4VZM2wpD0PTIe6WTHUpIcw9JXGM0yvTmOQBJqLCzPiwVAAAIfiEzQ=');
end;
Usage further down:
Code:
if FindDTM(FoodDTMs[z], x, y, msx1, msy1, msx2, msy2) then // <-- problem occurs here I think
begin
//HumanMMouse(Point(x, y), 4, 3);
//if WaitUpTextMulti(['Withdraw', '5'], 400) then
//fastClick(Mouse_Right);
//waitOption('Withdraw-8', 250);
WithdrawItem(sharks, 5);
break(); //stops the itteration if food is found and withrew.
end else if z=high(FoodDTMs) then
There was also a rather serious bug (actually a direct consequence of failing to withdraw food) causing the script to constantly click the deposit-all button. A simple condition to check if the inventory is empty or not should fix that:
Code:
if not(isInvEmpty) then
quickDeposit('inventory');
end;
Edit:
There is also a serious issue where the script will find the poll booth instead of the bank booth, and just spam right click it. The dirty solution to this would be to just rotate the screen so that the poll booth is not visible before banking, and I'm looking into how to achieve this atm.
Edit2: adding setAngle(1) right before the banking should do the job for now. This really needs a fix, though, as it's bannable behaviour. If you add this in the banking procedure, you'll probably also want to add setAngle(0) somewhere else, like in ToMarket.