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.