Results 1 to 10 of 10

Thread: Script doesnt begin walking after inv full

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

    Default Script doesnt begin walking after inv full

    Hey!
    My script doesnt start walking to the bank from west clay mines after the invs full and I would like to have some help with that ;>
    Simba Code:
    program ClayCrusher;

    {$DEFINE SMART}
    {$i srl/srl.simba}
    {$i sps/sps.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 WalkToBank;
    Var
      OutBank:TPointArray;
    begin                                  //SetupSRL here made a second client be summoned when It got to this part, so I took it out :)
      SPS_Setup(RUNESCAPE_SURFACE, ['11_7','10_8','10_7','10_6','12_6','12_8']);     //This I changed
      OutBank := [Point(4566, 2906), Point(4557, 2932), Point(4532, 2942),
      Point(4521, 2960), Point(4519, 2987), Point(4520, 3001), Point(4522, 3013),
      Point(4521, 3025), Point(4525, 3039), Point(4527, 3048), Point(4524, 3061),
      Point(4530, 3072), Point(4536, 3082), Point(4538, 3089), Point(4537, 3098),
      Point(4545, 3114), Point(4551, 3120), Point(4565, 3141), Point(4559, 3169),
      Point(4184, 3277), Point(4075, 3010), Point(4094, 2738), Point(5092, 2756), Point(5088, 3203), Point(4843, 3311)];
      SPS_WalkPath(OutBank);
      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,10) then
        begin
          Mouse(x, y, 5, 5, false); //I added some randomization
          ChooseOption('ine');
        end;
          Wait(1500+random(250));
      until(InvFull);
      WalkToBank;
    end;

    begin
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
      MineRock;
      WalkToBank;
    end.

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

    Default

    Bu bedibump
    Need some help with scripting, If you would like to help me, My skype is "cRazona" Without " "

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

    Default

    Well first you can take out WalkToBank in the MineRock, since in your main loop at the bottom you already have WalkToBank following MineRock so you're just repeating it.

    You may have to add more areas. After you make your path click on a few points surrounding your path. This will add additional areas (DON'T INCLUDE THESE POINTS IN YOUR PATH!). Sometimes that fixes my problem.

    I'm going to test it out, I'll play around with it and see what happens.


    Oh, by the way, try doing something like this:

    Simba Code:
    procedure MineRock;
    var
      x, y, t, PlusOne: integer;
    begin
      PlusOne := InvCount + 1
      repeat
        if FindObj(x, y, 'lay',7845078,10) then
          MarkTime(t);
          Mouse(x, y, 5, 5, true);
          repeat
            Wait(100+random(10));
          until(InvCount=PlusOne) or (TimeFromMark(t) > 2000);
      until(InvFull);
    end;
    The wait you have can throw your timing off. You can either double click or if you mine it fast it'll be delayed. This will allow so after it gets another item the InvCount will equal PlusOne so it'll just repeat the loop RIGHT AFTER mining a clay. If it waits too long (2 seconds, or increase it) then it'll restart the loop (this is in case it misses an ore or something).

    And AFAIK, the other scripts I compete with when I use this at Rimmington can't keep up. Don't know why.


    Edit: I'm curious why there were SO MANY points before

    This worked for me

    Simba Code:
    procedure WalkToBank;
    Var
      myPath:TPointArray;
    begin
      Writeln('walking bank');                                  
      SPS_Setup(RUNESCAPE_SURFACE, ['10_6', '10_7', '10_8', '11_6', '11_7', '11_8']);
      myPath := [Point(4579, 3138), Point(4545, 3099), Point(4518, 3039),
    Point(4524, 2995), Point(4525, 2951), Point(4561, 2938), Point(4581, 2901)];
      SPS_WalkPath(myPath);
      end;

    Got me to the VWB (I hope that was your destination, if you want to go bank elsewhere then you'll have to make a new path, sorry.)

    Try making that on your own again, though. Don't just copy and paste
    Last edited by Roflme; 11-04-2012 at 10:38 PM.
    Currently: Playing OSRS legit until I get bored

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

    Default

    You may have to add more areas. After you make your path click on a few points surrounding your path. This will add additional areas (DON'T INCLUDE THESE POINTS IN YOUR PATH!). Sometimes that fixes my problem
    .

    I didnt really understand that, How I cna make those "points" thats not on the original path
    Need some help with scripting, If you would like to help me, My skype is "cRazona" Without " "

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

    Default

    I tried making an SPS path for on the way back and it didn't work, although going to the bank worked,so I'm not sure what the problem is..

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

    Default

    Alright thanks ;> Could any of you suggest me a other way of "walking"? and easy way please C;
    Need some help with scripting, If you would like to help me, My skype is "cRazona" Without " "

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

    Default

    After you copy and paste the points of the path, go back and click on a bunch of points SURROUNDING your current path, and then ONLY COPY THE AREA. Your path will be the original one you used before, but the area will be the area those points are in PLUS some surrounding areas.


    An alternative is to use the minimap images (Bank symbols, Trees, Ladders, Water sources, Stores, etc.) and move the mouse based on their positions. Although this isn't ALWAYS reliable since the map symbols can change (I think trees and ladders are constant though).

    You can also use radialwalk to walk along a road. I don't use this though so I can't help you with that.
    Currently: Playing OSRS legit until I get bored

  8. #8
    Join Date
    Nov 2011
    Posts
    1,589
    Mentioned
    9 Post(s)
    Quoted
    17 Post(s)

    Default

    Quote Originally Posted by Roflme View Post
    Simba Code:
    procedure MineRock;
    var
      x, y, t, PlusOne: integer;
    begin
      PlusOne := InvCount + 1
      repeat
        if FindObj(x, y, 'lay',7845078,10) then
          MarkTime(t);
          Mouse(x, y, 5, 5, true);
          repeat
            Wait(100+random(10));
          until(InvCount=PlusOne) or (TimeFromMark(t) > 2000);
      until(InvFull);
    end;
    That won't work well because PlusOne int is only ran once. You'd need it to be called in the first repeat loop.
    Also I'd suggest adding a Timer on its so say after 1:40Min it'll loop out the first repeat so you don't have infinite loops.
    Mat



    ^^

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

    Default

    I can show you how to use radialwalk, but in my experience it is frustratingly inaccurate . If you have a low tolerance it will not walk anywhere if the colours change when you hop worlds/teleport, and if you have a higher tolerance then it will just click anywhere in the radian, so you need to make them small. So want to try Radialwalk? If you do I'll help where I can

  10. #10
    Join Date
    Jul 2010
    Location
    Western US
    Posts
    387
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Perhapse this could be of some use.

    Simba Code:
    //from SRL RunAway
    //reused by etherfreak
    //runs in a specified direction and a specified distance. direction is 0-360 degrees, with 0 being N
    //rads is the radius from the character. try to keep this between 20-70.
    //also, no randoms incorperated, so use your own randoms!
    procedure RunDir(dir: variant; Rads: Integer);
    var
      Deg: extended;
    begin
      if (not LoggedIn) then exit;
      Deg := variantToDirection(dir);
      Deg := Deg + Random(2);
      SetRun(True);
      MFNF(Trunc(Rads * Sin(Radians(FixD(Rs_GetCompassAngleDegrees + Deg))) + MMCX + Random(5)),
          Trunc(-Rads * Cos(Radians(FixD(Rs_GetCompassAngleDegrees + Deg))) + MMCY + Random(5)), 1, 1);
      FFlag(0);
      Wait(500 + Random(1500));
    end;

    It works better the radial walk for short walking distances. using this incorporated with symbol finding may be what you need.
    Of all the things I have lost, I miss my mind the most.
    Current Projects:
    Addy bar miner and superheater

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
  •