Results 1 to 9 of 9

Thread: Mining Guild[Coal + Mithril]

  1. #1
    Join Date
    Jun 2007
    Posts
    108
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Mining Guild[Coal + Mithril]

    Script is still in beta, but it gets the job done (generally speaking.)
    Please post any bugs you find, I don't have the time to run the script and watch it.

    Start at bank booth in front of the door at Falador East bank with Pickax equipped and nothing in inventory.

    Simba Code:
    program MiningGuild_by_Jatex;
    {$DEFINE SMART}
    {$DEFINE PAINT}
    {$i srl/srl/misc/smart.simba}
    {$i SRL/srl.simba}
    {$i SRL\SRL\Misc\PaintSmart.simba}
    {$i ObjectDTM\ObjDTMInclude.simba}
     var
     {MSX1,MSY1,MSX2,MSY2,}x,y,i: integer;
     OldInv,PlusOne,Ores,AngleHigh,colorz: integer;
     //MyTPA: TPointArray;
     //MyPoint: TPoint;
     WalkingToOres,WalkingToUpLadder: Array[0..3] of integer;
     aFound: Extended;

     Procedure DeclarePlayers;
      begin
        HowManyPlayers := 1;
        NumberOfPlayers(HowManyPlayers);
        CurrentPlayer := 0;
        with Players[0] do
        begin
          Name         := '';                             //Account Username
          Pass         := '';                             //Account Password
          Pin          := '';                             //Account Pin (leave blank if not one)
          BoxRewards   := ['XP','xp','lamp'];
          LampSkill    := 'Mining';
          Active       := True;
        end;
      end;

      procedure Antiban;
      begin
        if(not(LoggedIn))then
        Exit;
        case Random(500) of
        0:
        begin
          HoverSkill('Mining', false);
          wait(1000+Random(200));
        end;
        10: PickUpMouse;
        20: BoredHuman;
        30: RandomMovement;
        40:
        begin
          MakeCompass('S');
          wait(125+random(100));
          MakeCompass('N');
          wait(75+random(100));
          MakeCompass('N');
          FindNormalRandoms;
        end;
        50: MakeCompass('Random');
      end;
     end;

     procedure MineMithril;
      begin
        if(InvFull) then
        Exit;
        repeat
          FindNormalRandoms;
          MakeCompass('S');
          SetAngle(AngleHigh);
          Oldinv := InvCount;
          PlusOne:= InvCount + 1;
        if FindObjCustom(x,y,['ine','ocks'],[7230805,9728626,7096649],10) then
          begin
            Writeln('Found Mithril Ore..');
            colorz:=GetColor(x,y);
            Mouse(x,y,4,4,true);
            ChooseOption('ine');
            Writeln('Mining Mith Ore..');
            MarkTime(Ores);
          end;
            repeat
              Wait(500+random(250));
              Writeln('Waiting')
              Antiban;
              Writeln('Antiban');
              FindNormalRandoms;
              Wait(500+random(300));
            //if (OldInv=PlusOne) then
              //Writeln('Mithril Count:'+InvCount);
            Until(OldInv=PlusOne)or(TimeFromMark(Ores) > 5100+random(250));
              Writeln('+1Invy');
                //until FindObjCustom(x,y,['ine','ocks'],[7230805,9728626,7096649],10)=False;
        until FindColorTolerance(x,y,7230805,MSX1,MSY1,MSX2,MSY2,10)=false or InvFull;
     end;
                //until (InvFull);


     procedure MineCoal;
     begin
      If(InvFull) then
        Exit;
        repeat
          Antiban;
          FindNormalRandoms;
          MakeCompass('S');
          SetAngle(AngleHigh);
          Oldinv := InvCount;
          PlusOne:= InvCount + 1;
            if FindObjCustom(x,y,['ine','ocks'],[789773,1052945,1316117],5) then
              begin
                Writeln('Found Coal Ore.. Mining');
                //Wait(1000+random(500));
                colorz:=GetColor(x,y);
                Mouse(x,y,4,4,true);
                ChooseOption('ine');
                Writeln('Mining Coal Ore..');
                MarkTime(Ores);
                Writeln('Marking Time');
              end;
                repeat
                  Wait(500+random(250));
                  Writeln('Waiting')
                  Antiban;
                  Writeln('Antiban');
                  FindNormalRandoms;
                  Wait(500+random(300));
            //if (OldInv=PlusOne) then
              //Writeln('Mithril Count:'+InvCount);
                until(OldInv=PlusOne)or(TimeFromMark(Ores) > 5100+random(250));
                  Writeln('+1Invy');
      until FindObjCustom(x,y,['ine','ocks'],[789773,1052945,1316117],10) or InvFull;
     end;

     procedure WalkToRocks;
     begin
      Wait(450+random(125));
      ClickNorth(SRL_ANGLE_HIGH);
      Wait(1250+random(275));
        if FindDTMRotated(WalkingToOres[0],x,y,MMX1,MMY1,MMX2,MMY2,-Pi/4,Pi/4,Pi/60,aFound) then
          begin
            Writeln('Walking to first DTM');
            Mouse(x,y,5,5,True);
            FFlag(6);
              repeat
                Wait(50+Random(25));
              until FindDTMRotated(WalkingToOres[1],x,y,MMX1,MMY1,MMX2,MMY2,-Pi/4,Pi/4,Pi/60,aFound) or FindDTMRotated(WalkingToOres[2],x,y,MMX1,MMY1,MMX2,MMY2,-Pi/4,Pi/4,Pi/60,aFound);
          end;
            if FindDTMRotated(WalkingToOres[1],x,y,MMX1,MMY1,MMX2,MMY2,-Pi/4,Pi/4,Pi/60,aFound) then
              begin
                Writeln('Walking to second DTM');
                Mouse(x,y,5,5,True);
                FFlag(6);
              end;
            if FindDTMRotated(WalkingToOres[2],x,y,MMX1,MMY1,MMX2,MMY2,-Pi/4,Pi/4,Pi/60,aFound) then
              begin
                Writeln('Walking to failsafed DTM');
                Mouse(x,y,5,5,True);
                FFlag(6);
              end;
                  {repeat
                    Wait(50+Random(25));
                  until FindDTMRotated(WalkingToOres[1],x,y,MMX1,MMY1,MMX2,MMY2,-Pi/4,Pi/4,Pi/60,aFound);
              end;
                if FindDTMRotated(WalkingToOres[1],x,y,MMX1,MMY1,MMX2,MMY2,-Pi/4,Pi/4,Pi/60,aFound) then
                  begin
                    Writeln('Walking to second DTM');
                    Mouse(x,y,5,5,True);
                    FFlag(6);
                  end;}

      end;

     procedure WalkToMine;
      begin
        if(InvEmpty) then
          Writeln('Walking To Mine..');
        begin
           ClickNorth(SRL_ANGLE_HIGH);
          if ObjDTM_WalkPath(['117:55:5:0:7:72:143:1:7:23:80:1:7:26:27:1:7:46:36:0:7:134:87', '114:140:3:1:7:98:33:0:7:124:67:0:7:96:113', '43:114:3:0:7:30:89:0:7:43:133:0:7:67:55'],0,100,80,false, true) then
            begin
              Wait(1000+random(500));
              MakeCompass('W');
              if FindObjCustom(x,y,['limb-down','adder'],[4548989,2118252,1787227,2376274],15) then
                repeat
                  Wait(1000+random(500));
                  Writeln('Found Ladder, climbing down');
                  //Wait(1000+random(500));
                  //colorz:=GetColor(x,y);
                  Mouse(x,y,4,4,false)
                  ChooseOption('limb');
                  Wait(500+random(250));
                  Antiban;
                //until FindColorTolerance(x,y,5067905,MSX1,MSY1,MSX2,MSY2,3);
                until(IsMoving);
              //end else;
              //Writeln('Cannot Find Ladder.');
                  begin
                    Wait(250+random(225));
                    WalkToRocks;
        //ObjDTM_WalkPath(['129:92:3:5:7:111:97:5:7:142:94:5:7:119:78', '133:86:3:5:7:85:55:5:7:123:48:5:7:100:90'],0,100,80,false,true);
                  end;
          end;
        end;
     end;

     procedure WalkToLadder;
     begin
       ClickNorth(SRL_ANGLE_HIGH);
       Wait(1250+random(275));
       if FindDTMRotated(WalkingToUpLadder[0],x,y,MMX1,MMY1,MMX2,MMY2,-Pi/4,Pi/4,Pi/60,aFound) or FindDTMRotated(WalkingToUpLadder[2],x,y,MMX1,MMY1,MMX2,MMY2,-Pi/4,Pi/4,Pi/60,aFound) then
        begin
          Writeln('Walking to first DTM');
          Mouse(x,y,4,4,True);
          FFlag(6);
          repeat
            Wait(50+Random(25));
          until FindDTMRotated(WalkingToUpLadder[1],x,y,MMX1,MMY1,MMX2,MMY2,-Pi/4,Pi/4,Pi/60,aFound) or FindDTMRotated(WalkingToUpLadder[3],x,y,MMX1,MMY1,MMX2,MMY2,-Pi/4,Pi/4,Pi/60,aFound)
        end;
          if FindDTMRotated(WalkingToUpLadder[1],x,y,MMX1,MMY1,MMX2,MMY2,-Pi/4,Pi/4,Pi/60,aFound) or FindDTMRotated(WalkingToUpLadder[3],x,y,MMX1,MMY1,MMX2,MMY2,-Pi/4,Pi/4,Pi/60,aFound) then
            begin
              Writeln('Walking to second DTM');
              Mouse(x,y,4,4,True);
              FFlag(6);
            end;
     end;

     procedure WalkToBank;
      begin
        if(InvFull) then
          begin
            WalkToLadder;
          end;
          //if ObjDTM_WalkPath(['28:76:4:5:7:46:59:5:7:85:62:5:7:77:90:5:7:46:90', '52:105:5:5:7:35:82:5:7:85:63:5:7:104:82:5:7:79:117:5:7:35:112', '38:86:4:5:7:62:70:5:7:96:59:5:7:109:93:5:7:54:86', '33:64:4:5:7:81:59:5:7:104:55:5:7:104:86:5:7:89:82'],0,100,80,false,true) then
            begin
             if FindObjCustom(x,y,['limb-up','adder'],[3751746,4541776,3226432,4410190],15) then
              repeat
                //MakeCompass('W');
                SetAngle(AngleHigh);
                Wait(1000+random(500));
                Writeln('Found Ladder, climbing down');
                //Wait(1000+random(500));
                //colorz:=GetColor(x,y);
                Mouse(x,y,4,4,false)
                ChooseOption('limb');
                Wait(500+random(250));
                Antiban;
            //until FindColorTolerance(x,y,5067905,MSX1,MSY1,MSX2,MSY2,3);
              until(IsMoving);
            end;
              begin
                Wait(1250+random(275));
                MakeCompass('N');
                ObjDTM_WalkPath(['117:89:3:0:7:38:81:0:7:66:55:0:7:79:101', '54:25:3:0:7:42:97:0:7:29:52:0:7:66:18', '35:59:3:0:7:68:143:0:7:28:124:0:7:91:68'],0,100,80,false,true);
              end;
     end;
    //end;

     procedure Banking;
     begin
      if(InvFull) then
        begin
          SetAngle(AngleHigh);
            repeat
              WriteLn('Inventory full, banking.');
              OpenBankFast('feb');
                if(PinScreen)then
                  InPin(Players[CurrentPlayer].Pin );
                if(BankScreen) then
                  DepositAll;
                  CloseBank;
            until(InvEmpty);
       end;
    end;

     procedure DeclareDTMs;
     begin
       WalkingToOres[0] := DTMFromString('mggAAAHicY2MAAlYGhmMsDAx7gPg0lH4OxKeAUoeA+AIQrwbiDUB8FYhdLHUYInR5GMw15Ris9BQYzLXlGBwdPBi4gHLYMCMODAEAaN0MZw==');
       WalkingToOres[1] := DTMFromString('mbQAAAHicY2VgYHjGwsBwCIhLgfgtEL8B4kdA8TVAfAWIXwPxeiB2s1ZmcHZ1Z4gy4mb49OULQ2RMNAM7UBwdM2LBYAAABK4OKA==');
       WalkingToOres[2] := DTMFromString('mggAAAHicY2NgYNjHwsCQCMTLgXgvEM8G4llA3A+UawLiGCCeA8R5QDwJiN0s1RiidNkYIsPDGF6/+8bw6f17BnMTYwYuoBw2zIgDQwAABfMPlw==');
       WalkingToUpLadder[0] := DTMFromString('mggAAAHicY2NgYFjMwsAwF4gnAPEHIN4OxLuBeClQrhGIDwDxbCDeCsT9QOxsocXw/elLBmNNaQZDVSkGExNzhrDwKAYuoBw2zIgDQwAA8YIOTw==');
       WalkingToUpLadder[1] := DTMFromString('mbQAAAHicY2VgYOhlYWA4AMXngfgSEK8Gis8E4jNAvAuIVwKxpZ4sw/enLxkM1aUYHBzcGMLCoxi4gOLomBELBgMAt1IM+g==');
       WalkingToUpLadder[2] := DTMFromString('mggAAAHicY2NgYNjEwsCwlwVC3wHi00B8HYinA+VWAnECEE8E4kogXgLEHubqDJ8+fWFw0JNhcLN3YYgJi2Cw1pRi4ALKYcOMODAEAAAVOg6n');
       WalkingToUpLadder[3] := DTMFromString('mggAAAHicY2NgYJjPwsAwC4h3AfFuIF4JxIeAuAso1wnErUA8C4hnAnEJEDvoyTDE6nAwxIRFMOhraDN8ffcRjLmActgwIw4MAQAnyRAI');
     end;

     procedure FreeDTMs;
     begin;
      FreeDTM(WalkingToOres[0]);
      FreeDTM(WalkingToOres[1]);
      FreeDTM(WalkingToOres[2]);
      FreeDTM(WalkingToUpLadder[0]);
      FreeDTM(WalkingToUpLadder[1]);
     end;

     procedure MineRocks;
      begin
        repeat
          MineMithril;
          Writeln('Starting Mith Loop');
          MineCoal;
          Writeln('Starting Coal Loop');
        until(InvFull);
     end;
      //Exit;

      procedure Setup;
      begin
        Smart_Server := 135;
        Smart_Members := false;
        Smart_Signed := True;
        Smart_SuperDetail := False;
        SetupSRL;
        ActivateClient;
        ObjDTM_Setup;
        DeclarePlayers;
      end;

      procedure WalkingTo;
      begin
        DeclareDTMs;
        WalkToMine;
        FreeDTMs;
      end;

      procedure Walkingback;
      begin
        if(InvFull) then
          begin
            Writeln('Time to walk to bank..');
            DeclareDTMs;
            Writeln('DTMs declared');
            WalkToBank;
            FreeDTMs;
          end;
      end;

    begin
      Setup;
      ClearDebug;
      if not(LoggedIn) then
      LogInPlayer;
      repeat
      //WalkingTo;
      MineRocks;
      Walkingback;
      Banking;
      until(false);
    end.
    Last edited by jatex; 01-23-2012 at 04:15 AM.

  2. #2
    Join Date
    Dec 2011
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Beta Tester here this click out of area mining (black area out of mining guild) can modify this please?
    Last edited by Tuning1st; 01-23-2012 at 04:52 AM.

  3. #3
    Join Date
    Jan 2012
    Posts
    470
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    hey does it support coal bag?

  4. #4
    Join Date
    Jan 2012
    Posts
    62
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Is this good? Any bugs? If any, will you fix them? Strongly waiting to see if this is good.

  5. #5
    Join Date
    Feb 2012
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    its good but when it goes bank it stops fix it please

  6. #6
    Join Date
    Jan 2012
    Posts
    62
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Exception in Script: Unable to find file 'ObjectDTM\ObjDTMInclude.simba' used from ''

  7. #7
    Join Date
    Mar 2012
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah, mine stops there too. No luck with just some small edits, though I didn't try much.

  8. #8
    Join Date
    Sep 2006
    Posts
    89
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I edited this and got it to work pretty well. I'd suggest getting Waygon (?)'s map tool (Check the utilities section of the scripts) and editing the unstuck coords, editing the isoremined click times...otherwise it works pretty decently.

  9. #9
    Join Date
    Oct 2007
    Posts
    184
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    nice, may i will post a proggy later, when i finish botting runecrafting

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
  •