Author Topic: Tug 'O' War Script  (Read 975 times)

Offline Home

  • Leecher
  • Posts: 7
  • Rep: 0
    • View Profile
Tug 'O' War Script
« on: December 01, 2008, 12:37:04 am »
Will Play Tug 'O' War.
Simple And Clear.

[scar]Program Tug_o_War;
Var x,y :integer;

// Made By Home!


// Plays Tug_o_War At neopets.Com
// Start Game in Game Main Screen:
// Game Size 750x450
// Game Qaulity: Best
// Be Logged In, Will Send Scores After Game.


// Cred: TheGuyWhoGotOn Fpr This Mouse Proc.
procedure perfectmouse(x, y, xran, yran, xshake, yshake, delay, delran: integer; left: boolean);
var xx, yy, xx1, yy1, rand: integer;
begin
  getmousepos(xx, yy);
  getmousepos(xx1, yy1);
  x:= x - xran + random(xran * 2)
  y:= y - yran + random(yran * 2)
  xx:= xx - x
  yy:= yy - y
  repeat
    if (xx > 0)or(xx = 0) then
    begin
      rand:= 1 + random(xshake)
      xx:= xx - (rand)
      xx1:= xx1 - (rand)
    end;
    if xx < 0 then
    begin
      rand:= 1 + random(xshake)
      xx:= xx + (rand)
      xx1:= xx1 + (rand)
    end;
    if (yy > 0)or(yy = 0) then
    begin
      rand:= 1 + random(xshake)
      yy:= yy - (rand)
      yy1:= yy1 - (rand)
    end;
    if yy < 0 then
    begin
      rand:= 1 + random(xshake)
      yy:= yy + (rand)
      yy1:= yy1 + (rand)
    end;
    movemouse(xx1, yy1);
    wait(delay + random(delran));
  until((xx = 0)and(yy = 0))
  wait(delay * 25 + random(delran * 7));
  getmousepos(xx, yy);
  clickmouse(xx, yy, left);
end;


Procedure ASDW;
Begin
  Sendkeys('A');
 Wait(30+Random(50))
  Sendkeys('S');
 Wait(40+Random(50))
  Sendkeys('D');
 Wait(40+Random(50))
  Sendkeys('W');
 Wait(40+Random(50))
 end;


Procedure StartScreen;
begin
 If(FindColorTolerance(X,y,1636511,240, 357,240, 357,5)) Then begin
  Wait(1000+Random(1000))
   PerfectMouse(116, 427,1,1,2,2,1,2,True)
Repeat
 Wait(100+Random(100))
Until(Not(FindColorTolerance(X,y,1636511,240, 357,240, 357,5)))
    PerfectMouse(243, 216,1,1,2,2,1,2,True);
   Wait(1550+Random(600))
  case random(5) of
    0: PerfectMouse(156, 222,1,1,2,2,1,2,True);
    1: PerfectMouse(267, 220,1,1,2,2,1,2,True);
    2: PerfectMouse(374, 222,1,1,2,2,1,2,True);
    3: PerfectMouse(482, 214,1,1,2,2,1,2,True);
    4: PerfectMouse(588, 221,1,1,2,2,1,2,True);

 end;
 end;
 end;



Procedure Play;
begin
 If(FindColorTolerance(X,y,3246790,321, 70,321, 70,5)) Then
  ASDW;
  Wait(50+Random(100))
   SendKeys('A')
 end;


procedure Ending;
Begin
 If(FindColorTolerance(x,y,1514783,430, 425,430, 425,5))
 Then begin
  PerfectMouse(460, 426,1,1,2,2,2,2,True);
 Wait(10+Random(10))
  Repeat
 Wait(50+Random(100))
  Until(FindColorTolerance(x,y,16777215,311, 160,311, 160,5))
Wait(500+Random(500))
  PerfectMouse(298, 155,1,1,2,2,1,2,True);
 Wait(4000+Random(2000))
 end;
 end;

begin
 Activateclient;

repeat;
 StartScreen;
  Wait(1+Random(1)) // :D
 Play;
  Ending;
until(False);

end.[/scar]


~Home

Freddy1990.com

Tug 'O' War Script
« on: December 01, 2008, 12:37:04 am »

Offline d1s3l

  • Newbie
  • *
  • Posts: 14
  • Rep: 0
    • View Profile
    • Email
Re: Tug 'O' War Script
« Reply #1 on: December 30, 2008, 04:06:33 pm »
You should work on your standards a bit, but its good otherwise

Freddy1990.com

Re: Tug 'O' War Script
« Reply #1 on: December 30, 2008, 04:06:33 pm »

 

deductible-aliform