SRL Archive - First Scripts

Clay Softener


Heysus

2008-10-11 16:46:37

Heysus Clay Softener

Uses reflection, has AntiBan and AntiRandom (Not sure how well the antirandom works though)

Instructions:
1. Go to Edgeville
2. Clear your inventory except for 14 empty buckets.
3. Start

Please post if theres a way i could improve it or if i'm doing anything wrong.

program HeysusClaySoftener;
{.Include SRL\SRL\Misc\Smart.Scar}
{.Include SRL\SRL.Scar}
{.Include SRL\SRL\Reflection\Reflection.scar}

var
x,y,i,n,c,A,
SoftClay,Clay,Bucket_Empty,Bucket_Water: Integer; // bmps/dtms
ClayCount: Integer;
P,P1,P2,P3,P4: TPoint;
Done: Boolean;


const
World = 121;


Procedure DeclarePlayers;
Begin

HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name :='Username';
Players[0].Pass :='Password';
Players[0].Nick :='Nick';
Players[0].Active:=True;
end;


Procedure ProgressReport;
begin
ClearDebug;
Writeln('Heysus Clay Softener');
Writeln('');
Writeln('Time: ' + TimeRunning);
Writeln('Clay Softened: ' + inttostr(ClayCount));

SRLRandomsReport;
end;


Function Location: String;
begin
P := GetMyPos

Result:='Outside';

if ((P.x <= 3098) and (P.x >= 3091)
and (P.y <= 3499) and (P.y >= 3488))
then Result:= 'Bank';

ProgressReport;
end;


Procedure AntiRandom;
begin
if not LoggedIn then exit;

FindNormalRandoms;

if FindFight then
begin
RunAway('w',true,1,15000+random(10000));
AntiRandom;
end;
end;



Procedure AntiBan;
begin
c:=random(200)

case c of
0: HoverSkill('smithing',false);
1: PickUpMouse;
2: BoredHuman;
3: SleepAndMoveMouse(250+random(250));
4: SleepAndMoveMouse(750+random(750));
end;

GameTab(4);
end;


Function Check_Clay: Boolean;
begin
Result:=false;
AntiRandom;
GameTab(4);
if CountItemsIn('inv','dtm',Clay,[0]) >= 1 then
Result:=true;
end;




Function Find_Bank: Boolean;
begin
AntiRandom;
result:=false
if Bankscreen = false then
begin
OpenBankReflection('eb');
i:=0
repeat
Wait(500+random(5));
AntiRandom;
inc(i)
until((BankScreen = true) or (i=4))
end;
if BankScreen = true then result:=true
end;


Procedure Bank;
begin
if Bankscreen = false then exit;

if(FindColorTolerance(x,y,2700606,228,299,255,317,10)) then
Mouse(x,y,3,3,true); // Turn Bank Notes Off



n := 0
if FindDTM(SoftClay,x,y,MIX1,MIY1,MIX2,MIY2) then
begin
n := CountItemsIn('inv','dtm',SoftClay,[0]);
Mouse(x,y,5,5,false);
Wait(50+random(50));
if ChooseOption('All')
then ClayCount := ClayCount + n;
Wait(500+random(500));
end;

n:= 14-CountItemsIn('inv','dtm',Clay,[0]);
if ((FindDTM(Clay,x,y,MSX1,80,MSX2,MSY2)) and (n>0)) then
begin
Mouse(x,y,5,5,false);
Wait(50+random(50));
ChooseOption('All');
Wait(500+random(500));
end;
AntiRandom;
CloseBank;
ProgressReport;
end;


Procedure Soften_Clay;
begin
if CountItemsIn('inv','bmp',Bucket_Water,[30]) = 0
then exit;

if BankScreen = true then CloseBank;

if FindBitmapToleranceIn(Bucket_Water,x,y,MIX1,MIY1,MIX2,MIY2,30) then
begin
Mouse(x,y,5,5,true);
Wait(200+random(200));
if FindDTM(Clay,x,y,MIX1,MIY1,MIX2,MIY2) then
begin
AntiRandom;
Mouse(x,y,5,5,true);
Wait(800+random(400));
Mouse(255,413,6,6,false);
Wait(100+random(100));
ChooseOption('All');
i:=0
repeat
Wait(500+random(10));
AntiRandom;
AntiBan;
inc(i)
until((FindBitmapToleranceIn(Bucket_Water,x,y,MIX1,MIY1,MIX2,MIY2,30)=false) or (i=40))
end;
end;
end;


Procedure Find_Fountain;
begin

