Page 3 of 7 FirstFirst 12345 ... LastLast
Results 51 to 75 of 152

Thread: [OSR] Walking & positioning system

  1. #51
    Join Date
    Aug 2013
    Posts
    230
    Mentioned
    1 Post(s)
    Quoted
    114 Post(s)

    Default

    I'm really confused. Every time I run my script, the position of my character changes.. Not sure what i'm doing wrong.


    Simba Code:
    //i declare that
      Walker.init('surface', 'WorldMap');
      Walker.skipClose    := 4;
      Walker.minRunEnergy := 35;
      Walker.walkStyle    := wsSPS;


    writeln(Walker.GetMyPos());


    Edit:

    Okay, It's displaying different positions at different angles. Is there any way to display the same position at all angles.

  2. #52
    Join Date
    Feb 2012
    Location
    Norway
    Posts
    995
    Mentioned
    145 Post(s)
    Quoted
    596 Post(s)

    Default

    Quote Originally Posted by Unfold View Post
    I'm really confused. Every time I run my script, the position of my character changes.. Not sure what i'm doing wrong.

    Okay, It's displaying different positions at different angles. Is there any way to display the same position at all angles.
    I don't remember if I ever answered this... But here it goes (just so that everybody knows):
    >> Walker.anyAngle := True;

    This is covered in the "How to use in a script"-section.
    Last edited by slacky; 06-29-2015 at 04:01 PM.
    !No priv. messages please

  3. #53
    Join Date
    Apr 2013
    Posts
    680
    Mentioned
    13 Post(s)
    Quoted
    341 Post(s)

    Default

    Is this up to date and working??

    Error: Access violation at line 153 " if PID >= 0 then scan.Init(process); "

    I haven't previously had trouble.

    <------------------>



  4. #54
    Join Date
    Feb 2012
    Location
    Norway
    Posts
    995
    Mentioned
    145 Post(s)
    Quoted
    596 Post(s)

    Default

    Quote Originally Posted by FullPottatoHarry View Post
    Is this up to date and working??

    Error: Access violation at line 153 " if PID >= 0 then scan.Init(process); "

    I haven't previously had trouble.
    That will happen if/when you pass an invalid Process ID to it.
    !No priv. messages please

  5. #55
    Join Date
    Apr 2013
    Posts
    680
    Mentioned
    13 Post(s)
    Quoted
    341 Post(s)

    Default

    Sir; I am Lost >.<



    Code:
    program DebugMyPos;
    {$I OSRWalker/Walker.simba}
    
    var
      RSW:TRSWalker;
    
    procedure TRSWalker.DebugPos();
    var
      TPA:TPointArray;
      BMP:Integer;
      W,H,_:Int32;
      loc,glob:TPoint;
    begin
      loc := self.finder.GetLocalPos(True); //find local pos
      self.UpdateGlobalStart(loc);          //find a piece of the local map in the provided world map
      glob.x := loc.x + self.global.x;      //offset
      glob.y := loc.y + self.global.y;
    
      //when loading a new chunk there is chance it will fail at first attempet
      //so just ignore it.. and it will fix it self next call.. simple as that.
      if PointInBox(loc,TBox([70,70,440,440])) then
      begin
        BMP := CreateBitmap(0,0);
        DrawMatrixBitmap(BMP,self.localMap);
        GetBitmapSize(BMP,W,H);
    
        DrawTPABitmap(BMP, TPAFromLine(loc.x-69,loc.y,loc.x+69,loc.y), $00FF00);
        DrawTPABitmap(BMP, TPAFromLine(loc.x,loc.y-69,loc.x,loc.y+69), $00FF00);
        DrawTPABitmap(BMP, TPAFromCircle(loc.x,loc.y,69), $0022FF);
    
        TPA := TPAFromText('Global Pos: '+ToString(glob), 'SmallChars07',_,_);
        OffsetTPA(TPA,Point(55,35));
        DrawTPABitmap(BMP, TPA, $00FF00);
    
        DisplayDebugImgWindow(W,H);
        DrawBitmapDebugImg(BMP);
        FreeBitmap(BMP);
      end;
    end;
    
    procedure OnTerminate();
    begin RSW.Free(); end;
    
    var
      loc:TPoint;
      t:UInt32;
    begin
      RSW.Init('world.png', w_getClientPID());  //big map, takes a while for Simba to load it.
      AddOnTerminate('OnTerminate');
      //RSW.anyAngle := True;
    
      while 1 do
        RSW.DebugPos();
    
    end;
    I simply trying to use the debug position posted.. many months ago i didnt have this trouble....


    I am completely lost. i have tried every version you have posted


    Thank you in advanced

    Ben

    <------------------>



  6. #56
    Join Date
    Mar 2015
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Quote Originally Posted by slacky View Post
    That will happen if/when you pass an invalid Process ID to it.
    Hello Slacky,

    I ran into a problem with one file. When I save the folder I downloaded, it doesn't keep libMatchTempl.dll. When I try to provide admin permission it said destination folder access denied.. I tried changing a few things in the properties security tab but still no luck... The scripts won't run with this file missing. Do you know what I should do? Thanks!

    Edit: Here is the error message I receive btw:
    C:\Simba\Includes\RSWalker.rar: Cannot create C:\Simba\Includes\OSRWalker\libMatchTempl.dll
    Access is denied.
    Last edited by iownyou23; 09-16-2015 at 06:27 AM.

  7. #57
    Join Date
    Sep 2014
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    same issue.

    Code:
    {$I OSRWalker/Walker.simba}
    
    var
      RSW:TRSWalker;
      t:UInt32;
    begin
      RSW.Init('world.png', w_GetClientPID());
      //RSW.Init('world.png', 393828,-1);
      WriteLn('RSW is setup!');
    
      //The first scan is a lot slower then the next scans, it's used to setup stuff..
      t := GetTimeRunning();
      WriteLn('I am here: ', RSW.GetMyPos(), ' used: ', GetTimeRunning()-t,'ms');
    
      //scan again.. this time it will be pretty much "instant".. same for all of the future times.
      t := GetTimeRunning();
      WriteLn('I am here: ', RSW.GetMyPos(), ' used: ', GetTimeRunning()-t,'ms');
    
      //one more time to prove my point..:
      t := GetTimeRunning();
      WriteLn('I am still here: ', RSW.GetMyPos(), ' used: ', GetTimeRunning()-t,'ms');
    
      RSW.Free();
    end.

    Compiled successfully in 844 ms.
    Error: Access violation at line 156
    Execution failed.
    Code:
    procedure TRSPosFinder.Init(PID:Int32);
    begin
      with Self do
      begin
        matchAlgo := CV_TM_CCOEFF_NORMED;
        scanRatio := 8;
        numSamples := 100;
        process := PID;
        
        if PID > 0 then scan.Init(process);///line156
        addr := 0;
        bufferW := 512;
        bufferH := 512;
      end;
    end;
    Last edited by herolym; 09-18-2015 at 05:54 PM.

  8. #58
    Join Date
    Feb 2012
    Location
    Norway
    Posts
    995
    Mentioned
    145 Post(s)
    Quoted
    596 Post(s)

    Default

    Err..
    If anyone is getting the above error `Access Violation` in the initialization-procedure you should check Simbas console. It should have more info.
    The console will most likely say `TMemScan.Init -> PID XXXX does not exist` and give a trace-back.
    Be sure to always run Simba as administrator if you ever run into trouble.

    It's most likely that the Process-ID you are passing doesn't exist, or you simply don't have access to it, I can add more error-handling so that we can know for sure exactly why windows' OpenProcess fails.
    1. Try re-selecting your target with Simba.
    2. If that didn't solve it, restart the RS-client, and reselect the target (with simba).
    3. Still here? Make sure you are running Simba as administrator. And repeat the steps above.
    Last edited by slacky; 09-22-2015 at 05:38 AM.
    !No priv. messages please

  9. #59
    Join Date
    Feb 2012
    Location
    Norway
    Posts
    995
    Mentioned
    145 Post(s)
    Quoted
    596 Post(s)

    Default

    So yeah here it is.. a updated version that prints the error to the debug-box.. since some people don't check the console.
    https://github.com/WarPie/RSWalker/releases/tag/0.6

    The above still stands tho, you need to have full access to the RS-client, but the error as to why it fails will be simpler to notice.


    Quote Originally Posted by herolym View Post
    same issue.
    Code:
    ...
      RSW.Init('world.png', w_GetClientPID());
      //RSW.Init('world.png', 393828, -1);
    If you actually tried to use that stuff commented out there you should know that would likely go to hell - at best..
    1. the PID is normally just a number with 3-5 decimals (I suspect that what you have there was an invalid PID)
    2. ScanRatio of -1? You should not touch that parameter - leave it blank

    PS: In the latest versions (not default in AeroLib yet) all you really need to do to initialize is to call
    >> RSW.Init('world.png');
    As long as you use AeroLib or the "hybrid" OSR include I've worked on, then shit will be automatically detected. More precisely, it will then detect SMART if you use SMART, and fall back to w_GetClientPID if SMART isn't defined.



    Quote Originally Posted by iownyou23 View Post
    Hello Slacky,

    I ran into a problem with one file. When I save the folder I downloaded, it doesn't keep libMatchTempl.dll. When I try to provide admin permission it said destination folder access denied.. I tried changing a few things in the properties security tab but still no luck... The scripts won't run with this file missing. Do you know what I should do? Thanks!

    Edit: Here is the error message I receive btw:
    C:\Simba\Includes\RSWalker.rar: Cannot create C:\Simba\Includes\OSRWalker\libMatchTempl.dll
    Access is denied.
    Be sure to close all your instances of Simba before you try to copy that in there. If Simba has that DLL loaded you can't overwrite it on Windows - sux.
    Last edited by slacky; 04-30-2016 at 01:15 AM.
    !No priv. messages please

  10. #60
    Join Date
    Mar 2015
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Quote Originally Posted by slacky View Post
    So yeah here it is.. a updated version that prints the error to the debug-box.. since some people don't check the console.
    https://github.com/WarPie/RSWalker/releases/tag/0.6

    The above still stands tho, you need to have full access to the RS-client, but the error as to why it fails will be simpler to notice.



    If you actually tried to use that stuff commented out there you should know that would likely go to hell - at best..
    1. the PID is normally just a number with 3-5 decimals (I suspect that what you have there was an invalid PID)
    2. ScanRatio of -1? really? You should not touch that parameter - leave it blank.

    PS: In the latest versions all you really need to do to initialize is to call
    >> RSW.Init('world.png');
    As long as you use AeroLib or the "hybrid" OSR include I've worked on, then shit will be automatically detected. More precisely, it will then detect SMART if you use SMART, and fall back to w_GetClientPID if SMART isn't defined.




    Be sure to close all your instances of Simba before you try to copy that in there. If Simba has that DLL loaded you can't overwrite it on Windows - sux.
    Thank you for the reply slacky. I tried closing out Simba but it still did not work. :/ Once I extract the .rar file, sometimes I See the dll file for a second or two then poof, it just disappears. I keep getting Access Denied

  11. #61
    Join Date
    Feb 2012
    Location
    Norway
    Posts
    995
    Mentioned
    145 Post(s)
    Quoted
    596 Post(s)

    Default

    Quote Originally Posted by iownyou23 View Post
    Thank you for the reply slacky. I tried closing out Simba but it still did not work. :/ Once I extract the .rar file, sometimes I See the dll file for a second or two then poof, it just disappears. I keep getting Access Denied
    That's just crazy. AFICT the issue is unrelated to both Simba, and RSWalker. But you clearly do not have permission to do that for some reason, why? Idk. Try to login as Administrator if you have such a user, and your user doesn't have the same rights. Just make sure you actually have the rights to that folder (properties -> security).
    Last edited by slacky; 02-16-2016 at 03:57 AM.
    !No priv. messages please

  12. #62
    Join Date
    Apr 2007
    Location
    Estonia
    Posts
    156
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default

    What's the best way to integrate this when using dungeon and surface in one script?
    Have to make one custom map where are the segment of surface and the dungeon map?
    Where can one find dungeon maps?
    ROCK IS NOT A DEVILS WORK, ITS MAGICAL AND RAD!

  13. #63
    Join Date
    Feb 2012
    Location
    Norway
    Posts
    995
    Mentioned
    145 Post(s)
    Quoted
    596 Post(s)

    Default

    Quote Originally Posted by neeger View Post
    What's the best way to integrate this when using dungeon and surface in one script?
    Have to make one custom map where are the segment of surface and the dungeon map?
    You do it as described in the initial post, but I'd go with two walkers, one for underground, and one for above ground.

    Quote Originally Posted by neeger View Post
    Where can one find dungeon maps?
    You have to make the map yourself, a good place to start is to run the MapGrabber.simba located in the maps-folder, while you are in the dungeon, it will store map-pieces which you will have to combine into a bigger map.
    !No priv. messages please

  14. #64
    Join Date
    May 2013
    Posts
    46
    Mentioned
    0 Post(s)
    Quoted
    24 Post(s)

    Default

    iam wondering if there could be a video made in the proper instructions to get and a small demo on how to walk

  15. #65
    Join Date
    Feb 2012
    Location
    Norway
    Posts
    995
    Mentioned
    145 Post(s)
    Quoted
    596 Post(s)

    Default

    Quote Originally Posted by maxlvs View Post
    iam wondering if there could be a video made in the proper instructions to get and a small demo on how to walk
    I don't really do videos, they take too much time while being extremely boring to make. Perhaps someone else would wanna do this.
    Last edited by slacky; 02-16-2016 at 03:59 AM.
    !No priv. messages please

  16. #66
    Join Date
    Mar 2016
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    This doesnt seem to be accurate.. People who are on the minimap affect the result of the co-ordinates. Do you know this happens or is this a bug?

  17. #67
    Join Date
    Mar 2013
    Posts
    1,010
    Mentioned
    35 Post(s)
    Quoted
    620 Post(s)

    Default

    Quote Originally Posted by Botmeplss2 View Post
    This doesnt seem to be accurate.. People who are on the minimap affect the result of the co-ordinates. Do you know this happens or is this a bug?
    Well, it's colour. It's nearly impossible for it to be 100% accurate, but it's within 5 pixels at most normally.
    #slack4admin2016
    <slacky> I will build a wall
    <slacky> I will ban reflection and OGL hooking until we know what the hell is going on

  18. #68
    Join Date
    Feb 2012
    Location
    Norway
    Posts
    995
    Mentioned
    145 Post(s)
    Quoted
    596 Post(s)

    Default

    Quote Originally Posted by Botmeplss2 View Post
    This doesnt seem to be accurate.. People who are on the minimap affect the result of the co-ordinates. Do you know this happens or is this a bug?
    Considering the other thread you started relates to some private server, I have to assume you are using RSWalker on one. RSWalker ment for OldSchool Runescape, and only Oldschool runescape, not for any RSPS.
    If it works (somewhat) on a private server then that's just "luck", and the quality of it maybe be heavily reduced, features might not work, and the world map will be rendered nearly useless, as it for Oldschool runescape, not some RSPS.

    The walking is quite accurate on OSRS, even in cases where there's a notable amount of players, to a limit obviously, as it's relying on colors to pinpoint your position. As harrier said, it's normally within a few pixels of where you actually are.


    ... so if the "world" image doesn't really match, and at the same time as there is a lot of players around then you are pretty much f***ed, if the private server is very similar to official OSRS then you might get away with just building your own world map for the RSPS, for this you can use the mapgrabber shipped with RSWalker.
    Last edited by slacky; 04-01-2016 at 07:37 PM.
    !No priv. messages please

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

    Default

    Quote Originally Posted by slacky View Post
    Considering the other thread you started relates to some private server, I have to assume you are using RSWalker on one. RSWalker ment for OldSchool Runescape, and only Oldschool runescape, not for any RSPS.
    If it works (somewhat) on a private server then that's just "luck", and the quality of it maybe be heavily reduced, features might not work, and the world map will be rendered nearly useless, as it for Oldschool runescape, not some RSPS.

    The walking is quite accurate on OSRS, even in cases where there's a notable amount of players, to a limit obviously, as it's relying on colors to pinpoint your position. And so if the worldmap doesn't really match, at the same time as there is a lot of players around then you are fucked..
    This one time, I used a Phillips Screwdriver on a JIS Screw; it didnt work very well and would cam out. I called the manufacturer of the screwdriver to complain, but they didnt seem to care. Perhaps you should adopt this philosophy.

  20. #70
    Join Date
    Jul 2015
    Posts
    80
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default

    Ive been using RSW and its 99.9% accurate. Have you made custom map for your script?

  21. #71
    Join Date
    Mar 2016
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by slacky View Post
    Considering the other thread you started relates to some private server, I have to assume you are using RSWalker on one. RSWalker ment for OldSchool Runescape, and only Oldschool runescape, not for any RSPS.
    If it works (somewhat) on a private server then that's just "luck", and the quality of it maybe be heavily reduced, features might not work, and the world map will be rendered nearly useless, as it for Oldschool runescape, not some RSPS.

    The walking is quite accurate on OSRS, even in cases where there's a notable amount of players, to a limit obviously, as it's relying on colors to pinpoint your position. As harrier said, it's normally within a few pixels of where you actually are.


    ... so if the "world" image doesn't really match, and at the same time as there is a lot of players around then you are pretty much f***ed, if the private server is very similar to official OSRS then you might get away with just building your own world map for the RSPS, for this you can use the mapgrabber shipped with RSWalker.


    Thanks the server im using isnt similiar to 07. I just was asking for help with walking and people said rswalker... so i presumed it worked with servers since i posted in rsps hel too thanks though maybe SPS is a better solution.

    I used the map grabber to grab my own map and the issue i said above is happening. wen players take over space of min map the co-ordinates change signficantly reducing the accuracy by 90%
    Last edited by Botmeplss2; 04-02-2016 at 12:45 AM.

  22. #72
    Join Date
    Dec 2007
    Posts
    289
    Mentioned
    4 Post(s)
    Quoted
    86 Post(s)

    Default

    https://github.com/WarPie/RSWalker/b...ker.simba#L297 waits for a negative amount of time (indefinitely). I don't really follow what's going on, I did have to remove that wait to get things working otherwise it would just hang on that wait.

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

    Default

    Quote Originally Posted by honeyhoney View Post
    https://github.com/WarPie/RSWalker/b...ker.simba#L297 waits for a negative amount of time (indefinitely). I don't really follow what's going on, I did have to remove that wait to get things working otherwise it would just hang on that wait.
    Uh oh, @slacky;... using GetTimeRunning() instead of GetTickCount64(). Shame on you.

  24. #74
    Join Date
    Feb 2012
    Location
    Norway
    Posts
    995
    Mentioned
    145 Post(s)
    Quoted
    596 Post(s)

    Default

    Quote Originally Posted by honeyhoney View Post
    https://github.com/WarPie/RSWalker/b...ker.simba#L297 waits for a negative amount of time (indefinitely). I don't really follow what's going on, I did have to remove that wait to get things working otherwise it would just hang on that wait.
    As Turpinator hinted, it's overflowing due to your PC having higher uptime then normal, I'll see if I can update it at some point. Replacing it with GetTickCount64 works, rebooting your PC also works.

    Quote Originally Posted by Turpinator View Post
    Uh oh, @slacky;... using GetTimeRunning() instead of GetTickCount64(). Shame on you.
    I did that because idgaf, reboot your PC, and quit your whining...
    Last edited by slacky; 05-29-2016 at 07:33 PM.
    !No priv. messages please

  25. #75
    Join Date
    Dec 2007
    Posts
    289
    Mentioned
    4 Post(s)
    Quoted
    86 Post(s)

    Default

    Quote Originally Posted by slacky View Post
    As Turpinator hinted, it's overflowing due to your PC having higher uptime then normal, I'll see if I can update it at some point.
    Cheers. Totally aware of that issue I just didn't put 2 and 2 together.

    Edit: I'm not actually sure that is the issue. Take a look:

    Simba Code:
    st := GetTimeRunning() + 60;
    if Assigned(@self.onMoveEvent) then
      self.onMoveEvent(@self, pos);
       
    Wait( Min(1, st-GetTimeRunning()));

    Scenario:
    GetTimeRunning() is 1000ms
    st is therefore set to 1060ms
    the onMoveEvent takes 200ms
    GetTimeRunning() is now 1200ms
    st - GetTimeRunning() is equal to -140
    The minimum value of 1 or -140 is -140
    The script then executes Wait(-140) which results in an indefinite wait.

    It looks to me, irrespective of any overfolow issues, if the onMoveEvent takes longer than 60ms you're always going to end up waiting for an indefinite (negative) amount of time.

Page 3 of 7 FirstFirst 12345 ... LastLast

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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