Lama
2014-11-16 16:20:15
So I'm trying to find an item (portable sawmill) in the bankscreen and withdraw it under certain circumstances, however, after multiple different DTM variations and other trial and error, I havee yet to figure out a way to get the script to find it, and I think it's because it's stackable and the number covers up some of the black outline of the item.
The only thing I don't understand is that in the DTM editor, the editor can find the DTM's I make, but when used in practice, it doesn't detect it at all.
Here's the code snippet I am using for development:
Any thoughts so I don't have to limit users to 'Place this item in bank slot 10, etc'?
The only thing I don't understand is that in the DTM editor, the editor can find the DTM's I make, but when used in practice, it doesn't detect it at all.
Here's the code snippet I am using for development:
if bankScreen.isOpen(1250) or pinScreen.isOpen(1250) then
begin
if pinScreen.isOpen() then
pinScreen.enter(players[currentPlayer].bankPin);
mouseBox([393, 564, 420, 585], MOUSE_LEFT); // quick inventory deposit seems broken at the moment, look in to
writeLn(toStr(bankScreen.getPackCountDTM(millDTM))); // For dev purposes, always comes out as 0 so far
if bankScreen.isPackEmpty() then // probably unnecessary check
if not bankScreen.withdraw(millDTM, 1) then // withdraw the mill, by DTM
begin
writeLn('No extra mills left ... terminating script ...');
terminateScript();
end;
smartImage.debugDTM(millDTM, mainScreen.getBounds(), clLime);
antiban();
if bankScreen.isItemInPackSlot(1) then // also probably unnecessary, have yet to test all of this...
bankScreen.close();Any thoughts so I don't have to limit users to 'Place this item in bank slot 10, etc'?