
Originally Posted by
NCDS
Looking at your latest post, I think you could change "0,1" to just 1, as I don't see why you would want to click the InvSlot if nothing exists there.
Other than that, it seems like ti would work as long as he didn't have over 10 runes of the same kind.
SCAR Code:
{*******************************************************************************
function GetAmount(ItemX, ItemY: Integer): Integer;
By: Zeph, N1ke & Narcle
Description: Returns the amount of an item at coordinates (ItemX, ItemY).
Returns approximate values for 'K' and 'M'.
*******************************************************************************}
Function GetAmount(ItemX, ItemY: Integer): Integer;
var
Col: TIntegerArray;
X, Y, I: Integer;
B: TBox;
TPA: TPointArray;
S: String;
begin
Result := 0;
If Not FindColor(X, Y, srl_outline_black, ItemX-30, ItemY-30, ItemX+30, ItemY+30)then
Exit;
Inc(Result);
Col := [65535, 16777215, 8453888];
For I:=0 to 2 do
If FindColor(X, Y, Col[I], ItemX-22, ItemY-22, ItemX+22, ItemY+22)then
begin
FindColors(TPA, Col[i], ItemX-22, ItemY-22, ItemX+22, ItemY+22);
B := GetTPABounds(TPA);
S := Trim(GetTextAtEx(B.X1-1, B.Y1-1, 0, StatChars, False, False, 0, 1, Col[I], 5, True, tr_AllChars));
Result := StrToIntDef(GetNumbers(S), 1);
Case I of
1: Result := Result * 1000;
2: Result := Result * 1000000;
end;
Exit;
end;
end;
I don't see a Result := 1; Only 0.. and some items when you have 'em in you Inventory show a 1, so i just put it there.
And you can't have multiple stacks of the same runes. They auto stack. Unless we're dealing with millions of runes--if they even divide stacks then--but shouldn't the ExistItem fix that--Or am I completely not understanding what you said?
EDIT:

Originally Posted by
NCDS
I currently don't see an option to deposit all in your latest. Maybe add another InRange check?
SCAR Code:
else
Deposit(i, i, True);