SRL Archive - RS has been updated.

DepositAll function


Justin

2012-01-04 10:55:19

Since they have added the Deposit Pouch button, DepositAll is no longer working, when DepositAll is called, it clicks on the money pouch button


Edit: http://villavu.com/forum/showpost.php?p=881685&postcount=8 for the fix

Kyle Undefined

2012-01-04 10:57:14

Deposit All coords just need to be updated.

Swatarianess

2012-01-04 10:58:29

Nice hate the pouch sometimes :/

smurg

2012-01-04 11:18:39

In Bank.scar, on line 454, I just changed the first coord to 370 - 50 * ….. instead of 390 or whatever it was.

Working fine.

Justin

2012-01-04 11:24:35

From: smurg
In Bank.scar, on line 454, I just changed the first coord to 370 - 50 * ….. instead of 390 or whatever it was.

Working fine.


Just made a quick DTM and pushed it to my users so they don't have to edit Bank.scar, will remove the DTM once SRL is updated.

Thanks for the coords tho!

keiranmartin

2012-01-04 11:31:32

wheres bank.scar?

Justin

2012-01-04 11:35:17

From: keiranmartin
wheres bank.scar?


C:\Simba\Includes\SRL\SRL\core\bank.scar

Kyle Undefined

2012-01-04 11:39:12

You can replace your DepositAll function with this and it will work:


function DepositAll: Boolean;
var
T, X, Y: Integer;
BScreen, DScreen: Boolean;
begin
Result := false;
BScreen := BankScreen;
if (not(BScreen)) then
DScreen := DepositScreen;
if (BScreen) or (DScreen) then
if (InvCount > 0) or (FindColor(X, Y, srl_outline_black, 98, 68, 436, 257) and (DSCreen)) then
begin
Mouse(360 - 50 * Integer(DScreen), 305 - 30 * Integer(DScreen), 15, 10, True);
Wait(200 + Random(300));
T := GetSystemTime;
while (InvCount > 0) or (FindColor(X, Y, srl_outline_black, 98, 68, 436, 257) and (DSCreen)) and (GetSystemTime - T < 2000) do
Wait(100);
Result := (InvEmpty) or (not(FindColor(X, Y, srl_outline_black, 98, 68, 436, 257)) and (DScreen));
end else begin
srl_Warn('DepositAll', 'No items to deposit ', warn_AllVersions);
result := true;
end;
end;

keiranmartin

2012-01-04 11:39:31

done it :D

Justin

2012-01-04 11:45:29

Thank you Kyle Undefined.

MaxPayne619

2012-01-05 04:10:35

From: Kyle Undefined
You can replace your DepositAll function with this and it will work:


function DepositAll: Boolean;
var
T, X, Y: Integer;
BScreen, DScreen: Boolean;
begin
Result := false;
BScreen := BankScreen;
if (not(BScreen)) then
DScreen := DepositScreen;
if (BScreen) or (DScreen) then
if (InvCount > 0) or (FindColor(X, Y, srl_outline_black, 98, 68, 436, 257) and (DSCreen)) then
begin
Mouse(360 - 50 * Integer(DScreen), 305 - 30 * Integer(DScreen), 15, 10, True);
Wait(200 + Random(300));
T := GetSystemTime;
while (InvCount > 0) or (FindColor(X, Y, srl_outline_black, 98, 68, 436, 257) and (DSCreen)) and (GetSystemTime - T < 2000) do
Wait(100);
Result := (InvEmpty) or (not(FindColor(X, Y, srl_outline_black, 98, 68, 436, 257)) and (DScreen));
end else begin
srl_Warn('DepositAll', 'No items to deposit ', warn_AllVersions);
result := true;
end;
end;


Replace the whole file?

EDIT: Found what he told: Goto Line 454, Replace the whole paragraph!

chelmid

2012-01-05 06:37:34

what program are you opening your scar files?I'm opening with free file viewer.and i cannot replace line 454.plz help!

Justin

2012-01-05 07:35:19

From: chelmid
what program are you opening your scar files?I'm opening with free file viewer.and i cannot replace line 454.plz help!


Just update your SRL and it will be fixed

SRL -> Update in the menu bar
You should be on version 1005+

darklordnd

2012-01-06 10:26:45

I updated everything possible (simba, SRL, SPS, extension, MSI), but it's still clicking the deposit money pouch. can someone help me?

legoace

2012-01-06 15:01:42

From: darklordnd
I updated everything possible (simba, SRL, SPS, extension, MSI), but it's still clicking the deposit money pouch. can someone help me?


Delete SRL, then go SRL -> setting -> override update, then SRL -> Update

darklordnd

2012-01-07 02:20:34

From: legoace
Delete SRL, then go SRL -> setting -> override update, then SRL -> Update


I did all that and it didn't work for me, still.

RuNnNy

2012-01-07 10:46:35

if i use the DepositAll function in my script and i have already changed the DepositAll function with the right coords, Do everyone who use my script have to do the same?

Justin

2012-01-07 21:27:38

From: RuNnNy
if i use the DepositAll function in my script and i have already changed the DepositAll function with the right coords, Do everyone who use my script have to do the same?


If your script is using SRL5 the no, if its using SRL4 (you should really move to SRL5) then yes

darklordnd

2012-01-07 21:55:45

please, someone help me with this. I can't get it working, it's still clicking the deposit money pouch icon. I'm working on a new script to become member at last. Thank you!

Kyle Undefined

2012-01-07 22:00:34

Update to SRL5.