SRL Archive - First Scripts

Earth Crafter


big_jim

2008-12-08 06:38:18

Here is my first crafter, its not finished there is one small problem, i mean just cause it cant actually craft the ess into runes…..
anyway any help getting it done would be appreciated, post if your having trouble with anything getting it to run, it should actually go to altar, enter and then do nothing, if you exit altar within 3 seconds, it will walk back bank! so if you pause and craft! sadly that requires ppl watching the game cheat, which is……pointless…… anyway the script



{so far all you have to do is start in or near the varrock east bank,
with ess in 1st slot of your bank it doesnt matter if there is anything in your
invo currently it will bank it! have map set to north.}
program New;
{.include SRL\SRL.scar}
{.include SRL\SRL\Skill\RuneCrafting.scar}
var
ESS, Prtl, xpos, ypos,x,y trips: integer;
const
bank = 'veb';
Procedure VARIABLES;
Trips:= ///How many trips do ya wanna do?
/////Hit start to begin



function FindessinBank: Boolean;
begin
Result:=(FindDTM(ESS, xpos, ypos, 40,100, 460, 300));
end;

procedure SetUp;
begin
VARIABLES
SetupSRL;
ActivateClient;
ess := DTMFromString('78DA639CCFC0C0F09A0105581969836946206' +
'602D1FBF0AB01D32073B818E1F24C686A9861E620A94137078401' +
'788A0713');
Wait(500);
end;


procedure Withdrawess;
begin
Wait(100 + random(20));
if (FindBank(bank)) then
begin
Wait(70 + random(20));
if (BankScreen) then
begin
Wait(300 + random(45));
depositall
Wait(300 + random(45));
FindessinBank;
Mouse(xpos, ypos, 5, 5, False);
Wait(100 + random(35));
ChooseOption('All');
Wait(200 + random(50));
CloseBank;
end else
begin
WriteLn('Error: Could not find bank screen.')
Exit;
end;
end else
begin
WriteLn('Error: Could not find your bank nearby. Have you set the constant?')
Exit;
end;
end;

procedure walktoaltar;
begin
RadialRoadWalk(findvarrockRoadColor, 52, 67, 68+random(3), -2, 1)
wait(2250)
radialroadwalk(findvarrockRoadColor, 85, 95, 65+random(5), -2, 1)
wait(2500)
radialroadwalk(findvarrockRoadColor, 5, 40, 65+random(5), -2, 1)
wait(2500)
radialroadwalk(findvarrockRoadColor, 15, 40, 65+random(5), -2, 1)
wait(2500)
If(FindSymbol(x,y, 'tree')) then
Begin
Wait(30+random(70));
Mouse(x-random(3),y-random(3),0,0,true)
end else
begin
radialroadwalk(findvarrockRoadColor, 80, 100, 35+random(10), -2, 1)
wait(750)
If(FindSymbol(x ,y , 'tree')) then
Begin
Wait(30+random(70))
Mouse(x-random(3),y-random(3),0,0,true)
end
end;
wait(3500)
enterRCAltar
wait(1000)
end;

procedure craft;
begin
///////NEED DATA TO CRAFT/////
Findsymbol(x,y, 'transportation')
mouse(x+2, y+2, 5,5, true)
///NEED DATA TO USE PORTAL///
end;

Procedure walktobank;
begin
radialroadwalk(findvarrockroadcolor,202,247, 68+random(4),-2,1)
wait(2000)
radialroadwalk(findvarrockroadcolor,180,225, 68+random(4),-2,1)
wait(1500)
radialroadwalk(findvarrockraodcolor,170,190, 30+random(5),-2,1)
Wait(1000)
radialroadwalk(findvarrockroadcolor,202,247, 68+random(4),-2,1)
wait(2000)
radialroadwalk(Findvarrockroadcolor,260,280, 50+random(5),-2,1)
wait(1250)
end;

begin
setup
repeat
withdrawess
walktoaltar
//craft//
walktobank
Trips:=Trips-1
Until(Trips=0)
end.

benjaa

2008-12-08 10:00:58

needs a few more failsafes

for example the radialwalking, but good start

this needs fixing;

const
bank = 'veb';
Procedure VARIABLES;
Trips:= ///How many trips do ya wanna do?
/////Hit start to begin

INTO

const
bank = 'veb';
Trips = 80; //How many trips do ya wanna do?

here's a nice Ess Withdrawer procedure for you;

function FindessinBank: Boolean;
begin
if(FindDTM(ESS, xpos, ypos, 40,100, 460, 300))then Result := True else
begin
SearchBank('ess');
Wait(200 + Random(100));
if(FindDTM(ESS, xpos, ypos, 40,100, 460, 300))then
begin
Result := True;
end else
Result := False;
end;
end;


Also, check out Runecrafting.scar for the function EnterRCAlter (something like that)

big_jim

2008-12-08 20:14:28

First of, im not intending what i am about to say to be rude.

IF you read the whole script, trips needs to be a variable because at the end of it

begin
setup
repeat
withdrawess
walktoaltar
//craft//
walktobank
Trips:=Trips-1
Until(Trips=0)
end.
we have it being taken away, so it will stop. i could use a different variable, but thats just overcomplicating things.

Again the suggestion for using EnterRCaltar is only usable for entering the altar, which it is and not for crafting, aint that a *****.

as for the banking bit, yeah mine needs modifications but it still works, i just got to modify where on the essence it clicks other than that, I really just need help with adding anti-randoms, anti-ban, and most importantly a CRAFTING PROCEDURE!

benjaa

2008-12-08 20:39:19

Sorry, I mustve missed that.. usually scar scripts have a variable Trips and a constant TripsToDo. then when trips == tripstodo, you exit.

i've never seen anyone go with a 1 line procedure, it just looked "wrong" to me

Antirandoms is now one command: FindNormalRandoms. It supposedly finds and solves all randoms in rs, though mine screw up heaps.

Check out Antiban.scar for help with antiban. [inside SRL/Core]
Then use cases to put it all together