SRL Archive - OSR Help

Banking Issue


Incarceron

2012-03-11 21:43:12

I have the script set up to input the number of food the person set to withdraw from the bank but I'm unsure on how to make it select that number since
WaitOption('Withdraw-' + IntToStr(FoodAmount)); 
doesn't work.
The code snippet is here:

procedure WithdrawFood;
var
F,X,Y: Integer;
begin
if not LoggedIn then Exit;

Case lowercase(Food) of
'trout' : F := DTMFromString('mlwAAAHicY2dgYCgD4kIgzgbiAiCuAOJaIG4EYhUgVgRiTSDWBWJtqJg8EGfERAJJJqxYDkjiwox4MBQAALdhBks=');
'tuna' : F := DTMFromString('mlwAAAHicY2dgYFAAYikgFgFiCShfHYh1gFgFiOWBWA2I9YBYFyonC8QpEWFAkgkrFoGahw0z4sFQAABkyQOa');
'lobster' : F := DTMFromString('mbQAAAHicY2VgYOgB4g4g7gPiyUA8FYjPA/F1IL4CxHeA+DQQrw+TAJJMKJiLARMwYsFgAACaUQgl');
'swordfish' : F := DTMFromString('mlwAAAHicY2dgYGhmZGDoBuKJQNwHxJ2MELFyIJZhgGAFIFYCYmUglofSzTFdQJIJK+YCknI4MCMeDAUA/+8G2A==');
'monkfish': F := DTMFromString('mggAAAHicY2NgYJjEyMAwEYgXQPE8IJ4GxB+Bct+A+A0DhP0diH8AsbejJcP8miogiwkFcwFJEEYHjDgwBAAAZ90L0w==');
'shark' : F := DTMFromString('mggAAAHicY2NgYLBjZGAwB2JHIHYHYg8g1gfiEqBcAxBXA3EzEJcCcQsQd+RHAUkmDMzFgB0w4sAQAAAltwXX');
end;


if (BankScreen) then
if FindDTM(F, X, Y, MSX1, MSY1, MSX2, MSY2) then
begin
HumanMMouse(X, Y, 5, 5);
ClickMouse2(mouse_right);
WaitOption('Withdraw-X', 300);
TypeSend(IntToStr(FoodAmount));
wait(randomrange(200,300));
HumanMMouse(X, Y, 5, 5);
ClickMouse2(mouse_right);
WaitOption('Withdraw-' + IntToStr(FoodAmount)); //What even is...?

end;
FreeDTM(DTM);
end;

Fwd Motion

2012-03-12 03:01:14

Well the first problem that caught my attention pretty quickly was the fact that you are having it "Withdraw-X" every single time you have it withdraw food, that would be ineffective.

Second, you should be sure it waits long enough before you do "TypeSend" to let the dialogue or whatever pop up asking how much.

Also, if that bit doesn't work try using WaitOptionMulti rather than just WaitOption and use your '(food)' string as well, but the first letter may have to be capitalized.

I'm not an expert, so sorry for not being able to directly point out the problem.

Yago

2012-03-12 15:21:27

There should be a withdraw function somewhere…

Fwd Motion

2012-03-13 13:07:48

From: Yago
There should be a withdraw function somewhere…


Well he's doing it by DTM, which is what most SRL Members have been encouraging.