Results 1 to 9 of 9

Thread: Anybody feel like revising this?

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

    Default Anybody feel like revising this?

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



    procedure MM_WalkToTree;//clicks the spot on the minimap where maple trees are behind the bank
    var
      x,y:integer;
        begin
          if
            FindColorTolerance(x,y,999274,570,10,700,100,5)then
              wait(500+random(200));
                Mouse(x,y,15,15,true);
                  end;





    procedure ChopWood; //searches until finds maple tree and then it will click the given coordinate
    var
      x,y:integer;
        begin
          repeat
          FindColorTolerance(x,y,1714513,1,1,520,340,5);
            FindColorTolerance(x,y,1780821,1,1,520,340,5);
              FindColorTolerance(x,y,1319748,1,1,520,340,5);
                FindColorTolerance(x,y,1187643,1,1,520,340,5);
                  until(true);
                    wait(3000+random(1000));
                      Mouse(x,y,15,15,true);
                        end;





    procedure IFFind; //If finds that the closest tree you copped down by searching for the stump after a tree has been cut
    var               //then after it see that, it will call the chopwood procedure again (a noob loop?)
        Stump1,Stump2,x,y:integer;
          begin
          Stump1 := BitmapFromString(3, 2, 'meJzzTG7ySGwAIveEOggCAED+BvA=');
            Stump2 := BitmapFromString(3, 2, 'meJyTd0+RdYqDIxn7SAApbARz');
              if
                FindBitmapSpiralTolerance(Stump1,x,y,180,60,380,260,5)
                or
                  FindBitmapSpiralTolerance(Stump2,x,y,160,60,360,260,5)
                    then
                      ChopWood;
                        FreeBitmap(Stump1);
                          FreeBitmap(Stump2);
                            end;






    Procedure Fletch; // checks if your inventory is full before going on, when it fids that it is full it will
      begin           //click the first log in inventory and will click fletch all into bows(u)
        if
          InvFull then
            wait(500+random(100));
              MouseItem(1,true);
                wait(500+random(100));
                  Mouse(295,435,10,10,true);
                    wait(500+random(100));
                      Mouse(260,430,10,10,true);
                        end;








    Procedure WalkBank;  //chcks untill it finds a bow in the last inventory slot before proceding
    var                  //when it is found then i will click bank icon on minimap
        BankSymbol,BowBmp,x,y:integer;
            begin
                BankSymbol := BitmapFromString(9, 6, 'meJw7cOCA28Ktk7995fVLg5AQtGDB' +
                  'ggNIUooX3kMEIQAiBRGEkEB0AAaAUhBZCEI2EFkW2VhkvWhSAACUWEo=');

                    BowBmp := BitmapFromString(4, 2, 'meJwLj0qpa57ExMBgYO0MJOMSczp6' +
                      '5wAZAFO0Bjk=');
                        repeat
                          if
                            FindBitmapSpiral(BowBmp,x,y,685,430,725,460) then
                              FindBitmap(BankSymbol,x,y);
                                until(true)
                                 wait(500+random(100));
                                    Mouse(x,y,15,15,true);
                                       FreeBitmap(BankSymbol);
                                         FreeBitmap(BowBmp);
                                          end;









    begin
      ClearDebug();              //im not using smart atm because i am testing and i find this easier
        SetupSRL();
          ActivateClient;
            sleep(1000);
              playsound('chord'); //lets me know that client is fuly activated and the r client is fully active
                MM_WalkToTree;
                  sleep(8500+random(1000));
                    ChopWood;
                      Repeat
                        IFFind;
                          until(InvFull);
                            Fletch;
                              WalkBank;
                              end.









    its tricky for me to figure out how to get it stable... perhaps in the hands of a pro they can teach me!!!






    im totally sorry i forgot to mention that its a seers village maple choper / longbow fletcher/ banker... erra not quite yet...

    ill put comments so i can be more clear, and sorry about the crappy post with no info!! yikes!!
    Last edited by wantonman; 12-29-2011 at 02:43 AM.

  2. #2
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Whatever the hell that it, it's very ghetto-ly made and not worth revising...
    You aren't even telling us what it is, who made it, what it does, etc...

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

    Default

    I highly highly highly suggest taking a look at this, instead:
    http://villavu.com/forum/showthread.php?t=44942

    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

    Okay I edited my post sorry for the inconvenience..

  5. #5
    Join Date
    Oct 2007
    Location
    The deep web
    Posts
    2,496
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Did someone say GDK?

  6. #6
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    I just want to know what this is:

    Simba Code:
    procedure ChopWood; //searches until finds maple tree and then it will click the given coordinate
    var
      x,y:integer;
        begin
          repeat
          FindColorTolerance(x,y,1714513,1,1,520,340,5);
            FindColorTolerance(x,y,1780821,1,1,520,340,5);
              FindColorTolerance(x,y,1319748,1,1,520,340,5);
                FindColorTolerance(x,y,1187643,1,1,520,340,5);
                  until(true);
                    wait(3000+random(1000));
                      Mouse(x,y,15,15,true);
                        end;
    It's never going to chop wood.. No point calling all those FindColorTolerance if your not going to do something after the colour is found..
    I am Ggzz..
    Hackintosher

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

    Default

    that searches for the colors on a maple tree untill it finds one, then it stops searching and clicks x,y// could be wrong...

  8. #8
    Join Date
    Oct 2007
    Location
    The deep web
    Posts
    2,496
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    some
    Simba Code:
    if
    and
    Simba Code:
    then
    's are needed
    Did someone say GDK?

  9. #9
    Join Date
    Jan 2011
    Posts
    121
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You need to look at some of the structure of proper Pascal scripts. Try looking at some scripts others have posted and pick up the structure from them.

    Few immediate pointers:
    every begin has to have an end
    Whenever you want to do multiple lines because of a decision (i.e. if "this color found" then "do these lines"), you need to use this structure:

    Simba Code:
    if (condition = true) then
    begin
      line1;
      line2;
      etc;
      if (anotherCondition = true) then
      begin
        nestedifline1;
        nestedifline2;
        etcagain;
      end;
    end;

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
  •