Results 1 to 8 of 8

Thread: Gods Lumbridge Bow Stringer *Beta*

  1. #1
    Join Date
    Oct 2008
    Posts
    48
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Gods Lumbridge Bow Stringer *Beta*

    This is my 2nd public script, it still needs alot of work but im hoping to finish it within 1 or 2 days. Any Suggestions or feedback is greatly helpful.
    Please someone help me with the walking, i do not have a clue on walking plus help with the menus and stuff, please test and see if it works.
    Release -
    Beta -- 6/9/09
    Version 0.5 - 6/9/09

    SCAR Code:
    program New;
    {.include srl/srl.scar}
    {.SRL\Core\Bank.scar}
    {.SRL\Core\Inventory.scar}
    {.SRL\Core\FlagChat.scar}
    {.SRL\Core\MapWalk.scar}


    var
     x,y,i,counter,Loads :integer;
    Const
    LoadsToDo = 9999;

      function FlaxScreen : Boolean;
    begin
      Result := FindText(x, y, 'spin', NPCChars,314 ,50 ,346 ,57 );
    end;
     
     procedure DeclarePlayers;
     begin
      HowManyPlayers :=1; //How many players to use in script
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer :=0;

      Players[0] .Name         := '';          // Username
      Players[0] .Pass         := '';                // Pass
      Players[0] .Nick         := '';           //3/4 of the characters name (bobbey = bob)
      Players[0] .Active       := True;            // True=yes, False=no//
      Players[0] .Booleans[1]  := False;          // False for brightness Check Once. Just leave at false.
      Players[0] .Pin   := '0000';               // Your BANK-Pin - Leave at 0000 if you don't have a pin
     end;
     
     procedure GetFlax;
     begin
      MakeCompass('n');
      FindObjCustom(x, y, ['ban', 'ooth'], [5137010,8687513], 2);
      Mouse(x,y,5,5,false);
      wait(800+random(300));
      chooseoption('uickly');
      wait(1000+random(800));
       begin
        FindObjCustom(x,y, ['lax', 'ax'],  [12696923, 65536], 3);
        wait(200+random(340));
        Mouse(x,y,5,5,false);
        wait(500+random(400));
        ChooseOption('X');
        wait(500+random(300));
        Typesend('28');
        wait(200+random(100));
        CloseBank;
       end;
      end;


       Procedure Walk1;
     begin
      Counter := 0
      Mouse(622,128,5,5,true);
      wait(8000+random(2000));
      repeat
      until FindObjCustom(x, y, ['stair', 'case'], [6844272,6712430], 2) or (counter=20);
      wait(600+random(100));
      Mouse(x,y,5,5,false);
      ChooseOption('own');
      wait(1900+random(900));
     end;

    Procedure Walk2;
    begin
      wait(1000+random(800));
      if (FindSymbol(x,y,'spin')) then
      mouse(x,y,5,5,true);
      wait(3000+random(700));
    end;

    Procedure Spin;
    begin
      repeat
      until FindObjCustom(x, y, ['inning', 'heel'], [14672099,5137011], 5) or  (counter=20);
      Mouse(x,y,5,5,true);
      wait(1300+random(900));
       begin
      Mouse(265,119,5,5,false);
      wait(500+random(800));
      ChooseOption('X');
      Wait(300+random(400));
      TypeSend('28');
      HoverSkill('crafting',False );
      GameTab(4);
      wait(46000+random(4000));
    end;
     end;


    Procedure Walk3;
    begin
      Mouse(611,97,5,5,true);
      FFlag(2);
      FindObjCustom(x,y, ['air', 'case'], [6712686,8028803], 5);
      Mouse(x,y,5,5,false);
      wait(500+random(600));
      chooseoption('up');
      wait(500+random(700));
    end;

    Procedure BankFlax;
    begin
      Mouse(636,44,5,5,true);
      FFlag(2);
      FindObjCustom(x, y, ['ban', 'ooth'], [5137010,8687513], 2);
      Mouse(x,y,5,5,false);
      wait(800+random(300));
      chooseoption('uickly');
      wait(1500+random(900));
      if FindDTM(605191, x, y, Mix1, Miy1, Mix2, Miy2) then
      begin
      Mouse(x, y, 5, 5, False);
      wait(400+random(400));
      ChooseOption('28');
      wait(400+random(400));
         begin
          Mouse(54,106,5,5,false)
          wait(800+random(340));
          ChooseOption('X');
          wait(800+random(300));
          Typesend('28');
          wait(300+random(100));
          Mouse(486,35,5,5,true);
          if not LoggedIn then Exit;
         end;
    end;
     end;


    begin
      SetupSRL;
      DeclarePlayers;
      ActivateClient;
      LoginPlayer;
      GetFlax;
      repeat
      Walk1;
      Walk2;
      Spin;
      Walk3;
      Until (Loads>=LoadsToDo);
    end.
    Last edited by godspower55; 06-10-2009 at 03:54 AM.

  2. #2
    Join Date
    Mar 2007
    Location
    <3
    Posts
    2,683
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I would suggest reading - http://www.villavu.com/forum/showthread.php?t=3293
    So you learn standards, as for now, many people wouldn't even mind reading your script.

  3. #3
    Join Date
    Oct 2008
    Posts
    48
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    is that better?

  4. #4
    Join Date
    May 2007
    Location
    UK
    Posts
    4,007
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    I just read, Try using DTMs instead of FindObjCustom.
    Put failsafes in.
    Apart from that good start
    If you need any help msn is in my siggy.

    T~M

  5. #5
    Join Date
    Jul 2007
    Location
    Ohio
    Posts
    1,103
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You don't want to put exact coordinates in Mouse because it is very detectable. You have actual numbers defined like this in your GetFlax procedure:

    SCAR Code:
    Mouse(54, 106, 5, 5, False);

    You have randomness added, but if you are always clicking near the 245, 34 area it will likely get you a ban and can miss click if the screen moves. If you are trying to click an item in your inventory, make a DTM. For you it would need to be something like:

    SCAR Code:
    if FindDTM(Flax, x, y, Mix1, Miy1, Mix2, Miy2) then
    begin
      Mouse(x, y, 5, 5, False);

    In the FindDTM function, x and y store the coordinates in which it was found so even if the flax gets moved around somewhere, it will still find it and click it.


    Also, some of your procedures you have repeat then right after that have until blah or counter = 20. Your counter will never reach 20 unless you have like counter := counter + 1 somewhere between repeat and until.
    Like this from your Spin procedure:

    SCAR Code:
    repeat
    until FindObjCustom(x, y, ['inning', 'heel'], [14672099,5137011], 5) or  (counter=20);
    Your counter will never reach 20, look at this:

    SCAR Code:
    Begin
      Counter := 0// You have to make sure the counter is set at 0
      Repeat
        counter := counter + 1; //now your counter can reach 20 cause it keeps adding one to the counter.
        Wait(200 + random (200));
      until FindObjCustom(x, y, ['inning', 'heel'], [14672099,5137011], 5) or (counter=20);

    See how the counter will keep adding by one until it reaches 20 or if it finds the spinning wheel?


    Now, for the walking I would really recommend not using Mouse anywhere really (It can mess up so easily when its clicking on the minimap)... There are so many good ways to walk, for your script i would recommend looking at a couple good functions in MapWalk.scar (ask me if you don't know where to find this) that could help you out tremendously. Like radialwalk:

    SCAR Code:
    function RadialWalk(TheColor: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;

    I will guide you to a couple tutorials later that will help you with walking. With the walking, once you find out how to do it, it is simple!


    There is one big thing your script is semi-missing and it is failsafes! If you get a missclick, what will happen, will it go into an endless loop, or reset itself? Failsafes will help keep your script from getting lost, stuck, or being put into endless loop. You have already gotten the basic failsafe with the counters. You need more while you are walking, I will link you to a tutorial.


    I am glad you took the chance and made your own script. This is just one of the building blocks to becoming a good scripter. If you ever need help: get on IRC, add someone as a friend on AIM or MSN, create a thread looking for help, or send me or anyone a PM that you think could help. Also, if you have trouble with something, look at some other scripts and learn If you need anything else explained a little more in depth, ask me . Here are a couple tutorials that I want you to look at:
    DTM's:
    http://www.villavu.com/forum/showthread.php?t=31021
    http://www.villavu.com/forum/showthread.php?t=29175

    Failsafes:
    http://www.villavu.com/forum/showthread.php?t=37886

    Walking:
    http://www.villavu.com/forum/showthread.php?t=19162

    If you don't get enough info from these tutorials, check out this place!!!
    http://www.villavu.com/forum/forumdisplay.php?f=28

    Have fun learning and good luck!!!
    ~King of the Nites
    Last edited by King of the Nites; 06-10-2009 at 01:58 AM.

  6. #6
    Join Date
    May 2007
    Location
    UK
    Posts
    4,007
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    Rep+ for you King of the Nites.
    Very detailed

    T~M

  7. #7
    Join Date
    Oct 2008
    Posts
    48
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ty King of the Nites

  8. #8
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Btw, on your thread I posted one with proper standards .

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
  •