Results 1 to 4 of 4

Thread: My First Script Evuation

  1. #1
    Join Date
    Mar 2007
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default My First Script Evuation

    program DummyWhacker;
    {.include SRL/SRL.scar}


    Procedure Fight;
    begin
    SetupSRl;
    MoveMouseSmoothEx(150,85,2,4,15,20,10);
    Wait(2000+random(200));
    HoldMouse(150,85,true);
    Wait(300+random(100));
    ReleaseMouse(150,85,true);
    end;

    begin
    SetupSRL;
    Fight;
    end.

    it says there was a file opening error but i cannot figure out why,can some one shed me some enlightenment?i would very much appriciate it

  2. #2
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Take out SetupSRL; int the Fight procedure. You only need it once in the whole script. Also, instead of that whole mouse procedure with MoveMouseSmoothEx and stuff, just use SRL's procedure Mouse.

    Here's how to use Mouse:

    Mouse(x(like in MoveMouseSmoothEx), y(ditto), RandomX(Randomness in pixels of where it clicks), RandomY(ditto), True(true for a left click, and vice versa for right))

  3. #3
    Join Date
    Oct 2006
    Posts
    189
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program DummyWhacker;
    {.include SRL/SRL.scar}

    Const
      DummyColor  : 11111;
      TimesToClick  : 30;

    Var
      ClickedAmmount : Integer;

    Procedure Fight;
    Var
      DX, DY : Integer;
    begin
      If FindObjectMultiText(DX, DY, 'Dum', 'umm', 'Dummy', DummyColor, 3)
      Then
      Begin
        Mouse(DX, DY, 0, 0, True)
        ClickedAmmount := ClickedAmmount + 1;
      end;
      Wait(5000+Random(3000))
    end;


    begin
      SetupSRL;
      ClickedAmmount := 0;
      Repeat
       Fight;
       FindNormalRandoms;
      Until (ClickedAmmount > TimesToClick)
    end.

    I think it works.
    thanks the scar noob, for the avatar, it rocks!

    my sig owns

  4. #4
    Join Date
    Mar 2007
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thankz guys

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •