SRL Archive - Outdated / Broken

Crafting Booster


Ejjman

2007-02-19 23:25:57

My unfinished work. Too bad for me :\

program CraftingBooster;
{.include SRL\SRL.scar}
{.include SRL\SRL\skill\crafting.scar}
{.include SRL\SRL\skill\mining.scar}

var
fx, fy, cx, cy, hx, hy, rx, ry, InvX1, InvX2, InvY1, InvY2 : integer;
Wheel, Wheeler, MineTime, WheelTime, Clay, Bucket, WetClay, Bowls, Bowl, FindIt : integer;

const
ClayColor1 = 8304340; //Default
ClayColor2 = 7514566; //Default
SinkColor = 8874080; //Default
FireColor = 593486; //Default
WheelColor = 9803425; //Default
VersionNumber = '0.45'; //Default


procedure DeclarePlayers;
begin
HowManyPlayers := 4; //How many players
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := ''; //Username
Players[0].Pass := ''; //Password
Players[0].Nick := ''; //Nickname
Players[0].Active := True;
Players[0].loc := ''; //Don't touch.
Players[0].Boolean1 := True; //Equip Pickaxe?

Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';
Players[1].Active := True;
Players[1].loc := '';
Players[1].Boolean1 := True;

Players[2].Name := '';
Players[2].Pass := '';
Players[2].Nick := '';
Players[2].Active := True;
Players[2].loc := '';
Players[2].Boolean1 := True;

Players[3].Name := '';
Players[3].Pass := '';
Players[3].Nick := '';
Players[3].Active := True;
Players[3].loc := '';
Players[3].Boolean1 := True;

writeln(inttostr(HowManyPlayers)+' players.');
end;

procedure LoadPictures;
begin
Pickaxe := DTMFromString('78DA63EC636260B8CD8006189148203D17A8E' +
'61A0135AB806A1E12503319A8E613013513816A3E1250B304A8E6' +
'0E7E35004AB2090D');
Clay := DTMFromString('78DA6374676260B8CF8006189148206D0F54F' +
'39C801A0FA09A3704D4F811614E3050CD63026A9C816A5EE35703' +
'0069DC0738');
Bucket := DTMFromString('78DA632C616260D063644006BD25CE0CFF813' +
'448F43F10305601D598A2AA81C8C248209D03546349404D26508D' +
'3611E62813505349580D0073770A18');
WetClay := DTMFromString('78DA63DCCBC4C0C0CAC8800A189148207D04A' +
'84698809A0B40353C04D45C02AA6121C2AEFF0C78D50000DC3B05' +
'2C');
Wheel := DTMFromString('78DA6354616460486600036608C530A9BD9D8' +
'11548036518FE0301A32A90958BAAA6AAB010AE0604C06A8A50D5' +
'1828C8A1A801007A4E0938');
Bowl := DTMFromString('78DA639CCBCCC020CBC4800A18914820DD0D5' +
'4234E404D1F500D370135CB816AF808A859065423815F0D007767' +
'0391');
Wheeler := BitmapFromString(23, 11, 'z78DAD594490EC4200C04B' +
'F4412EC364708E1FF4F1A673910390B89660E434B75432EB50CCE' +
'FDDF61A64293258DC4C4BF9E0EE689B3A5661E6FE929D3F865878' +
'81EDD01CFDC0A436329ECDE16260E7A2C4FDD3C274E969BC9D2D5' +
'4B138F84648909A46961DD58C741B36CD40387289DECC9C818DBA' +
'919342B4D3F0F4C8A90E6297B04044B081C978D6B33CDFBAC97B3' +
'8CD71441C17443BB57753F3D458A372625788DE5995596416378B' +
'0399589FE405AE4B549ECE70A2D839720A1857527BB77675EBD9D' +
'FE018AA83B71');
end;

////////////////////////////////////////////////////////////////////////////////
//---> Progress Report Stuff
////////////////////////////////////////////////////////////////////////////////

procedure ProgressReport;
begin
writeln('{-------------------------------}');
writeln('{ Version '+VersionNumber);
writeln('{ Running for '+TimeRunning+'.');
writeln('{ Made '+IntToStr(Bowls)+' bowls.');
writeln('{ Loads to make: '+IntToStr(Players[CurrentPlayer].integer1)+'.');
SRLRandomsReport;
end;

////////////////////////////////////////////////////////////////////////////////
//---> Random Things
////////////////////////////////////////////////////////////////////////////////

