Results 1 to 9 of 9

Thread: Eldevin copperMinerReloaded

  1. #1
    Join Date
    Dec 2015
    Posts
    22
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default Eldevin copperMinerReloaded

    Hello,

    Due to the recent? change in Eldevin graphic, the double buffering rendered a lot of the bots inert. They are very well done bots, so I'm patching these older bots so that they would work with current version of Eldevin.

    This is a patch for the copperMiner by @Silverdraco;: https://villavu.com/forum/showthread.php?t=108330
    NOTE: I made a few changes, took away the pausing feature, because I don't think its necessary. And I changed the script so that it doesn't stop the program when it cant find ores. Now it waits for ores to re-spawn and continue mining.

    I'm pretty new to simba, so there are probably more elegant way to patch it. But it works.

    Requirements:
    Have Simba compiler

    Instructions:
    a) Move character to a mine with copper within your sights
    b) Drag the green circle with the cross hair button located on the top of the Simba Compiler to your DESKTOP to define your client to desktop.
    IMPORTANT NOTE: The color of the level ball in the bottom left hand corner confuses the program, because it looks like the color of copper ore. Move the left side of the game window off screen. i know i know its a cheap fix but it works.
    NOTE: Put your game window at a TOP DOWN VIEW makes it easier on the script.
    NOTE: Tested to be working with Game opened in BROWSER

    What it should do:
    It should start finding ore, within the range of your visual.
    When it finds ore, it would move your mouse to right click on it to mine.
    When there are no ore within visual range. It would wait for ores to re-spawn and then move to mine it.

    What I Changed:
    Removed Pause Feature
    Added "cant find ore" exception
    Added SetClientAsDesktop; to deal with Double Buffering.
    Commented out al_functions library, I think the features in there are now included.
    I left some of the codes I removed as comments. (after // and with in {})

    Le Code:

    Code:
    program copperMinerReloaded;
    {$I SRL-OSR/SRL.simba}
    //{$I SRL-OSR/SRL/misc/al_functions.simba}
    
    ////////////////////////////////////////
    ////              by                 ///
    ///           Silverdraco          ////
    //             patched by          ////
    //             BUGBUSTER          /////
    ////////////////////////////////////////
    
    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;
      SetDesktopAsClient;
      repeat
      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
            writeln('Finding Ore ...');
            allGood:= false;
            sleep(Random(10000));
            allGood := true;
        end;
      {if foundOre then
        writeln('Stopped by user.')
      else
        writeln('Finding Ore ...');
      writeln('=================================================');}
      FreeDTM(CopperColor);
      until (false);
    end.
    NOTE: If you needed Coal or any other type of minerals, find their DTM, i dont know what DTMs are but here is one for coal:
    Code:
    CopperColor := DTMFromString('mWAAAAHicXchBCsAgEEPRP0Oggrry/tdzV9AbGJdt4EESAW/ANCV0G7a9lzX38hQkkRn02vD1ET83BynpBE0=');
    replace DTM with above and it will mine coal instead of copper. Dont know the DTM for anything else. took it from @raitr;.
    Last edited by BUGBUSTER; 12-15-2015 at 09:10 AM.

  2. #2
    Join Date
    Dec 2015
    Posts
    22
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default

    Im not sure if it matters but my resolutions for both the game and the desktop is 1366x768.

  3. #3
    Join Date
    Sep 2014
    Location
    C:\Simba\
    Posts
    565
    Mentioned
    9 Post(s)
    Quoted
    71 Post(s)

    Default

    Nice to see someone making an effort for botting on Eldevin, I might just try that game out and perhaps? release a script
    Feel free to ask me any questions, I will do my best to answer them!

    Previously known as YouPee.

  4. #4
    Join Date
    Dec 2015
    Posts
    22
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default

    will do more patches if i find more old bots

  5. #5
    Join Date
    Dec 2015
    Posts
    22
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default

    ahh i know too little of simba to do anything significant at this point, but these patches for these older bot should be sufficient for general use i think lol

  6. #6
    Join Date
    Dec 2015
    Posts
    22
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default

    eldevin is pretty cool , the fact that its fairly easy to bot makes it that much better, but probably not as interesting as rs because its got relatively little players and people havent started botting extensively in eldevin yet, so the counter measures are not very well defined. muwahaha

    it doesnt have a player driven economy. yet.
    Last edited by BUGBUSTER; 12-14-2015 at 07:23 PM.

  7. #7
    Join Date
    Dec 2015
    Posts
    22
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default

    a lot of this resource gathering are not very complex because it doesnt need any feed back from the game itself. The game often times handles the exceptions for you. as long as you have enough preparation such as a large number of seeds (you can use a "bucket" which holds 100 seeds in one position) you can use auto mouser: http://sourceforge.net/projects/get-automouser/ for a quick bot. but with simba you have a lot of freedom to do stuff more complex and with more efficiency.

    here is the code for farming with automouser, put it in text and open with automouser.

    1:2:5000:278:338:0
    1:1:5000:107:309:0
    1:1:5000:260:347:0
    1:1:5000:161:318:0
    1:1:5000:251:341:0
    1:1:5000:158:286:0
    1:1:5000:272:323:0
    1:1:5000:162:352:0
    1:1:5000:280:330:0
    1:2:5000:271:338:0
    1:2:5000:271:338:0
    1:2:5000:271:338:0
    1:2:5000:271:338:0
    1:2:5000:271:338:0
    1:2:5000:271:338:0
    1:2:5000:271:338:0

    the coordinates wont be the same for you but you get an idea.
    and it just cycles and farm resources.

    Edit:
    ahh probably need to explain the code for automouser

    its for farming, top down view, zoom to the closest, find a lot of farm land stand near it.
    open inventory that contains: scarecrow, compost, seed and water.

    it would:
    double click on the plot to rake it, delay.
    single click on scarecrow, delay
    single click on farm land, delay
    single click on compost, delay
    single click on farm land, delay
    single click on seed, delay
    single click on farm land, delay
    single click on water, delay
    single click on farm land, delay
    double click on farm land, delay (to fend away bugs / harvest / rake farm land)
    double click on farm land, delay (to fend away bugs / harvest / rake farm land)
    double click on farm land, delay (to fend away bugs / harvest / rake farm land)
    double click on farm land, delay (to fend away bugs / harvest / rake farm land)
    double click on farm land, delay (to fend away bugs / harvest / rake farm land)
    double click on farm land, delay (to fend away bugs / harvest / rake farm land)
    double click on farm land, delay (to fend away bugs / harvest / rake farm land)

    NOTE: you will need to define your coordinates and set this up everytime you wanna bot farm. because it doesn't care and doesn't store your pre-cycle location and coordinates. the desktop is the entire client.

    It cant identify color so it cant get any feedback from the game. so you will have to plan things out because without feed back it cant handle exceptions. So its inefficient but really great for a quick simple bot that doesnt require feed backs.

    NOTE: acutally i dont need the first double click to rake.
    NOTE: wait i do because it wont work for first cycle.
    Last edited by BUGBUSTER; 12-14-2015 at 07:56 PM.

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

    Default

    I know its old thread, but it does not seem to do the double click.

  9. #9
    Join Date
    Jan 2019
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Are you still active and making still making bots for this game? I used your bot and tried it out first with the downloaded version and the game must have some new feture where the mouse gets locked inside the game or the game window because the bot was working while not inside the Eldevin window but soon as you click in the window the "bot mouse movement" wont work. But if you play the game in the browser, and running the bot it works perfectly. Meanwhile they have updated the game and changed some stuff so sometimes the mouse pointer gets stuck on "Level icon" because it is the "same" color as the copper ore. So if you're still active and still making bots please do some more for Eldevin.

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 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
  •