Greytor
2015-01-17 01:33:04
Hi guys, I need some help with my script, I need it to detect that if an item is not in my backpack, it will open the bank and withdraw it.
I have to part for the withdrawing working,but if my item is in my inventory it will still open the bank which is not what I want it to do.
Here is the code:
Im pretty sure it has to do with the tabBackPack.getBoundds that I use,but I am not sure about it,hopefully you guys can help me.
I have to part for the withdrawing working,but if my item is in my inventory it will still open the bank which is not what I want it to do.
Here is the code:
if not findDTM(SticksDTM, x, y, tabBackPack.getBounds()) then // If there is no stick in inventory open bank.
begin
bankScreen.open(BANK_BOOTH); // Open then bank
wait(randomRange(1000, 3000));
findDTM(SticksDTM, x, y, bankScreen.getBounds());
mouse(x, y, 3, 3, MOUSE_MOVE);
wait(randomRange(500, 700));
if isMouseOverText(['Withdraw']) then
begin
fastClick(MOUSE_RIGHT);
wait(RandomRange(500, 1000));
chooseOption.select(['All Tra']);
end;
bankScreen.close(); // Close the bank
end else
FreeDTM(SticksDTM);
end; Im pretty sure it has to do with the tabBackPack.getBoundds that I use,but I am not sure about it,hopefully you guys can help me.