SRL Archive - Non-RuneScape Scripts

Eldevin Farmer (Concept)


MaxGreden

2014-08-06 15:59:12

This will be my first public script. This is a farming bot for Eldevin
It will basically rake,prepare,plant,water, harvest and repeat. That's it.

Notes:
It works for any plot
This version will only work with Basil seeds … because it's a concept. If people like it I'll make all the seeds available.
If you decide to make a DMT for your seed of choice, sharing it here would be appreciated.

Pascal script:

program Eldevin_Farmer;
{$I SRL-OSR/SRL.simba}
// By MaxGreden
// ======= INSTRUCTIONS ===========
//Move Camera as far up you can, so the angle is top-down
//Camera Facing Directly North
//Character in the middle of a crop field
//Set Resolution 1024-600
//Have inventory Open and keep it on the right side of the screen
//Target Eldevin client
//Chat Visible
//Chat on 'General chat'

//Only things required in Inventory is: Watercan(with water) and Seeds
//Compost,Scarecrow, Dust is not required, but will use if found

const
CenterX = 510;
CenterY = 296;
InvX1 = 620;
InvY1 = 0;
InvX2 = 1020;
InvY2 = 596;
var
WaitTime,Compost,Dust,Scarecrow,BasilSeed,WaterCan,x,y:Integer;

Procedure LoadDTMs;
begin
Compost := DTMFromString('mlwAAAHicY2dgYGBhZmD4z8TA8BeKQXx2IOYB4gBGBoZoIA4FYh8gdgRidyD2BuIiP2sGK215hgD/AIbw8HCGskgXhl0ndjCUFJcwAI3BiRnxYCgAAAmlDYQ=');
Scarecrow := DTMFromString('m6wAAAHic42ZgYLjKzMBwCYhvAPEVID4PxCeBeDcQPwLiD1C5y0Asx8jAwAnEXEAsBMSSQCwDxFJQGoTVgdgMiEOd1BgqU90ZqkqdGSrSQxn0TRUZypNdGTzCtRg681wZMmKDGNwsVRkcvTQZYICRyhgJAABwKRT2');
BasilSeed := DTMFromString('mrAAAAHic42BgYHjKxMBwH4hvAPEtIL4DxI+B+BUQfwDijYwMDDuBeBsQrwfiVUC8HIhXA/EmIE6KimLwdHZm8HRyYgj29mZIjY4G84szMxmCvLwYgEoowjAAAJy6FG0=');
Watercan := DTMFromString('mrAAAAHic42BgYHBnZmCwBmJzIHYGYh8gDgRiDyjtxwjBnkDsAsSuQOwFZfsCcWZxOcPKFSsZ2Nm5GNyi0hjSq9sZgoKCwOzk5GQGoBKKMAwAAKadDa0=');
Dust := DTMFromString('mrAAAAHic42BgYHjKxMDwAIjvA/ErJggfJvYGiI8zMjBcBOJDQHwQiPcA8Q5GiPgxIN40z5yhNkmWISM9g+HMoX0MLS2tDGWRLgxLm6QYJk2cxEAIMBLAMAAAUhYZBQ==');
wait(500);
end;
Procedure CenterClick(DoubleClick: Boolean);
begin
MoveMouse(CenterX,CenterY);
ClickMouse(CenterX,CenterY, 1);
if(DoubleClick)
then
begin
wait(20);
MoveMouse(CenterX,CenterY);
ClickMouse(CenterX,CenterY, 1);
end;
end;

