Results 1 to 7 of 7

Thread: My script won't click

  1. #1
    Join Date
    Mar 2013
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default My script won't click

    Why won't this simple script I made click?

    procedure Attack;
    var x, y: integer;
    begin
    if findobj(x, y, 'iant', 12040108, 5) then
    begin
    Mouse(x, y, 5, 5, true);
    ClickMouse2(Mouse_left);
    end;
    end;

  2. #2
    Join Date
    Feb 2013
    Posts
    26
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    Quote Originally Posted by RequiredOne View Post
    Why won't this simple script I made click?

    procedure Attack;
    var x, y: integer;
    begin
    if findobj(x, y, 'iant', 12040108, 5) then
    begin
    Mouse(x, y, 5, 5, true);
    ClickMouse2(Mouse_left);
    end;
    end;
    The last "End" has to end with this "end."

  3. #3
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    You did not add the procedure to the main loop also check your color

  4. #4
    Join Date
    Mar 2013
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default

    Here is my full code;

    program KillSomething;
    {$I SRL/SRL.Simba}
    {$I SRL/SRL/Misc/Debug.Simba}
    {$I P07Include.Simba}

    procedure Attack;
    var x, y: Integer;
    begin
    if findobj(x, y, 'iant', 12040108, 25) then
    begin
    Mouse(x, y, 5, 5, true);
    ClickMouse2(Mouse_Left);
    end;
    end;

    begin
    SetupP07Include;
    ActivateClient;
    Attack;
    end.

  5. #5
    Join Date
    May 2008
    Location
    Mental Hospital
    Posts
    414
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by RequiredOne View Post
    Here is my full code;
    First:
    Simba Code:
    Mouse(x, y, 5, 5, true);
    ClickMouse2(Mouse_Left);

    "Mouse" moves the mouse and clicks, so you don't need ClickMouse.
    If you are using the P07 include then you need to change
    Simba Code:
    if findobj(x, y, 'iant', 12040108, 25) then
    to
    Simba Code:
    if P07_findobj(x, y, 'iant', 12040108, 25) then

    If that doesn't work, you may have the incorrect color for what you are trying to find.

  6. #6
    Join Date
    Mar 2013
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default

    Thank you very much I figured this out before you posted. Any way to get Right click and Attack working? I only have left click :/

  7. #7
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    P07_chooseoptionmuilti[('ttack')] to choose the attack option

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
  •