SRL Archive - OSR Help

Deposit


Shuttleu

2009-04-17 23:18:04

I want to know if its only me who is getting this error
in the script (UCB) it has Deposit(1, 28, true);
but when it goes to bank it clicks on the logs and it clicks on Deposit-All but in the message area it comes up as if i have clicked Deposit-X
well at least it certainly looks like its clicking on Deposit-Al
l
it could just be something wrong with the ChooseOption

~shut

MetalancA

2009-04-18 02:39:28

I'm getting that error too. The odd thing is, the withdraw is also broken; when my script tries to withdraw x amount of coins, it clicks the option right before the "withdraw-x" option.

I'm guessing it's a bug from rev. 32

Richard

2009-04-18 03:05:27

Heres the fix:


Procedure Deposit(SlotFrom, SlotTo: Integer; vType: Variant);

Var
DepositX: Boolean;
All: Variant;
I, T, x, y: Integer;

Begin
If Not BankScreen Then
Exit;
If vType = 2 Then
srl_Warn('Deposit', '2 now means store per 2, not ''All''', 15);
DepositX := False;
Case VarType(vType) Of
3: Begin
DepositX := InIntArray([1, 5, 10], vType);
If vType = 1 Then
All := False
Else
All := True;
End;
11: All := vType;
End;
For I := SlotFrom To SlotTo Do
Begin
If Not ExistsItem(I) Then
Continue;
MouseItem(I, Not All);
If DepositX Then
Begin
ChooseOption('Deposit-X');
T := GetSystemTime;
While (Not FindColor(x, y, 8388608, MCX1, MCY1, MCX2, MCY2)) And (GetSystemTime - T < 3000) Do
Wait(100);
TypeSend(vType);
End Else If VarType(vType) = 3 Then
ChooseOption('Deposit-' + vType)
Else
ChooseOption('Deposit-All');
T := GetSystemTime;
Wait(RandomRange(200, 300));
While ExistsItem(I) And (GetSystemTime - T < 2000) Do
Wait(50);
End;
End;


EDIT: With the withdraw function, are you sure you're typing 0 for it to withdraw all?

MetalancA

2009-04-18 05:43:14

No, I'm trying to withdraw a specific amount of coins. Here's the function:

 if (BankScreen = true) then
begin
Withdraw(1,1,50000+random(1500));
wait(500+random(500));

this withdraws approx. 50k coins from your first inv. slot.

Shuttleu

2009-04-18 11:32:23

thankyou for the fix
i will test now
just out of curiosity what did you change?

~shut

EDIT: nope still the same problem