
Originally Posted by
pure_thief
I'm trying make a procedure for banking iron and gems. However the script is only banking the iron and one gem, leaving the rest of the gems in the inventory (there are different kinds of gems, but the GemDTM has a 255 tolerance).
Here's what I've got. I'm sure I must need some kind of
repeat.... until function, but I don't really know how to use it
Fixed code
Simba Code:
Procedure DepositOres;
var
x, y, IronOreDTM, i:Integer;
begin
IronOreDTM := DTMFromString('mwQAAAHic42RgYMhlYmAoAuIqIC4H4iwgjoPiJCDOAGIxRgYGLiAWAGJpIFYGYllGiDhIjBOITeXFGbQkhBgygi0Z9GVEGNICLRjCXQ0YrPQUGEy1ZBnsjZQZ+IH2EcKMRGA4AABEwgqU');
if FindDTM(IronOreDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x, y, 5, 5, false);
WaitOption('All', 400);
end;
end;
Procedure DepositGems;
var
x, y, GemsDTM, i:integer;
begin
GemsDTM := DTMFromString('mvQEAAHictc5BCoNADIXhOOBOLQhTFUFob9aKBUVEKa13cNUbt/9gFiIup4EvgUcCsSIyGJERPVo0uOO2UeOBzqz7E154q1mny57IApEEEWJ1QoozClS44Lrj8hI5rN6428+y8K3x6ksPPQv+4LB+nDsOZw==');
if FindDtm(GemsDtm, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x, y, 5, 5, false);
WaitOption('All', 1000); // Changed this to 'All' As well, now it chooses the all option for you
end;
end;
You can also use a function like this
Simba Code:
procedure DepositLoot;
begin
if BankScreen then
Deposit(1, 23, true); // Deposits the slots 1-23 using the all feature!
end;
However the use of DTMs is good practice for more complex situations and I like it!
Also for a DTM making, read this tut
This should deposit all the gems now(: