Live Help
Membership
You are a guest!

Register Today!

Log In
Reset Password
Game Network
Community Forum

MMO GAME LIST
World of Warcraft
Age of Conan
Anarchy Online
Archlord
Cabal Online
City of Heroes
City of Villains
Dark Age of Camelot
Darkfall Online
Diablo 2
Dungeons and Dragons
Dofus
Eve Online
Everquest 2
Final Fantasy XI
Guild Wars
Hero Online
Knight Online
Lineage 2
Lord of the Rings Online
Maple Story
Ragnarok Online
Runescape 2
Second Life
SilkRoad Online
Star Wars Galaxies
Tibia
Warhammer Online

FPS GAME LIST
Call of Duty
Combat Arms
Counter Strike
Halo

Welcome Guest ( Log In | Register )

> Randomized Running Script, Incorporate this script into your own!
post Apr 20 2009, 01:42 AM
Post #1

n8t3d0gg



SCAR Coder
****

Group: Members
Posts: 82
Joined: 29-February 08
Member No.: 576,597






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! wink.gif

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.
Go to the top of the page
 
+Quote Post

Posts in this topic


Reply to this topicStart new topic

 


> Board Footer
Time is now: 19th March 2010 - 12:24 AM