Results 1 to 8 of 8

Thread: SPS get current location?

  1. #1
    Join Date
    Feb 2012
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default SPS get current location?

    is there any way that SPS can retrieve my current location?

    EDIT: I can't figure out how to use SPS_GetMyPos()
    HELP please!
    Last edited by ifrootloops; 02-20-2012 at 11:58 PM.

  2. #2
    Join Date
    Feb 2011
    Location
    Earth
    Posts
    1,784
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    SPS_GetMyPos

    Currently: Working on Defending&Attacking in my Castle-Wars Script
    Project Rebuild: 90M/170M

  3. #3
    Join Date
    Dec 2011
    Posts
    392
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yup SPS_GetMyPos()

    Simba Code:
    Var
      MyPos: Tpoint;

    Begin
      MyPos:= Sps_GetMyPos()
    End.


    Grr Ninja'd

  4. #4
    Join Date
    Feb 2012
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks guys : )

    now to put that into an if statement and correct my position if needs be

  5. #5
    Join Date
    Feb 2012
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    can someone please show me how to use this?

    I'm having trouble and my procedure fails over time

  6. #6
    Join Date
    Dec 2011
    Posts
    392
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I thought that might happen. Are you trying to check where you are? When changing fishing spots in one of my scripts I use this;
    Simba Code:
    writeln('moving');
        MyPos := SPS_GetMyPos();
        First := Point(4528, 3561);
        if ((myPos.y) < 3585) AND (((mypos.y) > 3555)) then
        begin
          Writeln('walking to second spot');
          SPS_WalkToPos(Point(4509, 3599));  
        end else
        Begin
          Writeln('Walking to first spot');
          SPS_WalkToPos(First);
        End;
    This checks if my y position is in a certain range and if it is move to the other spot. You could also you mypos.x to check your x number.

    Or is your question in reference to setting up SPS? Might show your script if this doesn't help.

  7. #7
    Join Date
    Feb 2012
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Cool Stuff. I'm just adding some polished touches to my fully operational Ape Atoll Agility script. (75+ agility necessary - doesn't support failing obs)

    I'm using SPS because the public script kept breaking on me. But a couple of times it would fail on the clicking.

    So to speed my bot up; I was hoping to test the location of my character - in two instances - before continuing with the agility course, making sure that the character is appropriately located.

    here are the procedures for the two walks:

    Code:
    procedure walkToStone;
    begin
      writeln('Moving To Stone');
      SPS_Setup(RUNESCAPE_SURFACE, ['7_14','6_14','8_14','7_13','6_13']);
      toStone := Point(2854, 5724);
      SPS_WalkToPos(toStone);
    end;  
    
    and
    
    procedure moveToSwing;
    begin
     writeln('Moved To Swing');
     SPS_Setup(RUNESCAPE_SURFACE, ['7_14','6_14','8_14','7_13','6_13']);
     toSwing := Point(2850, 5756);
     SPS_WalkToPos(toSwing);
    end;
    I've cleaned up some of the antibans and wait periods to make it easier to read.

    My concern is ensure that my character is on the correct tile before continuing the course, because a few times it misclicked.

    ie: If player position is not what it should be, repeat the walking procedure.
    if player position is where it should be, continue with script.

  8. #8
    Join Date
    Dec 2011
    Posts
    392
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Simba Code:
    procedure moveToSwing;
    begin
     Repeat
     writeln('Moved To Swing');
     SPS_Setup(RUNESCAPE_SURFACE, ['7_14','6_14','8_14','7_13','6_13']);
     toSwing := Point(2850, 5756);
     SPS_WalkToPos(toSwing);

     MyPos:= SPS_GetMyPos()

      Until (MyPos.x=2850) AND (MyPos.y=5756)
    end;

    Well this might work but it depends how well SPS works at ape atoll. It works better in some areas than others detecting your exact point. Also sometimes you pick a point you can't exactly get to (like mountain side you can't walk to but it still takes you to a general spot) That's why I used a y between two areas to get a general idea.

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
  •