function FindOven : boolean;
begin
if FindColorSpiralTolerance(cx, cy, FireColor, MSX1, MSY1, MSX2, MSY2, 15)then
begin
MMouse(cx, cy, 1, 1);
wait(500+random(200));
if IsUpTextMulti('ire', 'otte', 'ven')then
begin
Mouse(cx, cy, 1, 1, True);
wait(3000+random(3000));
result := true;
end;
end;
end;

////////////////////////////////////////////////////////////////////////////////

function FindPickaxe : boolean;
begin
if FindDTM(Pickaxe, cx, cy, InvX1, InvY1, InvX2, InvY2)then result := true;
end;

////////////////////////////////////////////////////////////////////////////////
function FindRocks2 : boolean;
begin
if FindColorSpiralTolerance(cx, cy, ClayColor2, MSX1, MSY1, MSX2, MSY2, 10)then
begin
MMouse(cx, cy, 2, 2);
if IsUpTextMulti('ine', 'ocks', 'ine')then result := true;
end;
end;

////////////////////////////////////////////////////////////////////////////////

procedure ImScared;
begin
RunAwayDirection('N');
wait(10000+random(5000));
RunBack;
end;

////////////////////////////////////////////////////////////////////////////////

procedure DoAntiBan;
begin
case Random(3) of
1: MMouse(x+500, y+500, 15, 15);
2: MMouse(x+500, y+500, 15, 15);
3: MMouse(x+500, y+500, 15, 15);
end;
end;

////////////////////////////////////////////////////////////////////////////////
//---> Actual Procedures
////////////////////////////////////////////////////////////////////////////////

procedure MineClay;
begin
if FindColorSpiralTolerance(cx, cy, ClayColor1, MSX1, MSY1, MSX2, MSY2, 10)then
begin
MMouse(cx, cy, 2, 2);
if IsUpTextMulti('ine', 'ocks', 'ine')then
begin
Mouse(cx, cy, 1, 1, True);
wait(2000+random(2000));
if IsChatMessage('swing')then
begin
MarkTime(MineTime);
repeat
if FindGas(fx, fy)then ImScared;
FindNormalRandoms;
wait(1000+random(1000));
DoAntiBan;
until IsChatMessage('manage') or (TimeFromMark(MineTime) >= 10000);
end;
end;
end;
if not FindColorSpiralTolerance(cx, cy, ClayColor1, MSX1, MSY1, MSX2, MSY2, 10)then
begin
if FindColorSpiralTolerance(hx, hy, ClayColor2, MSX1, MSY1, MSX2, MSY2, 10)then
begin
MMouse(hx, hy, 2, 2);
if IsUpTextMulti('ine', 'ocks', 'ine')then
begin
Mouse(hx, hy, 1, 1, True);
wait(2000+random(3000));
if IsChatMessage('swing')then
begin
MarkTime(MineTime);
repeat
if FindGas(fx, fy)then ImScared;
FindNormalRandoms;
wait(1000+random(1000));
DoAntiBan;
until IsChatMessage('manage') or (TimeFromMark(MineTime) >= 10000);
end;
end;
end;
end;
end;

////////////////////////////////////////////////////////////////////////////////

procedure FillBuckets;
begin
MakeCompass('E');
repeat
if FindDTM(Bucket, x, y, InvX1, InvY1, InvX2, InvY2)then
begin
MMouse(x, y, 2, 2);
wait(200+random(200));
Mouse(x, y, 1, 1, True);
wait(500+random(500));
if FindColorSpiralTolerance(cx, cy, SinkColor, MSX1, MSY1, MSX2, MSY2, 10)then
begin
MMouse(cx, cy, 2, 2);
wait(200+random(200));
if(IsUpTextMulti('se', 'ucke', 'cket'))then
begin
Mouse(cx, cy, 1, 1, True);
wait(10000+random(2000));
end;
end;
end;
until IsChatMessage('soft');
end;

////////////////////////////////////////////////////////////////////////////////

procedure MixStuff;
begin
repeat
if FindDTM(Clay, cx, cy, Invx1, Invy1, Invx2, Invy2)then
begin
MMouse(cx, cy, 2, 2);
wait(100+random(300));
Mouse(cx, cy, 1, 1, True);
wait(100+random(300));
if FindColorSpiralTolerance(hx, hy, 10255741, Invx1, Invy1, Invx2, Invy2, 10)then
begin
MMouse(hx, hy, 2, 2);
wait(100+random(300));
if IsUpTextMulti('se', 'lay', 'ater')then
begin
Mouse(hx, hy, 1, 1, True);
wait(2000+random(600));
end;
end;
end;
until not FindDTM(Clay, cx, cy, Invx1, Invy1, Invx2, Invy2);
end;

