Results 1 to 4 of 4

Thread: How do I make my script upload SRL stats?

  1. #1
    Join Date
    May 2007
    Location
    Ontario
    Posts
    361
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default How do I make my script upload SRL stats?

    I'm nearly finished my auto-woodcutter, however I want people to be able to upload their stats to SRL. Here is my script so far (It will run, with VERY few bugs, there are just a few things I need to add).

    SCAR Code:
    program SimpleLogCutter;
    {.include srl/srl.scar}
    {.include srl/srl/extended/xautotalk.scar}
    {.include srl/srl/extended/xantiban.scar}
    {.include SRL/SRL/Misc/PlayerForm.scar}
    {.include SRL/SRL/Skill/Woodcutting.scar}

    var yougetsome, xx, yy, yourinv, users, h, m, s, nogametab1, darkness, cut, dead, deads, lvltouse, lost: integer;
        tc: array[1..10] of integer;
        logs: array[1..5] of integer;
        nofirstslot: string;

    procedure setup;
    begin
      status('Setting up players');
      SetupPlayers;
      Users:= GetNumber;
    end;

    procedure setcb;
    begin
      status('Setting up colours and bitmaps');
      yougetsome := BitmapFromString2(False, 'a677B078DAB5575B92C' +
           '42008BC9266828F4FCD64EE7FA40DB353AE2902429CCD4757AA83' +
           '0AB4A071CE7970C7E3FD7A60C83BA25F1043407EC3AF509081844' +
           'C80D4F8B096660FAFD06C9684B3016C8D0F68E292CB074678216E' +
           'B8F0F2E6C333225664625D1B1FCBE3CFFEF16C36FB9ADF367BCD0' +
           '592AFA5D4849E1CCF87E9F81363C5DF197AD48F5D728E70818AB1' +
           '17B1C85ECD602D7B5E5886BEEB91EAA2F7CAAA8B7E2CA7CBB7D4E' +
           '1BC9DD78E53EA167EA2105774E4E16C68BC83F9493E4FAB889997' +
           '2DF5B3C9A3E4782F6C48A59C6C1886D3459307BAA3A8CF2786CEA' +
           '0509FAA467D93B5E8EBCBDAA5597BCE5B5223839CD05AE8195A2F' +
           'FD3B53E9FA8A18D49458FBFA7A1CA863ED6C335D42C1B30CA3854' +
           '11D71E79BD5D19C7A443B6E157D679BBFC3DCDC8772E615D564E8' +
           '6C5CCF9957878962901945BFBAA98EA27B98772C8D481323172F7' +
           '3CAC8F5CE5A1AEF2783B5E4B35B3CE5A7EE038C6AD61EA85167A0' +
           'CB77FF0834B77DF9FC956FBF337F61337F04FF8124333F131');
      tc[10]:= 9087930
      tc[9]:= 2781296
      tc[8]:= 3096632
      tc[4]:= 1718328
      tc[5]:= 199690
      tc[2]:= 2908240
      tc[1]:= 1724488
      tc[7]:= 2252880
      tc[6]:= 3295304
      tc[3]:= 3823696
      logs[1]:= 5411248
      logs[2]:= 5345198
      logs[3]:= 5542835
      logs[4]:= 6129318
      logs[5]:= 6063524
      yourinv := BitmapFromString2(False, 'a944CC78DACD55490E8' +
           '5200CBD52F553862538DCFF48DF5613302A14D144172FA6137DB4' +
           'B400D0190F0BAA7E41ED26C28EFFB526FC0DA425000CAC0545680' +
           '8D1EA28411B7DD96B8DD65BB64492E0CCF6640216DC820667C201' +
           '091D297AD6EA99B58A229891BD02464950D197BDB668239FA8395' +
           'D80E07DB0FEA3E83CDA4E6E7F64F4358E907C2D113649F01357B6' +
           '1C8D2D377C995D7ACA3DA6BB3809C7DDED1D18156CF2960D3D26D' +
           '1163A33ADE331E7AC567EE772A64D1C25B94938663BBC85E349F5' +
           'D739934C9B9338175590480ADACAD9F54A1DB3356AE2786B3E3FC' +
           '051D251E2F7553173E45DD73273B27956DCAA642FA4AFE36A2357' +
           '6E6AC91BBFEAAEDA5DF607F0D');
      dead := BitmapFromString2(False, 'a9E16B78DAAD924B0E80200C4' +
           '4AF54083F9745F1FE47922A2124156844162F6418D2C900000086' +
           '0CB03BC1D3DE064734A92A3A18DA3F9E934E9DA64B0E4977D112B' +
           'DAA8AD547A6F22622C6802DE15E5C2F8C98365DD8F32CB09D0E6C' +
           'F10C2F9E36E1D8294832CEC027F632749DE2FEB93EEE64924A306' +
           'BDCD824A7B801C9BB7CEC642195E49FFF95EA02269');
      lvltouse := BitmapFromString2(False, 'aA65C078DACD5A5B92A33' +
           '00CBC126143209F3093DCFF481B33A91A28AC76EBC5840F15658C' +
           '1FB2D46ACBEEBAAE7B7EBD44B74C2F313C8ABC8DD7DFF7619597B' +
           'EC8DBADC8EB5CBE4EE5BD9FD69A43696178AE5F4BC56EEC4BC9F8' +
           '7DFB7D5F4ACD717816F9351439FF2BF597D7FBF5F1B8BCDE2FE37' +
           '599E7659A7F64B73EDB9286BCCFC37411A5E7DFFE7E1F87F778D6' +
           'F79DC4FFDAE47654B4062A1A5BE6C7BDAF94ACF25D7F5372AA3C8' +
           'C47FD179EE9A7C9D811C2D6D4BEA39454FB5A1F8C95B49785E98A' +
           'C71F1B261C30E73D72A13EFE4AF5C24B3FD69D6F9F9237619C21D' +
           'A0F8E5C79D1C13F069B3EE9E8F3C711EA945816803F369F82EB6B' +
           '448F28E6E3673BD9B674EC45B2019B6D64F099BC96F37A211820E' +
           'F41365FA39013FBD427309F3CB489929051FC19DB391F0395F613' +
           'CCF679E4F47021EC35EEDD7D58FCCA60A4029AEDF44C44B40F623' +
           '2846456A43B3C0D4D1E1140B922BBBE98F11028B16D0DB74FCD7A' +
           'A33DAC998A2D1D668A5707D76C940B0C9FE95D4215DE122A35699' +
           'B54D81B5D4EAD14C607A1BC316B026345CBC75A25D0324357DA72' +
           '8585F0E32198860243684D4A7F05200CC179F2668A2DD06327521' +
           'DCA8A3026F0382C7884D10279BF33AD08AF19BFCF2AD694580B6D' +
           'D60897F311908FA78D5D18B13B536898CE55623C69940B6C07C79' +
           '14ABFCC084D5C0EAF7865D5709C25D88ED6DEFCB864CCA39A626B' +
           '405CC69A11B80DC64CD1DE24EB15769154FB6EB6935153F223A6C' +
           'D462F2664D0B2056D6E87E931630C3BBEE4D709B4AE23E7545875' +
           'A8BD29BEF2DEC4EFE2952B95114F5D3595A70F540411724778F76' +
           'D3B01316600B271923F4783F949C983025082C8B437664D64E11A' +
           '3315A26A83BB4A711F67290966C5307FDE561B3952A6173FD6317' +
           '95D61CC985979E232DE71B8722952DC11EC2485ED24E4E5186DF3' +
           '91BAC2163C275936ED29776DBB9B8D364E4570664FF40FE3E1902' +
           '7A8B9502C3786A7608D7E719464509DB1A528B6035B08F0FA8C73' +
           '0D3FDBE135C9B01D3E8FC1E49AFC6C8799B5F60602663541ECB11' +
           '2971DB941F5998ECD0283E2A02B56D2F7AC440D67B31DD3699427' +
           '2FF7396C27D81E84730451FFF0349CBF8F843381F8840EE35585F' +
           '9F0B91D9EED84E6D0146CC7CD331571848905FCEC6CEB0EE3821A' +
           'DFF8FB7244E6E124AF87B777A458C39F64FD07856');
    end;

    function udead: boolean;
    begin
      result:= findbitmap(dead, xx, yy);
    end;

    procedure recievelogs;
    var waited: integer;
    begin
      waited:= 0
      repeat
        status('Waiting for logs');
        wait(500 + random(500));
        waited:= waited + 1;
      until((findbitmap(yougetsome, xx, yy))or(findbitmap(yourinv, xx, yy))or(waited = 20))
    end;

    procedure clicktree;
    var click: boolean;
        number: integer;
    begin
      number:= 1
      repeat
        status('Clicking Tree');
        click:= true
        if click = true then
        begin
          if findmscolor(xx, yy, tc[number]) then
          begin
            mouse(xx, yy, 3, 3, true);
            click:= false
          end;
          wait(10);
        end;
        number:= number + 1
      until((click = false)or(number = 11))
    end;

    function findtree: boolean;
    begin
      if (findmscolor(xx, yy, tc[1]))or(findmscolor(xx, yy, tc[2]))or(findmscolor(xx, yy, tc[3]))or(findmscolor(xx, yy, tc[4]))or(findmscolor(xx, yy, tc[5]))or(findmscolor(xx, yy, tc[6]))or(findmscolor(xx, yy, tc[7]))or(findmscolor(xx, yy, tc[8]))or(findmscolor(xx, yy, tc[9]))or(findmscolor(xx, yy, tc[10])) then result:= true
    end;

    function lastlog: boolean;
    begin
      if (findcolorTolerance(xx, yy, logs[1], 694, 436, 710, 459, 75))or(findcolorTolerance(xx, yy, logs[2], 694, 436, 710, 459, 75))or(findcolorTolerance(xx, yy, logs[3], 694, 436, 710, 459, 75))or(findcolorTolerance(xx, yy, logs[4], 694, 436, 710, 459, 75))or(findcolorTolerance(xx, yy, logs[5], 694, 436, 710, 459, 75)) then result:= true
    end;

    function invcolourtol(colour, tolerance: integer): boolean;
      var xx, yy: integer;
    begin
      result:= findcolortolerance(xx, yy, colour, 567, 211, 729, 454, tolerance)
    end;

    procedure clickinvcolourtol(colour, tolerance: integer; left, ran: boolean);
      var xx, yy: integer;
    begin
      if findcolortolerance(xx, yy, colour, 567, 211, 729, 454, tolerance) then
      begin
        wait(100 + random(200));
        if ran = false then mouse(xx, yy, 0, 0, left);
        if ran = true then mouse(xx, yy, 3, 3, left);
      end;
    end;

    procedure nextaccount;
    begin
      if Users > 0 then
      begin
        status('Switching accounts');
        writeln('You were logged out, next user');
        nextplayer(false);
        loginplayer;
        wait(2000 + random(1000));
        makecompass('N');
        HighestAngle;
        fixchat;
      end;
    end;

    procedure droplogs;
    var number: integer;
        attempts: integer;
    begin
      number:= 3
      repeat
        status('Dropping logs');
        if invcolourtol(logs[1], 75) then
        begin
          if nofirstslot = 'yes' = false then
          begin
            clickinvcolourtol(logs[1], 75, false, true);
            wait(350 + random(250));
            if chooseoption(xx, yy, 'rop ') then cut:= cut + 1
          end;
        end;
        wait(900 + random(500));
        if invcolourtol(logs[2], 75) then
        begin
          if nofirstslot = 'yes' = false then
          begin
            clickinvcolourtol(logs[2], 75, false, true);
            wait(350 + random(250));
            if chooseoption(xx, yy, 'rop ') then cut:= cut + 1
          end;
        end;
        if invcolourtol(logs[number], 75) then
        begin
          clickinvcolourtol(logs[number], 75, false, true);
          wait(350 + random(250));
          if chooseoption(xx, yy, 'rop ') then cut:= cut + 1
        end;
        number:= number + 1
        if number = 6 then number:= 3
        wait(200 + random(200));
        if LoggedIn = false then
        begin
          if users > 0 then users:= users - 1
          Nextaccount;
        end;
        if getcurrenttab = 4 = false then gametab(4)
        attempts:= attempts + 1
        if attempts = 40 then
        begin
          writeln('Cannot drop some kind of object, logging out');
          logout;
        end;
      until((lastlog = false)or(loggedin = false)or(attempts = 40))
      attempts:= random(10);
    end;

    function events: boolean;
      var xx, yy: integer;
    begin
      result:= false
      status('Waiting for all fights and walking');
      if findmmcolor(xx, yy, 255) then result:= true
      if (findcolor(xx, yy, 255, 253, 150, 270, 163))or(findcolor(xx, yy, 65280, 253, 150, 270, 163)) then result:= true
    end;

    procedure mcbox(xx, yy, xx2, yy2: integer; lefft: boolean);
    begin
      xx:= xx + random(xx2 - xx)
      yy:= yy + random(yy2 - yy)
      mouse(xx, yy, 0, 0, true);
    end;

    function FindFastRandoms: Boolean; //By WT-Fakawi.
    var
      i: Integer;
    begin
      for i := 1 to 8 do
      begin
        case I of
          1: if UDead then
               begin
                 status('You died, going to oak tree in Lumby');
                 Result := True;
                 wait(3000 + random(1500));
                 mouse(633, 139, 5, 5, true);
                 deads:= deads + 1
               end;
          2: if FindMod then
               begin
                 Result := True;
                 status('Found MOD, waited');
               end;
          3: if FindMime then
               begin
                 status('Stupid mime, logging out');
                 Result := True;
                 if users > 0 then users:= users - 1
                 wait(2000 + random(1000));
                 makecompass('N');
                 HighestAngle;
                 fixchat;
               end;
          4: if FindMaze then
               begin
                 status('In maze, logging out');
                 Result := True;
                 if users > 0 then users:= users - 1
                 wait(2000 + random(1000));
                 makecompass('N');
                 HighestAngle;
                 fixchat;
               end;
          5: if FindQuiz then
               begin
                 status('Being quized, logging out');
                 Result := True;
                 if users > 0 then users:= users - 1
                 wait(2000 + random(1000));
                 makecompass('N');
                 HighestAngle;
                 fixchat;
               end;
          6: if FindDemon then
               Result := True;
          7: begin
              if NoGameTab then
              begin
                Result := True;
                status('A Game tab is missing, logging out');
                writeln('A gametab is missing! Random? Logging out...');
                nogametab1:= nogametab1 + 1
                Logout;
                Exit;
              end;
            end;
          7: begin
              if InBlack then
              begin
                Result := True;
                status('In dark area, logigng out');
                writeln('You are in a dark area, random? Logging out...');
                darkness:= darkness + 1
                Logout;
                Exit;
              end;
            end;
          8: RC;
        end;
        wait(1);
      end;
    end;

    procedure fixrandoms;
    begin
      NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
      findnormalrandoms;
      findfastrandoms;
      if findfight then
      begin
        writeln('You are under attack');
        runto('n', true);
        status('Under attack, running away');
      end;
      if findbitmap(lvltouse, xx, yy) then
      begin
        writeln('You lost all your axes, logging out...');
        lost:= lost + 1
        logout;
      end;
    end;

    begin
      SetupSRL;
      setcb;
      setup;
      readln('WARNING, this only works with regular trees and oak trees, please try to avoid others. Will be for more trees when this script is out of beta...');
      nofirstslot:= readln('Ignore more colours? ("yes" if the bot keeps dropping your axe(s)) WARNING, I think it may drop with axes still, sorry, I`m not too sure');
      movetotray;
      FindWindowBySize(766, 504)
      activateclient;
      mcbox(521, 5, 551, 432, true);
      status('Logging in and setting up');
      LoginPlayer;
      wait(1500 + random(1500));
      makecompass('N');
      HighestAngle;
      fixchat;
      repeat
        writeln(inttostr(users));
        if users = 0 = false then
        begin
          if getcurrenttab = 4 = false then gametab(4)
          if findtree then
          begin
            wait(2500 + random(1000));
            clicktree;
            recievelogs;
          end;
          events;
          if lastlog then droplogs
          wait(1000 + random(1000));
          status('Performing anti-ban');
          AntiBan;
          status('Checking/fixing randoms');
          fixrandoms;
          if LoggedIn = false then
          begin
            if users > 0 then users:= users - 1
            Nextaccount;
          end;
        end;
        wait(10 + random(10));
      until(Users = 0)
      writeln(inttostr(users));
      status('Setting Up Reports');
      srlrandomsreport;
      addtoreport('------Power Cutter By:-------');
      addtoreport('-------TheGuyWhoGotOn--------');
      addtoreport('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
      ConvertTime(gettimerunning, H, M, S)
      addtoreport('Time Run: ' + inttostr(H) + ':' + inttostr(M) + ':' + inttostr(S));
      addtoreport('Logs Cut: ' + inttostr(cut));
      addtoreport('Deaths: ' + inttostr(deads));
      addtoreport('Axes Lost: ' + inttostr(lost));
      addtoreport('Black Minimap: ' + inttostr(darkness));
      addtoreport('-----------------------------');
    end.

  2. #2
    Join Date
    Jun 2007
    Location
    In my computer room
    Posts
    148
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Go to www.stats.srl-forums.com/ and everything you need to know is there.

  3. #3
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    There are some good tuts on it.


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  4. #4
    Join Date
    May 2007
    Location
    Ontario
    Posts
    361
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks, my question was answered in another topic , they posted a tut, I forget which one though, I really wish SRL would be updated so I could test my script.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Can Someone Upload Delphi 7 v2 for me?
    By SKy Scripter in forum Delphi/FPC Help and Tutorials
    Replies: 21
    Last Post: 11-20-2008, 11:19 PM
  2. how do i upload a script
    By noahthepoo in forum OSR Help
    Replies: 4
    Last Post: 10-30-2007, 08:27 AM
  3. How do I make my script upload SRL stats?
    By TheGuyWhoGotOn in forum OSR Help
    Replies: 4
    Last Post: 08-07-2007, 01:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •