Results 1 to 6 of 6

Thread: RockSmasher 2nd script.

  1. #1
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default RockSmasher 2nd script.

    Hey! This is my second ever script, and I thank everyone who made the scripts I learned from, and the wiki too.


    So, could you guys point out anything wrong n' stuff? Try to compile it if you can too.
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  2. #2
    Join Date
    Dec 2006
    Location
    Australia
    Posts
    698
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    missing an end; after the case statement,
    Random not Random,
    You dont have to declare the simple x,y but if you change it you must declare it before the first begin in a procedure.
    Missing a few ends
    But for some reason your script has no logical sense to it, it doesnt have a main loop and your calling one procedure than in that procedure calling the previous procedure causing a huge problem. For some weird reason you have called simple things totally different names for example you wanted it to LOADBMPS; but instead of having a procedure called loadbmps you had one called createbmps.

    Here is a compilable verison but i have no idea what you want it to do so you might need to edit it

    SCAR Code:
    program RockSmasher;
    {Made By R0B0T1 Be sure to set up variables and players below.
    -you can add more than the specified players, if you know how.
    -You can also use less. Might need to change colors....}


    {.Include SRL/SRL.scar}
    {.Include SRL/SRL/Skill/Mining.scar}
    {.Include SRL/SRL/extended/xAntiBan.scar}
    Const
     TPlayers=          5;//How many? remember player 0 counts as 1
     MaxTimeWait=      10;//Max time to wait to mine. Seconds
     RunDirection=    'N';//Set depending on location
     LoadsPerPlayer=   25;//Well....
     Wield=         False;//Yo pick wielded homey?
     RockColor=   2832993;//*caugh*                 (current Iron)
     Rounds=           30;//Times declared players will be looped through
     UseBMP=         True;//Use BMP method?
     TimeToWait=        5;//If above is false. Seconds. Not MS

     Var
     mined, missedore,looped, i:Integer;
     DidRandomHappen{, Result}, UnKnown, Pmod, Mime:Boolean;
     Info:String;

    Procedure DeclarePlayers;
     begin;
      HowManyPlayers:= TPlayers;
      NumberOfPlayers(TPlayers);
      CurrentPlayer:=1;

      Players[0].Name :='';
      Players[0].Pass :='';
      Players[0].Nick :='';
      Players[0].Active:=True;

      Players[1].Name :='';
      Players[1].Pass :='';
      Players[1].Nick :='';
      Players[1].Active:=True;

      Players[2].Name :='';
      Players[2].Pass :='';
      Players[2].Nick :='';
      Players[2].Active:=True;

      Players[3].Name :='';
      Players[3].Pass :='';
      Players[3].Nick :='';
      Players[3].Active:=True;

      Players[4].Name :='';
      Players[4].Pass :='';
      Players[4].Nick :='';
      Players[4].Active:=True;
     end;

    Procedure CreateBMPs;
     begin;
      mined := BitmapFromString(116, 12, 'z78DAE5994B0EC2300C44AF' +
           '044815ED3291B8FF959080459099C9D82E6D285D78913A9F3A2F5' +
           '327A9A5D4B9D4C69E1E4F95CB5FB696DB72916C5B6B29D37CFE50' +
           '62ADF2D63B2A548BF7C57BF44623615F33B2495F9D182AF14411F' +
           '6461ED492B8CD7F698C876D38898DC1CEE03F709B8F1BD7B4CBB2' +
           '5CA7374B396929ED282D9AA3988E65E8CD44C9AB09BB2AED98DC4' +
           'A9C64AC4C8832929379603B864F548E3C5B7FDEA37B6CC61FD10B' +
           'DB04F3F8E649675CF1F4D68AB56CEBA212AE57526C9B5ACA7C29E' +
           'AA7CCA07D6B69CC70ABB4D629A12B11454929411914A748D14C85' +
           '31652DACD5B2BB44892D67892BA79399188D1D4F3AAA18B75693A' +
           'D62C72206DBB475390FBA27D8070DCD2DCD1C829A10E356202AAF' +
           '7EEE6F4CAF9495634BD72357FBCE5F18FC557996F25BDC4A79C2B' +
           '37D3D4F58576FD7E216E4CF12B70A632165EE780A7ADB396B1A47' +
           '6F95AF4B440C9ED524F204F42F767BD25D7C8C5B294F08E5DEBA3' +
           '2E85AEA505D61F794DA9781D5E4E0D6BB7EE9BE2C96276C6AF3B7' +
           '0F7B8D563ECB1DEEC4F57B370E99BB21EF99D8680C8CB6A6F49B3' +
           '267CE791086F3A7DFB1B3DC7FA0B4BD73C953CA73F263738BD6E9' +
           'F7EE1D1A7B07E72791BE');

      missedore := BitmapFromString(266, 15, 'z78DAED5C5B6E1B310C' +
           'BC521A2048FC6903C9FD8FD4024D506F7749CD7086DAF5C31F82A' +
           '17D4914C5E190922EE7F3E5E37CB99C3F4FAFEDE5DF6F45E5E9FC' +
           'F6F16B50E66FB82E6B6D50CA39324CCB973FBFAFAFEB7220875C2' +
           '6EBABBA0C91515E8F757AE7A2BFFA77750DDC771E79CB48022E79' +
           'EE5BBE9E4EEF6F8B727E1B7279AE5B88941D5A1D942FE9EF9F5DF' +
           'AF91F5AA1A8C68B20797FF336DC357648B688FDDF619DF25980E8' +
           '89600FBF35BC7BDECDC48BFF1036E95D2A555C3245191EA0FC6E7' +
           '9B795AE6994B78F880E083882D717F59FB5063504E9C0AF7B4510' +
           '1D71589BD6C70E82F7E7736743C3BBBDCD898C63D13BAFCDD1F17' +
           '78A3F0F8D7E8E0E7B610AEB110557171268F09F07D8A15B1B2F6F' +
           '3A4E3400E15CF78D23CAD8AD6741C37CDCB01E8877A47B38FA6C9' +
           '5A53DE89D894D48D8D1ECCFE7BE01D1721C59ACB1591D65200D17' +
           '34D9C03BE664345829B1B3CF956179224847D4DDCBD9239DF146B' +
           '06B78C47A2C415F6E003BC8F1F2F662D0F22B4458DC393FA2C5EA' +
           '5EC43BF0F75863568B6C089C43C9C72BBF07F9A292D9C9B571D0F' +
           '7CD9CF556CE08CD778F9E45F2507D6D18B42AD519FCAAA245842E' +
           '45D801E8246EFD724DABD5B333829630F2455832C838B268C2BE6' +
           'DA30D012244F7E465685BC81ED1D283E74B5863F2E810FDC963C8' +
           'F88CC36D4218530D7096F6BB52C631E8FB158220D63E8A6EE1CFE' +
           '2C882D4BBEE89E413F9F32E8B4ACF148477C8D831D05EA1A7B53B' +
           '6D6F2BCD71DCCE443E5B6E318A2302D8A21065D21A9C77D03690D' +
           '56D12A7A096973C07AFB6D422908A9E74F86C485668519FB29581' +
           '4D062CFCCED891464E7034A765CE6A26A06FB406AE7C0F9CE7222' +
           'C0C7F278B14D0DB4A73DF3B8B3B6CC2C6D51252D4B8552D92A660' +
           '871457C47907B08222671335DF12D26A53A4144110A8FD29070CF' +
           '32F2C6709F84E1E71C2635636EC0898886DF423CB96D66FE88FC2' +
           'A0ADEB1543ECC87D2D04298088A22192903EEBB2AB47C68EB5C76' +
           'E6ED51CDE21AC1C8E7C335B2F64CF13C98E419E21B232D31B5560' +
           '79071919C3EDBF013B0469D057D35CBC127BC1BD2696B12AFE92B' +
           '9A7355D355930625D68099BE808580D3BDA560E18B0A3E603D7B2' +
           'E72CEF10EAA1DC0D9C6BC8E3E74536545BDDC7E61FDB72E5F87B0' +
           '64FADB0096943915702AC4489CF20DEBB62E5D868278E3B7D3229' +
           'C6ACC8B983E4B614FCC5F1AE98D75845FE172CA3CFB6B0597E3C5' +
           '78EC71E916CF2D14AD7FAF9F9AD7DCCBD1E391750F66FEE75CE06' +
           '39BEFA7ABF1B2B5D276CECDB5ABC2FC75973DB7DCA41890F1EBAA' +
           '7476B21BEA3FC317797EBBB638E7046936B9FDD31FB3B077327EE' +
           'E16AB4847BA186EBBB73B4E27190825D7BF668A75AB9CEBFBA5D5' +
           'F5ACEE03CCBF6FDF5DDB60E671C2E4C9979C2899715B2BB62F73A' +
           'E3AB4FAA1D2722023B7F9FD8712BDEB86B5FEA0D330E6FD4E868D' +
           '8915B92EBAB1D1C04C7A9996C0890E76FC1F7A03E');
     end;

    Procedure Sig;
     begin;
      WriteLn('R0b0t1 made this');
     end;



    Procedure FreeBMPs;
     begin;
      Freebitmap(mined);
      Freebitmap(missedore);
     end;

    Function FindFastRandoms:Boolean; //WT-Fakawi... I think. I edited
     Var i:Integer;
     begin;
      For i := 1 to 12 Do
       begin;
        Case I of
         1: If FindDead then
            begin
             UnKnown:= True;
             Result:= True;
             end;
         2: If FindMod then
            begin
             Pmod := True;
             Result:= True;
             end;
         3: If FindMime then
                 begin
             UnKnown := True;
             Result := True;
             Players[CurrentPlayer].loc:= 'Mime';
             end;
         4: If FindMaze then
                 begin
             Result := True;
             UnKnown := True;
             Players[CurrentPlayer].loc:= 'Maze';
             end;
         5: If FindQuiz then
             begin;
              Result := True;
              SolveQuiz;
             end;
         6: If FindDemon then
             Result := True;
         7: If NoGameTab then
              begin
               UnKnown := True;
               Players[CurrentPlayer].loc := 'No GameTab';
              end;
         8: If InBlack then
              begin
               Result:= True;
               UnKnown := True;
               Players[CurrentPlayer].loc := 'InBlack';
              end;
         9: If FindFrogCave Then
             begin
              SolveFrogSwamp;
             end;
         10: if FindScapeRune then
                 begin
             Result := True;
             UnKnown:= True;
             Players[CurrentPlayer].loc:= 'ScapeRune';
             end;
         11: if FindTalk then // Call it twice
             Result := True;
       end;
       Wait(1);
     end;
     If (Result = True) Then
      DidRandomHappen := True;
     If (UnKnown = True) Then
      begin;
       Info:= Players[CurrentPlayer].loc;
       WriteLn('Lost Player. Reason: ' + Info);
       Logout;
       NextPlayer(false);
      end;
     If (Pmod = true) Then
      begin;
       Logout;
       Wait(60000);
       NextPlayer(true);
      end;
    end;

    Procedure AntiRandoms;
     begin;
      FindPick;
      FindTalk;
      FindNormalRandoms;
      FindFastRandoms;
      FindLamp('mining');
      If (FindFight = True) Then
       begin;
        RunAwayDirection(RunDirection);
        Wait(10000+random(2000));
        RunBack;
       end;
      If (ClickToContinue = True) Then
       begin;
        TalkToRand;
       end;
      If (FindNewBox = True) Then
       begin;
        OpenBox;
        Wait(3000);
        SolveBox;
       end;
      If FindCerter Then
       begin
        CerterLoadBmps;
        Wait(500);
        SolveCerter;
        Wait(500);
       end;
     end;

    Procedure AntiBans; //Yakman, edit by me.
     begin;
      case Random(10) of
       0: IdleTime(1000 + Random(200), 500, 1.0);
       1: IdleTime(1000 + Random(350), 1075, 1.0);
       2: SleepAndMoveMouse(2500 + Random(2500));
       3: SleepAndMoveMouse(2500 + Random(1500));
       4: SleepAndmoveMouse(500 + Random(500));
       5: IdleTime(100 + Random(250), 750, 0.5);
       6: RotateEvery(0+Random(5));
       7: BoredEvery(0+Random(5));
       8: LeaveScreenEvery(0+Random(5));
       9: HoverSkill('mining', False);
      end;
    end;

    Procedure LookGas;
     begin;
      If FindGas(x, y) Then
       begin;
        RunAwayDirection(RunDirection);
        Wait(10000 + Random(2000));
        RunBack;
       end;
     end;

    Procedure Mine;
    Var v:Integer;
     begin;
      If (UseBMP = True) Then
       begin;
        repeat;
         If FindObjOre2(x, y, 'ock', RockColor, 5, 2) Then
          begin;
           MMouse(x, y, 5, 5);
           LookGas;
           Mouse(x, y, 3, 3, True);
           Wait(1000+Random(1500));
           AntiRandoms;
           If not (FindBitmap(missedore, x, y)) Then
            begin;
             FindBitmap(mined, x, y);
             Wait(3000+Random(3000));
             If not (FindBitmap(mined, x, y)) Then
              begin;
               repeat;
                Wait(1000);
                FindBitmap(mined, x, y);
                v:= v+1;
               until (v = MaxTimeWait);
              end;
            end;
          end;
        until (invfull);
      If (UseBMP = False) Then
       begin;
        repeat;
         LookGas;
         If not (LoggedIn) Then
          NextPlayer(true);
         If (FindColorTolerance(x, y, RockColor, 0, 0, 500, 300, 20)) Then
          MMouse(x, y, 5, 1);
         If (IsUpText('Mine')) Then
          Mouse(x, y, 3, 3, True);
         Wait(TimeToWait*1000 + Random(2000));
        until (invfull);
       end;
     end;
    end;

    Procedure Drop;
     begin;
      If (Wield = True) Then
       begin;
        DropAll;
        i:= i + 1;
       end;
      If (Wield = False) Then
       begin;
        DropTo(2, 28);
        i:= i + 1;
       end;
     end;


    Procedure ProgressReport;
     begin;
      ClearDebug;
      WriteLn('______________________________________');
      WriteLn('RockSmasher by r0b0t1                 ');
      WriteLn('                   Progress Report    ');
      WriteLn(' Did '+InttoStr(i)+' Loads on          ');
      WriteLn('          '+Players[CurrentPlayer].Name);
      WriteLn('Worked For: ' + ScriptTime2(2) + '    ');
      WriteLn('Loops Worked: ' + InttoStr(Looped)    );
      WriteLn('Loops Left: '+InttoStr(Rounds-Looped) );
      SRLRandomsReport;
    end;

    Procedure All;
     begin;
     Looped := Looped+1
     i:= 0
      SetUpSRL;
      FindPickHeadColor;
      CreateBMPs;
      repeat;
       Antibans;
       Mine;
       AntiRandoms;
       Drop;
      until(i = LoadsPerPlayer);
      NextPlayer(True);
      i:= 0;
      ProgressReport;
     end;

    begin
     Looped:=0
     repeat
     All;
     until(false)
    end.

  3. #3
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    Thanks... But everyone has there own way of programming. It made perefect sense to me actually...
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  4. #4
    Join Date
    Dec 2006
    Location
    Australia
    Posts
    698
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    sorry about that, just that standards are pretty important

  5. #5
    Join Date
    Jan 2007
    Location
    Not here
    Posts
    1,604
    Mentioned
    2 Post(s)
    Quoted
    19 Post(s)

    Default

    make ur bmp's again! they are freaking huge Also wat are they bmps of I have a feeling there are other things u can use instead
    Sleeping...

  6. #6
    Join Date
    Mar 2007
    Location
    Under a rock
    Posts
    813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah, definetaly make the bitmaps way smaller. It looks like a good script overall though, good job, but it seems like it has a little to much antirandoms .

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. RockSmasher by Brenth
    By Brenth in forum First Scripts
    Replies: 6
    Last Post: 01-07-2008, 09:44 PM
  2. RockSmasher by r0b0t1
    By R0b0t1 in forum RS3 Outdated / Broken Scripts
    Replies: 3
    Last Post: 05-28-2007, 03:32 AM

Posting Permissions

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