if(FindColorTolerance(x,y,7464434,720,104,728,112,20)=false) then
Mouse(724,108,6,6,true); // Turn Run On

if CountItemsIn('inv','bmp',Bucket_Water,[30]) >= 1
then exit;

if TileOnMS( Point(3084, 3501) ,0) = false then
WalktoTile(Point(3086,3500),2,2);

AntiRandom;
if FindBitmapToleranceIn(Bucket_Empty,x,y,MIX1,MIY1,MIX2,MIY2,30) then
begin
Mouse(x,y,5,5,true);
Wait(200+random(200));
P1 := TileToMS(Point(3084, 3500),0);
P2 := TileToMS(Point(3083, 3500),0);
P3 := TileToMS(Point(3084, 3501),0);
P4 := TileToMS(Point(3083, 3501),0);
Mouse((P1.x + P2.x + P3.x + P4.x)/4, (P1.y + P2.y + P3.y + P4.y)/4,5,5,true);
i:=0
repeat
wait(500+random(5));
AntiRandom;
AntiBan;
inc(i)
until((FindBitmapToleranceIn(Bucket_Empty,x,y,MIX1,MIY1,MIX2,MIY2,30)=false) or (i=25))
end;
end;




Procedure SetupScript;
begin
SetupSRL;
SmartSetupEx(World, True, True, False);
Wait(1000);
SetTargetDC(SmartGetDC);
DeclarePlayers;
if R_LoggedIn = false then LoginPlayer;

SoftClay := DTMFromString('78DA639CCDC4C0C0C2C8800C125C391852803' +
'448F43F10304E07AAF9C580061819E4A06AC0BCA540357F8950C3' +
'CE885FCD4CA01A3E026AFA806A38F0AB0100F0C60B80');
Clay := DTMFromString('78DA634C666060E8654001536BFC185280342' +
'310FF0702C65820A38F010D3032C841D580798940A28B809A2C20' +
'D143404D2A9098845F0D006BDA0AF9');
Bucket_Empty:= SRL_GetBitmap(96);
Bucket_Water:= SRL_GetBitmap(97);
end;



Begin
SetupScript;
R_SetAngle(100);

repeat
if Check_Clay = false then
begin
if Find_Bank then Bank;
end;

if Check_Clay = true then
begin
Find_Fountain;
Soften_Clay;
if Location = 'Outside' then
Find_Fountain;
end;

AntiRandom;
ProgressReport;
until(done = true)

Logout;
ProgressReport;
Writeln('');
Writeln('Done.');
end.

joelster134

2008-10-11 17:15:58

Great try for first script, looks neat+ nice…anti randoms just do work :p its unexplanable…jkes..lol….will test soon maybe wen i make my new army

Blumblebee

2008-10-11 17:17:52

congrads looks nice, erm for your first scripts you shouldnt use reflection though (its easier to script). none the less looks nice, your standards are a bit off, but i can see you attempted to standardize which is good :). Congrads on your first script,

-Blumblebee

TViYH

2008-10-11 18:30:02

Yes, your standards need some fixing, and it doesn't look too bad!

A few things can be tweaked to make it more efficient though =]

EDIT: Why do you have it exiting procedures if it has the required items?

Example: in your FindFountain procedure, if it has more than 1 bucket of water you have it exiting the procedure. Why?

joelster134

2008-10-11 18:45:42

Can you post a non-smart version for those who donthave/dont use SMart? just a question :p will test!


Also where do we have the clay 1st bank slot?

TViYH

2008-10-11 18:48:18

Joelster, you have SMART if you have an updated SRL version.

Recommended to have clay in the top row of the bank.

joelster134

2008-10-11 18:52:53

kk lolz thanks for info for clay..gunna test after i mess around with my fighter :p

Heysus

2008-10-11 19:04:59

From: TheVoiceInYourHead

EDIT: Why do you have it exiting procedures if it has the required items?

Example: in your FindFountain procedure, if it has more than 1 bucket of water you have it exiting the procedure. Why?


If you already have buckets of water it doesn't need to find the fountain…

TViYH

2008-10-11 19:22:01

But, what if it has 1 filled bucket and 7 unfilled buckets?

Heysus

2008-10-11 19:29:05

It will use the one filled bucket and then withdraw another clay from the bank.

Phipps22

2008-10-11 19:37:00

Why would anyone want to use this? It seems like a 1 time thing with only 14 buckets. Does it fill them back up?

joelster134

2008-10-11 19:39:48

