SRL Archive - Reflection Help

Bank Click Pos changed.


tomisme

2011-02-09 15:52:41

Hey guys, I'm new to this and trying to learn.Have a prob, after todays update banking with a script is now clicking the "collect bank" rather than "use bank quickly". I have looked about and cant seem to see how to correct.
Sorry if its a noob question and if I have posted this in the wrong place.

HyperSecret

2011-02-09 16:00:54

AFAIK, this should be detected by the actual text, not the location of the text (someone correct me if I am wrong).

So it's something probably in the script that is wrong.

**BANNED The Man

2011-02-09 16:02:26

Yes it is clicked by text matching not location.
I will test this now.

tomisme

2011-02-09 16:05:52

procedure Bank;
var
Tries : Integer;
begin
if not(LoggedIn) then
exit
else
begin
if not (Loc = 'at bank') then
Walk(True);
DeBug('Bank : Open Bank Booth');
R_OpenBankBooth('veb');
Tries := 0;
Wait(200 + Random(100));
while not BankScreen do
begin
if (DistanceFrom(Tile(3250, 3419)) < 2) or
(DistanceFrom(Tile(3257, 3419)) < 2) then
WalkToTile(PathTiles[High(PathTiles)], 1, 0);
R_OpenbankBooth('veb');
Inc(Tries);
if Tries > 3 then
exit;
end;
if (BankScreen) then
DeBug('Bank : Bank Opened')
else
DeBug('Bank : Open Bank Failed!');
Players[CurrentPlayer].Integers[1] := Players[CurrentPlayer].Integers[1]
+ R_CountItemID(440);
Inc(Players[CurrentPlayer].Integers[2]);
R_DepositAllButIDEx(AxeIds);
Wait(1000 + Random(500));
MarkTime(Loop);
while InvFull do //Failsafe
begin
Wait(66);
if TimeFromMark(Loop) > (7500 + Random(2000)) then
begin
DeBug('Bank : Deposit : Failed. Trying again');
exit;
end;
end;
Walk(False);
end;
end;

This is the section of code but I'm not too sure what to change. I was using the script before todays update and all was fine, as soon as I updated hooks and logged in againl…….wouldn't bank.

Iamadam

2011-02-09 20:53:13

Yeah, R_ChooseOptionMulti has broken I think. Not sure if this just affects banking though.
I'm going to have a look into it. Menu Hooks may just be broken.

Edit: Yup, I think hook_menu_Action is broken.

pyroryan

2011-02-09 22:07:05

Pretty sure its not broken, though I haven't checked.

Iamadam

2011-02-09 22:55:57

I got R_ChooseOptionMulti to dump each string it loaded into the options/actions array. Only options were printed. Although, I haven't looked through things enough to know if I was just doing it wrong :P

pyroryan

2011-02-10 13:28:06

From: Iamadam
I got R_ChooseOptionMulti to dump each string it loaded into the options/actions array. Only options were printed. Although, I haven't looked through things enough to know if I was just doing it wrong :P


Only thing that happened was my updater decided getCollapsedMenuItemsCount was getMenuItemsCount. Anyways, fixed in the hooks thread.

mormonman

2011-02-10 13:39:28

Commited hooks and tested.

tomisme

2011-02-10 15:31:44

Hey guys, Have copied the new hooks and saved but script I am using is still clicking (collect) rather than (use-quickly). I can't find the problem.

pyroryan

2011-02-10 16:00:26

From: tomisme
Hey guys, Have copied the new hooks and saved but script I am using is still clicking (collect) rather than (use-quickly). I can't find the problem.


Restarted the script?