Results 1 to 3 of 3

Thread: Why Aren't My SRL Stats Working?

  1. #1
    Join Date
    Dec 2011
    Posts
    249
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Why Aren't My SRL Stats Working?

    Here is my script. I've looked through it so many times to find why my script isn't pushing them and cannot see the problem. Thank you for any help.

    Simba Code:
    Program SurfingYewsEdgville;
    {$i srl/srl/misc/smart.simba}
    {$i SRL/SRL.simba}
    {$i ObjectDTM\ObjDTMInclude.simba}
    //Version 1.3b

    ///////////////////////////////////////////////////////////////////////////////
    //            See Line 231 if you want to weild your hatchet!                //
    ///////////////////////////////////////////////////////////////////////////////


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

      Players[0].Name := ''; // Username
      Players[0].Pass := ''; // Password
      Players[0].Active := True;
      Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
    end;

    const
      SRLStats_User = '';     // Your SRL Stats ID
      SRLStats_Password = ''; // Your SRL Stats Password

    var
      x, y, TreesChopped, DTMSPOT, DTM1, DTM2: integer;
      StartingXP: integer;

    procedure AntiRandoms;
    begin
      FindNormalRandoms;
      LampSkill := 'woodcutting';
      LevelUp;
      end;

    procedure AntiBan;
    begin
      case random(10) of
          0: RandomRClick;
          1: PickUpMouse;
          2: RandomRClick;
          3: HoverSkill('woodcutting', False);
      end;
    end;

    procedure SetupLogin;
    begin
      ClearDebug;
      Smart_Server := 87;
      Smart_Members := True;
      Smart_Signed := True;
      Smart_SuperDetail := False;
      SetupSRL;
      SetupSRLStats(636, SRLStats_User, SRLStats_Password);
      TreesChopped := 0;
      ObjDTM_Setup;
      ActivateClient;
      DeclarePlayers;
      if not (LoggedIn) then
      LoginPlayer;
      ToggleXPBar(True);
      StartingXP := (GetXPBarTotal);
    end;

    Procedure CheckStats;
    begin
        if ((SRLStats_User= '') And (SRLStats_Password = '')) then
        begin
          case MessageBox('No Stats account entered, would you like to set one up?','SRL Stats',mbYesNoCancel) of
            mrYes:
              begin
                OpenWebPage('http://stats.villavu.com/register');
                TerminateScript;
              end;
            mrNo:
              begin
                SetupSRLStats(636, 'Anonymous', 'anon1337');
                Exit;
              end;
            mrCancel: TerminateScript;
          end;
        end else
          SetupSRLStats(636, SRLStats_User, SRLStats_Password);
      end;

    Procedure Commit;
    begin
        stats_IncVariable('Total EXP (Gained)', 4725);
        stats_IncVariable('Yew Logs (Chopped)', 27);
        Stats_Commit;
        WriteLn('Updated SRL Stats')
    end;

    Procedure OpenDbox;
    var
    x,y:Integer;
    begin
      Antirandoms;
    repeat
      if FindObjCustom(x, y, ['eposit'], [5855581], 2) then
      MMouse(x, y, 0, 0);
    until(IsUpText('eposit'));
      Mouse(x, y, 2, 2, True);
    end;

    procedure ReportScreen(TP: TStringArray; Placement: TPoint; Colour: integer);
    var
      mx, my, Pic, I, B, H, TPH, Numb: Integer;
      TTP: TPointArray;
      Canvas: TCanvas;
    begin
      SmartSetDebug(True);
      GetClientDimensions(mx, my);
      Pic := BitmapFromString(mx, my, '');
      TPH := High(TP);
      for I := 0 to TPH do
      begin
        TTP := LoadTextTPA(TP[i], SmallChars, H);
        for B := 0 to High(TTP) do
        begin
          Numb := ((I + 1) * 13);
          FastSetPixel(Pic, TTP[b].x + 1, TTP[b].y + Numb + 1, 3421236);
          FastSetPixel(Pic, TTP[b].x, TTP[b].y + Numb, Colour);
        end;
      end;
      Canvas := TCANVAS.Create;
      Canvas.Handle := SmartGetDebugDC;
      DrawBitmap(Pic, Canvas, Placement.x, Placement.y);
      FreeBitmap(Pic);
    end;

    procedure Report;
    var Exp: integer;
    begin
      Exp := (GetXPBarTotal - StartingXP);
      ReportScreen(['Surfing Yews',
      '',
      'Total Time Running: ' + TimeRunning,
      '',
      'Yews Chopped: ' + IntToStr(TreesChopped),
      '',
      'XP Gained: ' + IntToStr(Exp)],
       Point(28, 28), 16777215);
    end;

    procedure Resting;
    var
    S: String;
    begin
        if not loggedin then exit;
        Antirandoms;
      if (GetMMLevels('run', S) <= 50) then
          RestUntil(RandomRange(90,100))
    end;

    Procedure WalkToBank;
    begin
        Antirandoms;
      if ObjDTM_Walk('84:22:4:3:7:67:43:3:7:43:63:3:7:40:76:3:7:28:72:4:73:8:73:27:98:30:98:9', 0, 100, 80, True) then
        Antiban;
      if ObjDTM_Walk('106:48:3:10:7:119:69:10:7:119:61:10:7:119:53:4:98:27:97:50:116:51:115:27', 0, 100, 80, True) then
        Antirandoms;
      if ObjDTM_Walk('73:66:3:1:7:95:47:1:7:123:80:3:7:128:96:4:69:57:70:73:84:73:83:57', 0, 100, 80, True) then
      begin
        WriteLn('Now at Bank')
        MakeCompass(0);
      end else WriteLn('Could not find Bank');
    end;

    procedure WalkToYews;
    begin
        Antirandoms;
        WriteLn('Walking to Yews')
      if ObjDTM_Walk('60:129:4:1:7:131:95:3:7:137:112:10:7:98:99:10:7:98:107:4:51:120:52:137:76:137:75:119', 0, 100, 80, True) then
        Antiban;
      if ObjDTM_Walk('86:116:2:3:7:63:110:3:7:37:131:4:40:131:92:135:93:98:70:97', 0, 100, 80, True) then
        WriteLn('Now at Yews')
      else WriteLn('Could not find Yews')
    end;

    procedure WalkToSouthYew;
    begin
      Antirandoms;
      WriteLn('Walking to South Yew')
      if ObjDTM_Walk('80:112:4:1:7:32:123:3:7:35:106:3:7:39:94:3:7:22:102:4:72:105:71:124:96:125:98:103', 0, 100, 80, True) then
        begin
          MakeCompass('S');
          Resting;
      end else WriteLn('Could not find South Yew')
    end;

    procedure WalkToNorthYew;
    begin
      Antirandoms;
      MakeCompass(0);
      WriteLn('Walking to North Yew')
      if ObjDTM_Walk('75:53:4:3:7:57:44:3:7:33:63:3:7:29:75:3:7:17:71:5:57:44:65:67:84:67:83:35:65:33', 0, 100, 80, True) then
        begin
          Resting;
        end else WriteLn('Could not find North Yew')
      end;

    procedure Bank;
    begin
      MakeCompass(0);
      Setangle(SRL_ANGLE_HIGH);
      TreesChopped := TreesChopped + 27;
      Commit;
      Report;
      WalkToBank;
      Resting;
      AntiRandoms;
      DidRedClick;
      OpenDbox;
    begin
      if DidRedClick then
      begin
        report;
        wait(3000 + random(300));
      end else
        begin
          Report;
          wait(6000);
        end;
      if DepositScreen then
        begin
          Report;
          Deposit(2,28,True); // If You want to Weild your Hachet than replace with DepositAll;
          Wait(500 + random (50));
        end;
    begin
      MakeCompass(0);
        end;
      end;
    begin
      WalkToYews;
      end;
    end;

    procedure ChopYew;
    var
    x,y:Integer;
    begin
      Report;
      SetAngle(SRL_ANGLE_HIGH);
      AntiRandoms;
      if FindObjCustom(x,y, ['ew','hop','own'], [4016976],3) then
      begin
      Writeln('Found Yew Tree');
        Wait(550+random(500));
          Mouse(x,y,4,4,true)
            ChooseOption('hop');
            MMouse(x, y, 2, 1);
          end else Writeln('Cannot find Yew Tree');
      repeat
        wait(100);
        Report;
      Until(Not IsUpText('own') or InvFull);
      if(InvFull)then
      Bank;
    end;

    procedure MainLoop;
    begin
    ChopYew;
    WalkToNorthYew;
    ChopYew;
    WalkToSouthYew;
    end;

    begin
      ClearDebug;
      SetupLogin;

    repeat
      MainLoop;
    until(Not LoggedIn);
    end.

  2. #2
    Join Date
    Jan 2012
    Posts
    48
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hey try putting {$i SRL/SRL.simba} first. in the includes.

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

    Default

    Quote Originally Posted by MattL191 View Post
    Hey try putting {$i SRL/SRL.simba} first. in the includes.
    Will give anything a go

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
  •