Results 1 to 7 of 7

Thread: Not working....

  1. #1
    Join Date
    Sep 2007
    Location
    Pennsylvania
    Posts
    3,396
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Not working....

    I'm making a Dwarfen Mines Miner (nowhere near finished yet), but I'm testing the walking. It gets down the staircase fine, but then nothing happens. I've tested it by putting Writeln's in, but after doing the following...

    Mainloop
    then gets to ToMiningSpot
    Gets to ManualPickSpot

    and then doesn't get to SouthernCoal. It's probably some stupid mistake with cases or something, but I can't figure it out

    I'd appreciate any other suggestions

    SCAR Code:
    ////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////Runescapian's Dwarfen Mines Miner///////////////////////////////////
    //////////////////////////////////Version 1.0///////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////
    ///////This script mines and banks Iron, Copper, Tin, or Coal from the Dwarfen Mines////////
    ///////To run it, set up the stuff under 'const' and under 'procedure DeclarePlayers;'//////
    ///////Start at the Fally East bank.////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////
    ///////Now, we all know the big problem with the Dwarfen Mines - Scorpians. This ///////////
    ///////Script will evade those scorpians by choosing a spot suitable for your combat ///////
    ///////level. Anyone with Combat 65+ will be sent to the mines with scorpians //////////////
    ///////(level 65 because the King Scorpians are level 32 and will not attack anyone ////////
    ///////over twice their level). However, you have the option of choosing where to go ///////
    ///////if you want./////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////
    {
      There are many different mines to mine at. Below is a list.
     
      Scorpian infested
    (The center would be the big pillar west of the stairs when you go down)
    *Eastern Coal (ec)
    *Southern Coal (sc) //default for coal
    *Western Iron (wi) //default for iron
    *NorthWest Copper (nwc) //default for copper
    *NorthEast Tin (net) //default for tin
    *Northern Coal (nc)

      Safe spots (no scorpians)
    (The Center is where the iron, copper, and one tin rock are located)
    *SouthEast Tin (set)  //default for tin
    *Eastern Iron (ei)
    *Center Iron (ci) //default for iron
    *Center Copper (cc) //default for copper
    *SouthWest Copper (swc)

    **NOTE** - If you're under level 65 and you make it automatically pick a mine for you to mine coal, the script will go
    to the next player after walking down the stairs.

    So if you have a certain spot you want to mine at, put it in under the DeclarePlayers procedure
    where it asks for it.

    Remember, post progress reports on my thread and report any, I mean ANY, bugs you find. Whether
    it gets lost, goes to the wrong mine, whatever.

    Happy Autoing! :}



    program DwarfMiner;
    {.include SRL\SRL.scar}

    var x,y,lvl, x1, y1, x2, y2, centerDDTM, CenterTol, CenterArea: integer;

    const

      FirstPlayer = 0; //Player to start with
      world = 49;

    procedure DeclarePlayers;
    begin
         SRLID:= '';     //put in your SRL Stats ID
         SRLPassword:= '';     //put in your SRL Stats Password


         HowManyPlayers := 5;       //Leave these three lines be, unless you know what you're doing
         CurrentPlayer  := FirstPlayer;
         NumberOfPlayers(HowManyPlayers);

         Players[0].Name :='zezima';        //Runescape username
         Players[0].Pass :='gouliker'; //Runescape password
         Players[0].Nick :='ezim';    //3 letters from the middle of you Runescape username
         Players[0].Active:=True;        //Do you want to use this player?
         Players[0].Strings[0]:='rune'; //Type of pickaxe - 'rune', 'addy', 'mith', 'steel', 'iron', 'bronze'
         Players[0].Booleans[0]:=false; //Is the pickaxe equipped? true or false
         Players[0].Booleans[1]:=false; //Do you want the script to find out which mine to go to for the ore
                                        //you want (true), or do you want to set it (false)?
         Players[0].Strings[1]:='sc'; //if the above option is false, set your location (see beginning of
                                      //script to know what the following abbreviations mean) -
                                      //ec, sc, wi, nwc, net, nc
                                      //set, ei, ci, cc, swc
         Players[0].Strings[2]:='iron'; //type of ore you want to mine - tin, copper, iron, coal
         
         Players[1].Name :='';        //Runescape username
         Players[1].Pass :=''; //Runescape password
         Players[1].Nick :='nick';    //3 letters from the middle of you Runescape username
         Players[1].Active:=False;        //Do you want to use this player?
         Players[1].Strings[0]:='rune'; //Type of pickaxe - 'rune', 'addy', 'mith', 'steel', 'iron', 'bronze'
         Players[1].Booleans[0]:=false; //Is the pickaxe equipped? true or false
         Players[1].Booleans[1]:=true; //Do you want the script to find out which mine to go to for the ore
                                        //you want (true), or do you want to set it (false)?
         Players[1].Strings[1]:='ec'; //if the above option is false, set your location (see beginning of
                                      //script to know what the following abbreviations mean) -
                                      //ec, sc, wi, nwc, net, nc
                                      //set, ei, ci, cc, swc
         Players[1].Strings[2]:='iron'; //type of ore you want to mine - tin, copper, iron, coal
         
         Players[2].Name :='';        //Runescape username
         Players[2].Pass :=''; //Runescape password
         Players[2].Nick :='nick';    //3 letters from the middle of you Runescape username
         Players[2].Active:=False;        //Do you want to use this player?
         Players[2].Strings[0]:='rune'; //Type of pickaxe - 'rune', 'addy', 'mith', 'steel', 'iron', 'bronze'
         Players[2].Booleans[0]:=false; //Is the pickaxe equipped? true or false
         Players[2].Booleans[1]:=true; //Do you want the script to find out which mine to go to for the ore
                                        //you want (true), or do you want to set it (false)?
         Players[2].Strings[1]:='ec'; //if the above option is false, set your location (see beginning of
                                      //script to know what the following abbreviations mean) -
                                      //ec, sc, wi, nwc, net, nc
                                      //set, ei, ci, cc, swc
         Players[2].Strings[2]:='iron'; //type of ore you want to mine - tin, copper, iron, coal
         
         Players[3].Name :='';        //Runescape username
         Players[3].Pass :=''; //Runescape password
         Players[3].Nick :='nick';    //3 letters from the middle of you Runescape username
         Players[3].Active:=False;        //Do you want to use this player?
         Players[3].Strings[0]:='rune'; //Type of pickaxe - 'rune', 'addy', 'mith', 'steel', 'iron', 'bronze'
         Players[3].Booleans[0]:=false; //Is the pickaxe equipped? true or false
         Players[3].Booleans[1]:=true; //Do you want the script to find out which mine to go to for the ore
                                        //you want (true), or do you want to set it (false)?
         Players[3].Strings[1]:='ec'; //if the above option is false, set your location (see beginning of
                                      //script to know what the following abbreviations mean) -
                                      //ec, sc, wi, nwc, net, nc
                                      //set, ei, ci, cc, swc
         Players[3].Strings[2]:='iron'; //type of ore you want to mine - tin, copper, iron, coal
         
         Players[4].Name :='';        //Runescape username
         Players[4].Pass :=''; //Runescape password
         Players[4].Nick :='nick';    //3 letters from the middle of you Runescape username
         Players[4].Active:=False;        //Do you want to use this player?
         Players[4].Strings[0]:='rune'; //Type of pickaxe - 'rune', 'addy', 'mith', 'steel', 'iron', 'bronze'
         Players[4].Booleans[0]:=false; //Is the pickaxe equipped? true or false
         Players[4].Booleans[1]:=true; //Do you want the script to find out which mine to go to for the ore
                                        //you want (true), or do you want to set it (false)?
         Players[4].Strings[1]:='ec'; //if the above option is false, set your location (see beginning of
                                      //script to know what the following abbreviations mean) -
                                      //ec, sc, wi, nwc, net, nc
                                      //set, ei, ci, cc, swc
         Players[4].Strings[2]:='iron'; //type of ore you want to mine - tin, copper, iron, coal
         
    end;



    function LoadCenterDDTM: integer;
    var
      CenterMP: TDTMPointDef;
      CenterSP: array of TDTMPointDef;
      CenterDDTM: TDTM;
      CenterTol, CenterArea: Integer;
    begin

      CenterTol:=15;
      CenterArea:=1;
     
      SetArrayLength(CenterSP, 4);

      CenterMP.x := 567;
      CenterMP.y := 107;
      CenterMP.areasize := 1;
      CenterMP.areashape := 0;
      CenterMP.color := 6513497;
      CenterMP.tolerance := CenterTol;

      CenterSP[0].x := 565;
      CenterSP[0].y := 99;
      CenterSP[0].areasize := CenterArea;
      CenterSP[0].areashape := 0;
      CenterSP[0].color := 15658734;
      CenterSP[0].tolerance := CenterTol;

      CenterSP[1].x := 561;
      CenterSP[1].y := 113;
      CenterSP[1].areasize := CenterArea;
      CenterSP[1].areashape := 0;
      CenterSP[1].color := 2901347;
      CenterSP[1].tolerance := CenterTol;

      CenterSP[2].x := 558;
      CenterSP[2].y := 96;
      CenterSP[2].areasize := CenterArea;
      CenterSP[2].areashape := 0;
      CenterSP[2].color := 3092005;
      CenterSP[2].tolerance := CenterTol;
     
      CenterSP[3].x := 564;
      CenterSP[3].y := 99;
      CenterSP[3].areasize := CenterArea;
      CenterSP[3].areashape := 0;
      CenterSP[3].color := 15658734;
      CenterSP[3].tolerance := CenterTol;

      CenterDDTM.MainPoint :=  CenterMP;
      CenterDDTM.SubPoints :=  CenterSP;
      result := AddDTM(CenterDDTM);
    end;

    procedure TheDTMs;
    begin
      LoadCenterDDTM;
    end;

    procedure CheckSRLstats;
    begin
    end;

    function Picklost: Boolean;
    begin
    end;

    function Brokenpick : Boolean;
    begin
    end;

    function Lostpick : Boolean;
    begin
    end;

    procedure Findpickhead;
    begin
    end;

    function Findgas : Boolean;
    begin
    end;

    procedure Solvegas;
    begin
    end;

    procedure AntiRandom;
    begin
    end;

    procedure AntiBan;
    begin
    end;

    procedure Login;
    begin
      Disguise('DwarfMiner - Running');
      ActivateClient;
      if not (Loggedin) then Loginplayer;
      SetAngle(true);
      MakeCompass('N');
      SetBar('brightness', 4);
      Lvl:=GetCombatLevel;
    end;

    procedure Checkcblvl;
    begin
    end;

    procedure WalktoMine;

    begin
      RadialWalk(FindFallyRoadColor,40,110,72,99,99);
      FFlag(6);
      RadialWalk(FindFallyRoadColor,30,110,72,99,99);
      FFlag(6);
      RadialWalk(FindFallyRoadColor,50,120,72,99,99);
      if FindObjTPA(x,y, 7377573, 17, -1, 10, 10, 50, ['pen', 'oord']) then
        begin
          mouse(x,y,2,2,true);
          Writeln('Opened the door!');
        end;
      if FindObjTPA(x,y, 5790047, 17, -1, 10, 10, 50, ['own', 'case']) then
        begin
          mouse(x,y,2,2,true);
          Writeln('Going down the staircase...');
          if  Inchat('reach') then
            begin
              if FindObjTPA(x,y, 7377573, 17, -1, 10, 10, 50, ['pen', 'oord']) then
               begin
                 mouse(x,y,2,2,true);
                 Writeln('Opened the door!');
               end;
            end;
        end
      else
        begin
          writeln('Could not find stairs')
          NextPlayer(false);
        end;
    end;

    procedure EasternCoal;
    begin
    {You can see one coal rock. The Mining procedure waits for a total
    of 35 sec for a rock to show up.}

    end;

    procedure SouthernCoal;
    var looked,tried, rx,ry: integer;
    begin
      Writeln('check1');
      looked:=0;
      repeat
        if  FindDTM(CenterDDTM, x,y,x1,y1,x2,y2) then
          begin
            mouse(x,y,2,2,true);
            break;
          end
        else
          begin
            Centertol:=Centertol+3;
            Centerarea:=Centerarea+1;
            looked:=looked+1;
            if (looked=6) then
              begin
                NextPlayer(false);
                Writeln('Could not find the mining spot');
              end;
          end;
      until (looked=6);
      repeat
      if FindSymbolIn(rx, ry,'mining spot', 578, 87, 631, 120) then
        begin
          mouse(x,y,2,2,true);
          break;
        end;
      wait(1000);
      tried:=tried+1;
      until (tried=25);
      Writeln('We''''re at the mine!');
    end;

    procedure WesternIron;
    var looked,tried, rx,ry: integer;
    begin
      looked:=0;
      repeat
        if  FindDTM(CenterDDTM, x,y,x1,y1,x2,y2) then
          begin
            mouse(x,y,2,2,true);
            break;
          end
        else
          begin
            Centertol:=Centertol+3;
            Centerarea:=Centerarea+1;
            looked:=looked+1;
            if (looked=6) then
              begin
                NextPlayer(false);
                Writeln('Could not find the mining spot');
              end;
          end;
      until (looked=6);
      repeat
      if FindSymbolIn(rx, ry,'mining spot', 578, 87, 631, 120) then
        begin
          mouse(x,y,2,2,true);
          break;
        end;
      wait(1000);
      tried:=tried+1;
      until (tried=25);
      Writeln('We''''re at the mine!');
    end;

    procedure NorthWestCopper;
    begin
    end;

    procedure NorthEastTin;
    begin
    {You can see the tin rocks, no need to walk anywhere}
    end;

    procedure NorthernCoal;
    begin
    end;

    procedure SouthEastTin;
    begin
    end;

    procedure EasternIron;
    begin
    end;

    procedure CenterIron;
    begin
    end;

    procedure CenterCopper;
    begin
    end;

    procedure SouthWestCopper;
    begin
    end;

    procedure Autopickspot;
    begin
      if(Lvl<65) then
        begin
          case Players[CurrentPlayer].Strings[2] of
            'coal' : SouthernCoal;
            'iron' : WesternIron;
            'copper' : NorthWestCopper;
            'tin' : NorthEastTin;
          end;
        end
      else
        begin
          case Players[CurrentPlayer].Strings[2] of
            'tin' : SouthEastTin;
            'iron' : CenterIron;
            'copper' : CenterCopper;
            'coal' : begin
                       Writeln('There is no coal for characters under 65. If you would still like to mine coal, please restart the script and set your own location');
                       NextPlayer(false);
                     end;
          end;
        end;
    end;

    procedure Manualpickspot;
    begin
      case Players[CurrentPlayer].Strings[2] of
        'ec' : EasternCoal;
        'sc' : SouthernCoal;
        'wi' : WesternIron;
        'nwc' : NorthWestCopper;
        'net' : NorthEastTin;
        'nc' : NorthernCoal;
        'set' : SouthEastTin;
        'ei' : EasternIron;
        'ci' : CenterIron;
        'cc' : CenterCopper;
        'swc' : SouthWestCopper;
      end;
    end;

    procedure ToMiningSpot;
    begin
      if (Players[CurrentPlayer].Booleans[1] = true) then
        begin
          AutoPickSpot;
        end
      else
        begin
          ManualPickSpot;
        end;
    end;

    procedure Minetheore;
    begin
    end;

    procedure Walktobank;
    begin
    end;

    procedure Bankore;
    begin
    end;


    begin
      SetupSRL;
      DeclarePlayers;
      Login;
      TheDTMs;
      //WalktoMine;
      ToMiningSpot;
      Disguise('DwarfMiner - Stopped');
    end.

  2. #2
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Instead of FindDTM, use DTMRotated, use if RadialWalk(bla) then and does the Xmod and the Ymod works for you at 99?


  3. #3
    Join Date
    Sep 2007
    Location
    Pennsylvania
    Posts
    3,396
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    The radialwalking works. My problem is that it never starts the SouthernCoal procedure :/

  4. #4
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Use DTMRotated or FindDTMRotated for the DDTM Finding instead of FindDTM


  5. #5
    Join Date
    Sep 2007
    Location
    Pennsylvania
    Posts
    3,396
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I mean it never starts. The writeln never happens.

  6. #6
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    In manualpickspot you put the Strings[2] as the case. You need Strings[1] because that is the abbreviation or whatever.

    SCAR Code:
    ////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////Runescapian's Dwarfen Mines Miner///////////////////////////////////
    //////////////////////////////////Version 1.0///////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////
    ///////This script mines and banks Iron, Copper, Tin, or Coal from the Dwarfen Mines////////
    ///////To run it, set up the stuff under 'const' and under 'procedure DeclarePlayers;'//////
    ///////Start at the Fally East bank.////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////
    ///////Now, we all know the big problem with the Dwarfen Mines - Scorpians. This ///////////
    ///////Script will evade those scorpians by choosing a spot suitable for your combat ///////
    ///////level. Anyone with Combat 65+ will be sent to the mines with scorpians //////////////
    ///////(level 65 because the King Scorpians are level 32 and will not attack anyone ////////
    ///////over twice their level). However, you have the option of choosing where to go ///////
    ///////if you want./////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////
    {
      There are many different mines to mine at. Below is a list.

      Scorpian infested
    (The center would be the big pillar west of the stairs when you go down)
    *Eastern Coal (ec)
    *Southern Coal (sc) //default for coal
    *Western Iron (wi) //default for iron
    *NorthWest Copper (nwc) //default for copper
    *NorthEast Tin (net) //default for tin
    *Northern Coal (nc)

      Safe spots (no scorpians)
    (The Center is where the iron, copper, and one tin rock are located)
    *SouthEast Tin (set)  //default for tin
    *Eastern Iron (ei)
    *Center Iron (ci) //default for iron
    *Center Copper (cc) //default for copper
    *SouthWest Copper (swc)

    **NOTE** - If you're under level 65 and you make it automatically pick a mine for you to mine coal, the script will go
    to the next player after walking down the stairs.

    So if you have a certain spot you want to mine at, put it in under the DeclarePlayers procedure
    where it asks for it.

    Remember, post progress reports on my thread and report any, I mean ANY, bugs you find. Whether
    it gets lost, goes to the wrong mine, whatever.

    Happy Autoing! :}



    program DwarfMiner;
    {.include SRL\SRL.scar}

    var x,y,lvl, x1, y1, x2, y2, centerDDTM, CenterTol, CenterArea: integer;

    const

      FirstPlayer = 0; //Player to start with
      world = 49;

    procedure DeclarePlayers;
    begin
         SRLID:= '';     //put in your SRL Stats ID
         SRLPassword:= '';     //put in your SRL Stats Password


         HowManyPlayers := 5;       //Leave these three lines be, unless you know what you're doing
         CurrentPlayer  := FirstPlayer;
         NumberOfPlayers(HowManyPlayers);

         Players[0].Name :='zezima';        //Runescape username
         Players[0].Pass :='gouliker'; //Runescape password
         Players[0].Nick :='ezim';    //3 letters from the middle of you Runescape username
         Players[0].Active:=True;        //Do you want to use this player?
         Players[0].Strings[0]:='rune'; //Type of pickaxe - 'rune', 'addy', 'mith', 'steel', 'iron', 'bronze'
         Players[0].Booleans[0]:=false; //Is the pickaxe equipped? true or false
         Players[0].Booleans[1]:=false; //Do you want the script to find out which mine to go to for the ore
                                        //you want (true), or do you want to set it (false)?
         Players[0].Strings[1]:='sc'; //if the above option is false, set your location (see beginning of
                                      //script to know what the following abbreviations mean) -
                                      //ec, sc, wi, nwc, net, nc
                                      //set, ei, ci, cc, swc
         Players[0].Strings[2]:='coal'; //type of ore you want to mine - tin, copper, iron, coal

         Players[1].Name :='';        //Runescape username
         Players[1].Pass :=''; //Runescape password
         Players[1].Nick :='nick';    //3 letters from the middle of you Runescape username
         Players[1].Active:=False;        //Do you want to use this player?
         Players[1].Strings[0]:='rune'; //Type of pickaxe - 'rune', 'addy', 'mith', 'steel', 'iron', 'bronze'
         Players[1].Booleans[0]:=false; //Is the pickaxe equipped? true or false
         Players[1].Booleans[1]:=true; //Do you want the script to find out which mine to go to for the ore
                                        //you want (true), or do you want to set it (false)?
         Players[1].Strings[1]:='ec'; //if the above option is false, set your location (see beginning of
                                      //script to know what the following abbreviations mean) -
                                      //ec, sc, wi, nwc, net, nc
                                      //set, ei, ci, cc, swc
         Players[1].Strings[2]:='iron'; //type of ore you want to mine - tin, copper, iron, coal

         Players[2].Name :='';        //Runescape username
         Players[2].Pass :=''; //Runescape password
         Players[2].Nick :='nick';    //3 letters from the middle of you Runescape username
         Players[2].Active:=False;        //Do you want to use this player?
         Players[2].Strings[0]:='rune'; //Type of pickaxe - 'rune', 'addy', 'mith', 'steel', 'iron', 'bronze'
         Players[2].Booleans[0]:=false; //Is the pickaxe equipped? true or false
         Players[2].Booleans[1]:=true; //Do you want the script to find out which mine to go to for the ore
                                        //you want (true), or do you want to set it (false)?
         Players[2].Strings[1]:='ec'; //if the above option is false, set your location (see beginning of
                                      //script to know what the following abbreviations mean) -
                                      //ec, sc, wi, nwc, net, nc
                                      //set, ei, ci, cc, swc
         Players[2].Strings[2]:='iron'; //type of ore you want to mine - tin, copper, iron, coal

         Players[3].Name :='';        //Runescape username
         Players[3].Pass :=''; //Runescape password
         Players[3].Nick :='nick';    //3 letters from the middle of you Runescape username
         Players[3].Active:=False;        //Do you want to use this player?
         Players[3].Strings[0]:='rune'; //Type of pickaxe - 'rune', 'addy', 'mith', 'steel', 'iron', 'bronze'
         Players[3].Booleans[0]:=false; //Is the pickaxe equipped? true or false
         Players[3].Booleans[1]:=true; //Do you want the script to find out which mine to go to for the ore
                                        //you want (true), or do you want to set it (false)?
         Players[3].Strings[1]:='ec'; //if the above option is false, set your location (see beginning of
                                      //script to know what the following abbreviations mean) -
                                      //ec, sc, wi, nwc, net, nc
                                      //set, ei, ci, cc, swc
         Players[3].Strings[2]:='iron'; //type of ore you want to mine - tin, copper, iron, coal

         Players[4].Name :='';        //Runescape username
         Players[4].Pass :=''; //Runescape password
         Players[4].Nick :='nick';    //3 letters from the middle of you Runescape username
         Players[4].Active:=False;        //Do you want to use this player?
         Players[4].Strings[0]:='rune'; //Type of pickaxe - 'rune', 'addy', 'mith', 'steel', 'iron', 'bronze'
         Players[4].Booleans[0]:=false; //Is the pickaxe equipped? true or false
         Players[4].Booleans[1]:=true; //Do you want the script to find out which mine to go to for the ore
                                        //you want (true), or do you want to set it (false)?
         Players[4].Strings[1]:='ec'; //if the above option is false, set your location (see beginning of
                                      //script to know what the following abbreviations mean) -
                                      //ec, sc, wi, nwc, net, nc
                                      //set, ei, ci, cc, swc
         Players[4].Strings[2]:='iron'; //type of ore you want to mine - tin, copper, iron, coal

    end;



    function LoadCenterDDTM: integer;
    var
      CenterMP: TDTMPointDef;
      CenterSP: array of TDTMPointDef;
      CenterDDTM: TDTM;
      CenterTol, CenterArea: Integer;
    begin

      CenterTol:=15;
      CenterArea:=1;

      SetArrayLength(CenterSP, 4);

      CenterMP.x := 567;
      CenterMP.y := 107;
      CenterMP.areasize := 1;
      CenterMP.areashape := 0;
      CenterMP.color := 6513497;
      CenterMP.tolerance := CenterTol;

      CenterSP[0].x := 565;
      CenterSP[0].y := 99;
      CenterSP[0].areasize := CenterArea;
      CenterSP[0].areashape := 0;
      CenterSP[0].color := 15658734;
      CenterSP[0].tolerance := CenterTol;

      CenterSP[1].x := 561;
      CenterSP[1].y := 113;
      CenterSP[1].areasize := CenterArea;
      CenterSP[1].areashape := 0;
      CenterSP[1].color := 2901347;
      CenterSP[1].tolerance := CenterTol;

      CenterSP[2].x := 558;
      CenterSP[2].y := 96;
      CenterSP[2].areasize := CenterArea;
      CenterSP[2].areashape := 0;
      CenterSP[2].color := 3092005;
      CenterSP[2].tolerance := CenterTol;

      CenterSP[3].x := 564;
      CenterSP[3].y := 99;
      CenterSP[3].areasize := CenterArea;
      CenterSP[3].areashape := 0;
      CenterSP[3].color := 15658734;
      CenterSP[3].tolerance := CenterTol;

      CenterDDTM.MainPoint :=  CenterMP;
      CenterDDTM.SubPoints :=  CenterSP;
      result := AddDTM(CenterDDTM);
    end;

    procedure TheDTMs;
    begin
      LoadCenterDDTM;
    end;

    procedure CheckSRLstats;
    begin
    end;

    function Picklost: Boolean;
    begin
    end;

    function Brokenpick : Boolean;
    begin
    end;

    function Lostpick : Boolean;
    begin
    end;

    procedure Findpickhead;
    begin
    end;

    function Findgas : Boolean;
    begin
    end;

    procedure Solvegas;
    begin
    end;

    procedure AntiRandom;
    begin
    end;

    procedure AntiBan;
    begin
    end;

    procedure Login;
    begin
      Disguise('DwarfMiner - Running');
      ActivateClient;
      if not (Loggedin) then Loginplayer;
      SetAngle(true);
      MakeCompass('N');
      SetBar('brightness', 4);
      Lvl:=GetCombatLevel;
    end;

    procedure Checkcblvl;
    begin
    end;

    procedure WalktoMine;

    begin
      RadialWalk(FindFallyRoadColor,40,110,72,99,99);
      FFlag(6);
      RadialWalk(FindFallyRoadColor,30,110,72,99,99);
      FFlag(6);
      RadialWalk(FindFallyRoadColor,50,120,72,99,99);
      if FindObjTPA(x,y, 7377573, 17, -1, 10, 10, 50, ['pen', 'oord']) then
        begin
          mouse(x,y,2,2,true);
          Writeln('Opened the door!');
        end;
      if FindObjTPA(x,y, 5790047, 17, -1, 10, 10, 50, ['own', 'case']) then
        begin
          mouse(x,y,2,2,true);
          Writeln('Going down the staircase...');
          if  Inchat('reach') then
            begin
              if FindObjTPA(x,y, 7377573, 17, -1, 10, 10, 50, ['pen', 'oord']) then
               begin
                 mouse(x,y,2,2,true);
                 Writeln('Opened the door!');
               end;
            end;
        end
      else
        begin
          writeln('Could not find stairs')
          NextPlayer(false);
        end;
    end;

    procedure EasternCoal;
    begin
    {You can see one coal rock. The Mining procedure waits for a total
    of 35 sec for a rock to show up.}

    end;

    procedure SouthernCoal;
    var looked,tried, rx,ry: integer;
    begin
      Writeln('check1');
      looked:=0;
      repeat
        if  FindDTM(CenterDDTM, x,y,x1,y1,x2,y2) then
          begin
            mouse(x,y,2,2,true);
            break;
          end
        else
          begin
            Centertol:=Centertol+3;
            Centerarea:=Centerarea+1;
            looked:=looked+1;
            if (looked=6) then
              begin
                NextPlayer(false);
                Writeln('Could not find the mining spot');
              end;
          end;
      until (looked=6);
      repeat
      if FindSymbolIn(rx, ry,'mining spot', 578, 87, 631, 120) then
        begin
          mouse(x,y,2,2,true);
          break;
        end;
      wait(1000);
      tried:=tried+1;
      until (tried=25);
      Writeln('We''''re at the mine!');
    end;

    procedure WesternIron;
    var looked,tried, rx,ry: integer;
    begin
      looked:=0;
      repeat
        if  FindDTM(CenterDDTM, x,y,x1,y1,x2,y2) then
          begin
            mouse(x,y,2,2,true);
            break;
          end
        else
          begin
            Centertol:=Centertol+3;
            Centerarea:=Centerarea+1;
            looked:=looked+1;
            if (looked=6) then
              begin
                NextPlayer(false);
                Writeln('Could not find the mining spot');
              end;
          end;
      until (looked=6);
      repeat
      if FindSymbolIn(rx, ry,'mining spot', 578, 87, 631, 120) then
        begin
          mouse(x,y,2,2,true);
          break;
        end;
      wait(1000);
      tried:=tried+1;
      until (tried=25);
      Writeln('We''''re at the mine!');
    end;

    procedure NorthWestCopper;
    begin
    end;

    procedure NorthEastTin;
    begin
    {You can see the tin rocks, no need to walk anywhere}
    end;

    procedure NorthernCoal;
    begin
    end;

    procedure SouthEastTin;
    begin
    end;

    procedure EasternIron;
    begin
    end;

    procedure CenterIron;
    begin
    end;

    procedure CenterCopper;
    begin
    end;

    procedure SouthWestCopper;
    begin
    end;

    procedure Autopickspot;
    begin
      if(Lvl<65) then
        begin
          case Players[CurrentPlayer].Strings[2] of
            'coal' : SouthernCoal;
            'iron' : WesternIron;
            'copper' : NorthWestCopper;
            'tin' : NorthEastTin;
          end;
        end
      else
        begin
          case Players[CurrentPlayer].Strings[2] of
            'tin' : SouthEastTin;
            'iron' : CenterIron;
            'copper' : CenterCopper;
            'coal' : begin
                       Writeln('There is no coal for characters under 65. If you would still like to mine coal, please restart the script and set your own location');
                       NextPlayer(false);
                     end;
          end;
        end;
    end;

    procedure Manualpickspot;
    begin
      case Players[CurrentPlayer].Strings[1] of
        'ec' : EasternCoal;
        'sc' : SouthernCoal;
        'wi' : WesternIron;
        'nwc' : NorthWestCopper;
        'net' : NorthEastTin;
        'nc' : NorthernCoal;
        'set' : SouthEastTin;
        'ei' : EasternIron;
        'ci' : CenterIron;
        'cc' : CenterCopper;
        'swc' : SouthWestCopper;
      end;
    end;

    procedure ToMiningSpot;
    begin
      if (Players[CurrentPlayer].Booleans[1] = true) then
        begin
          AutoPickSpot;
        end
      else
        begin
          ManualPickSpot;
        end;
    end;

    procedure Minetheore;
    begin
    end;

    procedure Walktobank;
    begin
    end;

    procedure Bankore;
    begin
    end;


    begin
      SetupSRL;
      DeclarePlayers;
      Login;
      TheDTMs;
      WalktoMine;
      ToMiningSpot;
      Disguise('DwarfMiner - Stopped');
    end.

  7. #7
    Join Date
    Sep 2007
    Location
    Pennsylvania
    Posts
    3,396
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default



    Thanks, i knew it was something stupid

    Rep++ when I'm allowed to rep you again

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. is srl working yet.
    By th3ko in forum NOTA
    Replies: 2
    Last Post: 10-20-2008, 08:06 PM
  2. ~~~~Working Edge cooker WORKING~~~
    By NiCbaZ in forum RS3 Outdated / Broken Scripts
    Replies: 5
    Last Post: 10-29-2007, 11:16 PM
  3. [Working on].:Autoseller:.[/Working on]
    By dritar in forum First Scripts
    Replies: 10
    Last Post: 10-07-2007, 06:13 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
  •