Runescape Pro
2009-06-10 13:48:45
Well, this is the first script i have completed in soooooo long its ridiculous. It's mostly ref. with some color finding. I know atm ref is out of date. When i finished it, I compiled it and got a nasty access violation error. I fix something i notice, then compile again, then I get a diff. access violation error(i fixed something and recompiled at least 5 times, just to get a diff access violation error). =[
UPDATE: It has something to do with the handlegate function. I fiixed everything else, but when i uncommented the handlegate function, i got an access violation error again.
heres the gate code:
I'm gunna attach the script to the bottom of this, please someone try to help me.
UPDATE: It has something to do with the handlegate function. I fiixed everything else, but when i uncommented the handlegate function, i got an access violation error again.
heres the gate code:
Function HandleGate: boolean;
var
G:TPoint;
begin
G:=Point(3032, 3313);
if not(loggedin) then exit;
MyRandoms;
if FindObjectEx(G, 7050, 5) then
begin
Writeln('Attempting to handle gate.');
if (GetMyPos.x = 3031) then
begin
if FindColorSpiralTolerance(x, y, 5401208, 257, 183, 281, 237, 4) then
begin
MMouse(x, y, 2, 2);
wait(100+Random(75));
if IsUpText('pen') then
begin
Mouse(x, y, 0, 0, false);
wait(100+Random(75));
ChooseOption('pen');
Writeln('Successfully opened gate. =D');
GatesOpened:=GatesOpened+1;
end else
begin
Writeln('Failed to find gate.');
LogOut;
TerminateScript;
end;
end else
begin
Writeln('Failed to find gate.');
LogOut;
TerminateScript;
end;
end else
begin
if FindColorSpiralTolerance(x, y, 5401208, 208, 119, 225, 225, 4) then
begin
MMouse(x, y, 2, 2);
wait(100+Random(75));
if IsUpText('pen') then
begin
Mouse(x, y, 0, 0, false);
wait(100+Random(75));
ChooseOption('pen');
Writeln('Successfully opened gate. =D');
GatesOpened:=GatesOpened+1;
end else
begin
Writeln('Failed to find gate.');
LogOut;
TerminateScript;
end;
end else
begin
Writeln('Failed to find gate.');
LogOut;
TerminateScript;
end;
end;
end else Writeln('Gate already open, walking in the cow pen now.');
end;
I'm gunna attach the script to the bottom of this, please someone try to help me.