Bonfield
2008-02-10 18:33:53
<!– BEGIN TEMPLATE: formanswers –>
Bonfield - SRL Member Application Form
Bonfield
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
no
Other Communitys
How Long have You Played Runescape
2 years i think
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
i enjoy the challenge of scripting, here is an autofighter that i released a while ago to the SRLjunior members sectio, i decidedto update it to the latest SRL, i would really like to be able to contribute more to these forums
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
——————————————————
<!– END TEMPLATE: formanswers –>
Bonfield - SRL Member Application Form
Bonfield
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
no
Other Communitys
How Long have You Played Runescape
2 years i think
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
i enjoy the challenge of scripting, here is an autofighter that i released a while ago to the SRLjunior members sectio, i decidedto update it to the latest SRL, i would really like to be able to contribute more to these forums
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
program Autofighter;
{.include SRL/srl.scar}
{.include SRL\SRL\Skill\Fighting.scar}
{this is an autofighter that i made
all u have to do is fill out lines 16-32 and run}
var
m, monsters, Att,Str,Def, x, y, ArrowGround, ArrowInv, ArrowInvent:Integer;
Goal : String;
const
Startplayer = 0;
mColor1 = 10066062; //colour of monster
mColor2 = 9211010; //colour of monster
mColor3 = 9474182; //colour of monster
UseRange = true; // Will you be ranging?
PickArrows = false; // If your ranging, pick up arrows? (Can only pick up iron, steel, and mithril arrows)
ArrowType = 'Mithril'; // Arrow type (Iron, Steel or Mithril))
Monster = 'Giant rat'; //Monsters name
tol = 5;
mode = 2; //1 att 2 str 3 controlled 4 defence
EvenSkills = True; //true or false
Eat = 'No'; //yes/no}
Eathp = 5; //when you want to eat
Foodname = ''; //name
Foodcolor = 1; //colour of food
VerNumber = '5'; //Version Number
MaxTime = 5000; //Maximum wait time!
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := StartPlayer;
Players[0].Name :='name';
Players[0].Pass :='pass';
Players[0].Nick :='nick';
Players[0].Active := True;
end;
procedure WriteLns(Text: string);
begin
WriteLn(Text);
Wait(200);
end;
procedure Credits;
begin
WriteLns(' [ B ]');
WriteLns(' [ B o ]');
WriteLns(' [ B o n ]');
WriteLns(' [ B o n f ]');
WriteLns(' [ B o n f i ]');
WriteLns(' [ B o n f i e ]');
WriteLns(' [ B o n f i e l ]');
WriteLns(' [ B o n f i e l d ]');
WriteLns(' [ B o n f i e l d s ]');
WriteLns(' [ B o n f i e l d s A ]');
WriteLns(' [ B o n f i e l d s A u ]');
WriteLns(' [ B o n f i e l d s A u t ]');
WriteLns(' [ B o n f i e l d s A u t o ]');
WriteLns(' [ B o n f i e l d s A u t o F ]');
WriteLns(' [ B o n f i e l d s A u t o F i ]');
WriteLns(' [ B o n f i e l d s A u t o F i g ]');
WriteLns(' [ B o n f i e l d s A u t o F i g h ]');
WriteLns(' [ B o n f i e l d s A u t o F i g h t ]');
WriteLns(' [ B o n f i e l d s A u t o F i g h t e ]');
WriteLns(' [ B o n f i e l d s A u t o F i g h t e r]');
ClearDebug;
WriteLn('tell me how my script goes =] =]') ;
end;
procedure ProgressReport;
Begin
ClearDebug;
Writeln('<|----------------------------------------------|>');
Writeln(' AutoFighter v'+VerNumber+' by Bonfield ');
Writeln(' ');
Writeln('| Worked for ' + TimeRunning + '');
Writeln(' ');
Writeln(' Attacked ' + IntToStr(Monsters));
Writeln('<|----------------------------------------------|>');
end;
procedure LoadDTM;
begin;
ArrowInvent := DTMFromString('78DA63FCCCC8C01002C44820362A184CC3441' +
'96F0259EDA86ADC34A551D55C05B23251D5F03133A0AAF9006495' +
'A3AAE1674053F315C88A4055A3A3A982A20600B75108DB');
end;
procedure EquipArrows;
begin;
GameTab(4);
if FindDTM(ArrowInvent,x, y,558, 210, 738, 446) then MMouse( x, y, 2, 2);
if IsUpText('rro') then
Mouse(x ,y, 1, 1, True);
end;
procedure ArrowColors;
begin;
if (UseRange = true) and (PickArrows = true) then
begin
if (arrowtype = 'Iron') then
begin
arrowground := 3750205;
arrowinv := 4342342;
end;
if (arrowtype = 'Steel') then
begin
arrowground := 9079445;
arrowinv := 9079445;
end;
if (arrowtype = 'Mithril') then
begin
arrowground := 5585209;
arrowinv := 5322294;
end;
end;
end;
procedure Mode2name;
begin
if not LoggedIn then exit;
if(Mode = 1) then Goal := 'Attack';
if(Mode = 2) then Goal := 'Strength';
if(Mode = 3) then Goal := 'Strength';
if(Mode = 4) then Goal := 'Defence';
end;
procedure EatFood;
begin
if (not (LoggedIn)) then exit;
if (eat = 'Yes') then
begin
repeat
if (gethp < Eathp) then
begin
Gametab(4);
if FindColorTolerance(x, y, Foodcolor, MIX1, MIY1, MIX2, MIY2, 4)
then
begin
Mouse(x ,y, 1, 1, False);
if isuptext(foodname) then
begin
Mouse(x, y, 5, 5, true);
end else
begin
WriteLn('could not find food');
end;
end;
end;
until ((gethp > eathp) or (not (LoggedIn)));
end;
end;
procedure FindRandoms;
begin
FindNormalRandoms;
end;
procedure SkillCheck;
begin
if not LoggedIn then exit;
if(Mode = 1) then
begin
HoverSkill('Attack',false);
end;
if(Mode = 2) then
begin
HoverSkill('Strength',false);
end;
if(Mode = 3) then
begin
HoverSkill('Attack',false);
wait(1000 + random(500));
HoverSkill('Strength',false);
end;
if(Mode = 4) then
begin
HoverSkill('Defence',false);
end;
end;
Procedure ArrowPickup;
begin
if (FindColorSpiralTolerance(x, y, arrowground, MSX1, MSY1, MSX2, MSY2, 8)) then
begin
MMouse(x, y, 0, 0);
wait(10 + random(10));
if (IsUpText('ake')) or (IsUpText('arrow')) or (IsUpText(arrowtype)) then
begin
Mouse(x, y, 0, 0, true);
wait(50 + random(10));
FFlag(1);
wait(1000 + random(100));
GameTab(4);
wait(100 + random(50));
if (FindColorSpiralTolerance(x, y, arrowinv, MIX1, MIY1, MIX2, MIY2, 8)) then
begin
Mouse(x, y, 0, 0, true);
end;
end;
end;
end;
function AttackTheMonster2(Color1, Color2, Color3, Tolerance: Integer; MonsterName: string): Boolean; {thanks to mastaraymond for the help}
var
i, x, y: Integer;
begin
if not LoggedIn then Exit;
Flag;
for i := 1 to 5 do
begin
if (FindColorTolerance(x, y, Color1, MSX1, MSY1, MSX2, MSY2, Tolerance + i)) or
(FindColorTolerance(x, y, Color2, MSX1, MSY1, MSX2, MSY2, Tolerance + i)) or
(FindColorTolerance(x, y, Color3, MSX1, MSY1, MSX2, MSY2, Tolerance + i)) then
begin
MMouse(x, y, 3, 3);
Wait(80 + Random(60));
if (IsUpTextMulti('Att','tta','ack' + MonsterName)) then
begin
Result := True;
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
Wait(40 + Random(20));
Flag;
Exit;
end;
end;
end;
end;
Function MakeTBoxOfTPointArrays(Points1,Points2,Points3:TPointArray;var ThePoint:TPoint): Boolean; //thanks to mastaraymond for the help explaining TPA's
Var
I,II,III:integer;
L,LL,LLL:integer;
TempBox:TBox;
begin;
if not LoggedIn then Exit;
L:= Length(Points1);
LL:= Length(Points2);
LLL:= Length(Points3);
if (L = 0) or (LL = 0) or (LLL = 0) then
begin;
Result:= False;
Exit;
end;
For I:= 0 to L-1 do
begin;
TempBox.x1:= (Points1[I].x-10);
TempBox.y1:= (Points1[I].y-10);
TempBox.x2:= (Points1[I].x+10);
TempBox.y2:= (Points1[I].x+10);
For II:= 0 to LL-1 do
if IntInBox(Points2[II].x,Points2[II].y,TempBox) then
For III:= 0 to LLL-1 do
if IntInBox(Points2[II].x,Points2[II].y,TempBox) then
For III:= 0 to LLL do
if IntInBox(Points3[III].x,Points3[III].y,TempBox) then
begin;
Result:=True;
ThePoint.x:=Round(((Points1[I].x + Points2[II].x + Points3[III].x ) div 3));
ThePoint.y:=Round(((Points1[I].y + Points2[II].y + Points3[III].y ) div 3));
exit;
end;
end;
end;
function AttackTheMonster(Color1, Color2, Color3, Tolerance: Integer; MonsterName: string): Boolean; //thanks to mastaraymond for the help explaining TPA's
var
i, x, y: Integer;
PointsColors1,PointsColors2,PointsColors3:TPointArray;
TempPoint:TPoint;
begin;
Flag;
FindColorsSpiralTolerance(MSCX,MSCY,PointsColors1,Color1,MSX1,MSY1,MSX2,MSY2,Tolerance);
FindColorsSpiralTolerance(MSCX,MSCY,PointsColors2,Color2,MSX1,MSY1,MSX2,MSY2,Tolerance);
FindColorsSpiralTolerance(MSCX,MSCY,PointsColors3,Color3,MSX1,MSY1,MSX2,MSY2,Tolerance);
if MakeTBoxOfTPointArrays(PointsColors1,PointsColors2,PointsColors3,TempPoint) then
begin;
if not LoggedIn then Exit;
MMouse(TempPoint.x,TempPoint.y, 3, 3);
Wait(80 + Random(60));
for I:= 0 to 3 do
if (IsUpTextMulti('Att','tta','ack' + MonsterName)) then
begin;
Result := True;
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
Wait(40 + Random(20));
Flag;
Exit;
end;
end;
if AttackTheMonster2(Color1, Color2, Color3, Tolerance,MonsterName) then Result:=true;
end;
procedure Fighter;
var
TempTime:Integer;
begin
if not LoggedIn then Exit;
m:= 0;
if AttackTheMonster(mcolor1, mcolor2, mcolor3, tol, monster) then
begin;
TempTime:=GetSystemTime;
FindNormalRandoms;
Repeat
Wait(50+random(100));
FindNormalRandoms
until ((GetSystemTime - TempTime) >= MaxTime) or (not(LoggedIn));
Monsters := m + 1;
ProgressReport;
end else if not AttackTheMonster(MColor1,MColor2,MColor3,Tol,Monster) then
begin;
Writeln('We cant find the monster sorry! Logging out!');
NextPlayer(false);
end;
end;
procedure Setup;
begin;
Declareplayers;
Credits;
SetupSRL;
ActivateClient;
SRLRandomsReport;
end;
begin
setup;
repeat
if (not (loggedin)) then
begin
loginplayer;
SetRun(true);
setfightmode(mode);
wait(2000 + random(1000));
SetAngle(true);
end;
FindNormalRandoms;
wait(200 + random(200));
fighter;
if PickArrows = True then ArrowPickup;
wait(200 + random(200));
until (false);
ProgressReport;
Logout;
End.——————————————————
<!– END TEMPLATE: formanswers –>