SRL Archive - OSR Help

Deposit Box - Deposit All


digitalninja

2013-07-21 12:32:16

Hi Folks,

I need help updating a few scripts … with the I guess not so recent update that we can add dragon tools to our toolbelt the once complicated task of find DTM's and depositing just certain items is no longer needed. I would like to update my script to just be able to deposit all into a deposit box … can anyone point me in the right direction please??

Thanks!

DN

Sjoe

2013-07-21 12:49:13

DepositAll; should work for Bank and Depositbox

digitalninja

2013-07-21 12:59:47

Hey Sjoe,

I thought there was a function like that but I cant seem to locate in Simba? I have tried searches for deposit and bank but I think I have something set up wrong … I can find seem to find it anywhere?

Thanks!

DN

I have even gotten to this site - http://docs.villavu.com/simba/referencescript.html and cant find any of the bank/deposit functions?

Sjoe

2013-07-21 13:04:15

http://docs.villavu.com/srl-5/bank.html#depositall here:)

digitalninja

2013-07-21 13:37:42

Thanks Sjoe … I tried to replace my bank procedure with the DepositAll but got the following error - [Error] C:\Simba\Scripts\MahoganyApe.simba(197:10): Duplicate identifier 'DEPOSITALL' at line 196
Compiling failed.

Is this because I still need to call the depositall in a procedure vs a function?

Sjoe

2013-07-21 13:43:18

just call

DepositAll;

Maybe show your work plox?

digitalninja

2013-07-21 13:50:59

Thanks again for the help … I think I am making this more complicated than it needs to be … this is my current banking procedure -

procedure BankLogs;
var
x, y, MahoganyLog, SpecialMahoganyLog, BankBox, i: integer;
tmpCTS, counter:integer;
ChestTPA:TPointArray;
begin
SetAngle(SRL_ANGLE_HIGH);

MahoganyLog := DTMFromString('mbQAAAHicY2VgYChiZGAoBeIuIG4H4nIgNgBiFSBWB2JTILYAYn9dbqBqJjSMCRixYDAAAFrdA/s=');
SpecialMahoganyLog := DTMFromString('mWAAAAHicY2FgYGhjYmBoBuKJQFwJohkZGLqAeCoQtwFxlb8ZQ1uYNVAlExSjAkY0DAIAl8wGeA==');
BankBox := DTMFromString('mbQAAAHicY2VgYLBiZmAwAWJjIHYEYicgfsfIwPAYiL9AMYg9IUiHIctGgaHAw5ChPsiCoc5DjQEEWNEwIxYMBgDmiQql');

tmpCTS := GetToleranceSpeed;
SetColorToleranceSpeed (2);
SetToleranceSpeed2Modifiers(0.03, 0.07);

FindColorsTolerance(ChestTPA, 2574721, MSX1, MSY1, MSX2, MSY2, 33);

SetColorToleranceSpeed(tmpCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);

if FindObjTPA(x, y, 2904720, 5, 2, 60, 30, 15, ['epo', 'Deposit', 'chest', 'Bank']) or FindDTM(BankBox, x, x, msx1, msy1, msx2, msy2) then
begin
Mouse(x, y, 7, 7, mouse_left);
repeat
Wait(250 + random(100));
Inc(i);
until(FindDTM(MahoganyLog, x, y, msx1, msy1, msx2, msy2) or (FindDTM(SpecialMahoganyLog, x, y, msx1, msy1, msx2 ,msy2)) or (i > 20));
if FindDTM(MahoganyLog, x, y, msx1, msy1, msx2, msy2) then
begin
Mouse(x, y, 7, 7, false);
WaitOptionMulti(['All', '-All', 'sit-All'], 1000);
Wait(500 + random(250));
WriteLn('Found logs');
if FindDTM(SpecialMahoganyLog, x, y, msx1, msy1, msx2 ,msy2) then
begin
Mouse(x, y, 7, 7, false);
WaitOptionMulti(['All', '-All', 'sit-All'], 1000);
Wait(500 + random(250));
WriteLn('Found special logs');
end;
CloseBank;
Inc(Loads);
IncEx(MahoganyLogs, 27);
end else WriteLn('Not Finding Logs');
end else
begin
WriteLn('Couldnt find the bank, exiting!');
TerminateScript;
end;
FreeDTM(MahoganyLog);
FreeDTM(SpecialMahoganyLog);
FreeDTM(BankBox);
end;

Sjoe

2013-07-21 14:00:11

yeh could normally just do


if FindObjTPA(x, y, 2904720, 5, 2, 60, 30, 15, ['epo', 'Deposit', 'chest', 'Bank'])or
FindDTM(BankBox, x, x, msx1, msy1, msx2, msy2) then
repeat
Wait(250 + random(100));
Inc(i);
until(Depositcreen or BankScreen or ( i > 20));

if BankScreen or DepositScreen then DepositAll;


Maybe add a failsafe that your inventory is empty before you closebank / continue with the script :)

The Mayor

2013-07-21 17:03:23

I'm not sure if the DepositAll button is in the same location on the deposit box screen as the bank screen. It's easy enough to make your own mousebox of the button though.

A snippet from my clay miner which uses a deposit box & chest.



Function DepositClay: Boolean;
Begin
MouseTBox(IntToBox(297, 270, 322, 285), mouse_Left); // The Deposit All button
Status('Depositing clay');
Result := WaitColorGoneIn(4812676, 96, 113-50, 430, 302-50, 10, 5000); //wait until clay colour is gone from deposit screen
If Result Then IncEx(Clay, 28);
End;


Sjoe

2013-07-21 17:07:19

From: The Mayor
I'm not sure if the DepositAll button is in the same location on the deposit box screen as the bank screen. It's easy enough to make your own mousebox of the button though.

A snippet from my clay miner which uses a deposit box & chest.



Function DepositClay: Boolean;
Begin
MouseTBox(IntToBox(297, 270, 322, 285), mouse_Left); // The Deposit All button
Status('Depositing clay');
Result := WaitColorGoneIn(4812676, 96, 113-50, 430, 302-50, 10, 5000); //wait until clay colour is gone from deposit screen
If Result Then IncEx(Clay, 28);
End;



Depositall is for bankscreen and depositscreen