Results 1 to 25 of 25

Thread: [Eldevin] Working Copper Miner [RELEASE]

  1. #1
    Join Date
    Mar 2014
    Posts
    9
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default [Eldevin] Working Copper Miner [RELEASE]

    Hi everyone,

    After a bit of work I finished my copper miner for Eldevin.

    Code:
    program copperMiner;
    {$I SRL-OSR/SRL.simba}
    {$I SRL-OSR/SRL/misc/al_functions.simba}
    
    ////////////////////////////////////////
    ////              by                 ///
    ///           Silverdraco           ////
    ////////////////////////////////////////
    
    var
      a, CopperColor, foundX, foundY, clientW, clientH: Integer;
      foundOre, allGood: Boolean;
    
    procedure initDTMs;
    begin
      CopperColor := DTMFromString('mGQAAAHicY2RgYPBgZmDQY2RgUHfzZGAF8oFMBgYAEgwBOA==');
    
    end;
    
    procedure LClickXY(x,y: Integer);
    begin
      MoveMouse(x,y);
      ClickMouse(x,y,0);
    end;
    
    procedure RClickXY(x,y: Integer;doubleClick: boolean);
    begin
      MoveMouse(x,y);
      ClickMouse(x,y,1);
      if doubleClick then
        begin
          ClickMouse(x,y,1);
        end;
    end;
    
    procedure compareDTMScreen(DTM: Integer);
    begin
      foundOre := FindDTM(CopperColor,foundX,foundY,0,0,clientW-1,clientH-1);
    end;
    
    begin
      writeln('=================================================');
      writeln('Initializing...');
      GetClientDimensions(clientW,clientH);
      initDTMs;
      writeln('done');
      allGood:= true;
      while allGood do
        begin
          if isKeyDown(112) then
            allGood:=false;
          compareDTMScreen(CopperColor);
          sleep(400);
          if foundOre then
            begin
              writeln('Found ore at ['+toStr(foundX)+','+toStr(foundY)+'] - Mining...');
              RClickXY(foundX,foundY,true);
              for a := 0  to 3 do
                begin
                  if isKeyDown(112) then 
                    allGood:=false
                  else
                    sleep(1000);
                end;
              sleep(Random(1000))
            end
          else
            allGood:= false;
        end;
      if foundOre then
        writeln('Stopped by user.')
      else
        writeln('Can not find ore. Stopping...');
      writeln('=================================================');
      FreeDTM(CopperColor);
    end.

    [Instructions]
    Set up Simba like in this guide: can't post links, will post on first comment (Thanks to HoodZ)
    Start this in the mine with the copper ores. Preferably somewhere where at least 3 or 4 copper ores are within sight at all times.
    Hold F1 for a sec or so to stop the script. It will stop automatically if it can not find any ores.


    Special credits to Wizzup for helping me out with some stuff in IRC!

    Edit: yeeeaah I can't post the link in a comment either. Just look for 'Updated SRL-OSR Setup (Jan 4, 2014)' by Turpinator in > HomeForum > Help and Tutorials > Old School Runescape Help and Tutorials > OSR Setup Tutorials

    Edit 2: optimized code thanks to Foundry
    Last edited by Silverdraco; 03-09-2014 at 12:18 AM.

  2. #2
    Join Date
    Jul 2013
    Location
    An horse
    Posts
    300
    Mentioned
    9 Post(s)
    Quoted
    120 Post(s)

    Default

    Grats on the release! I'm gonna take a look at Eldevin later today, seems like quite a few people want scripts for it.

    Your script looks pretty good. The only thing I see that could be made neater is this:

    Simba Code:
    if isKeyDown(112) then
      allGood:=false
    else
      sleep(1000); //don't mind this awesome piece of redundancy, please. I didn't want to make the user have to hold the stop button for 4 seconds :)
    if isKeyDown(112) then
      allGood:=false
    else
      sleep(1000);
    if isKeyDown(112) then
      allGood:=false
    else
      sleep(1000);
    if isKeyDown(112) then
      allGood:=false
    else
      sleep(1000);

    I know you put the note there and everything and I understand that you don't want to have the user hold it down for four seconds, but you could do this to condense it a bit:

    Simba Code:
    for 0 to 3 do
    begin
      if isKeyDown(112) then
        allGood:=false
      else
        sleep(randomrange(800, 1200));
    end;
    Currently lurking while messing around with dll injection. Will continue contributing after I finish my quest.

  3. #3
    Join Date
    Mar 2014
    Posts
    9
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Foundry View Post
    Grats on the release! I'm gonna take a look at Eldevin later today, seems like quite a few people want scripts for it.

    Your script looks pretty good. The only thing I see that could be made neater is this:

    Simba Code:
    if isKeyDown(112) then
      allGood:=false
    else
      sleep(1000); //don't mind this awesome piece of redundancy, please. I didn't want to make the user have to hold the stop button for 4 seconds :)
    if isKeyDown(112) then
      allGood:=false
    else
      sleep(1000);
    if isKeyDown(112) then
      allGood:=false
    else
      sleep(1000);
    if isKeyDown(112) then
      allGood:=false
    else
      sleep(1000);

    I know you put the note there and everything and I understand that you don't want to have the user hold it down for four seconds, but you could do this to condense it a bit:

    Simba Code:
    for 0 to 3 do
    begin
      if isKeyDown(112) then
        allGood:=false
      else
        sleep(randomrange(800, 1200));
    end;

    Cheers! I'll add that to the code, haha this is my first time working in pascal ever, so I'm doing a lot of things wrong...

    If you like the game and feel like trying something together I have some (potentially) neat ideas, already got a prototype for wool collecting and coal mining, PM me your skype!

  4. #4
    Join Date
    Mar 2014
    Posts
    9
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    Farming script is almost done!

  5. #5
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Gratz on release, not too many non RS scripters around these parts

  6. #6
    Join Date
    Feb 2014
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Looking forward to your farming script and good work with this one

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

    Default

    Awesome script. Works perfectly. Good job, all. Anyone thought about a coal miner or the other ore miners?

  8. #8
    Join Date
    Mar 2014
    Posts
    9
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Mythos View Post
    Looking forward to your farming script and good work with this one
    Couldn't reply to your message due to low post count...

    Farming script is pretty much finished, it only supports 1 plot so I'm not sure how useful it really is...

  9. #9
    Join Date
    Feb 2014
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    That's still majorly useful, anything that can farm 1 plot automatically is awesome, especially if it adds compost and a scarecrow.

  10. #10
    Join Date
    Mar 2014
    Posts
    9
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Mythos View Post
    That's still majorly useful, anything that can farm 1 plot automatically is awesome, especially if it adds compost and a scarecrow.
    It doesnt do that, but I can implement it. PM me your skype or something I'll send you the 'beta' version

  11. #11
    Join Date
    Feb 2014
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Silverdraco View Post
    It doesnt do that, but I can implement it. PM me your skype or something I'll send you the 'beta' version
    Awesome, ive sent you a message with my skype.

  12. #12
    Join Date
    Mar 2014
    Posts
    9
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Officer Barbrady View Post
    Gratz on release, not too many non RS scripters around these parts
    Thanks! Just wish more people played this game. I guess me making scripts for it isn't helping

  13. #13
    Join Date
    Feb 2014
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    If the game hits steam, Which I think it will thousands will play.

  14. #14
    Join Date
    Apr 2014
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Tnx.
    Last edited by casfreak; 04-10-2014 at 03:22 AM.

  15. #15
    Join Date
    Apr 2012
    Posts
    2
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Found out about this game today, was googling for some guides and found this
    Gotta push out some scripts too ty for this example.

    Edit:

    Rough edit for coal

    program copperMiner;
    {$I SRL-OSR/SRL.simba}
    {$I SRL-OSR/SRL/misc/al_functions.simba}

    var
    a, CopperColor, foundX, foundY, clientW, clientH: Integer;
    foundOre, allGood: Boolean;

    procedure initDTMs;
    begin
    CopperColor := DTMFromString('mWAAAAHicXchBCsAgEEPRP0Oggrry/tdzV9AbGJdt4EESAW/ANCV0G7a9lzX38hQkkRn02vD1ET83BynpBE0=');

    end;

    procedure LClickXY(x,y: Integer);
    begin
    MoveMouse(x,y);
    ClickMouse(x,y,0);
    end;

    procedure RClickXY(x,y: Integer;doubleClick: boolean);
    begin
    MoveMouse(x,y);
    ClickMouse(x,y,1);
    if doubleClick then
    begin
    ClickMouse(x,y,1);
    end;
    end;

    procedure compareDTMScreen(DTM: Integer);
    begin
    foundOre := FindDTM(CopperColor,foundX,foundY,0,0,clientW-1,clientH-1);
    end;

    begin
    writeln('========================================= ========');
    writeln('Initializing...');
    GetClientDimensions(clientW,clientH);
    initDTMs;
    writeln('done');
    allGood:= true;
    while allGood do
    begin
    if isKeyDown(112) then
    allGood:=false;
    compareDTMScreen(CopperColor);
    sleep(400);
    if foundOre then
    begin
    writeln('Found ore at ['+toStr(foundX)+','+toStr(foundY)+'] - Mining...');
    RClickXY(foundX,foundY,true);
    for a := 0 to 3 do
    sleep(Random(1000));
    begin
    if isKeyDown(112) then
    allGood:=false
    else
    sleep(1000);
    end;
    sleep(Random(1000))
    end
    else
    allGood:= true;
    end;
    if foundOre then
    writeln('Stopped by user.')
    else
    writeln('Can not find ore. Stopping...');
    writeln('========================================= ========');
    FreeDTM(CopperColor);
    end.
    And Shearing Sheep

    program sheepShearer;
    {$I SRL-OSR/SRL.simba}
    {$I SRL-OSR/SRL/misc/al_functions.simba}

    var
    a, SheepColor, foundX, foundY, clientW, clientH: Integer;
    foundSheep, allGood: Boolean;

    procedure initDTMs;
    begin
    SheepColor := DTMFromString('mQwAAAHicY2ZgYBBiYmAQA2JeIH7EyMBwC4 hfAHF/fx1DhL8bQ6iPCwMrUB0MMyJhIAAABHYGZg==');

    end;

    procedure LClickXY(x,y: Integer);
    begin
    MoveMouse(x,y);
    ClickMouse(x,y,0);
    end;

    procedure RClickXY(x,y: Integer;doubleClick: boolean);
    begin
    MoveMouse(x,y);
    ClickMouse(x,y,1);
    if doubleClick then
    begin
    ClickMouse(x,y,1);
    end;
    end;

    procedure compareDTMScreen(DTM: Integer);
    begin
    foundSheep := FindDTM(SheepColor,foundX,foundY,0,0,clientW-1,clientH-1);
    end;

    begin
    writeln('========================================= ========');
    writeln('Initializing...');
    GetClientDimensions(clientW,clientH);
    initDTMs;
    writeln('done');
    allGood:= true;
    while allGood do
    begin
    if isKeyDown(112) then
    allGood:=false;
    compareDTMScreen(SheepColor);
    sleep(100);
    if foundSheep then
    begin
    writeln('Found sheep at ['+toStr(foundX)+','+toStr(foundY)+'] - Shearing...');
    RClickXY(foundX,foundY,true);
    for a := 0 to 3 do
    sleep(2500);
    sleep(Random(1000))
    begin
    if isKeyDown(112) then
    allGood:=false
    else
    sleep(1000);
    end;
    sleep(Random(1000))
    end
    else
    allGood:= false;
    end;
    if foundSheep then
    writeln('Stopped by user.')
    else
    writeln('Can not find sheep. Stopping...');
    writeln('========================================= ========');
    FreeDTM(SheepColor);
    end.
    Last edited by raitr; 04-12-2014 at 02:43 AM.

  16. #16
    Join Date
    May 2014
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I have this error :
    Exception in Script: Don't know which overloaded method to call with params (Extended) at line 362, column 27 in file "C:\Simba\Includes\SRL-OSR\SRL\misc\al_functions.simba"
    How to fix it?


    Ah okay, just need switch to pascal.

    But there is another problem, when i run script, character just run anywhere, not to the ore.
    Now it works well, just need to run in full screen.
    Can anyone do script for Amethyst Deposits?
    Last edited by DiShanTheRage; 05-10-2014 at 04:18 AM.

  17. #17
    Join Date
    Aug 2014
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Hi!

    Nice release!

    A couple things:

    Simba Code:
    procedure compareDTMScreen(DTM: Integer);
    begin
     foundOre := FindDTM(CopperOre,foundX,foundY,0,0,clientW-1,clientH-1);
    end;
    On the FindDTM, you don't need to have CopperOre. You can just have it as DTM as currectly you're not using the parameter.

    Simba Code:
    compareDTMScreen(CopperColor);

    For the script, it clicked randomly on the ground sometimes, also on my level bubble. For me, it worked best with tolerance of 3. Instead of 5.
    I noticed your DTM had only 1 point. You're basically just checking the color. Which FindColorTolerance does just fine.

    This worked for me:
    foundOre := FindColorTolerance(foundX,foundY,4276791,0,0,clien tW-1,clientH-1,3);

    Crystal color: 10240845

    For coal, either bitmap or DTM would be neccecary, I think.
    Last edited by MaxGreden; 08-06-2014 at 10:49 AM.

  18. #18
    Join Date
    Sep 2014
    Posts
    55
    Mentioned
    0 Post(s)
    Quoted
    23 Post(s)

    Default

    script works fine great job

  19. #19
    Join Date
    Oct 2014
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I can't seem to get this to work, it just clicks near a node, not on the actual node. What resolution/ settings are you running on? browser/client?

  20. #20
    Join Date
    Oct 2014
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Doesnt work for me either. Can't even find the ore

  21. #21
    Join Date
    Nov 2014
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Can someone post some updated versions of these scripts?

  22. #22
    Join Date
    Aug 2014
    Location
    Australia
    Posts
    932
    Mentioned
    53 Post(s)
    Quoted
    495 Post(s)

    Default

    Quote Originally Posted by thebillyman View Post
    Can someone post some updated versions of these scripts?
    I don't think anyone here even plays Eldevin, it's not very likely to happen.



    New to scripting? Procedures & Functions for Beginners
    Do you use your computer at night? Just get f.lux

  23. #23
    Join Date
    Nov 2014
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    work ?

  24. #24
    Join Date
    Nov 2014
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    any update?

  25. #25
    Join Date
    Nov 2014
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Damn I don;t know how to get this to work, I'm having issues with
    {$I SRL-OSR/SRL.simba}
    {$I C:\Simba\Scripts\al_functions.simba}

    I don't know what to do :/

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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