View Full Version : need script help
farseer
05-11-2012, 02:54 AM
well,im pretty new started learn simba script and i just wanna banking all my oak logs but somehow won't work:
Procedure bankking;
var
x, y:Integer;
begin
//Deposit OAK LOGS
if BankScreen then
begin
if FindColorTolerance(x, y, 3958151, MIX1, MIY1, MIX2, MIY2, 20) then
begin
Writeln('Found OAK LOGS');
Mouse(x, y, 0, 0, false);
WaitOptionMulti(['posit','All'], 300);
end else;
Writeln('no OAK logs')
Exit;
end;
end;
the debug box show:
fond oak logs but do nothing just get stuck,pretty stupid question but help me alot .
CephaXz
05-11-2012, 03:15 AM
Try
Mouse(x, y, 0, 0, mouse_right);
WaitOptionMulti(['posit','All'], 3000);
You could also add a check on uptext.
If it doesn't do the job again, its probably because the color and tolerance is wrong. It might be finding other things instead of logs.
Runaway
05-11-2012, 03:18 AM
Procedure bankking;
var
x, y:Integer;
begin
//Deposit OAK LOGS
if BankScreen then
begin
if FindColorTolerance(x, y, 3958151, MIX1, MIY1, MIX2, MIY2, 20) then
begin
Writeln('Found OAK LOGS');
Mouse(x, y, 0, 0, false);
WaitOptionMulti(['posit','All'], 300);
end else
begin
Writeln('no OAK logs');
Exit;
end;
end;
end;
I don't think this is the error, but you should not have a semi-colon after the end else, and you need a begin/end after the end else also. I fixed it for you above.
If that's not the reason it didn't work, try increasing the WaitOptionMulti() time.
CephaXz
05-11-2012, 03:25 AM
Procedure bankking;
var
x, y:Integer;
begin
//Deposit OAK LOGS
if BankScreen then
begin
if FindColorTolerance(x, y, 3958151, MIX1, MIY1, MIX2, MIY2, 20) then
begin
Writeln('Found OAK LOGS');
Mouse(x, y, 0, 0, false);
WaitOptionMulti(['posit','All'], 300);
end else
begin
Writeln('no OAK logs');
Exit;
end;
end;
end;
I don't think this is the error, but you should not have a semi-colon after the end else, and you need a begin/end after the end else also. I fixed it for you above.
If that's not the reason it didn't work, try increasing the WaitOptionMulti() time.
Didn't realize that because of the standards, messed up my mind :duh:
farseer
05-11-2012, 05:40 AM
Thanks your guys,thanks so much.
I fixed it.
Le Jingle
05-11-2012, 05:57 AM
Well if you have your hatchet equipped, you could do:
Procedure bankking;
var
x, y:Integer;
begin
if BankScreen then
DepositAll() // Found & Deposited
else
Exit; // Didn't have any oak logs
end;
Let me know if it works, + hope this helps if it does
farseer
05-11-2012, 07:46 AM
Well if you have your hatchet equipped, you could do:
Procedure bankking;
var
x, y:Integer;
begin
if BankScreen then
DepositAll() // Found & Deposited
else
Exit; // Didn't have any oak logs
end;
Let me know if it works, + hope this helps if it does
Already figure it out,still many thanks all of you.
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.