Results 1 to 9 of 9

Thread: New to scripting & need help with walking

  1. #1
    Join Date
    Oct 2012
    Posts
    26
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default New to scripting & need help with walking

    Hey!
    I just today started to think of making a clay miner that will bank and mine and repeat ^^

    I have this so far:
    Simba Code:
    program New;
    {$DEFINE SMART}
    {$i srl/srl.simba}

    Procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      Players[0].BoxRewards  := ['oins', 'oins', 'oins'];

      Players[0].Name :='';
      Players[0].Pass :='';
      Players[0].Nick :='';
      Players[0].Active:=True;
    end;

     procedure AntiBan;
    begin
      if(not(LoggedIn))then
      Exit;
      case Random(8) of
       0:
       begin
         HoverSkill('Mining', false);
         wait(2453+Random(432));
       end;
       1: PickUpMouse;
       2:
       begin
         MakeCompass('N');
         wait(100+random(133));
         MakeCompass('S');
         wait(50+random(133));
         MakeCompass('N');
       end;
      end;
    end;

    procedure MineRock;
    var x, y: integer;
    begin
    repeat
      if FindObj(x, y, 'lay',7845078,35 ) then
      begin
            Mouse(x, y, 0, 0, false);
        ChooseOption('ine');
        end;
    repeat
                       Wait(3000+random(250));
      Until not IsUpText('ew') or (InvFull);
      until(InvFull);
    end;

    begin
      SetUpSRL;
      ActivateClient;
      DeclarePlayers;
      LoginPlayer;
      MineRock;
    end.
    But I am very new to walking and need some help with walking and banking, If ANYONE could help me it would be awesome!

    Thanks

  2. #2
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    If SPS works in theat location you could use that, it'd be easiest. Otherwise you could use RadialWalk or ODTMs. I've never used ODTMs myself but I've heard good things.

    SPS Tutorial by Mat : http://villavu.com/forum/showthread.php?t=71461


    RaidialWalk Tutorial by NKN : http://villavu.com/forum/showthread.php?t=78648

    ODTMs : http://villavu.com/forum/showthread.php?t=72067

    Hope these help, feel free to PM the tut makers for help, of me if using SPS o RadialWalk

  3. #3
    Join Date
    Oct 2012
    Posts
    26
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Awesome! Thanks; I would still need some help cause I have no idea how to make it to trigger the walking if you know what I mean

  4. #4
    Join Date
    Oct 2012
    Posts
    26
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh yeah and I will be using the SPS

  5. #5
    Join Date
    Dec 2009
    Posts
    380
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    To "trigger" the walking, just add the function after your mining procedure

    Simba Code:
    begin
      SetUpSRL;
      ActivateClient;
      DeclarePlayers;
      LoginPlayer;
      repeat
        MineRock;
        Bank;
      until(false);
    end.

    You can do that because your procedure repeats the mining until a full invo. If it didn't you'd add another repeat in the above for MineRock; until(InvFull).

    I would highly suggest having a better function for finding the clay. Try using TPAs?

    Simba Code:
    Function FindObj(Hue, Sat: Extended; Color, Tol, w, h: Integer; ObjText: string): Boolean;
    var
      CTS, I, N: Integer;
      TPA: TPointArray;
      ATPA: Array of TPointArray;

    begin
      CTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(Hue, Sat);
      For N := 0 to 1 do
        if not FindColorsSpiralTolerance(MSCX, MSCY, TPA, Color, MSX1, MSY1, MSX2, MSY2, Tol) then
          Exit;
        ColorToleranceSpeed(CTS);
        ATPA := TPAToATPAEx(TPA, w, h);
        For I := 0 to High(ATPA) do
        begin
          MiddleTPAEx(ATPA[i], x, y);
          MMouse(x, y, 0, 0);
          Wait(50+random(10));
          If IsUpText(ObjText) then
          begin
            Result := True
            Writeln('Found Object');
            Break;
          end;
        end;
    end;

    That's something I always use

    Now where are you going to be mining? If in walking distance to a bank, just use a path creator (I can't find the one I use, it's different but I believe they all work the same) and make a path. If it's far from a bank, make sure to have teleporting between the walking (Teleport, walk to bank, teleport, walk to mine, etc.) those will require functions as well.

    If you'd rather keep it simple simba's minimap obj detection is pretty accurate so you could always use symbols like mines, water sources, shops, banks, etc. and have your mouse adjust itself based on their positions. But if you'd rather just use SPS then ignore this portion

    Where are you planning on mining the clay exactly?
    Last edited by Roflme; 11-04-2012 at 01:14 AM.
    Currently: Playing OSRS legit until I get bored

  6. #6
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    He's mining in west varrock and banking in varrock west bank.

  7. #7
    Join Date
    Oct 2012
    Posts
    26
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Alrightt.. Thanks guys

  8. #8
    Join Date
    Nov 2012
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    repeat
    Wait(3000+random(250));
    Until not IsUpText('ew') or (InvFull);
    until(InvFull);
    end;
    Shouldn't that be 'lay' instead of 'ew'?

  9. #9
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    Quote Originally Posted by Kobbra View Post
    Shouldn't that be 'lay' instead of 'ew'?
    Yeah, it should.

    although it isn't a very good detection method compared to invcounting because it thinks you are done mining if the camera rotates or if the rock was chosen via right click. (left click should detect fine usually)
    Last edited by Ian; 11-08-2012 at 01:15 AM.

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
  •