Procedure E_Rake;
begin
writeln('Started program - Raking...');
wait(100);
CenterClick(true);
end;
Procedure E_Compost;
begin
if FindDTM(Compost, x, y, InvX1, InvY1, InvX2, InvY2) then
begin
writeln('Found Compost');
MoveMouse(x,y);
ClickMouse(x,y, 1);
wait(100);
CenterClick(false);
writeln('Applying Compost...');
wait(9000);
end;
end;
Procedure E_Dust;
begin
if FindDTM(Dust, x, y, InvX1, InvY1, InvX2, InvY2) then
begin
writeln('Found Dust');
MoveMouse(x,y);
ClickMouse(x,y, 1);
wait(100);
CenterClick(false);
writeln('Applying Dust...');
wait(9000);
end;
end;
Procedure E_Scarecrow;
begin
if FindDTM(Scarecrow, x, y, InvX1, InvY1, InvX2, InvY2) then
begin
writeln('Found Scarescrow');
MoveMouse(x,y);
ClickMouse(x,y, 1);
wait(100);
CenterClick(false);
writeln('Applying Scarecrow...');
wait(5000);
end;
end;
Procedure E_Seeds(seedDMT:Integer);
begin
if FindDTM(seedDMT, x, y, InvX1, InvY1, InvX2, InvY2) then
begin
writeln('Found Seed');
MoveMouse(x,y);
ClickMouse(x,y, 1);
wait(100);
CenterClick(false);
writeln('Planting Seeds...');
end else
begin
writeln('Could not find Seeds - Stopping program...');
Exit;
end;
end;
Procedure E_Water;
begin
if FindDTM(Watercan, x, y, InvX1, InvY1, InvX2, InvY2) then
begin
writeln('Found Watercan');
MoveMouse(x,y);
ClickMouse(x,y, 1);
wait(100);
CenterClick(false);
writeln('Watering Seeds...');
end else
begin
writeln('Could not find Watercan - Stopping program...');
Exit;
end;
end;
Procedure E_Spam;
begin
writeln('Spamming leftClick');
repeat
wait(700);
CenterClick(true);
If FindColorTolerance(x,y,1074175,24,436,290,521, 1) Then //finds color organge in Chat box / Looks for "Farming +X experience [x/]." / Finished Harvesting
Begin
WaitTime := 100;
writeln('Harvested successfully - Restarting program');
end;
until(WaitTime = 100);
end;


//Main program
begin
LoadDTMs;
repeat
WaitTime := 0;
wait(1000);
E_Rake;
wait(9000);
E_Compost;
Wait(200);
E_Dust;
wait(200);
E_Scarecrow;
wait(200);
E_Seeds(BasilSeed); //<<-- what seed to be used
wait(6000);
E_Water;
wait(6000);
E_Spam;
until(false);
end.

se7enek

2014-10-13 16:23:04

Hi
Do u think u could do farming JUTE?
I like ur idea rly much but i have no idea whats that DTM and how to obtain that.
If u could tell me how i can find out its DTM i could do it myself and propably others as well.

se7enek

2014-10-13 16:56:32

Ok, did some looking and:

Jute Seeds DTM: (TESTED)
mbQAAAHicY2VgYOAGYiEgFgZiNgYIYAdiASBmhPL5gHjVqjqGsrIIhpAQR4aEBC8GLy9jBmyAEQsGAwBysAY3

Wheat Seeds DTM:
mbQAAAHicY2VgYPjCxMDwGYh/A/FHIH4LxCmMDAx5QBwLxHFAnAbElXGmDL4eZgx9nSkMiQGeDBUJPgzYACMWDAYAm2AMPQ==

Garlic Seeds DTM:
mWAAAAHicY2FgYDBhZmAwY4bQekCcxcjAkALEBYwQdmt2KUN2cjJDVFAQw5TqMgZ0wIiGQQAAkMAHpg==

And…
U missed some steps ;D

1. Move ur window in proper resolution, to left-top of the screen
2. ZOOM IN to the limit, but keep camera angle looking from top

Now its working perfect (didnt tested with scarecrows and other bottles but i dont need it actually)
Post in topic what DMTs u would like to see there, and ill add ;]

se7enek

2014-10-14 05:51:47

