
Originally Posted by
undorak7
if the sawmill is placed always on the same spot you could make a searchbox around your character , and move the mouse around inside it until you find the mouseovertext you want, and store it in a variable so once its found, it knows its there for the whole script run.
So I thought about it and that was a fantastically magical idea. I went ahead and made what you described and it runs without errors now. Unfortunately, I haven't gotten to test it yet and it might not work properly so stay tuned. Once again, thanks for the great idea; I couldn't have thought of that myself.
Edit: It doesn't work right now but I don't have time to fix it today. I guess I'll post the script part anyways:
Simba Code:
procedure YouCantHide;
begin
clearDebug();
WriteLn('Searching for portable location, give it a second.');
begin
MouseOval(299,111,20,20,Mouse_Move); //N
if ismouseovertext(['awmill', 'Portable sa', 'mill', 'saw']) then
PortLocation := 1
else
Wait(RandomRange(800,2500));
end;
begin
MouseOval(199,198,20,20,Mouse_Move); //E
if ismouseovertext(['awmill', 'Portable sa', 'mill', 'saw']) then
PortLocation := 2
else
Wait(RandomRange(800,2500));
end;
begin
MouseOval(275,290,20,20,Mouse_Move); //S
if ismouseovertext(['awmill', 'Portable sa', 'mill', 'saw']) then
PortLocation := 3
else
Wait(RandomRange(800,2500));
end;
begin
MouseOval(183,178,20,20,Mouse_Move); //W
if ismouseovertext(['awmill', 'Portable sa', 'mill', 'saw']) then
PortLocation := 4
else
Wait(RandomRange(800,2500));
end;
end;
procedure PortablePosition;
begin
if not isLoggedIn() then
exit;
minimap.setAngle(MM_DIRECTION_NORTH);
mainScreen.setAngle(MS_ANGLE_HIGH);
Case PortLocation of //1=N 2=E 3=S 4=W
0:YouCantHide;
1:begin
PortableNorth;
exit;
end;
2:begin
PortableEast;
exit;
end;
3:begin
PortableSouth;
exit;
end;
4:begin
PortableWest;
exit;
end;
end;
end;