Results 1 to 16 of 16

Thread: [R]Lumbridge West Swamp Miner + Banker

  1. #1
    Join Date
    Oct 2006
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default [R]Lumbridge West Swamp Miner + Banker

    You will need reflection to run this script.
    Start your character(s) in the mine near a rock you want to mine.

    This script is designed to mine any combination of coal, mithril, and adamantite at the west Lumbridge swamp mine. It will then bank in Draynor.

    I'd appreciate any feedback you can give.

    Progress Report -
    Code:
    /*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/
    Bbri06s Lumbridge Swamp Miner 
    Time running: 3 Hours, 18 Minutes and 3 Seconds
    
    - Current Character Report -
    Banked 153 mithril ores.
    Banked 431 coal ores.
    Banked 0 adamantite ores.
    
    - Combined Report -
    Banked 153 mithril ores.
    Banked 431 coal ores.
    Banked 0 adamantite ores.
    /*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/
    Code:
    /*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/
    Bbri06s Lumbridge Swamp Miner 
    Time running: 4 Hours, 2 Minutes and 3 Seconds
    
    - Current Character Report -
    Banked 159 mithril ores.
    Banked 506 coal ores.
    Banked 0 adamantite ores.
    
    - Combined Report -
    Banked 159 mithril ores.
    Banked 506 coal ores.
    Banked 0 adamantite ores.
    /*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/
    Last edited by bbri06; 05-30-2010 at 03:39 AM.

  2. #2
    Join Date
    Dec 2006
    Location
    New York
    Posts
    473
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    first
    will test and post proggy!

  3. #3
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    No need for Players[].Integers[0]. You can simply do..

    Pascal Code:
    function HowManyRocks: Integer;
    var
      i: Integer;
    begin
      Result := 0;
      for i := 0 to 2 do
        IncEx(Result, BoolToInt(Players[CurrentPlayer].Booleans[i]));
    end;

    ^^ Less room for error setting up the script.

    Pascal Code:
    if (R >= 43) and (R <= 103) and (G >= 43) and (G <= 104) and (B >= 56) and (B <= 134) then

    Can be slightly shortened (I think it's better for readability, as well) to

    Pascal Code:
    if(InRange(R, 43, 103) and InRange(G, 43, 104) and InRange(B, 56, 134))then

    And the same goes for the other AC functions.

    I think there's one for extended, as well, but I'm not sure.

    IMPROMPTU FloatInRange!

    Add

    Pascal Code:
    {*******************************************************************************
    function FloatInRange(e, Min, Max: Extended): Boolean;
    by: i luffs yeww
    Description: Returns true if e is within Min and Max.
    *******************************************************************************}

    function FloatInRange(e, Min, Max: Extended): Boolean;
    begin
      Result := (e > Min) and (e < Max);
    end;

    to the beginning of script and instead of the ugly Z < 4.13 and Z > 2.61 gibberish, just do

    Pascal Code:
    if(FloatInRange(z, 1.3, 6.01))then

    etc.

    Also, in all of your AC functions you have an if then at then end, but you commented out the Writeln. So it won't do anything. Just sayin'.

    Pascal Code:
    StartP := 0; //StartP = 0
    z := 0; //z = 0
    for i := 0 to High(Path) do
    begin
      ThePoint := TileToMM(PointToTile(Path[i].x, Path[i].y));
      if(RS_OnMiniMap(ThePoint.x, ThePoint.y))then//also, below line could simply be if(i >= StartP)then :p
        if(i > StartP)or(i = StartP)then //if first point is found, then both i and StartP will be 0
        begin //#
          StartP := i; //StartP = i, so i will always be greater than or equal to i, so this will always happen //#
          z := z + 1; //This will always happen as well, so lines marked with # could be removed, I think.
        end; //#
    end;

    I think my logic is right for the above.

    Pascal Code:
    if(z = 0)then
      begin
        Writeln('No path points found... hmm..');
        Result := 0;
        Exit;
      end

    ^ Won't ever happen, I don't think.

    Pascal Code:
    for i := StartP to High(Path) do

    i and StartP will both be 15 at that point. (Or 14, I guess..)

    NoPath won't ever get past

    Pascal Code:
    z := WalkPath(Path);

    according to what I posted above.

    Pascal Code:
    if(Length(TPA) > 4)then
      Result := True;

    ==

    Pascal Code:
    Result := (Length(TPA) > 4);

    x]

    Pascal Code:
    if(BadCount > 2)then
      Result := False
    else
      Result := True;

    ==

    Pascal Code:
    Result := (BadCount < 3);



    Pascal Code:
    if(GetAnimation = 624)then
      Result := True
    else
      Result := False;

    ==

    Pascal Code:
    Result := (GetAnimation = 624);

    Pascal Code:
    if(BankScreen)then
      Break;
    if(PinScreen)then
      Break;

    ==

    Pascal Code:
    if(BankScreen or PinScreen)then
      Break;

    Pascal Code:
    if(Players[CurrentPlayer].Booleans[3])then
              Deposit(1, 28, true)
            else
              Deposit(2, 28, true);

    ==

    Pascal Code:
    Deposit(1 + Players[CurrentPlayer].Booleans[3], 28, True);

    And this last one is just personal preference. I don't see any reason to show blank things like "Banked 0 coal ores."

    Pascal Code:
    procedure ProgressReport;
    begin
      Writeln('/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/');
      Writeln('Bbri06s Lumbridge Swamp Miner ');
      Writeln('Time running: ' + TimeRunning);
      Writeln('');
      Writeln('- Current Character Report -');
      if(Players[CurrentPlayer].Booleans[0])then
        Writeln('Banked ' + IntToStr(MOres[CurrentPlayer]) + ' mithril ores.');
      if(Players[CurrentPlayer].Booleans[1])then
        Writeln('Banked ' + IntToStr(COres[CurrentPlayer]) + ' coal ores.');
      if(Players[CurrentPlayer].Booleans[2])then
        Writeln('Banked ' + IntToStr(AOres[CurrentPlayer]) + ' adamantite ores.');
      Writeln('');
      Writeln('- Combined Report -');
      if(SumIntegerArray(MOres) > 0)then
        Writeln('Banked ' + IntToStr(SumIntegerArray(MOres)) + 'mithril ores.');
      if(SumIntegerArray(COres) > 0)then
        Writeln('Banked ' + IntToStr(SumIntegerArray(COres)) + ' coal ores.');
      if(SumIntegerArray(AOres) > 0)then
        Writeln('Banked ' + IntToStr(SumIntegerArray(AOres)) + ' adamantite ores.');
      Writeln('/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/');
    end;

    I ALSO SUGGEST THAT FloatInRange(e, Min, Max: Extended): Boolean; is to be added to SRL/MML!
    Last edited by i luffs yeww; 05-29-2010 at 10:42 PM.

  4. #4
    Join Date
    Oct 2006
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by i luffs yeww View Post
    No need for Players[].Integers[0]. You can simply do..

    Pascal Code:
    function HowManyRocks: Integer;
    var
      i: Integer;
    begin
      Result := 0;
      for i := 0 to 2 do
        IncEx(Result, BoolToInt(Players[CurrentPlayer].Booleans[i]));
    end;

    ^^ Less room for error setting up the script.
    There is no BoolToInt function as far as I know, and I don't really think it's to much of a hassle to put in a number.

    Pascal Code:
    if (R >= 43) and (R <= 103) and (G >= 43) and (G <= 104) and (B >= 56) and (B <= 134) then

    Can be slightly shortened (I think it's better for readability, as well) to
    I just use ACA for all my AC functions and whatever it spits out I use.

    Also, in all of your AC functions you have an if then at then end, but you commented out the Writeln. So it won't do anything. Just sayin'.
    Fixed that.

    Pascal Code:
    StartP := 0; //StartP = 0
    z := 0; //z = 0
    for i := 0 to High(Path) do
    begin
      ThePoint := TileToMM(PointToTile(Path[i].x, Path[i].y));
      if(RS_OnMiniMap(ThePoint.x, ThePoint.y))then//also, below line could simply be if(i >= StartP)then :p Bbri06: fixed it
        if(i > StartP)or(i = StartP)then //if first point is found, then both i and StartP will be 0
        begin //#
          StartP := i; //StartP = i, so i will always be greater than or equal to i, so this will always happen //# Bbri06: StartP = i doesn't set StartP equal to i, it checks to see if it is. StartP := to i would set them equal, I believe.
          z := z + 1; //This will always happen as well, so lines marked with # could be removed, I think.
        end; //#
    end;
    Pascal Code:
    if(z = 0)then
      begin
        Writeln('No path points found... hmm..');
        Result := 0;
        Exit;
      end

    ^ Won't ever happen, I don't think.
    Highly unlikely to happen, but if there are no tiles that I am searching for on the minimap, then it will.

    Pascal Code:
    for i := StartP to High(Path) do

    i and StartP will both be 15 at that point. (Or 14, I guess..)
    Not always. If tile[i] wasn't on the map then StartP won't change.

    NoPath won't ever get past

    Pascal Code:
    z := WalkPath(Path);

    according to what I posted above.
    But it does because z can be 0 and I've seen it happen while testing

    Pascal Code:
    if(Length(TPA) > 4)then
      Result := True;
    ...
    ...
    ...
    Fixed all the result stuff, thanks.

    Pascal Code:
    Deposit(1 + Players[CurrentPlayer].Booleans[3], 28, True);
    You cannot add 1 to a boolean

    ~~

    Thanks for the feedback

  5. #5
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Pascal Code:
    var
      wat: Boolean;

    begin
      wat := True;
      Writeln(1 + Integer(wat));
    end.

    That's what I meant to do. But Wizzup? frowns upon type changes, I think. So it's up to you. It'd just make it a little shorter, and look sexier in my opinion.

    And for the BoolToInt I used before, replace BoolToInt with Integer. But yeah, it doesn't really matter for having that extra Integer setting in DeclarePlayers.

  6. #6
    Join Date
    Oct 2006
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Uploaded a small update with a couple more fail safes.

  7. #7
    Join Date
    Jul 2009
    Posts
    206
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    any chance u could make it superheat your ores so u can stay there longer and get more profit and xp? just a thought, but i will try this soon

  8. #8
    Join Date
    Dec 2006
    Location
    New York
    Posts
    473
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Bbri06s Lumbridge Swamp Miner
    Time running: 1 Hours, 36 Minutes and 33 Seconds

    - Current Character Report -
    Banked 55 mithril ores.
    Banked 112 coal ores.
    Banked 0 adamantite ores.
    Don't know why it stopped working, found player in the mine

  9. #9
    Join Date
    Sep 2009
    Location
    Pennsylvania
    Posts
    85
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Reserved for proggy to come... as soon as I can get about 60 mining, will test.

    Or rather, for reflection to be released... which, thank god, is gonna be pretty soon! <a week? 2 weeks?
    Last edited by Najorin; 06-03-2010 at 03:24 AM.

  10. #10
    Join Date
    Oct 2006
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by kevinconklin View Post
    any chance u could make it superheat your ores so u can stay there longer and get more profit and xp? just a thought, but i will try this soon
    It's a possibility.

    Quote Originally Posted by gamer716 View Post
    Don't know why it stopped working, found player in the mine
    I can't really say either. A few lines of debug above where it stopped working would help me figure it out.

  11. #11
    Join Date
    Feb 2007
    Posts
    29
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    This gives me a compile error for some reason...

    [Error] C:\Program Files (x86)\Simba\Includes\SRL/SRL/Reflection\./Core/Core.simba(108:3): Unknown identifier 'MarkTime' at line 107

  12. #12
    Join Date
    Jun 2007
    Posts
    98
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by JokeAss View Post
    This gives me a compile error for some reason...

    [Error] C:\Program Files (x86)\Simba\Includes\SRL/SRL/Reflection\./Core/Core.simba(108:3): Unknown identifier 'MarkTime' at line 107

    Yep this script don't work for me either. And i have run other scripts that require simba/refelction and works just fine. Soo it might be the script. Dont quote me on htat though.

  13. #13
    Join Date
    Oct 2006
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah... I haven't really updated this in a long time. You can consider it dead.

  14. #14
    Join Date
    Aug 2010
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Could you please update this

  15. #15
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    MSI supports Lumbridge west mine I believe.

  16. #16
    Join Date
    Aug 2010
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks

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
  •