Darevaine
2007-10-19 02:56:36
So, I'm trying to make a script that automates walking from Karamaja dock to Draynor bank, then deposits the lobsters once there. Right now, it's going to run tended. I may go ahead and write a bit more into it later. *shrug* I figured I'd go ahead and get my feet wet with something simple.
Right now all I have is the procedure to take the boat to the mainland from Karamaja, and I'd like some advice on it. It seems to work fine, but I haven't tested it extensively yet. If there's any glaring errors with my scripting I'd like to correct them now rather than later.
The commented stuff at the end is my notes on what to do when. It doesn't need to be there, but it doesn't need to be gone either. The writeln stuff was there so I could test the code before I made it actually interact.
Anyhow, let me know what you think. I appreciate any constructive advice. :)
Right now all I have is the procedure to take the boat to the mainland from Karamaja, and I'd like some advice on it. It seems to work fine, but I haven't tested it extensively yet. If there's any glaring errors with my scripting I'd like to correct them now rather than later.
procedure BoatToMainland;
var x, y, MarkBoatTime, IsBoatTaken: Integer;
begin
MarkTime( MarkBoatTime );
repeat
if( FindColorTolerance( x, y, 3875105, 9, 3, 498, 243, 8 )) then
begin
IsBoatTaken := 0;
if( not( LoggedIn )) then exit;
// writeln( 'Customs officer color found!' );
MMouse( x, y, 0, 0 );
if( IsUpText( 'lk-to' )) then
begin
// writeln( 'Customs officer found!' );
Mouse( x, y, 0, 0, false );
Wait( 692 + Random( 1745 ));
if ChooseOption( 'Pay-Fare' ) then IsBoatTaken := 1;
end;
end;
until( IsBoatTaken = 1 ) or ( TimeFromMark( MarkBoatTime ) > 20000 );
//Find the customs officer using colors.
//Right-click on cust. off. and 'pay-fare'.
end;
The commented stuff at the end is my notes on what to do when. It doesn't need to be there, but it doesn't need to be gone either. The writeln stuff was there so I could test the code before I made it actually interact.
Anyhow, let me know what you think. I appreciate any constructive advice. :)