Results 1 to 12 of 12

Thread: Heres my simba scrip any sugestions?

  1. #1
    Join Date
    Sep 2010
    Location
    Azeroth
    Posts
    395
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default Heres my simba scrip any sugestions?

    Simba Code:
    program Autoer;
    var
    x,y:integer;


    function find_loghead:boolean;
    var
    x,y:integer;
    begin
    repeat
    findcolor(x,y,3303273,0,0,800,620)
    until(false);
    end;




    procedure Click_loghead;
    begin
    if
    find_loghead
    then
    movemouse(x,y);
    end;




    begin
    activateclient;
    repeat
    click_loghead;
    until(false);
    end.

  2. #2
    Join Date
    Feb 2007
    Location
    Estonia.
    Posts
    1,938
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Code:
    function find_loghead:boolean;
    var
      x,y: integer;
    begin          // this will set the boolean true or false, if it finds then the result is true.
      result := findcolor(x,y,3303273,0,0,800,620);
    end;
    ~Eerik.

    E: Try Including SRL also, read tutorials, and your click_log won't click, it will only move the mouse there. Try using Mouse or ClickMouse

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

    Default

    Here ya go:

    Simba Code:
    program Autoer;
    {$i srl/srl.scar}

    Var
    X,Y,T: integer;


    function find_loghead:boolean;
    begin
      repeat
        if findcolor(X,Y,3303273,0,0,800,620) then
          Result := True;
      until(Result);
    end;


    procedure Click_loghead;
    begin
      if find_loghead then
      begin
        MMouse(X,Y,0,0);
        ClickMouse2(True);
      end;
    end;


    begin
      activateclient;
      MarkTime(T);
      repeat
        if (TimeFromMark(T) >= 10000) then  //10 seconds
          TerminateScript;  //Stops the script after 10 seconds, just incase something goes wrong
        click_loghead;
      until(false);
    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..."


  4. #4
    Join Date
    Sep 2010
    Location
    Azeroth
    Posts
    395
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default

    thank you for helping, my main concern was that resut= thing... yeah a little different from scar but so far i already see the advantages simba has over scar... he is the king lol!

  5. #5
    Join Date
    Sep 2010
    Location
    Azeroth
    Posts
    395
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default

    With all your revisions and faqs Ive made a version of mine


    Simba Code:
    program Autoer;
    var
    x,y:integer;


    function func1:boolean;
    begin
      result := findcolor(x,y,3303273,0,0,800,620);
    end;




    procedure proced1;
    begin
    repeat
    func1
    until(true);
    movemouse(x,y);
    clickmouse(x,y,1);
    end;





    begin
    activateclient;
    repeat
    proced1;
    until(false);
    end.



    this is just a little code chunk whithout anything you can call this the core

  6. #6
    Join Date
    Feb 2007
    Location
    Estonia.
    Posts
    1,938
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Code:
    repeat
    func1
    until(true);
    It should be something like:
    Code:
    repeat
      DoSomething; //For example wait.
    until(Func1);
    ~Eerik.

  7. #7
    Join Date
    Sep 2010
    Location
    Azeroth
    Posts
    395
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default

    Simba Code:
    repeat
    func1
    until(func1);

    because func1 is the boolean I get it, cool thanks!

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

    Default

    Just as a heads up, because you're not using SMART, this will take control of your mouse, and it you have it moving infinitely it'll be a real pain to stop that. For testing purposes, you might want to put a number limit or time limit before the script stops.

    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..."


  9. #9
    Join Date
    Sep 2010
    Location
    Azeroth
    Posts
    395
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default

    will do, will do. Thanks

  10. #10
    Join Date
    Aug 2007
    Location
    England
    Posts
    1,038
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    You can stop a script by pressing alt tab until you got simba up then F2 to stop the script ? if you didn't have a timer that is
    Today is the first day of the rest of your life

  11. #11
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    1,612
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Jakkle View Post
    You can stop a script by pressing alt tab until you got simba up then F2 to stop the script ? if you didn't have a timer that is
    Sometimes [especially with MoveMouse] you will find yourself fighting the Mouse, ALT + TAB + F2 may not always work if things get crazy

    Therefore, a Timer or some form of fail safe to break the [endless] loops can really save you a lot of headache.
    ~ Past experiences

  12. #12
    Join Date
    Mar 2006
    Location
    Behind you
    Posts
    3,193
    Mentioned
    61 Post(s)
    Quoted
    63 Post(s)

    Default

    I'd also like to recommend using proper Scripting standards. It makes your work Easier to read for others to help you with. To learn the proper standards here is a tut by Shuttleu.

    ~BraK

    "Sometimes User's don't need the Answer spelled out with Code. Sometimes all they need is guidance and explanation of the logic to get where they are going."

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
  •