Results 1 to 12 of 12

Thread: -script doesent do anything-

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

    Default -script doesent do anything-

    so i made a theiving bot for a private server called pkpassage. it is suposed to click on the table 10 times click the npc sell the cake then return to the square. when i run the script my mouse does not move at all. here is the codeidc if its stolen its nothing specail):
    Code:
    //auto theiver by thehatered(rjj95)
    program Autotheiver;
    Var x,y: Integer;
    Procedure findtable;
    begin;
    wait(800)
       FindColorTolerance (x,y,5231294,185,134,208,173,12);
    wait(2200)
    ClickMouse(x, y, Mouse_Left)
    wait(1700)
    ClickMouse(x, y, Mouse_Left)
    wait(1700)
    ClickMouse(x, y, Mouse_Left)
    wait(1700)
    ClickMouse(x, y, Mouse_Left)
    wait(1700)
    ClickMouse(x, y, Mouse_Left)
    wait(1700)
    ClickMouse(x, y, Mouse_Left)
    wait(1700)
    ClickMouse(x, y, Mouse_Left)
    wait(1700)
    ClickMouse(x, y, Mouse_Left)
    wait(1700)
    ClickMouse(x, y, Mouse_Left)
    wait(3000)
    end;
    begin
    //find NPC
      wait(1000)
      FindColorTolerance (x,y,3689566,166,195,194,213,12);
      wait(500)
    ClickMouse(x, y, Mouse_Left);
    wait(1200)
    end.
          begin
          Procedure findcake;
          wait(1000)
      FindColorTolerance (x,y,207164,607,211,635,240,12);
      wait(500)
    ClickMouse(x, y, Mouse_Right);
    wait(1200)
          end;
          begin
          Procedure sellcake;
                 wait(1000)
      FindColorTolerance (x,y,2070783,550,295,608,311,50);
      wait(700)
              ClickMouse(x, y, Mouse_Left);
              wait(900)
          end;
          begin
            Procedure closeout;
            wait(1000)
      FindColorTolerance (x,y,3358280,419,24,501,52,50);
      wait(700)
          end;
          begin
          Procedure findsquare;
             wait(1000)
      FindColorTolerance (x,y,942420,288,115,321,151,50);
      wait(700)
          end.

  2. #2
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    To clickMouse you must moveMouse first, even though clickMouse has coords in it. It's weird Also I suggest adding writeLns, such as:
    Simba Code:
    if findcolortol(..) then
    begin
    writeln('found color!');
    movemouse etc...
    end else
    writeln('did not find color!');
    Will make debugging your problems a lot easier.


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

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

    Default

    ok ty ill post if i have anymore trouble

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

    Default

    Code:
    //auto theiver by thehatered(rjj95)
    program Autotheiver;
    Var x,y: Integer;
    Procedure findtable;
    begin;
    wait(800)
       FindColorTolerance (x,y,5231294,185,134,208,173,12);
    wait(2200)
    if FindColorTolerance(x,y,5231294,185,134,208,173,12) then
    begin
    writeln('found color!');
    wait(500)
    movemouse(x, y)
    wait(500)
    ClickMouse(x, y, Mouse_Left)
    wait(1700)
    ClickMouse(x, y, Mouse_Left)
    wait(1700)
    ClickMouse(x, y, Mouse_Left)
    wait(1700)
    ClickMouse(x, y, Mouse_Left)
    wait(1700)
    ClickMouse(x, y, Mouse_Left)
    wait(1700)
    ClickMouse(x, y, Mouse_Left)
    wait(1700)
    ClickMouse(x, y, Mouse_Left)
    wait(1700)
    ClickMouse(x, y, Mouse_Left)
    wait(1700)
    ClickMouse(x, y, Mouse_Left)
    wait(3000)
    end;
    
    begin
    //find NPC
      wait(1000)
      FindColorTolerance (x,y,3689566,166,195,194,213,12);
      wait(500)
    ClickMouse(x, y, Mouse_Left);
    wait(1200)
    end;
          begin
         // Procedure findcake;
          wait(1000)
      FindColorTolerance (x,y,207164,607,211,635,240,12);
      wait(500)
    ClickMouse(x, y, Mouse_Right);
    wait(1200)
          end;
          begin
         // Procedure sellcake;
                 wait(1000)
      FindColorTolerance (x,y,2070783,550,295,608,311,50);
      wait(700)
              ClickMouse(x, y, Mouse_Left);
              wait(900)
          end;
          begin
           // Procedure closeout;
            wait(1000)
      FindColorTolerance (x,y,3358280,419,24,501,52,50);
      wait(700)
          end;
          begin
         // Procedure findsquare;
             wait(1000)
      FindColorTolerance (x,y,942420,288,115,321,151,50);
      wait(700)
        end.
    well i added that in but i cant run it i keep getting errors:
    [Error] (71:5): Identifier expected at line 70
    Compiling failed.

  5. #5
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Give me a few minutes and I'll clean this up for ya.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


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

    Default

    ty.
    im mainly just trying to get my mouse to click a color.

  7. #7
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Try this out bud. Obviously I cannot test it but compiles just fine and it's much cleaner. I made things as simple as I could, but if you get lost somewhere or you get errors just let me know and I'll help.

    Simba Code:
    //auto theiver by thehatered(rjj95)
    program Autotheiver;

      Procedure LootCakes;
      Var
        X,Y,I: Integer;
      begin
        wait(800);

        if FindColorTolerance(X,Y,5231294,185,134,208,173,12) then
        begin

          wait(500);
          movemouse(x, y);
          wait(500);

          for i := 0 to High(9) do  //This means repeat the code below 9 times
          begin
            ClickMouse(x, y, Mouse_Left);
            wait(1700);
          end;

          //Now that we've done that 9 times, let's continue the script
          wait(3000);

        end else
          writeln('Failed to find color (table color)');
      end;

      Procedure SellCakes;
      Var
        X,Y: Integer;
      begin

        //find NPC
        wait(1000);
        if FindColorTolerance(x,y,3689566,166,195,194,213,12) then
        begin
          wait(500);
          ClickMouse(x, y, Mouse_Left);
          wait(1200);
        end else
          writeln('Failed to find color (find NPC)');

        //find cake
        if FindColorTolerance(x,y,207164,607,211,635,240,12) then
        begin
          wait(500);
          ClickMouse(x, y, Mouse_Left);
          wait(1200);
        end else
          writeln('Failed to find color (find cake)');

        //sell cake
        if FindColorTolerance(x,y,2070783,550,295,608,311,50) then
        begin
          wait(500);
          ClickMouse(x, y, Mouse_Left);
          wait(1200);
        end else
          writeln('Failed to find color (sell cake)');

        //close out
        if FindColorTolerance(x,y,3358280,419,24,501,52,50) then
        begin
          wait(500);
          ClickMouse(x, y, Mouse_Left);
          wait(1200);
        end else
          writeln('Failed to find color (close out)');

        //find square
        if FindColorTolerance(x,y,942420,288,115,321,151,50) then
        begin
          wait(500);
          ClickMouse(x, y, Mouse_Left);
          wait(1200);
        end else
          writeln('Failed to find color (find square)');

      end;

      begin
        LootCakes;
        SellCakes;
      end.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


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

    Default

    ok thanks ill try it out

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

    Default

    ty so much but theres a small problem. the bot clicks on the cakes and only clicks on the cakes. the script wont move on to click the npc and sell them

  10. #10
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    I'm afraid I'll need some more info before I can help beyond that. Try putting in some more debugging (like how I did) and let me know where exactly you're having your problems. It might just be a matter of wrong colors or too much tolerance so it's finding colors you don't want to find.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


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

    Default

    it does the first procedure until the script is stopped ill try adding less tolerence and see what happens

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

    Default

    script still loops on the first procedure

    ---
    ive got to go for now ill be on later not sure when thanks for the help guys.
    Last edited by rj; 10-16-2011 at 04:06 PM.

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
  •