Just did it at night and gathered some actually, but more like just 200 jute seeds were used.
Program was all the time spamming left click (while there was no jute seeds planted)
If u know some solution, would be glad if someone help ;)

bgtgust

2014-11-18 11:57:31

i get:
Error: Exception: You passed a wrong xe to a finder function: 1020. The client has a width of 744, thus the xe is out of bounds. at line 59
The following DTMs were not freed: [0, 1, 2, 3, 4]
think it has something to do with the res? or does it matter if its in browser or client?

letsrock

2014-12-07 18:26:50

Could not find Seeds - Stopping program…
Could not find Watercan - Stopping program…
Successfully executed.
The following DTMs were not freed: [0, 1, 2, 3, 4]

Can You Help Me Guys ??

MaxGreden

2014-12-21 03:45:09

New version. Eldevin farmer 2.0

program Eldevin_Farmer;
//{$I SRL-OSR/SRL.simba}
//{$i SRL-6\lib\core\mouse.simba}
{$i SRL-6/srl.simba}
//{$i SRL-OSR\SRL\misc\AL_functions.simba}
// By MaxGreden
// ======= INSTRUCTIONS ===========
//Move Camera as far up you can, so the angle is top-down
//Camera Facing Directly North
//Character in the middle of a crop field
//Set Resolution 1024-600
// Move your window in proper resolution, to left-top of the screen
//ZOOM IN to the limit, but keep camera angle looking from top
//Have iventory Open and keep it on the right side of the screen
//Target Eldevin client
//Chat Visible
//Chat on 'General chat'

//Only things required in Inventory is: Watercan(with water) and Seeds
//Compost,Scarecrow, Dust is not required, but will use if found

// ================= OPTIONS ================== //
const
numberOfPlots = 1; //How many plots to be managed
//==============================================//

const
CenterX = 510;
CenterY = 296;
InvX1 = 620;
InvY1 = 0;
InvX2 = 1020;
InvY2 = 596;

BasilAvrgExp = 90;
JuteAvrgExp = 120;
GarlicAvrgExp = 190;
PotatoAvrgExp = 190;
var
attempt,randomWait,IRx,IRy,JuteSeed,PotatoSeed,GarlicSeed,WaitTime,Compost,Dust,Scarecrow,BasilSeed,WaterCan,x,y:Integer;
pruned:Boolean;

