SRL Archive - Non-RuneScape Scripts

Eldevin Copper Miner [Beta]


bg5

2014-06-26 04:37:43

One day I was bored, so I started my scripting adventure in Lape… I don't really know much about this game, but it was fun to make that script.


1. Instalation

Script uses ETL for debug purpose:

a) Unzip and put this in Simba/Plugins :

[ATTACH]23437[/ATTACH]

b) Put this in Simba/Include

[ATTACH]23438[/ATTACH]

c) Script also uses part of SRL-6 library : mouse.simba and math.simba. If you don't have SRL-6 library already you should download it from github or optionally download only those 2 files. Make sure that include path in the header of files is correct!


d) Get the script:
[ATTACH]23439[/ATTACH]
[ATTACH]23892[/ATTACH] v 1.1
[ATTACH]24461[/ATTACH] v 1.1b Fixed Version




2. Settings



3. Known Issues

a) Script breaks when it clicks on another player and opens his interface
b) Script breaks when it clicks on rock, which is only partially visible on screen (Exception in Script: Runtime error: "You passed a wrong xe to a finder function…blah blah blah) - Now I'm looking for elegant solution. Solved in v1.1

4. Enjoy!




5. Changelog

Version 1.1
  • Solved issue with CountColor() breaking script
  • Added customization - now you can adjust script to any ore you want in 3 easy steps! Read code for details…

Version 1.1b
  • Script is now compatible with updated SRL-6 version

Novite666

2014-07-31 10:00:17

Any examples of your Lave code? Sounds interesting.

MaxGreden

2014-08-06 11:59:04

The way the bot is made is intriguing. Nice. One problem with it, it sometimes right clicks the ore so that the interface comes up and interferes with the green line detection, breaking the bot.

angelusgbi

2014-08-15 04:36:45

you can create or edit for bronze ore?


[ATTACH=CONFIG]23800[/ATTACH]

bg5

2014-08-23 11:08:39

The way the bot is made is intriguing. Nice.


Yeah, thanks :P It's my first script in Lape, so I wanted to test it's abilities.

One problem with it, it sometimes right clicks the ore so that the interface comes up and interferes with the green line detection, breaking the bot.


I know about this error. It should be handled inside CountColor() function, instead of breaking a script it should at least just throw an exeption. The only way to fix it is constructing a wrapper, which checks if presumed position of green lines is out of client bounds and if yes, adjusts position to client bounds.If I remember well, FindColors… functions have this mechanism built in.


you can create or edit for bronze ore?


Shure, it's just little work in ACA. However, I don't guarantee big accuracy with just 1 base sample.

@Edit Sorry I can't do that with sample you've sent. It's .png, so picture is compressed and colors are broken. I need raw .bmp format. Or with new script version you can easy add it by yourself!

@Edit2

New version is out !

Cjey

2014-11-13 20:07:09

Error: Unknown declaration "MOUSE_MOVE" at line 308

What can I do?

akarigar

2014-11-13 20:15:33

From: Cjey
Error: Unknown declaration "MOUSE_MOVE" at line 308

What can I do?


Make sure you follow the instructions under "How to install/setup Simba" section in this guide.

a12312312

2014-11-15 09:29:58

i have the same issue MOUSE_MOVE

Fawflance

2014-11-16 07:44:47

I have the same problem, I followed the exact instructions, but still it gives same error

bg5

2014-11-17 18:17:06

From: Fawflance
I have the same problem, I followed the exact instructions, but still it gives same error


From: Cjey
Error: Unknown declaration "MOUSE_MOVE" at line 308

What can I do?


Uhm..what?!

Took me some time to find out what happened…

Sorry guys, but it's @Olly who screwed my script so blame him not me :P Basically change was done in mouse.simba ( https://github.com/SRL/SRL-6/commit/b7a664fb04869b99650159f12fb40601b398325f#diff-84eb4897dc6c868ce0fa6dd8dc00b736L68 ) and MOUSE_MOVE , MOUSE_LEFT etc constans were removed. Also other changes were done to SRL6… Well, it sucks that you can't now use parts of SRL library independently anymore. This script uses only SRL mouse procedures (because of their great simulation of human movements) so attaching whole big SRL library is unnecessary and I'm trying to avoid it.


Ok, here is solution. Change the header of the script to:

program EldevineCopperMiner; // v 1.1b (fixed)
{$loadlib ETL}
{$i etl_Lape.simba}

{$i SRL-6\lib\utilities\math.simba}
const
MOUSE_NONE = -1;
MOUSE_MOVE = 3;
MOUSE_BREAK = 8;
MOUSE_ACCURATE = 14;
MOUSE_HUMAN = 7;
{$i SRL-6\lib\core\mouse.simba}

daggen

2014-11-29 03:51:03

im having slight problem not sure whats happening, i think i set everything up correctly script runs and all but when it runs, it clicks the rock so to speak but eldevin does nothing like as if the mouse is not clicking the target its finding.