SRL Archive - SRL Archives

function withdrawitem(Name :string; Amount : Integer) Boolean;


Dark_Sniper

2006-06-03 16:59:24

still in beta… workin on the scroll down tec and i just might go out there and make DTMS of every item before yohojo does… if he doesent hurry up with that.. because then i can make it find the item without searching the bank for it.



function WithdrawItem(Name : string; Amount : Integer): Boolean;
var
resulty : integer;
begin
if (BankScreen = True) then
begin
x:=40
y:=72
Resulty:= 0;
repeat
x:=x+45
MMouse(x, y, 5, 1)
wait(500+random(50)-random(50))
If (IsUpText(Name)) then
Begin
getmousepos(x, y)
wait(100+random(50)-random(50))
mouse(x, y, 0, 0, true)
wait(100+random(50)-random(50))
resulty:= 1;
end else
begin
getmousepos(x, y)
wait(100+random(50)-random(50))
if (x >= 415) then
begin
y:=y+38
mmouse(97, y, 0, 1)
wait(100+random(50)-random(50))
getmousepos(x, y)
wait(100+random(50)-random(50))
x:=92
end;
if (y >= 282) then
begin
wait(100+random(50)-random(50))
writeln('couldn''t find item')
resulty:= 2;
end;
end;
until(IsUpText(''+Name+'')) or (resulty=1) or (resulty=2);
if (resulty = 2) then
begin
result:=false;
end else
result:=true;
if (result = True) then
begin
if (Amount = 1) then
begin
Mouse(x, y, 0, 0, True);
end
else
begin
Mouse(x, y, 0, 0, False);
wait(1000)
if (Amount = 1) or (Amount = 5) or (Amount = 10) or (Amount = 0) then
begin
if (Amount = 5) then
ChooseOption(x, y, 'Withdraw 5');
if (Amount = 10) then
ChooseOption(x, y, 'Withdraw 1');
if (Amount = 28) or (Amount = 0) then
ChooseOption(x, y, 'Withdraw All');
end
else
begin
ChooseOption(x, y, 'Withdraw X');
Wait(1000 + Random(100));
TypeSend(IntToStr(Amount) + chr(13));
end;
end;
end;
end;
end;