Procedure FreeTheDTMs;
begin
freeDTM(Compost);
freeDTM(Scarecrow);
freeDTM(Watercan);
freeDTM(Dust);
freeDTM(PotatoSeed);
freeDTM(GarlicSeed);
//freeDTM(JuteSeed);
//freeDTM(BasilSeed);
end;
Procedure LoadDTMs;
begin
Compost := DTMFromString('mlwAAAHicY2dgYGBhZmD4z8TA8BeKQXx2IOYB4gBGBoZoIA4FYh8gdgRidyD2BuIiP2sGK215hgD/AIbw8HCGskgXhl0ndjCUFJcwAI3BiRnxYCgAAAmlDYQ=');
Scarecrow := DTMFromString('m6wAAAHic42ZgYLjKzMBwCYhvAPEVID4PxCeBeDcQPwLiD1C5y0Asx8jAwAnEXEAsBMSSQCwDxFJQGoTVgdgMiEOd1BgqU90ZqkqdGSrSQxn0TRUZypNdGTzCtRg681wZMmKDGNwsVRkcvTQZYICRyhgJAABwKRT2');
Watercan := DTMFromString('mrAAAAHic42BgYHBnZmCwBmJzIHYGYh8gDgRiDyjtxwjBnkDsAsSuQOwFZfsCcWZxOcPKFSsZ2Nm5GNyi0hjSq9sZgoKCwOzk5GQGoBKKMAwAAKadDa0=');
Dust := DTMFromString('mrAAAAHic42BgYHjKxMDwAIjvA/ErJggfJvYGiI8zMjBcBOJDQHwQiPcA8Q5GiPgxIN40z5yhNkmWISM9g+HMoX0MLS2tDGWRLgxLm6QYJk2cxEAIMBLAMAAAUhYZBQ==');
PotatoSeed := DTMFromString('mrAAAAHic42BgYOAHYikgFgNiHiBmB2JmBgjggGJuqDgDVI4Lqk8AiJe1OTOk+ykxNGcaM0wts2bwMBMF47YsCJ8QYCSAYQAARAwI7g==');
GarlicSeed := DTMFromString('mrAAAAHic42BgYOAEYiEg5gNifiDmAmJGBghghopzQ/ksUHkBIBYGYgkg3rFmBUNqVCrD1O6pDK/fvGbo6OhgKPYKYiiJCmFozUpjIAQYCWAYAADhOw1+');
JuteSeed := DTMFromString('m1gAAAHic42JgYOAFYlEg5gdibiBmBWImIGZmgAAQnwuI2aFsEGAEYjYg5gRiHqheASAWBOKWlgQGLy9jhrlzqxl27JjKcPHiWobi4lCGsrIIsDiIzspyYyAWMBKJEQAAkL8Ong==');
BasilSeed := DTMFromString('mrAAAAHic42BgYHjKxMBwH4hvAPEtIL4DxI+B+BUQfwDijYwMDDuBeBsQrwfiVUC8HIhXA/EmIE6KimLwdHZm8HRyYgj29mZIjY4G84szMxmCvLwYgEoowjAAAJy6FG0=');
Wheat seeds := DTMFromString('mbQAAAHicY2VgYPjCxMDwGYh/A/FHIH4LxCmMDAx5QBwLxHFAnAbElXGmDL4eZgx9nSkMiQGeDBUJPgzYACMWDAYAm2AMPQ==');
AddOnTerminate('FreeTheDTMs');
wait(500);
end;
Procedure RandomWaiter(min,max: Integer);
begin
randomWait := randomRange(min,max);
wait(randomWait);
end;

Procedure CenterClick(DoubleClick: Boolean);
begin
Mouse(CenterX,CenterY,1,1,1);
wait(20);
if(DoubleClick)
then begin
fastClick(1);
end;
end;
Procedure clickObject(item: String; DoubleClick: Boolean);
begin
writeln('Found ' +item);
Mouse(x,y,1,1,1);
wait(20);
if(DoubleClick)
then begin
fastClick(1);
end;
wait(100);
end;