////////////////////////////////////////////////////////////////////////////////

procedure MakeBowls;
begin
MakeCompass('N');
if FindDtm(WetClay, x, y, Invx1, Invy1, Invx2, Invy2)then
begin
MMouse(x, y, 2, 2);
wait(200+random(300));
Mouse(x, y, 1, 1, True);
wait(200+random(200));
MarkTime(WheelTime);
repeat
if FindDeformed(cx, cy, Wheeler, MSX1, MSY1, MSX2, MSY2)then
begin
wait(200+random(300));
if(IsUpTextMulti('se', 'oft', 'heel'))then
begin
Mouse(cx, cy, 2, 2, True);
wait(3000+random(4000));
MMouse(316, 406, 2, 2);
wait(200+random(500));
Mouse(316, 406, 2, 2, False);
ChooseOption(hx, hy, 'Make X');
wait(1000+random(500));
TypeSend('15');
wait(200+random(300));
repeat
wait(2000+random(1000));
FindNormalRandoms;
until IsChatMessage('run') or (TimeFromMark(WheelTime) > 5000);
end;
end;
until not FindDTM(WetClay, cx, cy, Invx1, Invy1, Invx2, Invy2);
end;
end;

////////////////////////////////////////////////////////////////////////////////

procedure FireBowls;
begin
if FindOven then
begin
wait(2000+random(2000));
Mouse(315, 406, 2, 2, False);
ChooseOption(rx, ry, 'Make X');
wait(1000+random(500));
TypeSend('15');
wait(200+random(300));
repeat
wait(2000+random(1000));
FindNormalRandoms;
until IsChatMessage('any');
end;
end;

////////////////////////////////////////////////////////////////////////////////

procedure DropThem;
begin
if FindDTM(Bowl, cx, cy, Invx1, Invy1, Invx2, Invy2)then
begin
MMouse(cx, cy, 2, 2);
wait(200+random(250));
if IsUpTextMulti('se', 'ow', 'owl')then
begin
Mouse(cx, cy, 1, 1, False);
wait(200+random(200));
ChooseOption(rx, ry, 'Drop');
wait(500+random(200));
Bowls := Bowls + 1;
end;
end;
end;

////////////////////////////////////////////////////////////////////////////////
//---> Goto The Places
////////////////////////////////////////////////////////////////////////////////

procedure GotoMiningSymbol;
begin
if FindSymbol(rx, ry, 'mining spot')then
begin
Mouse(rx, ry, 2, 2, True);
Flag;
end;
if not FindSymbol(rx, ry, 'mining spot')then
begin
Players[CurrentPlayer].loc := 'Lost';
writeln('Lost. Switching players.');
NextPlayer(false);
end;
end;

////////////////////////////////////////////////////////////////////////////////

procedure GotoWaterSymbol;
begin
if FindSymbol(rx, ry, 'water')then
begin
Mouse(rx, ry, 2, 2, True);
Flag;
end;
if not FindSymbol(rx, ry, 'water')then
begin
Players[CurrentPlayer].loc := 'Lost';
writeln('Lost. Switching players.');
NextPlayer(false);
end;
end;

////////////////////////////////////////////////////////////////////////////////

procedure GotoBowlSymbol;
begin
if FindSymbol(rx, ry, 'pottery')then
begin
Mouse(rx, ry, 2, 2, True);
Flag;
end;
if not FindSymbol(rx, ry, 'pottery')then
begin
Players[CurrentPlayer].loc := 'Lost';
writeln('Lost. Switching players.');
NextPlayer(false);
end;
end;

////////////////////////////////////////////////////////////////////////////////
//---> Setup Player
////////////////////////////////////////////////////////////////////////////////

procedure SetupPlayer;
begin
if not LoggedIn then LoginPlayer;
HighestAngle;
MakeCompass('N');
SetRun(True);
if not FindSymbol(rx, ry, 'pottery')then
begin
Players[CurrentPlayer].loc := 'Lost';
writeln('Lost. Switching characters.');
nextplayer(false);
end;
if FindSymbol(rx, ry, 'pottery')then Players[CurrentPlayer].loc := 'Guild';
GameTab(4);
if Players[CurrentPlayer].Boolean1 = True then
begin
GameTab(5);
end;
if not FindPickaxe then
begin
writeln('No pickaxe. Switching players.');
Players[CurrentPlayer].loc := 'NoPick';
NextPlayer(false);
end;
Players[CurrentPlayer].Level[15] := GetSkillLevel('mining');
Players[CurrentPlayer].Level[13] := GetSkillLevel('crafting');
GameTab(4);
end;

////////////////////////////////////////////////////////////////////////////////
//---> Do The Stuff
////////////////////////////////////////////////////////////////////////////////

procedure First;
begin
GotoMiningSymbol;
repeat
MineClay;
until CountItemDtm(Clay) = 7;
end;

////////////////////////////////////////////////////////////////////////////////

procedure Second;
begin
GotoWaterSymbol;
FillBuckets;
end;

////////////////////////////////////////////////////////////////////////////////

procedure Third;
begin
MixStuff;
end;

////////////////////////////////////////////////////////////////////////////////

procedure Fourth;
begin
MarkTime(FindIt);
repeat
repeat
GotoBowlSymbol;
MakeBowls;
until not FindDTM(WetClay, x, y, Invx1, Invy1, Invx2, Invy2);
until TimeFromMark(FindIt) >= 120000;

end;

////////////////////////////////////////////////////////////////////////////////

procedure Fifth;
begin
GotoBowlSymbol;
FireBowls;
end;

////////////////////////////////////////////////////////////////////////////////

procedure Sixth;
begin
repeat
DropThem;
until not FindDTM(Bowl, cx, cy, Invx1, Invy1, Invx2, Invy2);
end;

////////////////////////////////////////////////////////////////////////////////
//---> Main Loop
////////////////////////////////////////////////////////////////////////////////

begin
SetupSRL;
SetupSRLCrafting;
LoadPictures;
ActivateClient;
BenMouse := True;
MouseSpeed := 7;
InvX1 := 560;
InvY1 := 208;
InvX2 := 742;
InvY2 := 458;
SymbolAccuracy := 0.4;
DisguiseScar('RuneScape - the massive online adventure game by Jagex Ltd');
DeclarePlayers;
repeat
repeat
SetupPlayer;
{First;
Second;
Third;}
Fourth;
Fifth;
Sixth;
Players[CurrentPlayer].integer1 := Players[CurrentPlayer].integer1 - 1;
ProgressReport;
until(Players[CurrentPlayer].integer1 = 0);
NextPlayer(True);
until(False);
end.

WhiteShadow

2007-02-20 02:31:29

description ples?

I don't want to try to guess what exactly this is for.

EDIT:

Btw, you improved alot. :} awesomee.

pwnaz0r

2007-02-20 12:16:14

Yah I have one of these in progress but it will not come out for awhile tho

Ejjman

2007-02-20 18:09:05

Shadow, this is nothing. But anyway, it mines clay, gets water in buckets, {tries} to wet the bowls, then heats the bowls, then drops, all in the crafting guild. It was meant for my <3 fawki lawl, but naww.

SubiN

2007-02-20 23:02:05

looks gud , try it out later -.-

Ejjman

2007-02-20 23:11:20

Tis incomplete, thats why its under script suggestions. Anyone can take it for grabs. Couldn't figure out the dumb deformed dtms or bitmaps.

Avaphi

2007-02-21 01:20:49

lele ejj was making this while I was studying Java :) Good script ejjy +rep for joo :P

Ejj post exactly what you cant get the script to do and ill take a look for ol times sake <3 (TP) ;)

Ejjman

2007-02-21 17:57:12

I Cannot Get The Script To Find The Silver Bowl Thingy, I Forgot What Its Called, But You Put The Wet Clay And Make A Wet Bowl. So Ya. :)

WT-Fakawi

2007-02-21 18:12:35

Try using the deformed routines. Look at Agent Smith and see how I detect the anvil.

Ejjman

2007-02-21 19:26:41

Fawki, you already said that lol, I did, I tried getting one, but I can't see your dtm of it, so I don't know what you got.

Avaphi

2007-02-21 19:29:05

Maybe ill make you a deformed bmp if you want, sometime today or tommorow? I learned from the best :) (Fawk)

Ejjman

2007-02-21 20:08:30

I think that I'm done with this project/script, and someone else can take over if they want. I MAY return and build to it later, but ya. Thanks though, bro .