Hey mmorpguidians,
Just wanted to post this new script I wrote that will make your character run around at random. This script in itself is useless, but incorporated with a farming script for example, if the map you are farming runs out of grain, you could use this script to have your character search for a new map to farm!
Enjoy!
CODE
program search;
var
x, y, i, count: integer;
const
waypoint = 772351;
function top_wp : boolean;
begin
if(FindColor(x, y, waypoint, 0, 0, 1024, 66))then result:= true
end;
function right_wp : boolean;
begin
if(FindColor(x, y, waypoint, 940, 0, 1024, 768))then result:= true
end;
function left_wp : boolean;
begin
if(FindColor(x, y, waypoint, 0, 0, 92, 768))then result:= true
end;
function bottom_wp : boolean;
begin
if(FindColor(x, y, waypoint, 0, 564, 1024, 768 ))then result:= true
end;
function switching_map : boolean;
begin
if(FindColor(x, y, 0, 419, 165, 420, 166)and
FindColor(x, y, 0, 635, 470, 636, 471))then result:= true
end;
function error : boolean;
begin
if(count > 3000)then result:= true
end;
procedure click;
begin
count:= 0;
MoveMouseSmooth(x, y);
Wait(100+random(200));
HoldMouse(x, y, true);
Wait(20+random(50));
ReleaseMouse(x, y, true);
repeat
wait(1);
count:= count + 1;
until(switching_map) or (error)
repeat
wait(1);
until(not(switching_map))
end;
procedure move_top;
begin
if(top_wp)then
begin
click;
i:= 1;
if(error)then
begin
i:= 0;
end;
end;
end;
procedure move_right;
begin
if(right_wp)then
begin
click;
i:= 2;
if(error)then
begin
i:= 0;
end;
end;
end;
procedure move_left;
begin
if(left_wp)then
begin
click;
i:= 3;
if(error)then
begin
i:= 0;
end;
end;
end;
procedure move_bottom;
begin
if(bottom_wp)then
begin
click;
i:= 4;
if(error)then
begin
i:= 0;
end;
end;
end;
procedure search;
begin
case(Random(4))of
0: begin
if(not(right_wp or left_wp or bottom_wp))then
begin
Move_top;
end else
begin
if(i = 4)then
begin
end else
begin
Move_top;
end;
end;
end;
1: begin
if(not(top_wp or left_wp or bottom_wp))then
begin
move_right;
end else
begin
if(i = 3)then
begin
end else
begin
move_right;
end;
end;
end;
2: begin
if(not(top_wp or right_wp or bottom_wp))then
begin
move_left;
end else
begin
if(i = 2)then
begin
end else
begin
move_left;
end;
end;
end;
3: begin
if(not(top_wp or right_wp or left_wp))then
begin
move_bottom;
end else
begin
if(i = 1)then
begin
end else
begin
move_bottom;
end;
end;
end;
end;
end;
begin
repeat
search;
until(false)
end.