Results 1 to 4 of 4

Thread: SPS Script Issues

  1. #1
    Join Date
    Dec 2011
    Posts
    164
    Mentioned
    4 Post(s)
    Quoted
    23 Post(s)

    Default SPS Script Issues

    I know SPS updated, and that threw a lot of scripts off, but I haven't been able to run any scripts but mine. I'm currently trying to run the following script

    Simba Code:
    program Construction;
    {$DEFINE SMART}
    {$i srl/srl.simba}
    {$i SPS/SPS.simba}
    var
    GlobalX, GlobalY : Integer;
    Plank, Construction : Integer;
    HomeTeleport, TeleportBank : Integer;
    ItemCount, Chairs, XpGain : Integer;
    XpPerChair, XpPerHour : Integer;
    PlanksNeeded : Integer;
    ChooseChairX, ChooseChairY : Integer;
    {               BASED CONSTRUCTION
                      By Based Lord
    Instructions: See Thread for Instructions

    | SETUP | SETUP | SETUP | SETUP | SETUP | SETUP |}

    Const
    WhatChair = 'Wooden';
    {^^SETUP^^
     Crude  - 2 Planks Per Chair Level 1 Requirement
     Wooden - 3 Planks Per Chair Level 8 Requirement

    }

    VERSION = '1.1';
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := ''; // Username
      Players[0].Pass := ''; // Password
      Players[0].Nick := ''; // 3-4 lowercase letters from username; used for random event detection
      Players[0].Active := True; // Set to true if you want to use Player 0
      Players[0].Pin := ''; // Leave blank if the player doesn't have a bank pin
      Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
    end;


    Procedure CallDTMs;
    Begin
      Plank := DTMFromString('mrAAAAHic42BgYOACYlEg5gViVgYIANE8QCwAxHxAzAwVB7ElgFgGiEWgaiK8DIEkE04MMxMXYCSAYQAAyRwBvA==');
      HomeTeleport := DTMFromString('mggAAAHicY2NgYJjDxMAwnwlCzwTiaUC8EIj/A+X+APFPKM3EyMDADMQSrPIMf//+heOsyANgzApUgw0z4sAQAABcdhP8');
      TeleportBank := DTMFromString('mbQAAAHicY2VgYHjIxMDwFIhvA/ELIH4FxAsZGRjmA/EyIF7OCOH//fsXjF2dDzL4xZ9kiA1cyoANMGLBYAAA7jURuw==');
    End;

    Procedure SetThings;
    Begin
      Case WhatChair of
        'Crude':
        Begin
          PlanksNeeded := 2;
          XpPerChair   := 66;
          ChooseChairX := 105;
          ChooseChairY := 77;
        End;

        'Wooden':
        Begin
          PlanksNeeded := 3;
          XpPerChair   := 96;
          ChooseChairX := 105;
          ChooseChairY := 129;
        End;


      End;
    End;


    Procedure RemoveChair;
    Begin
      ItemCount := CountItemsIn('inv', 'dtm', Plank, [])
      If (ItemCount < PlanksNeeded) Then Exit;
      Mouse(MSCX+45,MSCY,2,2,False);
      Wait(200);
      ChooseOptionMulti(['emove Cha','Remove Chair']);
      Wait(1000+Random(250));
      Mouse(250,410,4,4,True);
      Wait(1000+Random(250));
    End;

    Procedure BuildIt;
    Begin
      Mouse(MSCX+45,MSCY,0,0,False);
      ChooseOption('Build');
      Wait(1000+Random(500));
      MMouse(ChooseChairX,ChooseChairY,4,4);
      GetMousePos(GlobalX,GlobalY);
      If (WaitUpTextMulti(['Build', 'chair'], 500)) Then Mouse(GlobalX,GlobalY,0,0,True);
      Wait(1000+Random(500));
      MMouse(MSCX+45,MSCY,2,2);
      WaitUpTextMulti(['Sit-On', 'Chair'], 15000)
      ItemCount := CountItemsIn('inv', 'dtm', Plank, [])
      Inc(Chairs);

    End;

    Function OpenBanker : Boolean;
    Var
      CTS,x,y,I,H,a : Integer;
      TPA: TPointArray;
      ATPA: Array of TPointArray;
    Begin

      if (Not LoggedIn) then Exit;
      If (BankScreen) Then Exit;
      CTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.00, 0.17);
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, 8289913, MSX1, MSY1, MSX2, MSY2, 15);
      ColorToleranceSpeed(CTS);
      ATPA := TPAToATPAEx(TPA, 15, 15);
      H := High(ATPA);

      for a := 0 to H do
      Begin
        MiddleTPAEx(atpa[a], X, Y);
        MMouse(X, Y, 5, 5);
        If (WaitUpTextMulti(['anker', 'Bank'], 750)) Then
        Begin
          Mouse(x,y,0,0,False);
          Wait(150+Random(100));
          ChooseOption('Bank Bank');
          Repeat
            Wait(100+Random(150));
          Until (BankScreen);
          Result := True
        End;
      End;
    End;

    Procedure GetPlanks;
    Var
    X, Y, T : Integer;
    Begin
      Repeat
        if (FindDTM(Plank, X, Y, MSX1, MSY1, MSX2, MSY2)) then
        Begin
          MarkTime(T);
          Mouse(x,y,2,2,False);
          ChooseOption('All Plank');
          CloseBank;
        End;
      Until (InvFull)
    End;



    Procedure TeleportToBank;
    Var
    X, Y : Integer;
    Begin
      GameTab(tab_Magic);
      if (FindDTM(TeleportBank, X, Y, MIX1, MIY1, MIX2, MIY2)) Then
      Begin
        Mouse(X,Y,4,4,True);
        Wait(2500+Random(200));
        GameTab(Tab_Inv);
        Exit;
      End;
      WriteLn('Could not teleport');
      TerminateScript;
    End;

    Procedure WalkToBank;
    Var
    Bank1 : TPoint;
    Begin
      Bank1 := Point(1449, 5314);
      Repeat
        SPS_WalkToPos(Bank1);
      Until (OpenBanker)
      Wait(500+Random(150));
    End;





    Procedure HomeTeleporter;
    Var
    X, Y : Integer;
    Begin
      GameTab(tab_Magic);
      if (FindDTM(HomeTeleport, X, Y, MIX1, MIY1, MIX2, MIY2)) then
      Begin
        Mouse(X,Y,2,2,True);
        Wait(6000+Random(500));
        Mouse(253,77,0,0,True);
        Wait(3000+Random(500));
        Mouse(297,58,0,0,True);
        Wait(2000+Random(500));
        Exit;
      End;
      WriteLn('Couldnt find teleport');


    End;

    Procedure ProgressReport;

    Begin
      ClearDebug;
      XpGain := Chairs * XpPerChair;
      XpPerHour := Round((XpGain)/(GetTimeRunning / 3600000.0));
      WriteLn('  ~||//Based Construction\\||~');
      WriteLn('~||//'+VERSION+' By Based Lord\\||~');
      Writeln('Time Running: ' + TimeRunning);
      WriteLn('Chairs Crafted: ' +IntToStr(Chairs));
      WriteLn('Xp Gained: ' +IntToStr(XpGain));
      WriteLn('XP/Hour: ' +IntToStr(XpPerHour));
      WriteLn('-----------------------------');
    End;

    Procedure RemoveAndBuild;

    Begin
      ItemCount := CountItemsIn('inv', 'dtm', Plank, []);
      If (ItemCount < PlanksNeeded) Then Exit;
      Repeat
        BuildIt;
        ProgressReport;
        RemoveChair;
      Until (ItemCount<PlanksNeeded);
    End;

    begin
      Smart_Server := 26;
      Smart_Members := False;
      Smart_Signed := True;
      Smart_SuperDetail := False;

      ClearDebug;
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
      SPS_Setup(RUNESCAPE_SURFACE,['3_13']);
      CallDTMs;
      SetThings;
      ClickNorth(SRL_ANGLE_HIGH);
      Repeat
        RemoveAndBuild;
        TeleportToBank;
        WalkToBank;
        GetPlanks;
        HomeTeleporter;
      Until (not LoggedIn)





    end.

    But when I go to run this script, I get the following.



    Which is the same Error I've gotten on all scripts I've attempted to run.

    If anybody could help me solve this, I'd really appreciate it

  2. #2
    Join Date
    Jan 2012
    Location
    Calgary, AB, Canada
    Posts
    1,819
    Mentioned
    5 Post(s)
    Quoted
    120 Post(s)

    Default

    I believe there has been numerous threads like this one just use the search function on the website too find the answer
    Current Project: Retired

  3. #3
    Join Date
    May 2012
    Location
    Texas
    Posts
    365
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    http://villavu.com/forum/showthread...._FilterMinimap
    I'm not getting this error :/ Sorry
    Mostly Inactive, School

  4. #4
    Join Date
    Nov 2011
    Posts
    1,589
    Mentioned
    9 Post(s)
    Quoted
    17 Post(s)

    Default

    That means that
    A:You have a Path Tool, using the map.
    B:You haven't setup any maps
    C:If not them then, not a clue.
    Mat



    ^^

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
  •