Inspirations
2010-09-23 14:55:50
EDIT: Woah wrong section! I'm so sorry, will a mod please move it!
Okay so I am making a cooker for my second script and I'm really trying to do something advanced (in hopes I can apply for members with it), but I've come to an issue. I don't want to use DTM's for withdrawal, I would prefer to use BlackLists (I think that's what MSI Called them) or the black outline of an object. Now the issue is that in the inventory the blackcount is lets say 77. In the bank, when you have more than one you get the yellow text. There is black around the yellow text, thus distorting the black color count, and changing it everytime you withdraw. Is there any way around this, or any suggestions besides using a dtm?
here's code:
GlobalCount, like the name suggests is set globally in a different function
Okay so I am making a cooker for my second script and I'm really trying to do something advanced (in hopes I can apply for members with it), but I've come to an issue. I don't want to use DTM's for withdrawal, I would prefer to use BlackLists (I think that's what MSI Called them) or the black outline of an object. Now the issue is that in the inventory the blackcount is lets say 77. In the bank, when you have more than one you get the yellow text. There is black around the yellow text, thus distorting the black color count, and changing it everytime you withdraw. Is there any way around this, or any suggestions besides using a dtm?
here's code:
function WithdrawBank: Boolean;
var
Area: TBox;
I, Index: Integer;
BlackCount: Integer;
TP: TPoint;
begin
for I := 1 to 25 do
begin
Area := BankIndexToMSBox(I);
BlackCount := CountColorTolerance(BlackColor, Area.x1, Area.y1, Area.x2,
Area.y2, 2);
writeLn('Slot['+IntToStr(I)+']: BlackCount = '+IntToStr(BlackCount));
if InRange(BlackCount, GlobalCount+15, GlobalCount-15) then // I did this to try to account for the change in blackcount
begin
Index := I;
Break;
end;
end;
if Index = 0 then
Exit;
WriteLn('Found Item in Slot: '+IntToStr(Index));
TP := BankIndexToMSPoint(Index);
Mouse(TP.x, TP.y, 5, 5, false);
result := WaitOption('All', 500);
end; GlobalCount, like the name suggests is set globally in a different function