Results 1 to 7 of 7

Thread: SPS_GetMyPos

  1. #1
    Join Date
    Dec 2011
    Location
    United States
    Posts
    960
    Mentioned
    21 Post(s)
    Quoted
    504 Post(s)

    Default SPS_GetMyPos

    I am trying to make a simple script to find my player position. I use SPS_GetMyPos
    to find the position but how do I make it print it in the debug box?

    Code:
    program new;
    {$i SRL\SRL.scar}
    {$i sps/sps.simba}
    
    begin
    SPS_GetMyPos
    
    
    end.

  2. #2
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    WriteLn(); is used to print stuff in the debug box, but as you have it right now, I am pretty confident that it wont output anything worthwhile. SPS works in the sense that you have to tell it what areas you are most likely standing in; meaning SPS wont output the tile location in the way reflection did (reflection could just search the client. SPS has to compare minimap colors)

  3. #3
    Join Date
    Dec 2011
    Location
    United States
    Posts
    960
    Mentioned
    21 Post(s)
    Quoted
    504 Post(s)

    Default

    Quote Originally Posted by Zyt3x View Post
    WriteLn(); is used to print stuff in the debug box, but as you have it right now, I am pretty confident that it wont output anything worthwhile. SPS works in the sense that you have to tell it what areas you are most likely standing in; meaning SPS wont output the tile location in the way reflection did (reflection could just search the client. SPS has to compare minimap colors)
    So I should just not use SPS? What other walking methods are there ?

  4. #4
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Oh, no SPS works great (!), but the way you are trying to do it now wont work, as you have to setup surface and areas for SPS to search on

    There are several ways of walking. TPA, Color, (D)DTM, RadialWalk, and symbols are some keywords

    Take a look in the tutorial section, IIRC there's a tutorial for walking in there somewhere

  5. #5
    Join Date
    Dec 2011
    Location
    United States
    Posts
    960
    Mentioned
    21 Post(s)
    Quoted
    504 Post(s)

    Default

    Quote Originally Posted by Zyt3x View Post
    Oh, no SPS works great (!), but the way you are trying to do it now wont work, as you have to setup surface and areas for SPS to search on

    There are several ways of walking. TPA, Color, (D)DTM, RadialWalk, and symbols are some keywords

    Take a look in the tutorial section, IIRC there's a tutorial for walking in there somewhere
    Ok thanks

  6. #6
    Join Date
    Oct 2011
    Posts
    805
    Mentioned
    21 Post(s)
    Quoted
    152 Post(s)

    Default

    You should ,but any SPS function will not print message in debug box. SPS_GetMyPos gives you TPoint as output. So you need to make var to store this output and then print it...

    Simba Code:
    program new;
    {$i SRL\SRL.scar}
    {$i sps/sps.simba}

    var

    MyPos :TPoint;

    begin
    MyPos := SPS_GetMyPos;

    Writeln('My position is  x: '+inttostr(MyPos.x)+' y: '+inttostr(MyPos.y));


    end.

  7. #7
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Here's a tutorial on how to use SPS: http://villavu.com/forum/showthread.php?t=71461

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
  •