SRL Archive - Outdated / Broken

DummyFighter MV


The Prince of Randomness?

2006-06-20 23:21:11

DummyFighter Members version

Contains 8 more lines of coding then Free Version ()/\/\|_i l-l4><!!1 :rolleyes: )


Use it to level up your new recruits, thanks guys.

program dummykiller;
{.include srl/srl.scar}

const DummyColour = 7442087;

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

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

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

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

procedure FindDummy;
var x,y:integer;
begin
if FindObj(x,y,'tta',DummyColour,10) then
Mouse(x,y,10,5,true);
Wait(1500+Random(500));
end;

procedure R_Antiban;
begin
case Random(3)+1 of
1 : RotateEvery(1);
2 : RandomChat;
3 : FindNormalRandoms;
end;
end;


begin
SetUpSrl;
DeclarePlayers;
repeat
FindDummy;
FindNormalRandoms;
R_Antiban;
if not loggedin then RandomNextPlayer(false);
if GetSkillLevel('attack')=8 then LogOut;
until(false);
end.

Bebe

2006-06-20 23:29:43

A bug I saw:

procedure R_Antiban;
begin
case Random(3) of
1 : RotateEvery(1);
2 : RandomChat;
3 : FindNormalRandoms;
end;
end;

Should be:

procedure R_Antiban;
begin
case Random(3)+1 of
1 : RotateEvery(1);
2 : RandomChat;
3 : FindNormalRandoms;
end;
end;

Because "case random(3) of" will return a number between 0-2 because you are supposed to have "0" as your starting number. ;)
But since you don't, it is a simple fix.

Test the random thing out yourself:
 program New;
var
i:integer;
begin
i:=random(5)
writeln('i is '+inttostr(i)+'');
end.

It will return 0-4 :)

The Prince of Randomness?

2006-06-20 23:31:32

Thanks Bebe, corrected.

oliver1205

2007-03-25 19:33:54

so simple yet so usefull =]