Page 1 of 2 12 LastLast
Results 1 to 25 of 29

Thread: [Color][WorldSwitching] Runite Miner at 'Resource Dungeon'

  1. #1
    Join Date
    Nov 2011
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default [Color][WorldSwitching] Runite Miner at 'Resource Dungeon'

    Mines runite ores in Resource dungeon, switches worlds and banks when inventory full.
    Not the best, but it does its job.
    Does not have progress report!
    All the suggestions on what to implement/fix are welcome!
    Quickly made, so dont blame me if it f...s up, it has bugs i know.
    Start by the bank, rune pickaxe in inventories first slot or equipped.
    Simba Code:
    program RuniteMiner;
    {$DEFINE SMART}
      {.include SRL/SRL.scar}
        {$i sps/sps.simba}


    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1; // This is set to the total amount of players (more on multiplayer later ;)), for now, just keep it set as 1
      NumberOfPlayers(HowManyPlayers); // This is a procedure in SRL which sets up player arrays (also, more on that later), this will always be the same
      CurrentPlayer := 0; // This is the player to start with; the first player will always be 0 (you'll find out when you learn all about arrays)

      Players[0].Name := ''; // Username
      Players[0].Pass := ''; // Password
      Players[0].Nick := ''; // 3-4 lowercase letters from username; used for random event detection
      Players[0].Active := True; // Set to true if you want to use Player 0
      Players[0].Pin := ''; // Leave blank if the player doesn't have a bank pin

    end;


     const
    Bankcolor1=5469842;
    Bankcolor2=3233901;
    Laddercolor1=4091785;
    Laddercolor2=2315631;
    Entrancecolor1=4410514;
    Entrancecolor2=2898100;
    runitecolor1=15919011;
    runitecolor2=15787682;
    Laddercolor3=4541776;
    Laddercolor4=4673362;

    Procedure Start;
    Begin

      If(Not(LoggedIn))then
        LogInPlayer;
      Writeln('Starting...');
      Wait(RandomRange(1000, 1500));
      FindNormalRandoms;
      SetAngle(true)
    end;


    var
      I: Integer;



    Function ChatCheck: Boolean;
    var
      i, l : Integer;
      b : Boolean;
    begin
         if (Pos('anage', GetBlackChatMessage) > 0)then
        begin
           Writeln('Mined runite ore!');
           Result:=True;
      end;
    end;



    Function MineOre: boolean;
    var
      x, y : Integer;
    begin
      if not LoggedIn then Exit;
      if  FindObjCustom(x, y, ['ine', 'ocks'], [runitecolor1, runitecolor2], 5) then
      begin
          Writeln('Found Runite ore!');
          Mouse(x, y, 0, 0, true);
          Result:=True;
          Wait(3000 + Random(100));
        end else begin
          Writeln('Did not find runite ore!');

      end;
     end;

    Procedure MineProcess;
    var
    x,y: integer;
    begin
     repeat
      Mineore;
      wait(3300+RandomRange(20,80))
      ChatCheck;
      if InvFull=true then break;
       if (not(FindObjCustom(x, y, ['ine', 'ocks'], [runitecolor1, runitecolor2], 5))) then break;
     until(ChatCheck=true)
     end;

    Function MineAfterRelog: Boolean;
    begin
       Mineore;
        MineProcess;
       wait(2300+RandomRange(20,80))
       Mineore;
        MineProcess;
       SetAngle(false)
       Makecompass(60)
       wait(2300+RandomRange(20,80))
       Mineore;
        MineProcess;
       SetAngle(true)
       wait(2300+RandomRange(20,80))
    end;




    Procedure Spot3;
    var
    x, y: Integer;
    begin
    MakeCompass(30)
     If findcolortolerance(x,y,3026728,604 ,111 ,621 ,120, 15)then
     begin
         Mouse(x,y,1,1,true)
        end else begin
          Writeln('Did not find spot3!');
      end;
    end;

    Procedure Spot2;
    var
    x, y: Integer;
    begin
     If findcolortolerance(x,y,3421497,645 ,87 ,661 ,112, 15)then
     begin
         Mouse(x,y,1,1,true)
        end else begin
          Writeln('Did not find spot2!');
      end;
    end;

    procedure Spot;
    var
    x, y: Integer;
    begin
     If findcolortolerance(x,y,5796742,626 ,104 ,635 ,117, 15)then
     begin
         Mouse(x,y,1,1,true)
        end else begin
          Writeln('Did not find spot!');
      end;
    end;

     Function Pin: Boolean;
     begin
     if not (BankScreen) then
      begin
           if PinScreen then
      begin
        Writeln('Entering Pin...');
        repeat
          InPin(Players[CurrentPlayer].Pin);
        until (BankScreen)
        end;
      end;
     end;


    Procedure Bank;
    var x,y :Integer;
    begin
       if FindObjCustom(x, y, ['ank', 'ooth'], [Bankcolor1, Bankcolor2], 5) then
      begin
        Writeln('Found Bank booth!');
          Mouse(x, y, 0, 0, false);
        wait(300+RandomRange(20,80))
        end;
       if ChooseOption('uickly') then
       begin
       wait(2300+RandomRange(20,80))
           Pin;
     if (BankScreen) then
      begin
         wait(1300+RandomRange(20,80))
         Deposit(2,28,true);
         end else
      if not (BankScreen) then
      begin
        Bank;
         end;
        end;
    end;
     Procedure WithdrawPickaxe;
     var
     x,y: integer;
     begin
     if  FindObjCustom(x, y, ['une', 'ickaxe'], [11706488, 7299914], 5) then
        begin
          Mouse(x, y, 0, 0, true);
        end else begin
          Writeln('Found withdraw rune pickaxe!');
           CloseBank;
          TerminateScript;
      end;
    end;

    Procedure Equip;
    begin
      InvMouse(1,3);
      If WaitUptext('ickaxe', 500) then
      begin
      InvMouse(1,2);
        Writeln('equiping pickaxe!');
        ChooseOption('Wield');
      end else begin
        bank;
        WithdrawPickaxe;
        Closebank;
      end;
    end;

    Procedure Equiped;
    var
      x,y : Integer;
    Begin

      If(Not(LoggedIn))then
        LogInPlayer;
      FindNormalRandoms;

      MouseEquippedItem('weapon', 3);
      if WaitUptext('ickaxe', 500) then
        Writeln('Pickaxe is in equipment.')
      else begin
        Writeln('Theres no pickaxe in your equipment, checking inventory.');
        Equip;
      end;
       Wait(RandomRange(1000, 1500));
      end;

    Procedure Ladder;
    var x,y :Integer;
    begin
       if FindObjCustom(x, y, ['imb-down', 'adder'], [Laddercolor1, Laddercolor2], 15) then
      begin
        Writeln('Found ladder!');
          Mouse(x, y, 0, 0, false);
        wait(300+RandomRange(20,80))
        end;
       if ChooseOption('limb-down') then
         begin
         wait(1300+RandomRange(20,80))
         end;
     end;

    Procedure MysteriousEntrance;
    var x,y :Integer;
    begin
       if FindObjCustom(x, y, ['ysterio', 'ntrance'], [Entrancecolor1, Entrancecolor2], 15) then
      begin
        Writeln('Found Mysterious entrance!');
          Mouse(x, y, 0, 0, false);
        wait(300+RandomRange(20,80))
        end;
       if ChooseOption('nter') then
         begin
         wait(1300+RandomRange(20,80))
         end;
     end;

     Procedure MysteriousEntranceExit;
    var x,y :Integer;
    begin
       if FindObjCustom(x, y, ['ysterio', 'ntrance'], [Entrancecolor1, Entrancecolor2], 15) then
      begin
        Writeln('Found Mysterious entrance!');
          Mouse(x, y, 0, 0, false);
        wait(300+RandomRange(20,80))
        end;
       if ChooseOption('xit') then
         begin
         wait(1300+RandomRange(20,80))
         end;
     end;

    Procedure WalktoLadder;
    var
      toLadder : TPointArray;
    begin
            SPS_Debug := true;
             SPS_Setup(RUNESCAPE_SURFACE, ['9_7','9_8'])
             toLadder := [ Point(3911,3236),Point(3897, 3280) ];
            SPS_WalkPath(toLadder);
           SPS_GetMyPos();

    end;

    Procedure WalktoBank;
    var
      toBank : TPointArray;
    begin
            SPS_Debug := true;
             SPS_Setup(RUNESCAPE_SURFACE, ['9_7','9_8'])
             toBank := [ Point(3869, 3211) ];
            SPS_WalkPath(toBank);
            wait(6000);
           SPS_GetMyPos();

     end;


    Procedure CaveLadder;
    var x,y :Integer;
    begin
       if FindObjCustom(x, y, ['imb-down', 'adder'], [Laddercolor3, Laddercolor4], 15) then
      begin
        Writeln('Found Cave Ladder!');
          Mouse(x, y, 0, 0, false);
        wait(300+RandomRange(20,80))
        end;
       if ChooseOption('limb-up') then
         begin
         wait(1300+RandomRange(20,80))
         end;
     end;

    Function SwitchWorld1: Boolean;
    var
    x, y : Integer;
     WorldNum: Integer;
    begin
     FindNormalRandoms;
     begin
     repeat
      WriteLn(I);
       Inc(I);
        if (I > 130) then
       I := 1;
       Wait(10);
    Writeln('Logging to lobby.');
     ExitToLobby;
     OpenWorldScreen;
      inc(WorldNum);
         SelectWorld(I)
              LoginPlayer;
         SetAngle(True);
        MakeCompass(30);
         wait(1300+RandomRange(20,80))
        if InvFull=true then break;
         if  FindObjCustom(x, y, ['ine', 'ocks'], [runitecolor1, runitecolor2], 5) then Break;
     Until(WorldNum = 139)
     end;
    end;


    Procedure Walkback;
    var
    x, y: Integer;
    begin
    MakeCompass(30)
     If findcolortolerance(x,y,393964,MMX1 ,MMY1 , MMX2, MMY2, 15)then
     begin
         Mouse(x,y,1,1,true)
        end else begin
          Writeln('Did not find start!');
     end;
    end;
    Procedure Mining;
    begin
      ClickNorth(True)
      SetAngle(true)
       Spot;
       wait(5300+RandomRange(20,80))
        MineOre;
         MineProcess;
       Spot2;
       wait(5300+RandomRange(20,80))
        MineOre;
         MineProcess;
       Spot3;
       wait(6300+RandomRange(20,80))
        MineOre;
         MineProcess;
       wait(2300+RandomRange(20,80))
    end;

    Procedure Repeater;
    var
    WorldNum: Integer;
    begin
    repeat
     bank;
      WalktoLadder;
      wait(5000+RandomRange(20,80))
       Ladder;
       wait(5300+RandomRange(20,80))
      MysteriousEntrance;
      wait(3300+RandomRange(20,80))
     repeat
     Mining;
      SwitchWorld1;
     wait(3300+RandomRange(20,80))
     Walkback;
      wait(3300+RandomRange(20,80))
      until(invfull)
      wait(3300+RandomRange(20,80))
       Walkback;
       wait(3300+RandomRange(20,80))
      MysteriousEntranceExit;
      wait(2300+RandomRange(20,80))
      CaveLadder;
      wait(4300+RandomRange(20,80))
      WalktoBank;
     until(false)
    end;


    begin
    Smart_Server := 54;
      Smart_Members := True;
      Smart_Signed := True;
      Smart_SuperDetail := False;
      ClearDebug;
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
     start;
      equiped;
      repeater;

     end.
    Last edited by wasfer; 12-04-2011 at 12:40 AM.

  2. #2
    Join Date
    Feb 2007
    Posts
    287
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Nice bro, thanks for contributing. I almost have another 85 miner so ill post some proggys once I can.

  3. #3
    Join Date
    May 2007
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    "Exception in Script: Unable to find file 'SRL/SRL.scar' used from ''"

  4. #4
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    Try adding a progress report, and maybe even multi player to the script

    As for banking, SRL has nice banking functions that do still work. I prefer to use BankNPC since the bankers are usually unique compared to the rest of the colors.
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  5. #5
    Join Date
    Jun 2006
    Posts
    79
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    this is just the script i was looking for, but it just stands there for me, doesnt do anything :|

  6. #6
    Join Date
    Nov 2011
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    [Error] C:\Simba\Includes\sps/sps.simba(34:17): Unknown type 'T4DIntegerArray' at line 33
    Compiling failed.


    how to fix...

  7. #7
    Join Date
    Nov 2011
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by sidishere View Post
    this is just the script i was looking for, but it just stands there for me, doesnt do anything :|
    Cant help u there, works for me.

  8. #8
    Join Date
    May 2011
    Location
    In an Island.
    Posts
    1,413
    Mentioned
    2 Post(s)
    Quoted
    149 Post(s)

    Default

    Quote Originally Posted by divad82 View Post
    [Error] C:\Simba\Includes\sps/sps.simba(34:17): Unknown type 'T4DIntegerArray' at line 33
    Compiling failed.


    how to fix...
    You might not have correctly installed SPS. Try to re-install it, update version.
    ''If you want something you've never had, you have to do something you've never done''


    total leve 2715/1b exp +... exterminated.

  9. #9
    Join Date
    Jun 2006
    Posts
    79
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I got it working.
    Thanks for the script, the hard work you put into it and for sharing!

    Couple of bugs:

    It doesnt acctually mine the runite. Even if rock is available it switches worlds :S
    Sometimes it doesnt click on the ladder successfully to go down to the mine and gets confused.
    Sometimes an error on runescape "login limit exceeded too many connections from your address" pops up, and it gets stuck (it requires you to click "back")
    Last edited by sidishere; 11-20-2011 at 10:36 PM.

  10. #10
    Join Date
    Sep 2010
    Posts
    51
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by sidishere View Post
    This is all i get:
    SRL Compiled in 0 msec
    SMART Initialized.
    Loaded: Server 54, Members: True, Signed: True, Super Detail: False.

    And in the cmd it says "SmartSetup entered"

    And the script does nothing, doesnt even log the player in.

    Any ideas on what im doing wrong?
    make sure your graphics settings are set to lowest and fixed screen.

  11. #11
    Join Date
    Jun 2006
    Posts
    79
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by magernub573 View Post
    make sure your graphics settings are set to lowest and fixed screen.
    i figured that out, thanks anyway.
    I dont know what the issue is but it just goes:
    "Did not find runite ore!"
    even where there is some ore right in front of it.

  12. #12
    Join Date
    May 2007
    Location
    Waterloo, Ontario, Canada
    Posts
    1,008
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    I believe that you're going to need to add a few more failsafes, such as color detection of the actual rock, you're only using two colors and they seem to change at different angles. Fixing an angle then checking for a color may also work better. I may tinker it myself and let you know if it works any better.

    Regards,

    Toxin.

  13. #13
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    Use ACA2 to figure out the best colour & tolerance. Also, for anyone not finding the rocks you can always use the colour picker to choose a new colour.

    -RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

  14. #14
    Join Date
    May 2007
    Location
    Waterloo, Ontario, Canada
    Posts
    1,008
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    It seems that picking the colors was not the only thing wrong with the script. Upon world switches, it does not even check for rocks sometimes and it seems as if it is stuck in a switching loop. I'm watching it right now and it's switched 10 worlds so far still nothing in the log stating "rock not found" after I updated the colors.

  15. #15
    Join Date
    Nov 2011
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    lol after switching world it checks 2 nearest runite rocks, try to get colors right.

  16. #16
    Join Date
    May 2007
    Location
    Waterloo, Ontario, Canada
    Posts
    1,008
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Will gather colors again I suppose... It's weird though, there's nothing remotely close to the blue of the runite rock around, unless you're wearing a mining cape(t) or someone else is or something, so it shouldn't have a problem finding a tolerance of that blue. Will post back after I tweak it again.

    E: Got it workin.
    Last edited by 'Toxin; 11-22-2011 at 12:18 AM.

  17. #17
    Join Date
    Aug 2007
    Location
    Marijuanaville USA
    Posts
    195
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You got an MSN?

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

    Default

    Nice work, I updated the colors and it works flawlessly for me. congrats : )

  19. #19
    Join Date
    Oct 2011
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Works flawless great work I really appriciate it keep up the great work

  20. #20
    Join Date
    Aug 2007
    Location
    Marijuanaville USA
    Posts
    195
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    getting 45 dung in about 20 mins. will be very happy to find out this works still flawlessly

  21. #21
    Join Date
    Aug 2007
    Location
    Marijuanaville USA
    Posts
    195
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    does not climb down the ladder, it clicks somewhere inside of the housing surrounding the entrance when running and can barely see the ladder, I will donate 20m if you get this working

  22. #22
    Join Date
    Nov 2011
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I dont need anything for script, sadly i dont have time to work on this script, its dead script, would appreciate if mod would remove it, by the way Omegaangelz, u could just modifiy walking by removing SPS and add something simple, like Mouse clicks in minimap if u dont know any other way, then it would walk to right place and keep going
    Last edited by wasfer; 12-01-2011 at 05:01 PM.

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

    Default

    The script isnt bad, just pick your own colors people! Works flawless for me. Thanks Wasfer : )

  24. #24
    Join Date
    Nov 2011
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Nsight View Post
    The script isnt bad, just pick your own colors people! Works flawless for me. Thanks Wasfer : )
    oh great, did not know it would still work, its really simple script.

  25. #25
    Join Date
    Dec 2011
    Posts
    128
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It stops when it opens the bank, it says something about mod bitmaps, sorry i will get what it actually says later i closed it lol.

    If anyone actually knows what im on about i would love some help :d

Page 1 of 2 12 LastLast

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
  •