Lol this can make you alright money so ive heard…so im testing for fun btw im a nub at Rs havnt played in a bit…soft clay f2p?

Heysus

2008-10-11 19:41:22

From: Phipps22
Why would anyone want to use this? It seems like a 1 time thing with only 14 buckets. Does it fill them back up?


Of course it fills them back up lol. You can make like 2k soft clay per hour doing this. Thats around 150k profit.

joelster134

2008-10-11 19:44:02

How much clay (not soft) …i might run over night if it can :p

TViYH

2008-10-11 19:48:43

You should probably get as much clay as you want soft clay.

1 clay = 1 soft clay.
1k clay = 1k soft clay.

Depends how many soft clays you want.

joelster134

2008-10-11 19:57:44

Thanks Your always handy :) + rep for u :p

will test now!

in2it

2008-10-12 05:30:17

very RANDOM script lol but very very useful :P good work

Heysus

2008-10-12 07:32:53

Anyone know how I can make it deposit any rewards you get from random events into the bank?

bleyster

2008-10-12 08:16:29

This is very useful script. :cool:

TViYH

2008-10-12 12:54:26

Heysus, just have it deposit everything, then withdraw what you need.

Heysus

2008-10-12 16:54:35

From: TheVoiceInYourHead
Heysus, just have it deposit everything, then withdraw what you need.



Ok, ty :)

One more question: Is there any way i can make it drop a clay/soft clay when it is in certain random events that require inventory space (freaky forester/prison pete).

TViYH

2008-10-12 19:46:15

No, not really.

But, you might be able to do something like that…

I'm not sure how the AR's work, but you might be able to do:
if DetectForester then
DropItem(28);

Idk if that would work though.

yvw master

2008-10-13 12:18:52

In your AntiBan procedure I would remove the hoverskill because only hovering over 1 skill after a period of time might look botty. In replacement you can add something like

wait(15000 + (random(15000));
pickupmouse;

it makes it seem as though you got up from your computer to quickly do something then knocked the mouse when you sat back down and grabbed it. I'm new to this too so sorry my tips aren't that great.

TViYH

2008-10-13 14:53:48

Or he could do HoverSkill('random', False);

jneves7

2008-10-31 18:47:29

does this still work?

Heysus

2008-10-31 20:27:03

It should… if not I have an updated version that I made a few days ago that I know works. I'll post it soon.

jneves7

2008-10-31 23:59:00

From: Heysus
It should… if not I have an updated version that I made a few days ago that I know works. I'll post it soon.


Please do! :D
it sucks tho, since the gap between the prices of clay and soft clay has gotten much smaller :(

Heysus

2008-11-01 14:37:36

If the one posted there now doesn't work you probably need to download reflection.

mormonman

2008-11-01 14:39:01

From: jneves7
Please do! :D
it sucks tho, since the gap between the prices of clay and soft clay has gotten much smaller :(


its because of scripts like this and noobs selling for lowest… stupid ppl

in2it

2008-11-01 22:38:39

Good script for your first :) anti- randoms anti-ban :)

jneves7

2008-11-02 22:42:50

From: mormonman
its because of scripts like this and noobs selling for lowest… stupid ppl


ya, i've realised that. if people would only be more patient… they will get sold eventually!

i st33zy i

2008-11-02 23:32:16

sweet

joelster134

2008-11-03 05:36:51

From: i st33zy i
sweet




stop making useless posts man..will get you suspended

mathiasverbert

2008-11-03 09:27:25

Thank you very much was looking for a script like this

in2it

2008-11-03 16:31:56

yeah, that should work what TheVoiceinyourhead said :D

mormonman

2008-11-03 16:32:44

oops…

the minero

2008-11-03 18:14:23

Awesome way to get clay for crafting, or to make a profit on, thanks so much man

shutdown86

2008-11-03 23:17:21

Not bad i had it do all my clay now i hav 2k soft clay to sell

madis268

2008-11-19 13:17:14

Huh tried to get this working. First time I started it, it logged in and took a steel pickaxe and went to the water with buckets and tried to soft the pick xD. But after that i tried again and now it doesn't log in at all.

Jakez27

2008-11-23 14:27:07

Im getting this error every time I try to compile…
Anyone know why?
Jakez

EDIT just realised I forgot the error XD
Line 31: [Error] (16983:11): Unknown identifier 'SmartGetFieldArray2DObject' in script C:\Program Files\SCAR 3.15\includes\SRL\SRL\Reflection\Interfaces.Scar

Anarchist8x7

2008-11-24 19:01:06

Very nice, a rather useful script.

SoulCal

2008-11-25 18:53:44

this isn't bad at all and can make some cash in f2p:cool:

deWi

2008-11-26 14:32:00

Wohoo my first post :D too bad its not a very positive one, since i need help with getting this script to work. It seems the error is related to SMART:

Failed when compiling
Line 31: [Error] (16986:11): Unknown identifier 'SmartGetFieldArray2DObject' in script C:\Program Files\SCAR 3.20\includes\SRL\SRL\Reflection\Interfaces.Scar

Im very new to all of this and cant wait to learn more!

mounty

2008-11-29 21:07:37

i have the same problem. feel like a noob bet it's something really aesy.
i get:
Line 31: [Error] (16983:11): Unknown identifier 'SmartGetFieldArray2DObject' in script C:\Program Files\SCAR 3.15\includes\SRL\SRL\Reflection\Interfaces.Scar
are reflections out of date or something like that?

cheers cant wait to get this working

magixboy

2008-12-04 15:33:05

Does this script still works?

So, u take clay out of banks and soften them???

pope7pope

2008-12-09 21:23:52

its useful to make $ if only I had a clay buyer :p

simpalean

2008-12-15 16:25:59

i remember when i was doing soft clay for money..oh ..wht wonderfull days

XabdullahX

2008-12-17 18:15:06

Hi. Thx for nice script - was waiting for this :)

