Well there's all sorts of function on finding items in the bank, but nothing with withdrawing. How could I go about withdrawing an item using reflection and knowing only the ID of the item?
Printable View
Well there's all sorts of function on finding items in the bank, but nothing with withdrawing. How could I go about withdrawing an item using reflection and knowing only the ID of the item?
SCAR Code:var
Item : TBankSlot;
Index : Integer;
ItemPoint : TPoint;
Item.ID:= 1234;
if BankContains(Item, Index) then
begin
ItemPoint:= BankIndexToMSPoint(index);
Mouse(ItemPoint.x, ItemPoint.y, 20, 20, False);
{etc...}
end;
~shut
Oh so for it to be able to withdraw you don't need to fill out all of the parts of the TBankSlot variable?
yeah
which is what the Item.ID:= 1234; is for
replace 1234 with the item id
~shut
Yeah I know I just didn't realize we didn't have to fill out all these
For it to function correctly. Thanks :)Quote:
Index, ID, Stack : Integer;
Name : String;
Sorry for double post but, it's not working :\
SCAR Code:function BankIt: boolean; //ty shuttleu for help
var
BankTile,ItemPoint : TPoint;
x,y, opening,Index, waiting : Integer;
Rod, Ess: TBankSlot;
begin
if not LoggedIn then LoginPlayer;
proggy;
SetRun(true);
if RingCharged then
begin
Charged := true;
end else
begin
Charged := false;
end;
if not WalkToTile(Point(2443,3083),1,0) then
begin
wait(4000+random(1500));
if not WalkToTile(Point(2443,3083),1,0) then
begin
Players[CurrentPlayer].Strings[2] := 'Failed Getting to Bank';
writeln('FAILED GETTING TO BANK. Next Player');
result := false;
exit;
end;
end;
marktime(waiting);
repeat
wait(500+Random(300));
until not (CharacterMoving) or (TimeFromMark(waiting) > 10000);
BankTile := TileToMS(Point(2445,3083),2);
MMouse(BankTile.x, BankTile.y, 2, 2);
wait(300+random(100));
if IsUpText('ank') then
begin
GetMousePos(x,y);
Mouse(x,y,0,0,true);
end else
begin
Players[CurrentPlayer].Strings[2] := 'Failed Finding Bank';
writeln('FAILED FINDING BANK. Next Player');
result := false;
exit;
end;
MarkTime(opening);
repeat
wait(400+random(200));
InPin(Players[currentplayer].Pin);
until (R_BankScreen) or (TimeFromMark(Opening) > 19000);
if not BankScreen then
begin
Players[CurrentPlayer].Strings[2] := 'Failed Opening Bank';
writeln('FAILED OPENING BANK. Next Player');
result := false;
exit;
end;
DepositAll;
Ess.ID := 1437;
if not Charged then
begin
Rod.ID := 2553;
if BankContains(Rod, Index) then
begin
ItemPoint:= BankIndexToMSPoint(index);
Mouse(ItemPoint.x, ItemPoint.y, 2, 2, True);
marktime(waiting);
end else
begin
Players[CurrentPlayer].Strings[2] := 'No more RODs';
writeln('NO MORE RODS. Next Player');
result := false;
exit;
end;
end;
if BankContains(Ess, Index) then
begin
ItemPoint:= BankIndexToMSPoint(index);
Mouse(ItemPoint.x, ItemPoint.y, 2, 2, False);
marktime(waiting);
repeat
wait(200+random(100));
until (R_chooseoption('ll')) or (TimeFromMark(waiting) > 7000);
end else
begin
Players[CurrentPlayer].Strings[2] := 'No more ess';
writeln('NO MORE ESS. Next Player');
result := false;
exit;
end;
CloseBank;
marktime(waiting);
repeat
wait(100+random(100));
until (InvFull) or (TimeFRomMark(waiting) > 7000);
if not InvFull then
begin
Players[CurrentPlayer].Strings[2] := 'Failed Withdrawing';
writeln('FAILED WITHDRAWING. Next Player');
result := false;
exit;
end;
if not Charged then
begin
mouseitem(1, true);
Charged := true;
end;
result := true;
end;
It's giving me 'NO MORE ESS' :(
Why not just use Search Bank :)
~Home
Well, that wouldn't be quite as efficient :p
Anyone have any ideas on why the code I posted above isn't working?
probably the wrong id.
I used
To get the ID :(Quote:
DebugTItemArray(GetInventoryItemsEx);
use the bank debugger to get the bank id...
:eek: They're different? Didn't even know there was a thing like that...Lol. Rep+
EDIT: Where do I find all of those debug functions?
-.- Which file I mean :p Can't seem to find them...
EDIT: Or you can tell me the bank debug one :)
{************************************************* ******************************
procedure DebugTBankSlotArray(arrBS : TBankSlotArray);
By: Nava2
Description: Writes all the values in the TBankSlotArray, useful for scripters.
************************************************** *****************************}
in the bank.scar
Just so you know, the Index is different from the bank index.. =/
Just check to see if the item is in there, then search for it, and use a dtm to click it.
Why isnt this in reflection section?
But my suggestion was to just make a simple dtm.
if it cant be done fully with reflection then search wether it is there then do a bank search
~shut
What you could do, is check if its there, then follow up with a SearchBank then simply find a bitmap/dtm/colour. :)
Oh, I ended up using DTMs, doing the job great :)
item ID in inventory is itemdatabase ID + 1.
http://itemdb-rs.runescape.com/viewitem.ws?obj=1375
ID in database for Bronze b axe = 1375
in inventory its 1375 + 1 = 1376