Results 1 to 14 of 14

Thread: A walking question...

  1. #1
    Join Date
    Jul 2013
    Posts
    140
    Mentioned
    7 Post(s)
    Quoted
    61 Post(s)

    Default A walking question...

    I'm attempting to make a private cosmic runecrafter, due to me spending lots of points from GOP on cosmic teletabs, and I have the following.

    1. Withdrawing the teletab and the essence.
    2. Using the teletab to end up by the alter.
    3. Entering the ruins.
    4. Walking from the entrance to the center. ****
    5. Using the alter to craft runes.
    6. Using teleport back to bank.

    Step 4 is the only step that I am having major problems with...

    Currently I am trying to find a colour on the minimap for the client to realise that is where it needs to walk, but the problem is with the cosmic alter you can end up in four different spots when you enter the alter. I have tried using ACA to find a colour that will work from all 4 entrances but unfortunately I couldn't find a way of getting it to work.

    I am able to currently get it to work on the off chance, but after around 2-3 trips (possibly due to a certain entrance, not 100% sure) it will eventually fail to find the colour on the minimap to walk too, so I was wandering what would be the best method I could use to make this work (I did touch up on using SPS but I'm not sure how I could get that to work when there are 4 total paths that might need to be walked), thank you all for taking your time in reading this!
    Looking for cheap games? Kinguin has what you need!

    Teamwork Tutorial - Akuma Tutorial
    Don't give up, reward is just around the corner.

  2. #2
    Join Date
    Jul 2013
    Posts
    140
    Mentioned
    7 Post(s)
    Quoted
    61 Post(s)

    Default

    Bump for injustice.

    I have attempted to use SPS using the blindwalk function but currently whenever I use sps.getPlayerPos all I get is failure due to the following:
    Code:
    -- sps.init()
    ---- Path exists (C:\Simba\Includes\SPS\img\runescape_other\COSMIC_MAP.png)
    ---- Setup area "COSMIC_MAP" in 31ms
    -- sps.init()
    -- WARNING: sps.getPlayerPos(): Didn't find enough matches accurately calc your postion
    -- sps.getPlayerPos(): result = {X = -1, Y = -1}, took 140 ms

    ^ COSMIC_MAP.png, I have attempted to use a smaller version (This is the largest it can be, at least I think) and I have also previously taking the dots out to no effect.

    The only other option I thought I could do was maybe have a check to see which portal I had entered from and having seperate sps paths for each one (North, East, West and South) but I wouldn't know how to get Simba to realise which one I'm at. Any help would be appreciated!
    Looking for cheap games? Kinguin has what you need!

    Teamwork Tutorial - Akuma Tutorial
    Don't give up, reward is just around the corner.

  3. #3
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    From the debug in your second post I can only assume that you've configured your accuracy and tolerance incorrectly for that map

    Read up on .setup()'s overloads and use one which will allow you to set those params
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Badâ„¢ before everyone gets laser pistols

  4. #4
    Join Date
    Mar 2013
    Location
    Argentina
    Posts
    758
    Mentioned
    27 Post(s)
    Quoted
    365 Post(s)

    Default

    lolololol a walking question



    Code:
    SPS.setup('CABBAGE_MAP', RUNESCAPE_OTHER, 4, TOL, MINMATCHPERCENT);
    you should try playing with those variables (tol and min match percent) and see if you can get it working.. i usually dont even touch accuracy, but if you want you can change it up to 5 maybe, not more.

    Tol example: 500.00 , Minmatchpercent example: 0.40

  5. #5
    Join Date
    Jun 2014
    Location
    Oklahoma
    Posts
    336
    Mentioned
    22 Post(s)
    Quoted
    231 Post(s)

    Default

    I would not use SPS for something like this. You could do this,

    Simba Code:
    SomeTPA := minimap.getDots(MM_DOT_NPC,minimap.getBounds());
    Mouse(middleTPA(someTPA));

    From the image it looks like there is always that wizard npc there. This will find his dot and click on it, thus moving you to the altar. You might want to randomize that mouse though. But this is a workable idea.

    You could also just search the minimap for that gray color of "island" the altar is on. It would find the altar island and all the smaller surrounding ones. You could break the findings into an ATPA and sort it by size. Like so,

    Simba Code:
    findColorsSpiralTolerance(x, y, TPA, GRAY_COLOUR, minimap.getBounds(), GRAY_TOL, colorSetting(2, GRAY_HUE, GRAY_SAT));
    if (Length(TPA) < 1) then
    begin
       writeLn('Gray colour not found');
       Exit;
    end;
    ATPA := TPA.toATPA(45, 45); // you would have to play with this line a bit
    ATPA.sortBysize(true);
         
    Mouse(middleTPA(ATPA[0]));

    You could probably get away with using a DTM of the altar. Which would be by far the easiest method. Like so,



    These are not ready to go solutions but ideas. I would use one of these three methods to do this.

  6. #6
    Join Date
    Dec 2011
    Location
    Hyrule
    Posts
    8,662
    Mentioned
    179 Post(s)
    Quoted
    1870 Post(s)

    Default

    @tehYosh; If you are using DX mode - it won't work b/c the black MM is color 0 and sps does not like that. Try creating the map (in OGL mode) and running the map in OGL mode to see the difference. There should probably be a work around for this added.
    Last edited by Ashaman88; 11-04-2014 at 07:25 PM.

  7. #7
    Join Date
    Jul 2013
    Posts
    140
    Mentioned
    7 Post(s)
    Quoted
    61 Post(s)

    Default

    Thank you all for your responses, especially that walking question mark from @undorak7, that did make me chuckle!

    As you have guessed, I haven't touched the tolerance or accuracy settings, so I will have a futher look into them shortly.

    I would love to use the DTM method or the npc dot method, but the picture here shows me why I can't.


    ^ As you can see on the map, at this particular entrance from the alter I can't see the npc dot or the DTM, though I did look into those. I have also tried using ACA to find a colour that would match from each entrance, but for some reason I couldn't find a colour that could be found from all entrance (The problem entrance for this was the west one, as my colour match was about a third of the box on the left hand side.

    I shall obviously comment if changing the tolerance settings gives me any luck, thanks again!
    Looking for cheap games? Kinguin has what you need!

    Teamwork Tutorial - Akuma Tutorial
    Don't give up, reward is just around the corner.

  8. #8
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    Quote Originally Posted by tehYosh View Post
    Thank you all for your responses, especially that walking question mark from @undorak7, that did make me chuckle!

    As you have guessed, I haven't touched the tolerance or accuracy settings, so I will have a futher look into them shortly.

    I would love to use the DTM method or the npc dot method, but the picture here shows me why I can't.


    ^ As you can see on the map, at this particular entrance from the alter I can't see the npc dot or the DTM, though I did look into those. I have also tried using ACA to find a colour that would match from each entrance, but for some reason I couldn't find a colour that could be found from all entrance (The problem entrance for this was the west one, as my colour match was about a third of the box on the left hand side.

    I shall obviously comment if changing the tolerance settings gives me any luck, thanks again!

    Hey there, may I use your account and try one thing (It has been a while since I scripted, so I would like to try. )

    ~Home

  9. #9
    Join Date
    Jan 2012
    Posts
    1,596
    Mentioned
    78 Post(s)
    Quoted
    826 Post(s)

    Default

    soo this is the minimap, correct?


    Id suggest just finding the color of the platform on the minimap, split it into 2 tpas, then click on the larger one. its as simple as that. dont need to use a dtm, or a... whatever else. should always work too.

  10. #10
    Join Date
    Jul 2013
    Posts
    140
    Mentioned
    7 Post(s)
    Quoted
    61 Post(s)

    Default

    Quote Originally Posted by Home View Post
    Hey there, may I use your account and try one thing (It has been a while since I scripted, so I would like to try. )

    ~Home
    Replied to you, hoping to see what method you come across with, I'm glad you're willing to give it a go!

    Quote Originally Posted by Turpinator View Post
    soo this is the minimap, correct?


    Id suggest just finding the color of the platform on the minimap, split it into 2 tpas, then click on the larger one. its as simple as that. dont need to use a dtm, or a... whatever else. should always work too.
    I shall also have a look into that for future reference, but at each entrance the colour is different in slight, I couldn't find a colour that I would be able to use regardless of which entrance it ended up on, so wouldn't I end up with the same issue as before?

    E:
    Quote Originally Posted by Ashaman88 View Post
    @tehYosh; If you are using DX mode - it won't work b/c the black MM is color 0 and sps does not like that. Try creating the map (in OGL mode) and running the map in OGL mode to see the difference. There should probably be a work around for this added.
    I did try running it in openGL after searching for people having similar problems with Direct X, didn't realise this was due to the amount of black though, when I ran it in openGL I did get points come up but it still wouldn't walk to where I wanted it too, perhaps that was because I didn't screenshot the map in openGL. Thanks for shedding some light on that though, thanks @Ashaman88
    Looking for cheap games? Kinguin has what you need!

    Teamwork Tutorial - Akuma Tutorial
    Don't give up, reward is just around the corner.

  11. #11
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    Simba Code:
    function WalkTo() :Boolean;
    var
      WalkPoint :TPoint;
      TPA, TPA2 :TPointArray;
    begin
      Result := False;
      FindColors(TPA, minimap.getBlackBackground, miniMap.getBounds);
      If Length(TPA) = 0 then Exit;
      TPA2 := TPAFromBox(miniMap.getBounds).clearTPAFrom(TPA);
      miniMap.filterPoints(TPA2);
      TPA2.sortFromPoint(minimap.getCenterPoint);
      TPA2.Invert;
      WalkPoint := TPA2[0];
      smartImage.drawCross(WalkPoint, 5, clRed);
      mouse(WalkPoint, mouse_Left);
      minimap.waitPlayerMoving;
    end;

    What it does:

    Get TPA from black color of the minimap.
    Get TPA from the bitmap.
    Filter useless points out of the bitmap.
    Filter Black color so all what is left are those floor colors.
    Sort TPA from player location and invert it.
    Walk to Location.

    That function is just to give you an idea, I suggest you to edit it and add failsafes.

    ~Home

    P.S Thanks for lending an account.

    P.P.S How do I logout from RS :P?
    Last edited by Home; 11-04-2014 at 07:36 PM.

  12. #12
    Join Date
    Jul 2013
    Posts
    140
    Mentioned
    7 Post(s)
    Quoted
    61 Post(s)

    Default

    Quote Originally Posted by Home View Post
    Simba Code:
    function WalkTo() :Boolean;
    var
      WalkPoint :TPoint;
      TPA, TPA2 :TPointArray;
    begin
      Result := False;
      FindColors(TPA, minimap.getBlackBackground, miniMap.getBounds);
      If Length(TPA) = 0 then Exit;
      TPA2 := TPAFromBox(miniMap.getBounds).clearTPAFrom(TPA);
      miniMap.filterPoints(TPA2);
      TPA2.sortFromPoint(minimap.getCenterPoint);
      TPA2.Invert;
      WalkPoint := TPA2[0];
      smartImage.drawCross(WalkPoint, 5, clRed);
      mouse(WalkPoint, mouse_Left);
      minimap.waitPlayerMoving;
    end;

    What it does:

    Get TPA from black color of the minimap.
    Get TPA from the bitmap.
    Filter useless points out of the bitmap.
    Filter Black color so all what is left are those floor colors.
    Sort TPA from player location and invert it.
    Walk to Location.

    That function is just to give you an idea, I suggest you to edit it and add failsafes.

    ~Home

    P.S Thanks for lending an account.

    P.P.S How do I logout from RS :P?
    Thanks for the fast reply, I'm literally just rearranging my room and I'll attempt to add this in to the script once I'm finished! Also to log out all you have to do is press the Esc key and then log out, there is also a button just above the mini map in the top right corner
    Looking for cheap games? Kinguin has what you need!

    Teamwork Tutorial - Akuma Tutorial
    Don't give up, reward is just around the corner.

  13. #13
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Quote Originally Posted by Home View Post
    P.P.S How do I logout from RS :P?
    <Esc> will open the options menu, and logout button is at the bottom of said menu

    Alternatively the logout button is very small, and in the top-right corner
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Badâ„¢ before everyone gets laser pistols

  14. #14
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    Quote Originally Posted by tehYosh View Post
    Thanks for the fast reply, I'm literally just rearranging my room and I'll attempt to add this in to the script once I'm finished! Also to log out all you have to do is press the Esc key and then log out, there is also a button just above the mini map in the top right corner
    Yeah I got your account out (Thank god for google).
    But like I said that above function doesn't even Result anything so I highly suggest you to improve it

    ~Home

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
  •