Procedure E_Rake;
begin
writeln('Started program - Raking...');
wait(100);
CenterClick(true);
RandomWaiter(7000,9000);
end;
Procedure E_Compost;
begin
if FindDTM(Compost, x, y, InvX1, InvY1, InvX2, InvY2) then begin
clickObject('Compost', false);
RandomWaiter(1000,1500);
CenterClick(false);
writeln('Applying Compost...');
RandomWaiter(5000,9000);
end;
end;
Procedure E_Dust;
begin
if FindDTM(Dust, x, y, InvX1, InvY1, InvX2, InvY2) then begin
clickObject('Dust', false);
RandomWaiter(1000,1500);
CenterClick(false);
writeln('Applying Dust...');
RandomWaiter(3000,6000); //7000-9000
end;
end;
Procedure E_Scarecrow;
begin
if FindDTM(Scarecrow, x, y, InvX1, InvY1, InvX2, InvY2) then begin
clickObject('Scarecrow', false);
RandomWaiter(1000,1500);
CenterClick(false);
writeln('Applying Scarecrow...');
RandomWaiter(3000,6000);
end;
end;
Procedure E_Seeds(seedDMT:Integer);
begin
if FindDTM(seedDMT, x, y, InvX1, InvY1, InvX2, InvY2) then begin
clickObject('Seeds', false);
RandomWaiter(1000,1500);
CenterClick(false);
writeln('Planting Seeds...');
RandomWaiter(4000,6000);
end else begin
if FindDTM(seedDMT, x, y, InvX1, InvY1, InvX2, InvY2) then
writeln('Could not find Seeds - Stopping program...');
TerminateScript;
Exit;
end;
end;
Procedure E_Water;
begin
if FindDTM(Watercan, x, y, InvX1, InvY1, InvX2, InvY2) then begin
clickObject('Watercan', false);
RandomWaiter(1000,1500);
CenterClick(false);
writeln('Watering Seeds...');
RandomWaiter(5000,7000);
end else
begin
writeln('Could not find Watercan - Stopping program...');
TerminateScript;
Exit;
end;
end;
Procedure E_Spam;
begin
writeln('Spamming leftClick');
repeat
RandomWaiter(500,1000);
//CenterClick(true);
fastClick(1);
wait(20);
fastClick(1);
If FindColorTolerance(IRx,IRy,1074175,24,456,290,521, 1) Then Begin //finds color organge in Chat box / Looks for "Farming +X experience [x/]." / Finished Harvesting
WaitTime := 100;
writeln('Harvested successfully');
end;
until(WaitTime = 100);
end;
Procedure E_Prune;
begin
pruned := false;
attempt := 0;
writeln('Looking for disease')
repeat
RandomWaiter(500,1000);
attempt := attempt +1
If FindColorTolerance(x,y,2447435,434,30,591,502, 1) Then Begin //finds color of Prune
pruned := true;
writeln('Found disease... pruning');
clickObject('Disease',true);
RandomWaiter(5000,6000);
end;
until(pruned OR attempt = 13);
writeln('Stopped pruning')
end;
Procedure E_MoveToPlot(plot: Integer);
begin
wait(1000);
if(plot = 1) Then begin
Mouse(CenterX,(CenterY-235),1,1,1);
wait(20);
fastClick(1);
RandomWaiter(7000,9000);
end;
if(plot = 0) Then begin
Mouse(CenterX,(CenterY+125),1,1,1);
wait(20);
fastClick(1);
RandomWaiter(7000,9000);
end;
end;



//Main program
begin
activateclient();
LoadDTMs;

if(numberOfPlots = 1) Then Begin
repeat
WaitTime := 0;
RandomWaiter(900,1200);

E_Rake;
E_Compost;
E_Dust;
E_Scarecrow;
E_Seeds(PotatoSeed);
E_Water;
E_Spam;
writeln('Restarting program')

until(false);
end;

//////////////////////////////////////////////////////////////
if(numberOfPlots = 2) Then Begin
repeat
WaitTime := 0;
RandomWaiter(900,1200);
E_Rake;
E_Compost;
E_Dust;
E_Scarecrow;
E_Seeds(PotatoSeed);
E_MoveToPlot(1); //Move to next plot
//E_Rake; (*) The move procedure rakes automatically (*)
E_Compost;
E_Dust;
E_Scarecrow;
E_Seeds(PotatoSeed);
E_Water;
E_Prune; //Find disease -- If found... Progress... If not found in 3-6 seconds... Progress ... Find later on...
E_MoveToPlot(0); //Move to previous plot
E_Water;
E_Prune;
E_MoveToPlot(1);
E_Spam;
E_MoveToPlot(0);
E_Spam;
writeln('Restarting program');

until(false);
end;

End.

MaxGreden

2014-12-21 03:51:58

