Results 1 to 12 of 12

Thread: DeadWalkVE (Walks from Lumby to Varrock East)

  1. #1
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default DeadWalkVE (Walks from Lumby to Varrock East)

    Well, here it is, my first ever function/script. It is designed to walk from Lumby to Varrock East Bank, and has been working reliably for me ever since I got it "finished".

    I'd appreciate it if people would run it themselves, and/or look over it. Tell me of any errors that come up (please use detail). Also, please tell me of any standards that I might have missed (I've been working with Java and Eclipse's autoindentation feature has me spoiled).

    Feel free to use this in any FREE script, provided you give me proper credit.

    And before people say anything, I'm also working on one for Varrock West Bank, one for the center of Varrock, one for Draynor, and two for Falador (East and West banks, respectively). The Varrock ones shouldn't take much longer (once I actually start on them).

    SCAR Code:
    {*******************************************************************************
    function DeadWalkVE: Boolean;
    By: Senrath
    Description: Walks from Lumbridge Courtyard to Varrock East Bank.  Must include
    path.scar (found SRL/SRL/misc/path.scar)
    *******************************************************************************}


    function DeadWalkVE: Boolean;
    var
      count, x, y : Integer;
    begin
      if not(LoggedIn)then Exit;
      MakeCompass('n');
      wait(1000 + random(500));
      RadialRoadWalk(FindRoadColor, 85, 95, 70, 1, 1);
      RadialWalk(FindWaterColor, 60, 90, 70, 1, 1);
      RadialRoadWalk(FindRoadColor, 45, 90, 60, 1, 1);
      RadialRoadWalk(FindRoadColor, 45, 90, 60, 1, 1);
      repeat
      begin
         RadialRoadWalk(FindRoadColor, 320, 360, 70, 1, 1);
         count := count + 1;
      end;
      until(FindSymbol(x, y, 'churn'))or(count > 10);
      count := 0;
      repeat
      begin
        RadialRoadWalk(FindRoadColor, 0, 90, 70, 1, 1);
        count := count + 1;
      end;
      until(FindSymbol(x, y, 'quest'))or(count > 10);
      if(FindSymbol(x, y ,'quest'))then Mouse(x, y, 4, 4, true);
      RoadColor:=FindVarrockRoadColor;
      Path[0].Mainpoint.x:=700;
      Path[0].Mainpoint.y:=82;
      Path[0].Subpoints[0].x:=588;
      Path[0].Subpoints[0].y:=63;
      Path[0].Subpoints[1].x:=659;
      Path[0].Subpoints[1].y:=78;
      Path[0].Subpoints[2].x:=606;
      Path[0].Subpoints[2].y:=82;
      WalkPath(0);
      Flag;
      RoadColor:=FindVarrockRoadColor;
      Path[1].Mainpoint.x:=689;
      Path[1].Mainpoint.y:=79;
      Path[1].Subpoints[0].x:=576;
      Path[1].Subpoints[0].y:=75;
      Path[1].Subpoints[1].x:=604;
      Path[1].Subpoints[1].y:=68;
      Path[1].Subpoints[2].x:=636;
      Path[1].Subpoints[2].y:=82;
      Path[1].Subpoints[3].x:=660;
      Path[1].Subpoints[3].y:=68;
      WalkPath(1);
      Flag;
      RoadColor:=FindVarrockRoadColor;
      Path[2].Mainpoint.x:=638;
      Path[2].Mainpoint.y:=36;
      Path[2].Subpoints[0].x:=656;
      Path[2].Subpoints[0].y:=21;
      Path[2].Subpoints[1].x:=601;
      Path[2].Subpoints[1].y:=78;
      Path[2].Subpoints[2].x:=676;
      Path[2].Subpoints[2].y:=99;
      WalkPath(2);
      Flag;
      RoadColor:=FindVarrockRoadColor;
      Path[3].Mainpoint.x:=624;
      Path[3].Mainpoint.y:=24;
      Path[3].Subpoints[0].x:=585;
      Path[3].Subpoints[0].y:=125;
      Path[3].Subpoints[1].x:=621;
      Path[3].Subpoints[1].y:=130;
      Path[3].Subpoints[2].x:=667;
      Path[3].Subpoints[2].y:=139;
      Path[3].Subpoints[3].x:=642;
      Path[3].Subpoints[3].y:=102;
      Path[3].Subpoints[4].x:=656;
      Path[3].Subpoints[4].y:=43;
      WalkPath(3);
      Flag;
      RoadColor:=FindVarrockRoadColor;
      Path[4].Mainpoint.x:=641;
      Path[4].Mainpoint.y:=24;
      Path[4].Subpoints[0].x:=644;
      Path[4].Subpoints[0].y:=154;
      Path[4].Subpoints[1].x:=638;
      Path[4].Subpoints[1].y:=134;
      Path[4].Subpoints[2].x:=661;
      Path[4].Subpoints[2].y:=104;
      Path[4].Subpoints[3].x:=613;
      Path[4].Subpoints[3].y:=57;
      WalkPath(4);
      Flag;
      RoadColor:=FindVarrockRoadColor;
      Path[5].Mainpoint.x:=612;
      Path[5].Mainpoint.y:=24;
      Path[5].Subpoints[0].x:=624;
      Path[5].Subpoints[0].y:=159;
      Path[5].Subpoints[1].x:=622;
      Path[5].Subpoints[1].y:=158;
      Path[5].Subpoints[2].x:=611;
      Path[5].Subpoints[2].y:=136;
      Path[5].Subpoints[3].x:=599;
      Path[5].Subpoints[3].y:=117;
      Path[5].Subpoints[4].x:=614;
      Path[5].Subpoints[4].y:=102;
      Path[5].Subpoints[5].x:=631;
      Path[5].Subpoints[5].y:=76;
      Path[5].Subpoints[6].x:=609;
      Path[5].Subpoints[6].y:=57;
      WalkPath(5);
      RoadColor:=FindVarrockRoadColor;
      Path[6].Mainpoint.x:=631;
      Path[6].Mainpoint.y:=20;
      Path[6].Subpoints[0].x:=648;
      Path[6].Subpoints[0].y:=151;
      Path[6].Subpoints[1].x:=649;
      Path[6].Subpoints[1].y:=134;
      Path[6].Subpoints[2].x:=628;
      Path[6].Subpoints[2].y:=116;
      Path[6].Subpoints[3].x:=628;
      Path[6].Subpoints[3].y:=96;
      Path[6].Subpoints[4].x:=629;
      Path[6].Subpoints[4].y:=60;
      Path[6].Subpoints[5].x:=640;
      Path[6].Subpoints[5].y:=47;
      WalkPath(6);
      Flag;
      RoadColor:=FindVarrockRoadColor;
      Path[7].Mainpoint.x:=613;
      Path[7].Mainpoint.y:=21;
      Path[7].Subpoints[0].x:=632;
      Path[7].Subpoints[0].y:=158;
      Path[7].Subpoints[1].x:=629;
      Path[7].Subpoints[1].y:=133;
      Path[7].Subpoints[2].x:=640;
      Path[7].Subpoints[2].y:=116;
      Path[7].Subpoints[3].x:=633;
      Path[7].Subpoints[3].y:=92;
      Path[7].Subpoints[4].x:=619;
      Path[7].Subpoints[4].y:=67;
      Path[7].Subpoints[5].x:=628;
      Path[7].Subpoints[5].y:=47;
      WalkPath(7);
      Flag;
      RoadColor:=FindVarrockRoadColor;
      Path[8].Mainpoint.x:=580;
      Path[8].Mainpoint.y:=75;
      Path[8].Subpoints[0].x:=624;
      Path[8].Subpoints[0].y:=44;
      Path[8].Subpoints[1].x:=617;
      Path[8].Subpoints[1].y:=61;
      Path[8].Subpoints[2].x:=595;
      Path[8].Subpoints[2].y:=73;
      Path[8].Subpoints[3].x:=620;
      Path[8].Subpoints[3].y:=81;
      Path[8].Subpoints[4].x:=638;
      Path[8].Subpoints[4].y:=103;
      if not(WalkPath(8))then
      begin
        RadialRoadWalk(FindVarrockRoadColor, 0, 20, 30, 1, 1);
        WalkPath(8);
        Flag;
      end;
      RoadColor:=FindVarrockRoadColor;
      Path[9].Mainpoint.x:=571;
      Path[9].Mainpoint.y:=94;
      Path[9].Subpoints[0].x:=669;
      Path[9].Subpoints[0].y:=68;
      Path[9].Subpoints[1].x:=668;
      Path[9].Subpoints[1].y:=83;
      Path[9].Subpoints[2].x:=673;
      Path[9].Subpoints[2].y:=99;
      Path[9].Subpoints[3].x:=642;
      Path[9].Subpoints[3].y:=88;
      Path[9].Subpoints[4].x:=617;
      Path[9].Subpoints[4].y:=89;
      WalkPath(9);
      Flag;
      count:=0;
      repeat
      if(FindSymbol(x, y, 'bank'))then
      begin
        Mouse(x, y, 1, 1, true);
        Flag;
        Result := True;
      end;
      SymbolAccuracy := SymbolAccuracy - 0.1;
      count := count + 1;
      wait(1000 + random(500));
      until(Result)or(count > 5);
      SymbolAccuracy := 0.8;
    end;

  2. #2
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    use a loop for the path walking.

    Add failsafes for RRW, like If Not RadialRoadWalk..

  3. #3
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    What do you mean by use a loop? The ones that are repeated more than twice already are in loops. And for the failsafes, I'm not sure what would work. Some of the RRWs don't need to be done in order for the function to work most of the time, but they are needed for certain minimap angles.

  4. #4
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default

    the loop n3ss3s is refering to would be something like this:

    SCAR Code:
    for i := 0 to 6 do
    begin
      WalkPath[i];
      FFlag(0);
    end;

    you still need failsafes for the RRW even if you dont need some of them. For the ones you actually need you should put them in, like:

    SCAR Code:
    if(not(RadialRoadWalk(RoadColor,70,90,50,2,2)))then
      if(not(RadialRoadWalk(RoadColor,80,100,60,2,2)))then
      begin
        Writeln('Walking Failed');
        NextPlayer(False);
      end;
    end;

    stuff like that... another useful tool i find when using the walkpath, you can do something like this:

    SCAR Code:
    clicks := 0;
    repeat
      if(Clicks >= 3)then
      begin
        NextPlayer(False);
        Exit;
      end;
      RadialRoadWalk(blah blah); // mostly for straight paths, use wide angles
      Clicks := Clicks + 1;
    until(WalkPath(1));

    I use that stuff alot in my Eye of Newt[er]. Its very effective. Hope that stuff helps ya
    METAL HEAD FOR LIFE!!!

  5. #5
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    I understand that I need failsafes, but what I'm saying is that in any given run of the function, not all of the RRWs will be used and I don't know which ones will be used or not.

    Thanks for the clarification on the loop, though. I'll put that in when I get home.

  6. #6
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by senrath View Post
    I understand that I need failsafes, but what I'm saying is that in any given run of the function, not all of the RRWs will be used and I don't know which ones will be used or not.

    Thanks for the clarification on the loop, though. I'll put that in when I get home.
    *cough* thats why you run heavy testing *cough*

    you should know your script inside and out till the point where you know where every click is going to be made. Try out some of the things that we posted as you get going.

    BTW while testing, writeln can be your best friend.

    SCAR Code:
    if(RadialRoadWalk(blah blah))then Writeln('First click'); //or something to help you ID it
    METAL HEAD FOR LIFE!!!

  7. #7
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    That's not what I mean. Sorry if I was being ambiguous. I know where each click will be, depending on the angle of the minimap. As I said, some of those clicks only come into play at certain angles. And since, aside from using something like ScarScape, there is no way to get the map to perfect north (or perfect anything, for that matter), there is no real way for me to tell which ones will be used at any given time. Of course, if there IS a real way to do this, please let me know, I would love to use it.

  8. #8
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by senrath View Post
    That's not what I mean. Sorry if I was being ambiguous. I know where each click will be, depending on the angle of the minimap. As I said, some of those clicks only come into play at certain angles. And since, aside from using something like ScarScape, there is no way to get the map to perfect north (or perfect anything, for that matter), there is no real way for me to tell which ones will be used at any given time. Of course, if there IS a real way to do this, please let me know, I would love to use it.
    hehe, ok i think you are getting closer to what Im trying to point out, but you are not quite with me yet.

    Say for example that you are going around by the cow pen area...

    Have it search for the first radialwalk, then if it fails, have it increase the angle to what it should be for the other one and so on until you run out of options and have it do a "nextplayer"

    You will still be using the same format that you are doing, just with failsafes if it cant find for example like 3 in a row...then it would be searching for an angle nowhere even close to what you want, thus messing up the script. Have it switch if it cant find something close to what you want.

    It is helpful to use the WalkPaths as "marker points" to keep your script on track and more consistent. This is most useful in areas where you need to radically change the angles of you RRW, ie: Turns (around by the alkahrid desert, and the cowpen..) The WalkPath ensures that you click that specific marker before the angles start to change for the turn.

    Am I making any more sense?
    METAL HEAD FOR LIFE!!!

  9. #9
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    Again, I don't think I'm quite following you. The problem with me implementing that kind of thing is sometimes all of them will need to trigger (a couple times my minimap was about 45-50 degrees off of what the compass showed, requiring all of the walks to get there properly).

    At those turns, there isn't much need for extra WalkPaths. Walking around the cowpen uses angles wide enough that there can be some overlay on each side, and for going around Al-Kharid, the first time (by the gate) should walk completely up to the gate before continuing, and for the second time (around the top) I switch completely from RRW to WalkPath (except for one part incase of screen loading issues.)

  10. #10
    Join Date
    Nov 2006
    Location
    NSW, Australia
    Posts
    3,487
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Use DDTMs, since you can search for them rotated.
    [CENTER][img]http://signatures.mylivesignature.com/54486/113/4539C8FAAF3EAB109A3CC1811EF0941B.png[/img][/CENTER]
    [CENTER][BANANA]TSN ~ Vacation! ~ says :I Love Santy[/BANANA][/CENTER]

    [CENTER][BANANA]Raymond - Oh rilie? says :Your smart[/BANANA][/CENTER]

  11. #11
    Join Date
    Aug 2007
    Location
    bend down and ill show you!
    Posts
    210
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    nice need loop=\ and it will be nice

  12. #12
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    Quote Originally Posted by Santa_Clause View Post
    Use DDTMs, since you can search for them rotated.
    I have a couple problems with using DDTMs. First, I'd have to go and make them all, and I'm lazy :P
    Second, unless I'm mistaken, it would remove the "human-like" random element that the function currently has. And by that I mean the fact that it doesn't always use the same number of clicks, and almost never clicks in the same place twice (well, until it gets to the Varrock road anyway, since I had to exchange the randomness for reliability XD).

    At anyrate, I'm tweaking this now, adding the suggestions as best I can, and that sort of thing.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 18
    Last Post: 01-10-2009, 09:19 PM
  2. A east lumby miner
    By tomdavies in forum RS3 Outdated / Broken Scripts
    Replies: 1
    Last Post: 05-02-2008, 10:07 AM
  3. lumby to varrock walker
    By mamoth95 in forum First Scripts
    Replies: 17
    Last Post: 11-05-2007, 10:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •