Results 1 to 19 of 19

Thread: SPS randomly failing to get the correct location.

  1. #1
    Join Date
    Jan 2012
    Location
    Germany
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default SPS randomly failing to get the correct location.

    I'm currently working on a Elder Tree cutter, but SPS is giving me a headache. It works fine most of the time, but occasionally it just gives me the wrong position. It seems rather random.

    I'm currently alternating between the Varrock Tree, Edgeville Bank, Edgeville Tree, Draynor Bank, Draynor Tree.
    Sometimes it fails on the first round, but sometimes it runs for hours without any problems at all. Simply restarting the script solves the issue most of the time.

    I found a workaround for the issue: I'm currently detecting my position at every station (so at every lodestone, bank and tree) and decide where to go based off the current position. If SPS decides to fail again, the script won't be able to see where I'm at (since SPS thinks I'm actually somewhere in the middle of nowhere). It's just stuck at this point, it won't find the correct location.At the moment I do a simple logout and login as soon as this happens. Everything works fine after that. I don't like random logouts/logins though, so a little help would be appreciated. I use the worldmap of BMWxi if that helps (thanks for the awesome work btw).

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

    Default

    You should post some of the maps you're using.

    My guess would be that they're not big enough.

  3. #3
    Join Date
    Jan 2012
    Location
    Germany
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    I don't think thats the problem. I increased it several times but with no success. What bugs me is that it's seemingly random, it sometimes fails at a place where it didn't fail the last time. Anyways, my map:
    http://i.imgur.com/z4HNiTN.png I marked the important points (where my character should be when it checks for it's position) to show off my amazing paint skills

    This is the function that (should) find the current location btw: (based off of KeepBotting's iOak)
    http://pastebin.com/uqvpiWvz
    So there is quite some room for error. When it fails, it even places me somewhere near Edgeville when I'm actually standing at the Varrock lodestone for example. It's wierd :/
    Last edited by wutora; 03-01-2015 at 01:54 AM.

  4. #4
    Join Date
    Jan 2015
    Posts
    78
    Mentioned
    0 Post(s)
    Quoted
    48 Post(s)

    Default

    I also have this problem, And i can 100% say my map is big enough

    http://i.imgur.com/n4JoAij.jpg

    Which we appear to be attempting to make the same script

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

    Default

    Quote Originally Posted by Battousai View Post
    I also have this problem, And i can 100% say my map is big enough

    http://i.imgur.com/n4JoAij.jpg

    Which we appear to be attempting to make the same script
    1, The map is a jpg.
    2, it can also be too big.

  6. #6
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    Quote Originally Posted by wutora View Post
    I don't think thats the problem. I increased it several times but with no success. What bugs me is that it's seemingly random, it sometimes fails at a place where it didn't fail the last time. Anyways, my map:
    http://i.imgur.com/z4HNiTN.png I marked the important points (where my character should be when it checks for it's position) to show off my amazing paint skills

    This is the function that (should) find the current location btw: (based off of KeepBotting's iOak)
    http://pastebin.com/uqvpiWvz
    So there is quite some room for error. When it fails, it even places me somewhere near Edgeville when I'm actually standing at the Varrock lodestone for example. It's wierd :/
    Quote Originally Posted by Battousai View Post
    I also have this problem, And i can 100% say my map is big enough

    http://i.imgur.com/n4JoAij.jpg

    Which we appear to be attempting to make the same script
    Both of you should check this post by Lipcot:

    https://villavu.com/forum/showthread...09#post1322409

    It explains accuracy, tolerance, match%. These settings will help you make your map work properly.

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  7. #7
    Join Date
    Jan 2015
    Posts
    78
    Mentioned
    0 Post(s)
    Quoted
    48 Post(s)

    Default

    It was uploaded as jpg for some reason, but the actual file is a PNG

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

    Default

    Quote Originally Posted by Battousai View Post
    It was uploaded as jpg for some reason, but the actual file is a PNG
    That's puush's automatic compression, you can turn it off (always upload as .png, I believe the setting is called)
    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

  9. #9
    Join Date
    Jan 2015
    Posts
    78
    Mentioned
    0 Post(s)
    Quoted
    48 Post(s)

    Default

    Quote Originally Posted by KeepBotting View Post
    That's puush's automatic compression, you can turn it off (always upload as .png, I believe the setting is called)
    Don't know but this is irritating me how i cant get it to work


    Quote Originally Posted by 3Garrett3 View Post
    Both of you should check this post by Lipcot:

    https://villavu.com/forum/showthread...09#post1322409

    It explains accuracy, tolerance, match%. These settings will help you make your map work properly.
    I use the accuracy and things like that, Mine seems like it is finding points on the map that ain't loaded yet, I make the points really close together and that dont help, i spread them apart more, that dont help, i decrease the time between scans, that dont help, At least in my case anyways

    But i am about to give up on attempting to make scripts that use SPS because It don't work at all for me no matter how big the map, how small, how far apart the points are, how close together they are, some areas do an OK job and others it wont work at all

  10. #10
    Join Date
    Jan 2012
    Location
    Germany
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    Quote Originally Posted by 3Garrett3 View Post
    Both of you should check this post by Lipcot:

    https://villavu.com/forum/showthread...09#post1322409

    It explains accuracy, tolerance, match%. These settings will help you make your map work properly.
    I will try that, thanks for the reply. It's hard to reproduce though, so I just have to somehow log the failed attempts.

  11. #11
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    Quote Originally Posted by wutora View Post
    I will try that, thanks for the reply. It's hard to reproduce though, so I just have to somehow log the failed attempts.
    When I was testing my settings I just had it walk all the paths over and over until one time it walked for an hour with no mistakes. I figured an hour of walking was equivalent to like 12 hours gameplay or something, so it was considered good to go.

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

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

    Default

    So neither of you have yet to post the actual maps so that any of us can test it...

  13. #13
    Join Date
    Jan 2012
    Location
    Germany
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    Quote Originally Posted by Turpinator View Post
    So neither of you have yet to post the actual maps so that any of us can test it...
    My bad, sorry. I thought I uploaded it on my second post, seems like I forgot it :/
    Attached Images Attached Images

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

    Default

    Well...


    besides taking 2 sec/search, i saw no major issues with it.
    to make it faster, split it into 3 maps and just remember which map youre on. the map isnt continuous, so you have no reason to have it all on one file.

  15. #15
    Join Date
    Jan 2015
    Posts
    78
    Mentioned
    0 Post(s)
    Quoted
    48 Post(s)

    Default

    Quote Originally Posted by Turpinator View Post
    Well...


    besides taking 2 sec/search, i saw no major issues with it.
    to make it faster, split it into 3 maps and just remember which map youre on. the map isnt continuous, so you have no reason to have it all on one file.
    How would you go about doing 3 different map files? Anytime i try it always fails to walk on the second map, is there something i am missing?

  16. #16
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    Quote Originally Posted by Battousai View Post
    How would you go about doing 3 different map files? Anytime i try it always fails to walk on the second map, is there something i am missing?
    For a code example, see @Incurable's Lodestone Unlocker. He used multiple maps in there and it should be simple enough to follow how he loaded them.

    Edit:

    Also look this thread over where people discussed SPS in a bit more detail
    Last edited by 3Garrett3; 03-02-2015 at 11:58 PM.

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  17. #17
    Join Date
    Jan 2012
    Location
    Germany
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    Quote Originally Posted by Turpinator View Post
    Well...


    besides taking 2 sec/search, i saw no major issues with it.
    to make it faster, split it into 3 maps and just remember which map youre on. the map isnt continuous, so you have no reason to have it all on one file.
    Thanks for taking the time to help me, really appreciate it. I had 3 different maps initially, but I thought that the problem might be related to that so I rewrote the script to use one map instead. Are there any major downsides to the high searchtime? I'd have to rewrite major parts of the script to revert back to the 3 map method, if there are no real downsides I'll just leave it (for now).

  18. #18
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    Quote Originally Posted by wutora View Post
    Thanks for taking the time to help me, really appreciate it. I had 3 different maps initially, but I thought that the problem might be related to that so I rewrote the script to use one map instead. Are there any major downsides to the high searchtime? I'd have to rewrite major parts of the script to revert back to the 3 map method, if there are no real downsides I'll just leave it (for now).
    The only downside is that every time you try to call anything to do with SPS it will take 2 seconds to find the spot. If you don't mind your char sitting there for 2 seconds every step it takes, then it's fine. Personally I would go with 3 smaller maps because I would hate the performance if it was taking that long, but it's entirely up to how you feel.

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  19. #19
    Join Date
    Dec 2010
    Posts
    483
    Mentioned
    30 Post(s)
    Quoted
    328 Post(s)

    Default

    SPS is slow period.

    Rewrite it to use alpha maps, then profit

    E:

    I know simba doesn't actually handle alpha channels well, btu I'm thinking maybe under the hood it should still be possible to do the math.

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
  •