(Since It's a pain in the ass to type in a post with the code, laggy, I will make an additional post)
The new version has security features such as human movement, human-like mouse clicks, and random delays… Much harder to detect…
The new version features Potato,Garlic,Jute,Basil and Wheat seeds to be used. Option to change seeds is in the main program.

The new version also gives you the option to work on 2 plots at the same time. (If your farming level allows it).

You will need the SRL-6 plugin.
Enjoy!

MaxGreden

2014-12-21 03:53:56

From: letsrock
Could not find Seeds - Stopping program…
Could not find Watercan - Stopping program…
Successfully executed.
The following DTMs were not freed: [0, 1, 2, 3, 4]

Can You Help Me Guys ??

Follow the instructions carefully. Did you have the inventory open in the right side of the screen?

MaxGreden

2014-12-21 03:55:54

From: bgtgust
i get:
Error: Exception: You passed a wrong xe to a finder function: 1020. The client has a width of 744, thus the xe is out of bounds. at line 59
The following DTMs were not freed: [0, 1, 2, 3, 4]
think it has something to do with the res? or does it matter if its in browser or client?


It was made to work for browser. Did you target the client with Simba?

xfrodo1

2014-12-24 01:19:54

When i tried runnign this script I got an error with the wheat line, so i deleted it. Then i get the error were,

Compiled successfully in 1500 ms.
Started program - Raking…
Successfully executed.The following DTMs were not freed: [6, 7]

any fix?

- Edit:
And it doesn't rake at all.

–Edit 2:
When used on the inbrowser game it rakes but then stops. This time without the
'Successfully executed.The following DTMs were not freed: [6, 7]'

—Edit 3 (final till reply) :
No idea what I did but its not even raking again.

MaxGreden

2014-12-24 10:06:02

Unfortunately, the script has a lot of strict instructions… did you follow all of them?
//Move Camera as far up you can, so the angle is top-down
//Camera Facing Directly North
//Character in the middle of a crop field
//Set Resolution 1024-600
// Move your window in proper resolution, to left-top of the screen
//ZOOM IN to the limit, but keep camera angle looking from top
//Have iventory Open and keep it on the right side of the screen
//Target Eldevin client
//Chat Visible
//Chat on 'General chat'

Make sure you also have a watercan and seeds.

Which version did you use?

MaxGreden

2014-12-24 10:15:30

Oh yeah the wheat line… deerp.. the tag is in 2 words… if you wanna fix just change it to wheatSeed. I also forgot to write the freeDTM on the new seed types.

xfrodo1

2014-12-24 11:20:09

From: MaxGreden
Oh yeah the wheat line… deerp.. the tag is in 2 words… if you wanna fix just change it to wheatSeed. I also forgot to write the freeDTM on the new seed types.


Alright ill check, i did do all the instructions but maybe a new day it'll work, and i tried using the v2 to the beginning, but then switched to the v1 when it wasn't working… then v2 again XD

ill check V2 with now.

Edit: Still getting an error at the wheats seeds line.

Edit 2: After making some changes i was able to stop the error of the wheat, (IE: i added wheatSeed to the var line and make it one word,)

But after raking the script instantly stops again…. i'm not a programmer and i'm having to learn as i read up on this XD ill tell you if i figure out the problem asi doubt you want to read code on Christmas Eve.

;D Merry Christmas

hidulphus

2014-12-26 11:51:32

nice

MaxGreden

2014-12-29 07:24:26

From: xfrodo1
Alright ill check, i did do all the instructions but maybe a new day it'll work, and i tried using the v2 to the beginning, but then switched to the v1 when it wasn't working… then v2 again XD

ill check V2 with now.

Edit: Still getting an error at the wheats seeds line.

Edit 2: After making some changes i was able to stop the error of the wheat, (IE: i added wheatSeed to the var line and make it one word,)

But after raking the script instantly stops again…. i'm not a programmer and i'm having to learn as i read up on this XD ill tell you if i figure out the problem asi doubt you want to read code on Christmas Eve.

;D Merry Christmas


So, V1 is working but V2 isn't do you have the SRL 6-Master plugin installed? You need it for the commands such as "Fastclick" and "Mouse". (I think)



Unfortunately, I think I lost my Eldevin account due to it was connected to my Twitter, and I deleted my Twitter, I don't bother starting over, so I can't test the script, so I won't be working on this anymore.