I didnt have that reflection.scar, so i searched a bit and found this:
http://scarreflection.googlecode.com/svn/trunk/
Then i made a folder called Reflection and put all these files in it then it worked
but now, when i try to login it tells me that i am trying to play on a members server and i should return to mainpage and click on the free play button :S (in smart)

What should i do?
is it these files or your script?

Brimmy

2008-12-18 11:36:07

Thanks very much for this, i will try it and tell you how it goes.

deathlord221997

2008-12-20 08:45:39

From: joelster134
Lol this can make you alright money so ive heard…so im testing for fun btw im a nub at Rs havnt played in a bit…soft clay f2p?


ya its f2p and its like the best way to make money in f2p
;)
:spot:

jameo 30what

2009-02-18 15:00:18

I was looking for one of theese to get some money (only got 180) so i am going to test it.

mitch12555

2009-02-18 19:58:16

Ohhhhhh, ive needed one of these

mr grumble

2009-02-24 17:35:57

Nice script! found it sometimes gets out of sink mixing the clay with the water and only make about half.

From: xabdullahx
Hi. Thx for nice script - was waiting for this :)

I didnt have that reflection.scar, so i searched a bit and found this:
http://scarreflection.googlecode.com/svn/trunk/
Then i made a folder called Reflection and put all these files in it then it worked
but now, when i try to login it tells me that i am trying to play on a members server and i should return to mainpage and click on the free play button :S (in smart)

What should i do?
is it these files or your script?


change line 222 to SmartSetupEx(World, False, True, False); for free world

southpaw63

2009-02-25 20:59:43

This script has no point for non-members such as myself

Smarter Child

2009-02-27 19:57:00

Take out reflection. You won't get members with a reflection script, hmm i guess it's nice for a FIRST! script.

Though, obviously i wouldn't trust my level 3 (EVEN) with your script.

nuclears

2009-03-07 14:23:22

nice script, are you sure it is your first xD… i'm tried and worked well nice job

blzed

2009-03-07 20:01:37

From: xabdullahx
Hi. Thx for nice script - was waiting for this :)

I didnt have that reflection.scar, so i searched a bit and found this:
http://scarreflection.googlecode.com/svn/trunk/
Then i made a folder called Reflection and put all these files in it then it worked
but now, when i try to login it tells me that i am trying to play on a members server and i should return to mainpage and click on the free play button :S (in smart)

What should i do?
is it these files or your script?


I have the same reflection problem. TYVM for posting the link. Lemme see if this script works. <(^_^)>

Edit: It worked! Rep+ to Abdullah. One problem though, when it banks and withdraws, it goes extremely slow. It takes maybe 20 seconds to find the clay. I tried to put the clay in different slots but I still get the same results.

uwish30

2009-03-09 17:51:57

this is a very useful script, plan to use it for my pure

DivineGod

2009-03-09 18:11:59

This could come in handy, ill test right now

Fresh Prince Of Nyc

2009-03-09 19:53:22

nice first script

Sir R. M8gic1an

2009-03-10 14:50:48

guys, try to make some constructive posts please…

~RM

pil21

2009-03-12 10:43:14

testing now :rolleyes: