SRL Archive - RS3 Outdated / Broken Scripts

New Guild Pwner


Griff

2008-08-17 20:46:13

I have been working on this guy for quite some time now, and now its getting really good. It mines coal in the mining guild, then banks it. Please post all proggies here so I can improve the script as much as possible.

Enjoy!


Version 1.1
oops, put in the wrong version. It now works great. (actually mines now) :D

Griff

2008-08-17 20:47:13

reserved for proggie

jkmaster

2008-08-17 20:54:21

Downloaded, gunna check it out now. Script looks good, all i really know is that the proggy is wrong Writeln(' Willows Chopped ' + IntToStr(Mined) + 'Coal'); should be Writeln(' Mined' + IntToStr(Mined) + 'Coal');

Griff

2008-08-17 20:55:35

lol oops I'll fix that thanks… Hope the script runs well for you

:D i took that from my willow chopper

Awkwardsaw

2008-08-17 21:24:21

the dtms lag like crazy at the guild ladder. haha im not all to good with them so i cant give any advise

oh yeah, your current version didnt compile, so i took out the auto responder thing, and it works(untill it lags)

{Guild PWNER by griff721!!! A multiplayer guild miner that mines coal,
then banks in the fally bank. PLEASE post all progges at srl-forums
Fill in lines 30-40 (or more if more players) and run the script with
all players in the bank.}

program New;
{.include SRL\SRL.scar}
{.include srl/srl/skill/mining.scar}

var x, y, HP, HPTime: Integer;
CoalDTM : Integer;
done:integer;
ColorSign : string;
Mined : Integer;
ToMineLadderDTM : Integer;
Pick: integer;

Const
MineTime = 9000; // Around 3-4 more seconds than average mining rock time
Loads = 2; // How many loads each player before switching?

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

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

Procedure AntiBan;
begin
if(not(LoggedIn))then
Exit;
case Random(17) of
0: begin
HoverSkill('Woodcutting', false);
wait(2453+Random(432));
end;
1: begin
HoverSkill('Woodcutting',false);
wait(2364+Random(413));
GameTab(4);
end;
2: PickUpMouse;

7: begin
MakeCompass('N');
wait(100+random(5));
MakeCompass('S');
wait(100+random(5));
MakeCompass('N');
end;
8: begin
RandomRClick;
wait(500 + random(500));
end;
9: begin
IdleTime(1000 + Random(750), 500, 0.5);
Wait(300 + random(700));
end;
end;
end;

function InFight: Boolean; //By FrozenSoul
begin
if not (LoggedIn) then
Exit;
if Players[CurrentPlayer].Integers[4] = 0 then
begin
Players[CurrentPlayer].Integers[4] := GetSkillInfo('hitpoints', False);
GameTab(4);
end else
if Players[CurrentPlayer].Integers[4] > HP then
if TimeFromMark(HPTime) >= 60000 then
begin
x := TimeFromMark(HPTime) - 60000;
MarkTime(HPTime);
DecEx(HPTime, x);
Inc(HP);
end;
if FindColor(x, y, 65280, 217, 129, 297, 209) then
begin
x := GetMMLevels('hp', ColorSign);
if x = -1 then
begin
Result := FindFight;
Exit;
end;
if (x < HP) then
begin
Result := True;
WriteLn('******** FOUND FIGHTING RANDOM ********');
WriteFileString(TheFile, '******** FOUND FIGHTING RANDOM ********' + Chr(13));
TakeScreen('Found Fight');
Inc(Fights);
MarkTime(HPTime);
HP := GetMMLevels('hp', ColorSign);
if HP = -1 then
HP := Players[CurrentPlayer].Integers[4];
end;
end;
end;

function ToMineLadderDDTM: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..4] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 12;
dtmMainPoint.y := 17;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 12130;
dtmMainPoint.Tolerance := 0;

dtmSubPoints[0].x := 12;
dtmSubPoints[0].y := 17;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 12130;
dtmSubPoints[0].Tolerance := 0;

dtmSubPoints[1].x := 16;
dtmSubPoints[1].y := 18;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 12130;
dtmSubPoints[1].Tolerance := 0;

dtmSubPoints[2].x := 16;
dtmSubPoints[2].y := 23;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 12130;
dtmSubPoints[2].Tolerance := 0;

dtmSubPoints[3].x := 10;
dtmSubPoints[3].y := 21;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 65536;
dtmSubPoints[3].Tolerance := 0;

dtmSubPoints[4].x := 8;
dtmSubPoints[4].y := 18;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 12130;
dtmSubPoints[4].Tolerance := 0;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;


procedure FindAllRandoms;
begin
if (not (LoggedIn)) then
Exit;

FindNormalRandoms;
if (InFight) then
begin
RunTo('E', True)
FFlag(0);
Wait(1000 + random(500));
end;
end;

function ToMine: Boolean;//From BobboHobbo's tut "DDTM Walking"
var
ToMineLadderDTM: integer;
begin
SetRun(True);
ToMineLadderDTM := ToMineLadderDDTM;
if FindDTM(ToMineLadderDDTM, X, Y, 619, 125, 657, 172) then
begin
Mouse(X, Y, 8, 8, True);
WriteLn('Going to Guild');
FFlag(0);
Result := True;
end else
if RadialWalk(65536,140,190,72,4,4) then
begin
Writeln('Radial Walked to mine');
Result := True;
end else
begin
Result := False;
Writeln(' Both DDTM and Radial Walk failed tell Griff to fix the script...politely of course');
FreeDTM(ToMineLadderDTM);
if not (Result) then
begin
Logout;
exit;
end;
end;
end;

Procedure Ladder;
begin
wait(6000+random(250));
if FindObjTPA(x, y, 4751259, 20, 2, 15, 25, 10, ['adder', 'Ladder', 'dder']) then
begin
Mouse(x, y, 0, 0, false);
ChooseOption('down')
end;
end;

Procedure MineRocks;
begin
MakeCompass('N');
Repeat
Antiban;
FindAllRandoms;
if FindObjTPA(x, y, 3230025, 20, 2, 15, 25, 10, ['ocks', 'Rocks', 'cks']) then
begin
Mouse(x, y, 0, 0, false);
ChooseOption('ine')
Antiban;
Wait(MineTime+random(300));
FindAllRandoms;
end;
Until(Invfull);
if (RadialWalk(79198,210,290,72,3,3)) then
exit;
if not (RadialWalk(79198,210,290,72,3,3))
then
begin
RadialWalk(4344902,210,290,72,3,3);
end;
if RadialWalk(79198,210,290,72,3,3) then
exit;
if not (RadialWalk(79198,210,290,72,3,3))
then
begin
RadialWalk(4344902,210,290,72,3,3);
end;
RadialWalk(79198,210,290,72,3,3)
if not (RadialWalk(79198,210,290,72,3,3)) then
FindAllRandoms;
nextplayer(false);
end;

Procedure BackToBank;
begin
SetRun(True);
FindAllRandoms;
if FindObjTPA(x, y, 4413540, 20, 2, 15, 25, 10, ['adder', 'Ladder', 'dder']) then
begin
Mouse(x, y, 0, 0, false);
ChooseOption('up')
wait(2100+random(186));
if (RadialWalk(1235957,270,20,72,3,3)) then
begin
wait(8000+random(350));
Writeln('Straight to the bank!');
exit;
end;
if not (RadialWalk(1368561,270,20,72,3,3)) then
begin
RadialWalk(12130,1,90,72,3,3);
wait(8000+random(300));
RadialWalk(1235957,250,300,65,3,3);
wait(6000+random(300));
Writeln('Long way back to the bank...');
FindAllRandoms;
end;
end;
end;

function Banking: Boolean;
begin
CoalDTM := DTMFromString('78DA63E46560601066400169C156609A11CA6' +
'704A9E1475513E36D8AAA4610534D728005A61A1154358D195EA86AB' +
'8818404AA9AD2786754355C986EF6B2D142510300BFD40682');
Wait(350 + Random(500));
Writeln('Banking...');
begin
OpenBankFast('feb');
FFlag(0);
Wait(500);
if FindDTM(CoalDTM,x,y,MIX1,MIY1,MIX2,MIY2)
then
begin
Mouse(x, y, 4, 3, false);
Wait(200 + Random(100));
ChooseOption('All');
FreeDTM(CoalDTM);
end;
CloseBank;
Wait(150 + random (250));
MakeCompass('N');
done:=done+1
Mined:=Mined+27
end;
end;

procedure FindBrokenPick;
var
Pick: integer;
begin
if not (LoggedIn) then
Exit;
if TimeFromMark(Pick) < 1000 then
Exit;
FindNormalRandoms;
MarkTime(Pick);
if (FindBlackChatMessage('You do not')) then
begin
Writeln('Broken Axe...Getting new axe.');
BackToBank
Banking;
end;
end;

//Progress report from griff721's and blumblebee's wc and banker
//XD blum basacally did this whole thing
procedure ProgressReport;
begin
begin
ClearDebug;
end;
SRLRandomsReport;
WriteLn('****************************************');
WriteLn('****************************************');
WriteLn(' << << <<Progress Report>> >> >> ');
WriteLn('________________________________________');
Writeln(' Script Ran For ' + TimeRunning);
Writeln(' Coal Banked ' + IntToStr(Mined) + 'Coal');
writeln('****************************************');
writeln('****************************************');
end;


begin
SetupSRL;
repeat
DeclarePlayers;
LoginPlayer;
repeat
ToMine;
Ladder;
MineRocks;
BackToBank;
Banking;
ProgressReport;
until(done >= Loads);
NextPlayer(true);
until(false);
end.

jkmaster

2008-08-17 21:29:09

(deleted)

Awkwardsaw

2008-08-17 21:38:11

ok well, i found some bugs. First i made the script smart compatible. And then i found a bug. Your anti-ban talking procedure was missing a begin so i added one but then my scar couldnt read inchatline the function so i deleted that part altogether. Now when i try to run, it takes me to the mine but cant go down the ladder O.o


thats almost exactly what i just said =p

and thanks for the smart, did the script lag for you?

jkmaster

2008-08-17 21:39:31

From: akwardsaw
thats almost exactly what i just said =p

and thanks for the smart, did the script lag for you?


Uh yes it did kinda, redownload the script at least now it goes down the ladder, still won't mine though >.< and i don't have time to update more because i gtg eat dinner soon.(h)

Griff

2008-08-17 21:52:51

sorry guys, I put in the wrong version. It now works great, mines like a charm :D

And jkmaster dont update my script! Its mine, and I can do it perfectly fine. I had a few glitches, I ironed them out, and now ti works great. DO NOT try and take control

jkmaster

2008-08-17 21:59:43

oh sry dude, won't do it again.

Edit: Eh not working well, still won't take me down to the mine, i think the waiting procedure's still too long. And waay too much lag.

Griff

2008-08-17 22:10:24

lol its aight, thanks for feedback anyways

Awkwardsaw

2008-08-17 22:14:36

i'll try it again.. haha

res for proggy/feedback

jkmaster

2008-08-17 22:15:02

Umm maybe make the camera angle at the highest and look for ladder through color?

Griff

2008-08-17 23:45:37

It should work with camera angle how it is, but ill do that in later versions

Scaper

2008-08-20 01:55:36

well ust looking over the code you need better standards amnd the reason it lags like hell coz if the DTMs is because you dont free em(well i can't see anyway)

maybe load all ya dtms in 1 procedure then when you need to use that DTM in a procedure call load dtms etc

if you get what ya sayin

im tierd now it is 7:00am in the uk im off to bed i'll come back later and have a better look

but keep up the good work

edit: and make a procedure called freeDTMs;

procedure FreeDTMs;
begin
FreeDTM(Blah);
FreeDTM(Meh);

WriteLn('DTMs Successfully freed');
end;

freeing em that way the script lags a hell lot less

Simtoon

2008-08-26 01:05:38

OMG a guild miner hopefully it mines more than 1 or 2 loads

jkmaster

2008-08-26 22:05:53

From: simtoon
OMG a guild miner hopefully it mines more than 1 or 2 loads


not working atm… its a few days old

TViYH

2008-09-01 12:16:08

From: griff721
sorry guys, I put in the wrong version. It now works great, mines like a charm :D

And jkmaster dont update my script! Its mine, and I can do it perfectly fine. I had a few glitches, I ironed them out, and now ti works great. DO NOT try and take control


Dude. It's not that big of a deal.
You should put a copyright in it if you're that secure..