Results 1 to 2 of 2

Thread: SPS_Reset (multi map declaration)

  1. #1
    Join Date
    Nov 2011
    Location
    United states
    Posts
    516
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default SPS_Reset (multi map declaration)

    Thought I would write this code to help with the transfer from other map walking to surface map walking with sps.
    What it does?
    ~Just resets all the sps variables so that you can declare and use other map during your script.

    Location: SPS.simba

    Uses: going from above ground to other maps;

    Code:

    Simba Code:
    (*SPS_Reset
    ~~~~~~~~..
    code-block:: pascal
    procedure SPS_Reset
    by Getdropped
    Example:
    SPS_Setup(RUNESCAPE_SURFACE, ['1_1']);
    //stuff above ground
    SPS_Reset;
    SPS_Setup(RUNESCAPE_OTHER, ['dungeon']);
    //stuff in dungeon
    Uses:
    Declaring different types of sps maps
    code-block:: pascal
    *)

    procedure SPS_Reset;
    var
      SPS_Debug2, SPS_MultiMouse2: boolean;
      SPS_Areas2: TStringArray;
      SPS_AreaMaps2: T3DIntegerArray; // Grids of the combined SPS_Areas
      SPS_Tolerance2, SPS_MatchesPercent2: extended;
      SPS_Accuracy2: integer;
    begin
      SPS_Debug := SPS_Debug2;
      SPS_MultiMouse := SPS_MultiMouse2;
      SPS_Areas := SPS_Areas2;
      SPS_AreaMaps := SPS_AreaMaps2;
      SPS_Tolerance := SPS_Tolerance2;
      SPS_MatchesPercent := SPS_MatchesPercent2;
      SPS_Accuracy := SPS_Accuracy2;
    end;

    Its pretty basic but it should probably be included in sps else you can only declare one surface type (as far as I see)

    PS. how do I put pull requests for code snippets cause I have a few others in mind and would like to share them

    Enjoy

    ~Getdropped

  2. #2
    Join Date
    May 2012
    Location
    Moscow, Russia
    Posts
    661
    Mentioned
    35 Post(s)
    Quoted
    102 Post(s)

    Default

    procedure SPS_Reset;
    begin
    SPS_Areas := nil;
    SPS_AreaMaps := nil;
    SPS_Tolerance := 0;
    SPS_MatchesPercent := 0;
    SPS_Accuracy := 0;
    end;
    I think in this form it is more correct.
    Per aspera ad Astra!
    ----------------------------------------
    Slow and steady wins the race.

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
  •