bro k
2007-06-02 18:26:16
<!– BEGIN TEMPLATE: formanswers –>
bro k - SRL Member Application Form
bro k
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
Pascal, C++,Java Script
Other Communitys
Sythe.org
How Long have You Played Runescape
3 years
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
Well, I am a Scar/SRL addict, I use this website everyday for scripting help, I see myself as a moderate Scar scripter, I know most the basics, but I am really interested in learning more. I would be honored to be accepted as an SRL member.
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
{This is a sample of my goblin fighter, please read through this.}
//—————————————————————————-//
program GoblinSchredduler;
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/Magic.scar}
{.include SRL/SRL/Skill/Fighting.scar}
{.include SRL/SRL/Skill/Runecrafting.scar}
var
CastleFloor, NewDoor, Doors, RockColor, TheBone, NewBones, OldBones, Bone1,
Bone2, Bone3, Bone4, Bone5, Tellies, BeerMask, DaggerMask, BoneMask, HideMask,
ShieldMask, EmptyBeerMask, Bones, Goblins, Hides, Shields, Daggers, Beers,
GoblinAttempts, GoblinTimeOut, HGA, LeftCorner, RightCorner, BitMap,
BonesText, BeerText, CoinsText: integer;
var
GoblinColors: array[1..16] of integer;
GB: array[0..3] of integer;
G: array[1..16] of integer;
var
GCIndex, RockDTM: integer;
var
StartTime, RunningTime, CallibrateTime, SST1, SST2, FindNorMalRandomsTime,
FindFastRandomsTime: LongInt;
//—————————————————————————-//
// – Adjust these constants if needed
const RemoteMaster = ''; //<- fill in the Nickname of the RC master
const MySRLID = ''; //<- Your SRLID. Leave blank if you dont have one.
const MySRLPassword = ''; //<- Your SRL Password here if you want to have yout stats logged
const PlayerTime = 30; //<- Time for Each Player In MINUTES!!!(until death…)
const GobMouseSpeed = 1; //<- Set Mouse Speed.
const AutoLevels = True; //<- Set True to even Skills This overrides .Skill settings.
const PickupBones = True; //<- Enable Bone Collecting.
const BonesBoost = False; //<- Collect bones during fight.
//—————————————————————————-//
//—- COLORPICK THESE MINIMAP COLORS!!!!!!!———-//
//—- COLORPICK THESE MINIMAP COLORS!!!!!!!———-//
//—- COLORPICK THESE MINIMAP COLORS!!!!!!!———-//
Procedure SetupGlobalColors;
begin
RockColor := ;
WaterColor := ;
end;
//—————————————————————————-//
Function Callibrate(How: string): Boolean; Forward;
Procedure DeclarePlayers;
begin
HowManyPlayers:=8;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active :=True;
Players[0].Skill := 'auto';
Players[1].Name :='';
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Active :=True;
Players[1].Skill := 'attack';
Players[2].Name :='';
Players[2].Pass :='';
Players[2].Nick :='';
Players[2].Active :=True;
Players[2].Skill := 'strength';
Players[3].Name :='';
Players[3].Pass :='';
Players[3].Nick :='';
Players[3].Active :=True;
Players[3].Skill := 'defence';
Players[4].Name :='';
Players[4].Pass :='';
Players[4].Nick :='';
Players[4].Active :=True;
Players[4].Skill := 'auto';
Players[5].Name :='';
Players[5].Pass :='';
Players[5].Nick :='';
Players[5].Active :=True;
Players[5].Skill := 'auto';
Players[6].Name :='';
Players[6].Pass :='';
Players[6].Nick :='';
Players[6].Active :=True;
Players[6].Skill := 'auto';
Players[7].Name :='';
Players[7].Pass :='';
Players[7].Nick :='';
Players[7].Active :=True;
Players[7].Skill := 'prayer';
end;
//—————————————————————————-//
//– Initialises a Dynamic DTM –//
//—————————————————————————-//
procedure SetRockDTM;
var DTMSubPoints: array[0..2] of TDTMPointDef;
var CGMainPoint: TDTMPointDef;
var RockTDTM: TDTM;
begin
CGMainPoint.x:=625; // Centre Of Rock Formation
CGMainPoint.y:=34;
CGMainPoint.areasize:=1;
CGMainPoint.areashape:=0;
CGMainPoint.color:=0;
CGMainPoint.tolerance:=255; // Any Color
DTMSubPoints[0].x:=630;
DTMSubPoints[0].y:=31;
DTMSubPoints[0].areasize:=1;
DTMSubPoints[0].areashape:=0;
DTMSubPoints[0].color:=RockColor;
DTMSubPoints[0].tolerance:=1;
DTMSubPoints[1].x:=623;
DTMSubPoints[1].y:=30;
DTMSubPoints[1].areasize:=1;
DTMSubPoints[1].areashape:=0;
DTMSubPoints[1].color:=RockColor;
DTMSubPoints[1].tolerance:=1;
DTMSubPoints[2].x:=628;
DTMSubPoints[2].y:=37;
DTMSubPoints[2].areasize:=1;
DTMSubPoints[2].areashape:=0;
DTMSubPoints[2].color:=RockColor;
DTMSubPoints[2].tolerance:=1;
RockTDTM.MainPoint := CGMainPoint;
RockTDTM.SubPoints := DTMSubPoints;
RockDTM := AddDTM(RockTDTM);
end;
//—————————————————————————-//
Function FindFastRandoms: Boolean;
var
i: Integer;
begin
for i:=1 to 10 do
begin
case I of
1: If FindDead then
Result := True;
2: If FindMod then
Result := True;
3: If FindMime then
Result := True;
4: If FindMaze then
Result := True;
5: If FindQuiz then
Result := True;
6: If FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
8: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
9: RC;
10: //Respond; :)
end;
wait(1);
end;
end;
//—————————————————————————-//
//—> Waits while Checking for Randoms;
//—————————————————————————-//
procedure FTWaitD ( Time : Integer );
var T, I : integer;
begin
try
T := (Time div 1000)+1;
for I := 1 to T do
begin
Wait ( 250 );
FindTalk;
end
except
begin
Wait ( Time );
FindTalk;
end;
end;
FindFastRandoms;
MarkTime(FindNorMalRandomsTime);
if FindNorMalRandomsTime-SST1 >(10000+Random(5000)) then
begin
Status('FindNorMalRandoms.');
FindNorMalRandoms;
MarkTime(SST1);
Status('FindNorMalRandoms took:'+IntToStr(SST1-FindNorMalRandomsTime)+' msec');
end;
MarkTime(FindFastRandomsTime);
if FindFastRandomsTime-SST2 >(1500+Random(1500)) then
begin
Status('FindFastRandoms.');
FindFastRandoms;
MarkTime(SST2);
Status('FindFastRandoms took:'+IntToStr(SST2-FindFastRandomsTime)+' msec');
end;
end;
//—————————————————————————-//
// – Performs FlagWait and FindTalk….
//—————————————————————————-//
function FlagFTWait:Boolean;
var FlagMark: Integer;
begin
MarkTime(FlagMark);
Wait(10);
if not FlagPresent then
begin
Result:=False;
Status('NO FLAG');
Exit;
end
else
begin
repeat
FTWaitD(200);
if not(Loggedin) then break;
until ( (not FlagPresent) or (TimeFromMark(FlagMark) > 9000) ); // waits until flag is gone or 9 seconds.
Result:=True;
end;
end;
//—————————————————————————-//
Procedure LoadBitmaps;
begin
CastleFloor := BitmapFromString(8, 8, 'z78DA333334753475341B2507' +
'880400B5B154C1');
{ NewDoor := BitmapFromString(4, 4, 'z78DA3373313535743675313' +
'135B0B4703473343286906638C4CD8D4C2D4811070002361519');
NewDoor := BitmapFromString(1, 12, 'z78DAB37034733232B1402' +
'65DCD5CB1919686E6064666584813732323330047E10FA0');}
NewDoor := BitmapFromString(32, 1, 'z78DA33733535337436A30' +
'FE9646A4415D2CCC4CDD0124202003E5A2AD9');
{ NewDoor := BitmapFromString(1, 30, 'z78DA6DCEBB1180300C03D' +
'09562D9969D928FB3FF48E448031CCD2BA442D25208DD4DA66529' +
'246D486739E508F75D06876BAB999FAD073C67BEBCDB2C16EC699' +
'768E04B0BFC1AE11FB708E4D3F5676D2990820BC0D426BB');
}
Bone1 := BitmapFromString(4, 1, 'B6ACABD3CDCDD3CDCDD3CDC' +
'D');
Bone2 := BitmapFromString(1, 5, 'E8E5E5B2A6A6B6ACABBBB0B' +
'0BEB5B5');
Bone3 := BitmapFromString(1, 7, 'D3CDCDBBB2B247381847381' +
'8473818B0A4A4B8ADAC');
Bone4 := BitmapFromString(5, 1, 'CDC6C6D3CDCD493E20DFDAD' +
'ADFDADA');
Bone5 := BitmapFromString(4, 4, '000001000001000001D2CCCC9B9' + // centre of bonebmp
'090A19595CEC7C79B909089807FDED9D9CAC3C29A8E8E000001C7' +
'BFBFA99D9D000001');
BeerMask := BitmapFromString(11, 14, 'z78DA3330C00EDCC0C080' +
'02402D13908101C58016A6D1DA04FCE1404F1368170E9498435E9' +
'CD2531779BE03008015BB2D');
DaggerMask := BitmapFromString(11, 6, 'z78DA73730301033070C3000' +
'638801B862EFC6AF08BE3B78B3C338931871297901A1AC4980000' +
'A1115305');
BoneMask := BitmapFromString(8, 7, 'z78DA33304000371C0097A' +
'C010E804B16531CBF39F8ED25462FE5007F9860AA0100B7C04951' +
'');
Shieldmask := BitmapFromString(16, 7, 'z78DA7373231618D0188' +
'CDA3514EDA2B5F900F89A86C5');
HideMask := BitmapFromString(18, 8, 'z78DA7373C3070CE808068' +
'FED23CDD723C1C681B2170095BFAB49');
EmptyBeerMask := BitmapFromString(23, 2, 'z78DA73730301031A' +
'0337245BDC306C744302F471092E1B212200F5053865');
LeftCorner := BitmapFromString(4, 4, 'z78DA33753135313137C5' +
'411A600064715CEA914500CACE13F0');
RightCorner := BitmapFromString(4, 4, 'z78DA33753135313137' +
'C5200D30002E35F8C501C9C013F0');
BonesText := BitmapFromString(24, 1, 'z78DA7373B33430317003' +
'931060EA626A6262EE4603714C121940D40300C5511EC7');
BeerText := BitmapFromString(29, 1, 'z78DA7373B334303170039' +
'3C8C00D49DCD4C5D4C4C41C42BAD1513DA62E00B6FA2506');
CoinsText := BitmapFromString(35, 1, 'z78DA7373B33430317003' +
'931060EA626A62628E8B74C3A19ED6E2C8A4011240560F9105008' +
'F812CC8');
end;
//—————————————————————————-//
procedure SetupGoblinColors;
begin
GoblinColors[1] := 8635310;
GoblinColors[2] := 4372133;
GoblinColors[3] := 6269056;
GoblinColors[4] := 3058586;
GoblinColors[5] := 3058063;
GoblinColors[6] := 2595741;
GoblinColors[7] := 2129535;
GoblinColors[8] := 5075294;
GoblinColors[9] := 7050972;
GoblinColors[10] := 7642334;
GoblinColors[11] := 12832983;
GoblinColors[12] := 7237495;
GoblinColors[13] := 8700589;
GoblinColors[14] := 6978694;
GoblinColors[15] := 3844000;
GoblinColors[16] := 7118991;
end;
//—————————————————————————-//
procedure PlayerStats;
var Active: string;
var i: Integer;
begin
if Players[CurrentPlayer].Active=True then
Active:='True'
else
Active:='False';
WriteLn ('<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>');
Writeln (' Name : '+ Players[CurrentPlayer].Name);
Writeln (' Number : '+inttostr(CurrentPlayer));
Writeln (' Active : '+ Active);
if ( Players[CurrentPlayer].Worked > 0 ) then
Writeln (' Worked : '+ inttostr(Players[CurrentPlayer].Worked));
Writeln (' Location : '+ Players[CurrentPlayer].loc);
Writeln (' Time Left : '+ IntToStr ( PlayerTime - ((RunningTime - StartTime) / 60000 ) ) + ' min.');
WriteLn ('<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>');
for I := 0 to HowManyPlayers - 1 do
begin
if Players.Active=True then Active:='T' else Active:='F';
WriteLn ( ' ' + Inttostr ( I) + ' : ' + Players.Name + ' = ' + Active
+'. - Lvl : '
+' '+inttostr(Players.level[1])
+' '+inttostr(Players.level[2])
+' '+inttostr(Players.level[3])+
+' '+inttostr(Players.level[5])+
+' '+inttostr(Players.level[8])+'. '
+'W : '+IntToStr(Players.Worked)+' min. '
+'K : '+ IntToStr(Players.Killed)+' Goblins. '
+'L: '+Players.loc);
end
WriteLn ('<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>');
end;
//—————————————————————————-//
Procedure ProgressReport;
begin
writeln(' ');
WriteLn ('/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\');
WriteLn (' – GoblinSchredduler '+VersionNumber+' – Progress Report – by WT-Fakawi – '+ 'HGA=' +IntToStr(HGA));
Writeln ('<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>');
Writeln(' Worked for '+ TimeRunning);
Writeln(' Attacked '+inttostr(Goblins)+' Goblins.');
if Bones > 0 then Writeln(' Buried '+inttostr(Bones)+' Bones.');
if Deaths > 0 then Writeln(' Died '+inttostr(Deaths)+' Times.');
if Tellies > 0 then Writeln(' Tellied '+inttostr(Tellies)+' Times.');
if Doors > 0 then Writeln(' Opened '+inttostr(Doors)+' Doors.');
if Beers > 0 then Writeln(' Drank '+inttostr(Beers)+' Beers.');
if Hides > 0 then Writeln(' Dropped '+inttostr(Hides)+' Hides.');
if Daggers > 0 then Writeln(' Dropped '+inttostr(Daggers)+' Daggers.');
if Shields > 0 then Writeln(' Dropped '+inttostr(Shields)+' Shields.');
writeln(' B1= ' + IntToStr(Gb[0]) + ' B2= ' + IntToStr(Gb[1]) +' B3= ' + IntToStr(Gb[2]) +' B4= ' + IntToStr(Gb[3]));
writeln(' 1=' + IntToStr(G[1]) + ' 2=' + IntToStr(G[2]) +
' 3=' + IntToStr(G[3]) + ' 4=' + IntToStr(G[4]) +
' 5=' + IntToStr(G[5]) + ' 6=' + IntToStr(G[6]) +
' 7=' + IntToStr(G[7]) + ' 8=' + IntToStr(G[8]) +
' 9=' + IntToStr(G[9]) + ' 10=' + IntToStr(G[10]) +
' 11=' + IntToStr(G[11]) + ' 12=' + IntToStr(G[12]) +
' 13=' + IntToStr(G[13]) + ' 14=' + IntToStr(G[14]) +
' 15=' + IntToStr(G[15]) + ' 16=' + IntToStr(G[16]));
PlayerStats;
NewBones:= Bones;
Reportvars[1] := NewBones - OldBones;
SRLRandomsReport;
OldBones:= Bones;
end;
//—————————————————————————-//
function WeAreInLumbridge: Boolean;
begin
if FindSymbol(x, y, 'water') then
begin
Players[CurrentPlayer].Loc := 'Lumbridge';
Result := True;
end;
end;
//—————————————————————————-//
function WeAreInGoblinHouse: Boolean;
begin
if FindSymbol(x, y, 'fish') then
begin
Players[CurrentPlayer].Loc := 'Goblin';
Result := True;
end;
end;
function FindGobDoorDeformed(var ObjX, ObjY: Integer; UpText1, UpText2: string;
BMP, a, b, c, d: Integer): Boolean;
var
acc, ref: Extended;
XT, YT, times, tol: Integer;
begin
ref := 0.9;
tol := 0;
for times := 1 to 5 do
begin
FindDeformedBitmapToleranceIn(BMP, XT, YT, a, b, c, d, tol, 2, True, acc);
if (acc >= ref) then
begin
MMouse(XT, YT, 0, 0);
Wait(40);
if (IsUpText(UpText1) or IsUpText(UpText2)) then
begin
ObjX := XT;
ObjY := YT;
Result := True;
Exit;
end;
end;
ref := ref - 0.1;
tol := tol + 5;
Wait(5);
end;
end;
//—————————————————————————-//
Function OpenDoor:Boolean;
var Gx,Gy: Integer;
begin
Gx := MSCx;
Gy := MSCy + 100;
if FindGobDoorDeformed(Gx, Gy, 'Ope','pen', NewDoor, MSx1 + 100, MSCY - 30, MSx2 - 100, MSCY + 30) then
begin
MMouse(GX + 10, Gy, 0, 0);
GetMousePos(Gx, Gy);
Mouse(Gx, Gy, 0, 0, True);
Result := True;
Doors := Doors + 1;
ReportVars[11] := ReportVars[11] + 1;
FFlag(0);
Mouse(280, 90, 10, 10, True);
Exit;
end;
end;
//—————————————————————————-//
procedure FindRandoms;
begin
if ( not ( LoggedIn )) then Exit;
RC;
if InBlack then
begin
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
Wait(1);
if NoGameTab then
begin
Players[CurrentPlayer].loc := 'GameTab';
Logout;
Exit;
end;
FindNormalRandoms;
OpenDoor;
Wait(1);
end;
//—————————————————————————-//
procedure WieldAll;
var i, Dx, Dy:integer;
Begin
if ( not ( LoggedIn )) then Exit;
GameTab(4);
Wait(1000 + Random(1000));
i := 0;
repeat
if (FindColor(Dx, Dy, 65536, 571 + i, 215, 601 + i, 245)) // Do we have an Object?
then
begin
Mouse(dx, dy, 3, 3, False);
if not ChooseOption(x, y, 'W') then
ChooseOption(x, y, 'Cancel')
end
Wait(500 + Random(1000));
i := i + 47;
until(i >= 141);
End;
//—————————————————————————-//
Procedure SetUpScript;
var I : Integer;
begin
LoadBitmaps;
SetupGoblinColors;
SetupGlobalColors;
HGA := 0;
GCIndex := 1;
SetupSRL;
DeclareRuneBitMaps;
DeclarePlayers;
if MySRLID <> '' then
begin
SRLID := MySRLID;
SRLPassword := MySRLPassword;
end;
for I := 0 to 19 do
ReportVars := 0;
ReportVars[12] := 1;
ScriptID := '3';
MarkTime(SST1);
MarkTime(SST2);
Reincarnate := True; // <- RETAIN PLAYERS.ACTIVE TO TRUE AFTER DEATH
SymbolAccuracy := 0.8;
BenMouse := True;
MouseSpeed := GobMouseSpeed;
SetRockDTM;
LoginPlayer;
RCMaster:=RemoteMaster;
GetAllLevels;
end;
//—————————————————————————-//
Function FindLumbridgeRoadColor: Integer;
var FX, FY, d: Integer;
var Found: Boolean;
begin
if ( not ( LoggedIn )) then Exit;
while (D < 85) do
begin
D := D + 5;
if ( CastleFloor = 0 ) then
LoadBitmaps;
If FindBitMapToleranceIn(CastleFloor, FX, FY, 580, 50, 600, 80, D) then
begin
RoadColor:=GetColor(FX, FY);
Found := True;
Result := RoadColor;
break;
end
end
end;
//—————————————————————————-//
procedure SetGoblinTimeOut;
var HP:Integer;
begin
HP := Players[CurrentPlayer].level[8] ;
if ( (HP > 0 ) and (HP < 21) ) then GoblinTimeOut := 20;
if ( (HP > 20) and (HP < 31) ) then GoblinTimeOut := 12;
if ( (HP > 30) and (HP < 41) ) then GoblinTimeOut := 8;
if HP > 40 then GoblinTimeOut := 5;
end;
//—————————————————————————-//
//– Checks and sets Auto Retaliate. True = On, False = Off –//
//—————————————————————————-//
procedure Retaliate(AutoRet:Boolean);
begin
GameTab(1);
if AutoRet then
begin
If not FindColor(x, y, 1777020, 624, 385, 719, 396) then
begin
Mouse(666, 381, 8, 8, True);
end;
end;
if not AutoRet then
begin
If FindColor(x, y, 1777020, 624, 385, 719, 396) then
begin
Mouse(666, 381, 8, 8, True);
end;
end;
end;
//—————————————————————————-//
Procedure SetLowest;
var Ci, HL1, HL2, HL:Integer;
Begin
if ( not ( LoggedIn )) then Exit;
if TabExists(2) then
begin
GetAllLevels;
HL := 100;
for Ci := 1 to 2 do
begin
HL1 := Players[CurrentPlayer].level[Ci];
HL2 := Players[CurrentPlayer].level[Ci+1];
if HL2 > HL1 then
begin
if HL > HL1 then HL := HL1;
end
else
begin
if HL > HL2 then HL := HL2;
end;
end;
SetGoblinTimeOut;
end;
for CI := 1 to 3 do
begin
if Players[CurrentPlayer].level[Ci] = HL then
begin
if CI = 3 then CI := CI + 1;
SetFightMode(CI);
Case CI of
1 : LampSkill := 'attack';
2 : LampSkill := 'strength';
4 : LampSkill := 'defence';
end;
Exit;
end;
End;
End;
//—————————————————————————-//
procedure SetPlayerParams;
begin
if ( not ( LoggedIn )) then Exit;
if Players[CurrentPlayer].skill = 'prayer' then Exit;
WieldAll;
GameTab(1);
If AutoLevels then
SetLowest
else
begin
if Players[CurrentPlayer].Skill = 'attack' then SetFightMode(1);
if Players[CurrentPlayer].Skill = 'strength' then SetFightMode(2);
if Players[CurrentPlayer].Skill = 'defence' then SetFightMode(4);
LampSkill := LowerCase ( Players[CurrentPlayer].Skill );
if Players[CurrentPlayer].Skill = 'auto' then SetLowest;
end;
if Players[CurrentPlayer].Boolean2 = False then
begin
Retaliate(True); // Set Retaliate off only the first time. :)
Players[CurrentPlayer].Boolean2:=True;
end;
FTWaitD(1000 + Random(500));
SetChat('on', 1);
SetChat('friends', 2);
SetChat('off', 3);
SetChat('on', 1);
FindTalk;
end;
//—————————————————————————-//
Function InFightAt(x, y: Integer):Boolean;
var
dx, dy: Integer;
begin
if ( FindColor(dx, dy, GreenStatusColor, x - 20, y - 15, x + 20, y + 10) or
FindColor(dx, dy, RedStatusColor, x - 20, y - 15, x + 20, y + 10) or
FindColor(dx, dy, 16728128, x - 20, y - 15, x + 20, y + 10) or
FindColor(dx, dy, 192, x - 20, y - 15, x + 20, y + 10) ) then
Result:=True;
end;
//—————————————————————————-//
Procedure WalkToGoblinField;
var Xc, Yc :integer;
var Mark6: LongInt;
begin
if ( not ( LoggedIn )) then Exit;
MakeCompass('N');
RadialRoadWalk(RoadColor, 70, 40, 70, -1, 0);
RadialRoadWalk(RoadColor, 140, 0, 70, -1, 0);
if FindSymbol(Xc, Yc, 'arrow') then
begin
Wait(1500);
MouseFindFlag(Xc , Yc + 10, 1, 1);
FFlag(0);
end
else
begin
RadialRoadWalk(RoadColor, 320, 400, 60, -1, 0);
MarkTime(Mark6);
repeat
LinearRoadWalk(RoadColor, 320, 30, 1, 1);
if (not Loggedin) then break;
if(TimeFromMark(Mark6) > 60000) then begin Logout; Exit; end;
until FindSymbol(Xc, Yc, 'fish') or FindSymbol ( Xc, Yc, 'arrow');
end;
if (FindSymbol (Xc, Yc, 'fish')) then
MouseFindFlag(Xc + 2, YC + 10, 1, 1)
else
if ( FindSymbol (Xc, Yc, 'arrow')) then
MouseFindFlag(Xc + (10 + random(10)),Yc - (30-random(10)), 1, 1);
FFlag(0);
ReportVars[10] := ReportVars[10] + 1;
Players[CurrentPlayer].Loc := 'Goblin';
end;
//—————————————————————————-//
Function ClickCountMask(optionx: String; bmp, tol: Integer):Integer;//based off PPLSUQBAWLZ's InventoryCount
var
i, e, ObjectCount : Integer;
begin
GameTab(4);
while (i < 6) do
begin
if (i = 5) and (e < 8) then
begin
i := 0;
e := e + 1;
end;
if (FindBitmapMaskTolerance(bmp, x, y, (570 + 39 * i), (214 + 35 * e), (609 + 39 * i), (249 + 35 * e), tol, 10)) then
begin
MMouse(x, y, 0, 0)
if (not (optionx = '')) then
begin
MouseItem(e * 4 + i + 1, False);
ChooseOption(x,y,optionx);
ObjectCount := ObjectCount + 1;
end
else
MouseItem(e * 4 + i + 1, True);
FTWait(1);
end;
if (i = 4) and (e = 7) then
begin
Result:=ObjectCount;
break;
end;
i := i + 1;
end;
end;
//—————————————————————————-//
Procedure CleanUpInventory;
begin
if PickupBones then Bones := Bones + ClickCountMask('ury', BoneMask, 50); // Buries Bones
if FindBitmapMaskTolerance(BeerMask, x, y, MIx1, MIy1, MIx2, MIy2, 50, 10) then
Beers := Beers + ClickCountMask('rink', BeerMask, 50); // Drink Beers
Wait(40);
if FindBitmapMaskTolerance(DaggerMask, x, y, MIx1, MIy1, MIx2, MIy2, 50, 10) then
Daggers := Daggers + ClickCountMask('rop', DaggerMask, 50); // Drop Daggers
Wait(40);
if FindBitmapMaskTolerance(EmptyBeerMask, x, y, MIx1, MIy1, MIx2, MIy2, 50, 10) then
ClickCountMask('rop', EmptyBeerMask, 50); // Drop EmptyBeers
Wait(40);
if FindBitmapMaskTolerance(ShieldMask, x, y, MIx1, MIy1, MIx2, MIy2, 50, 10) then
Shields := Shields + ClickCountMask('rop', ShieldMask, 50); // Drops Shields
Wait(40);
if FindBitmapMaskTolerance(HideMask, x, y, MIx1, MIy1, MIx2, MIy2, 50, 10) then
begin
Hides := Hides + ClickCountMask('rop', HideMask, 50); // Drops hides
Callibrate('Fast');
end;
end;
//—————————————————————————-//
Function Callibrate(how:string): Boolean;
var Cx, Cy, Tx, Ty, RDTMx, RDTMy:integer;
var WhichAngle: Extended;
begin
if How = 'Full' then
begin
if TabExists(11) then SetRun(True);
If AutoLevels then
SetLowest
HighestAngle;
CleanUpInventory;
FindTalk;
MakeCompass('N');
SetGoblinTimeOut;
ProgressReport;
FindRandoms;
end;
if FindDtmRotated(RockDTM, RDTMx, RDTMy, MMX1, MMY1, MMX2, MMY2, - Pi/4, Pi/4, 0.1,
WhichAngle) then
begin
if rs_OnMinimap(RDTMx + 15, RDTMy + 53) then
begin
if How = 'Full' then MouseFindFlag(RDTMx + 15, RDTMy + 53, 1, -1)
else
if How = 'Fast' then
MouseFindFlag(RDTMx + 15, RDTMy + 62, 1, -1);
FFLag(0);
OpenDoor;
end
else
Begin
MouseFindFlag(RDTMx, RDTMy, 1, -1)
FFlag(0);
if FindDtmRotated(RockDTM, RDTMx, RDTMy, MMX1, MMY1, MMX2, MMY2, - Pi/4, Pi/4, 0.1,
WhichAngle) then
begin
MouseFindFlag(RDTMx + 15, RDTMy + 53, 1, -1)
FFlag(0);
GoblinAttempts := 0;
end
end
Result := True;
end
else if FindSymbol(Cx, Cy, 'arrow') then
begin
Tx := Cx + 10 + random(10);
Ty := Cy - 35 - random(10);
if rs_OnMinimap(Tx, Ty) then
MouseFindFlag(Tx, Ty, 1, 1)
else
MouseFindFlag(Cx, Cy, 1, 1)
FFlag(0);
GoblinAttempts := 0;
Result := True;
end
else if FindSymbol(Cx, Cy, 'fish') then
begin
Tx := Cx + 20 + random(10);
Ty := Cy + 30 + random(10);
if rs_OnMinimap(Tx, Ty) then
MouseFindFlag(Tx, Ty, 1, 1)
else
MouseFindFlag(Cx, Cy, 1, 1)
FFlag(0);
GoblinAttempts := 0;
Result := True;
end
if Not Result then
begin
if not FindColor(x, y, WaterColor, MMx1, MMy1, MMx2, MMy2) then
begin
MouseFindFlag(MMCx - 50, MMCy, -1, 1);
FFlag(0);
if FindColor(x, y, WaterColor, MMx1, MMy1, MMx2, MMy2) then
Result := True
else
Result := False;
end;
end;
end;
//—————————————————————————-//
// – function ChooseOption3: Boolean; – //
// – by Stupid3ooo modded by WT-Fakawi – //
// – Description: – //
// – Finds Popup menu, then clicks on Coins/Beers/Bones IN THAT ORDER! – //
//—————————————————————————-//
Function ChooseOption3:Boolean;
var
i, x1, y1, x2, y2, Fx, Fy: Integer;
begin
if (FindBitmap(LeftCorner, x1, y1)) and (FindBitmap(RightCorner, x2, y2)) then
begin
for i := 1 to 3 do // ALWAYS COWHIDE FIRST!!! :)
begin
case i of
1: BitMap := CoinsText; // Sliced Bitmaps of MenuItemText
2: BitMap := BeerText; // Sliced Bitmaps of MenuItemText
3: BitMap := BonesText; // Works like a charm
end;
If FindBitMap(BitMap, Fx, Fy) then
begin
Mouse(Fx, Fy, 20, 4, True);
FTWait(1);
if not FlagFTWait then
begin
Callibrate('Fast');
Result := False;
Break;
end;
Result := True;
FlagFTWait;
Exit;
end;
end;
if (FindText(Fx, Fy, 'Cancel', upchars, x1, y1, x2, 502)) then
Mouse(Fx + 9, Fy + 3, 2, 2, True);
end;
end;
//—————————————————————————-//
Function FindBones:Boolean;
var Dx, Dy, i, j, x1, x2, y1, y2:integer;
var acc:Extended;
begin
if InvFull then CleanUpInventory;
for j := 1 to 6 do
begin
case j of
1: begin x1:= MSx1; y1 := MSy1 + 20; x2 := MSCx; y2:= MSCy; end;
2: begin x1:= MSCx; y1 := MSy1 + 20; x2 := MSx2; y2:= MSCy; end;
3: begin x1:= MSx1; y1 := MSCy; x2 := MSCx; y2:= MSy2; end;
4: begin x1:= MSCx; y1 := MSCy; x2 := MSx2; y2:= MSy2; end;
5: begin x1:= MSCx - 50; y1 := MSCy - 50; x2 := MSCx + 50; y2:= MSCy + 50; end;
6: begin x1:= MSx1; y1 := MSy1 + 20; x2 := MSx2; y2:= MSy2; end;
end
if WeAreInLumbridge or WeAreDead or (not Loggedin) then Exit;
for i := 0 to 3 do
begin
case i of
0: TheBone := Bone1;
1: TheBone := Bone2;
2: TheBone := Bone3;
3: TheBone := Bone4;
end;
Status('Searching for bones in Quadrant ' + IntToStr(j) + ' for Bone '+IntToStr(i));
if InventoryFull then Exit;
if (not Loggedin) then Exit;
FindDeformedBitmapToleranceIn(TheBone, Dx, Dy, x1, y1, x2 , y2 , 10, 1, True, acc);
// writeln('acc =' + FloatToStr(acc));
begin
if (acc > 0.4) then
begin
MMouse(Dx, Dy, 0, 6);
GetMousePos(Dx, Dy);
FindTalk;
if FindColorTolerance(Dx, Dy, 3703002, 42, 8, 120, 21, 70) then // Orange Color indicating Uptext!
begin
GetMousePos(Dx, Dy);
Mouse(Dx, Dy, 0, 0, False);
if ChooseOption3 then
begin
Result := True;
Gb := Gb + 1;
Exit;
end
else Break;
end
end
end;
Wait(1);
end;
end
end;
//—————————————————————————-//
Procedure WaitGoblin;
var Mark5:Integer;
begin
FFlag(0);
MarkTime(Mark5);
repeat
if((WeAreInLumbridge) or (not (Loggedin)) or (WeAreDead)) then Exit;
FTWaitD(250 + Random(100));
if PickupBones then
if BonesBoost then
if TimeFromMark(Mark5) mod 500 < 150 then Findbones;
if (TimeFromMark(Mark5) > (GoblinTimeOut * 1000) ) then Exit;
until not InFight;
Goblins := Goblins + 1;
ReportVars[0] := ReportVars[0] + 1;
Players[CurrentPlayer].Killed := Players[CurrentPlayer].Killed+1;
end;
//—————————————————————————-//
Function ClickGoblin: Boolean;
var CBx,CBy,Dmx, Dmy: Integer;
begin
if Players[CurrentPlayer].skill = Lowercase('prayer') then
begin
Result := False;
Exit;
end;
for GCIndex := 1 to 16 do
begin
CBx := MSCx;
CBy := MSCy;
if FindColorSpiralTolerance(CBx, CBy, GoblinColors[GCIndex], MSX1, MSY1, MSX2, MSY2, 12) then
begin
GoblinAttempts := GoblinAttempts + 1;
Status('GA = '+IntToStr(GoblinAttempts));
MMouse(CBx, CBy, 0, 0);
if FindColorTolerance(Dmx, Dmy, 318168, 42, 8, 120, 21, 50) then // Yellow
begin
if IsUpText('b') then
begin
if not InFightAt(CBx, CBy) then
begin
Mouse(CBx, CBy, 0, 0, True);
G[GCIndex] := G[GCIndex] + 1;
FTWait(1);
if not FlagFTWait then
begin
Callibrate('Fast');
Exit;
end;
FFlag(1);
if (InChatMulti('alr', 'und ',' att')) then
begin
Result:=False;
WaitGoblin;
Exit;
end;
if (InChatMulti('ome', 'one ',' ing')) then
begin
Result:=False;
Exit;
end
else
begin
Result := True;
GoblinAttempts := 0;
end;
Exit;
end;
end;
end;
end;
end;
end;
//—————————————————————————-//
Function TellyHo:Boolean;
begin
if TabExists(7) then GameTab(7) else Exit;
FTWait(8);
MarkTime(Mark);
SetChat('off', 1);
Cast('Home Teleport');
FTWait(8);
if InChat('to wait') then
begin
Players[CurrentPlayer].Active := False;
Players[CurrentPlayer].Boolean1 := True;
LogOut;
end
else
begin
Repeat
Wait(250);
FindTalk;
until (TimeFromMark(Mark) > 30000); // wait 30 secs for lumby telly
SymbolAccuracy := 0.4;
if ( FindSymbol(x, y, 'guide') or FindSymbol(x, y, 'water')) then
begin
Players[CurrentPlayer].Active := True;
Result:= True;
Tellies := Tellies + 1;
ProgressReport;
LogOut;
end
else
begin
Players[CurrentPlayer].Active := False;
Result:= False;
Players[CurrentPlayer].Boolean1 := True;
LogOut;
end;
end;
GoblinAttempts := 0;
SymbolAccuracy := 0.8;
end;
//—————————————————————————-//
//– Checks False Player and Tellies Home if possible —//
//—————————————————————————-//
procedure LastChance;
var i: Integer;
begin
for i:= 0 to (HowManyPlayers - 1) do
begin
If Players.Boolean1 = False then // last change flag, assume not set.
begin
CurrentPlayer := i;
LoginPlayer;
Wait(4000);
if NoGameTab then
begin
Players.Active := False;
Players.Boolean1 := True;
LogOut;
end
else
begin
GameTab(7);
FTWait(8);
MarkTime(Mark);
SetChat('off', 1);
Cast('Home Teleport');
FTWait(8);
if InChat('to wait') then
begin
Players.Active := False;
Players.Boolean1 := True;
LogOut;
end
else
begin
Repeat
Wait(250);
FindTalk;
until (TimeFromMark(Mark) > 30000); // wait 30 secs for lumby telly
SymbolAccuracy := 0.4;
if ( FindSymbol(x, y, 'guide') or FindSymbol(x, y, 'water')) then
begin
Players.Active := True;
Tellies := Tellies + 1;
ProgressReport;
LogOut;
end
else
begin
Players.Active := False;
Players.Boolean1 := True;
LogOut;
end;
end;
end;
end else Writeln(Players.name + ' is hopelessly lost');
end;
SymbolAccuracy := 0.6;
end;
//—————————————————————————-//
//– As NextPlayer with LastChance —//
//—————————————————————————-//
procedure NextGPlayer(Active: Boolean);
begin
if RandomPlayer then
RandomNextPlayer(Active)
else
begin
if not Active then
Players[CurrentPlayer].Active := False;
Logout;
PlayerCurTime := (GetSystemTime div 1000);
Players[CurrentPlayer].Worked := Players[CurrentPlayer].Worked +
((PlayerCurTime - PlayerStartTime) / 60);
CurrentPlayer := CurrentPlayer + 1;
if CurrentPlayer > HowManyPlayers - 1 then
CurrentPlayer := 0;
while Players[CurrentPlayer].Active = False do
begin
CurrentPlayer := CurrentPlayer + 1;
if CurrentPlayer > HowManyPlayers - 1 then
begin
CurrentPlayer := 0;
LastChance; // <- if allFalse then run lastChance.
end;
end;
LoginPlayer;
end;
end;
//—————————————————————————-//
// Main EventLoop
//—————————————————————————-//
begin
SetupScript;
Repeat
SetPlayerParams;
MakeCompass('N');
if WeAreInLumbridge then
begin
If (FindLumbridgeRoadColor = 0) then RoadColorChecker;
WalkToGoblinField;
end
Callibrate('Full');
CallibrateTime := GetSystemTime;
StartTime := GetSystemTime;
Repeat // Fighting Loop
RunningTime := GetSystemTime;
if ClickGoblin then
WaitGoblin
else if PickupBones then
Findbones;
if Players[CurrentPlayer].skill = 'prayer' then FTWait(1);
if BonesBoost then FindBones;
if HGA < GoblinAttempts then HGA := GoblinAttempts; // Highest GoblinAttempts
If GoblinAttempts > 24 then Callibrate('Full');
If GoblinAttempts > 100 then TellyHo;
If TimeFromMark(CallibrateTime) > (180000 + Random(6000)) then
begin
Callibrate('Full');
MarkTime(CallibrateTime);
end
if (not LoggedIn)
or WeAreDead
or WeAreInLumbridge
or (RunningTime - StartTime > ( PlayerTime * 60000 ) )
then Break;
Until WeAreDead or (not LoggedIn);
if LoggedIn then
begin
SetChat('off', 1);
if WeAreDead then Deaths := Deaths + 1;
repeat
FTWaitD(1000);
until(not(LoggedIn));
NextPlayer(True);
FTWaitD(4000 + Random(2000));
end;
if (not(Loggedin)) then NextGPlayer(False);
until(False);
end.
——————————————————
<!– END TEMPLATE: formanswers –>
bro k - SRL Member Application Form
bro k
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
Pascal, C++,Java Script
Other Communitys
Sythe.org
How Long have You Played Runescape
3 years
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
Well, I am a Scar/SRL addict, I use this website everyday for scripting help, I see myself as a moderate Scar scripter, I know most the basics, but I am really interested in learning more. I would be honored to be accepted as an SRL member.
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
{This is a sample of my goblin fighter, please read through this.}
//—————————————————————————-//
program GoblinSchredduler;
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/Magic.scar}
{.include SRL/SRL/Skill/Fighting.scar}
{.include SRL/SRL/Skill/Runecrafting.scar}
var
CastleFloor, NewDoor, Doors, RockColor, TheBone, NewBones, OldBones, Bone1,
Bone2, Bone3, Bone4, Bone5, Tellies, BeerMask, DaggerMask, BoneMask, HideMask,
ShieldMask, EmptyBeerMask, Bones, Goblins, Hides, Shields, Daggers, Beers,
GoblinAttempts, GoblinTimeOut, HGA, LeftCorner, RightCorner, BitMap,
BonesText, BeerText, CoinsText: integer;
var
GoblinColors: array[1..16] of integer;
GB: array[0..3] of integer;
G: array[1..16] of integer;
var
GCIndex, RockDTM: integer;
var
StartTime, RunningTime, CallibrateTime, SST1, SST2, FindNorMalRandomsTime,
FindFastRandomsTime: LongInt;
//—————————————————————————-//
// – Adjust these constants if needed
const RemoteMaster = ''; //<- fill in the Nickname of the RC master
const MySRLID = ''; //<- Your SRLID. Leave blank if you dont have one.
const MySRLPassword = ''; //<- Your SRL Password here if you want to have yout stats logged
const PlayerTime = 30; //<- Time for Each Player In MINUTES!!!(until death…)
const GobMouseSpeed = 1; //<- Set Mouse Speed.
const AutoLevels = True; //<- Set True to even Skills This overrides .Skill settings.
const PickupBones = True; //<- Enable Bone Collecting.
const BonesBoost = False; //<- Collect bones during fight.
//—————————————————————————-//
//—- COLORPICK THESE MINIMAP COLORS!!!!!!!———-//
//—- COLORPICK THESE MINIMAP COLORS!!!!!!!———-//
//—- COLORPICK THESE MINIMAP COLORS!!!!!!!———-//
Procedure SetupGlobalColors;
begin
RockColor := ;
WaterColor := ;
end;
//—————————————————————————-//
Function Callibrate(How: string): Boolean; Forward;
Procedure DeclarePlayers;
begin
HowManyPlayers:=8;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active :=True;
Players[0].Skill := 'auto';
Players[1].Name :='';
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Active :=True;
Players[1].Skill := 'attack';
Players[2].Name :='';
Players[2].Pass :='';
Players[2].Nick :='';
Players[2].Active :=True;
Players[2].Skill := 'strength';
Players[3].Name :='';
Players[3].Pass :='';
Players[3].Nick :='';
Players[3].Active :=True;
Players[3].Skill := 'defence';
Players[4].Name :='';
Players[4].Pass :='';
Players[4].Nick :='';
Players[4].Active :=True;
Players[4].Skill := 'auto';
Players[5].Name :='';
Players[5].Pass :='';
Players[5].Nick :='';
Players[5].Active :=True;
Players[5].Skill := 'auto';
Players[6].Name :='';
Players[6].Pass :='';
Players[6].Nick :='';
Players[6].Active :=True;
Players[6].Skill := 'auto';
Players[7].Name :='';
Players[7].Pass :='';
Players[7].Nick :='';
Players[7].Active :=True;
Players[7].Skill := 'prayer';
end;
//—————————————————————————-//
//– Initialises a Dynamic DTM –//
//—————————————————————————-//
procedure SetRockDTM;
var DTMSubPoints: array[0..2] of TDTMPointDef;
var CGMainPoint: TDTMPointDef;
var RockTDTM: TDTM;
begin
CGMainPoint.x:=625; // Centre Of Rock Formation
CGMainPoint.y:=34;
CGMainPoint.areasize:=1;
CGMainPoint.areashape:=0;
CGMainPoint.color:=0;
CGMainPoint.tolerance:=255; // Any Color
DTMSubPoints[0].x:=630;
DTMSubPoints[0].y:=31;
DTMSubPoints[0].areasize:=1;
DTMSubPoints[0].areashape:=0;
DTMSubPoints[0].color:=RockColor;
DTMSubPoints[0].tolerance:=1;
DTMSubPoints[1].x:=623;
DTMSubPoints[1].y:=30;
DTMSubPoints[1].areasize:=1;
DTMSubPoints[1].areashape:=0;
DTMSubPoints[1].color:=RockColor;
DTMSubPoints[1].tolerance:=1;
DTMSubPoints[2].x:=628;
DTMSubPoints[2].y:=37;
DTMSubPoints[2].areasize:=1;
DTMSubPoints[2].areashape:=0;
DTMSubPoints[2].color:=RockColor;
DTMSubPoints[2].tolerance:=1;
RockTDTM.MainPoint := CGMainPoint;
RockTDTM.SubPoints := DTMSubPoints;
RockDTM := AddDTM(RockTDTM);
end;
//—————————————————————————-//
Function FindFastRandoms: Boolean;
var
i: Integer;
begin
for i:=1 to 10 do
begin
case I of
1: If FindDead then
Result := True;
2: If FindMod then
Result := True;
3: If FindMime then
Result := True;
4: If FindMaze then
Result := True;
5: If FindQuiz then
Result := True;
6: If FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
8: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
9: RC;
10: //Respond; :)
end;
wait(1);
end;
end;
//—————————————————————————-//
//—> Waits while Checking for Randoms;
//—————————————————————————-//
procedure FTWaitD ( Time : Integer );
var T, I : integer;
begin
try
T := (Time div 1000)+1;
for I := 1 to T do
begin
Wait ( 250 );
FindTalk;
end
except
begin
Wait ( Time );
FindTalk;
end;
end;
FindFastRandoms;
MarkTime(FindNorMalRandomsTime);
if FindNorMalRandomsTime-SST1 >(10000+Random(5000)) then
begin
Status('FindNorMalRandoms.');
FindNorMalRandoms;
MarkTime(SST1);
Status('FindNorMalRandoms took:'+IntToStr(SST1-FindNorMalRandomsTime)+' msec');
end;
MarkTime(FindFastRandomsTime);
if FindFastRandomsTime-SST2 >(1500+Random(1500)) then
begin
Status('FindFastRandoms.');
FindFastRandoms;
MarkTime(SST2);
Status('FindFastRandoms took:'+IntToStr(SST2-FindFastRandomsTime)+' msec');
end;
end;
//—————————————————————————-//
// – Performs FlagWait and FindTalk….
//—————————————————————————-//
function FlagFTWait:Boolean;
var FlagMark: Integer;
begin
MarkTime(FlagMark);
Wait(10);
if not FlagPresent then
begin
Result:=False;
Status('NO FLAG');
Exit;
end
else
begin
repeat
FTWaitD(200);
if not(Loggedin) then break;
until ( (not FlagPresent) or (TimeFromMark(FlagMark) > 9000) ); // waits until flag is gone or 9 seconds.
Result:=True;
end;
end;
//—————————————————————————-//
Procedure LoadBitmaps;
begin
CastleFloor := BitmapFromString(8, 8, 'z78DA333334753475341B2507' +
'880400B5B154C1');
{ NewDoor := BitmapFromString(4, 4, 'z78DA3373313535743675313' +
'135B0B4703473343286906638C4CD8D4C2D4811070002361519');
NewDoor := BitmapFromString(1, 12, 'z78DAB37034733232B1402' +
'65DCD5CB1919686E6064666584813732323330047E10FA0');}
NewDoor := BitmapFromString(32, 1, 'z78DA33733535337436A30' +
'FE9646A4415D2CCC4CDD0124202003E5A2AD9');
{ NewDoor := BitmapFromString(1, 30, 'z78DA6DCEBB1180300C03D' +
'09562D9969D928FB3FF48E448031CCD2BA442D25208DD4DA66529' +
'246D486739E508F75D06876BAB999FAD073C67BEBCDB2C16EC699' +
'768E04B0BFC1AE11FB708E4D3F5676D2990820BC0D426BB');
}
Bone1 := BitmapFromString(4, 1, 'B6ACABD3CDCDD3CDCDD3CDC' +
'D');
Bone2 := BitmapFromString(1, 5, 'E8E5E5B2A6A6B6ACABBBB0B' +
'0BEB5B5');
Bone3 := BitmapFromString(1, 7, 'D3CDCDBBB2B247381847381' +
'8473818B0A4A4B8ADAC');
Bone4 := BitmapFromString(5, 1, 'CDC6C6D3CDCD493E20DFDAD' +
'ADFDADA');
Bone5 := BitmapFromString(4, 4, '000001000001000001D2CCCC9B9' + // centre of bonebmp
'090A19595CEC7C79B909089807FDED9D9CAC3C29A8E8E000001C7' +
'BFBFA99D9D000001');
BeerMask := BitmapFromString(11, 14, 'z78DA3330C00EDCC0C080' +
'02402D13908101C58016A6D1DA04FCE1404F1368170E9498435E9' +
'CD2531779BE03008015BB2D');
DaggerMask := BitmapFromString(11, 6, 'z78DA73730301033070C3000' +
'638801B862EFC6AF08BE3B78B3C338931871297901A1AC4980000' +
'A1115305');
BoneMask := BitmapFromString(8, 7, 'z78DA33304000371C0097A' +
'C010E804B16531CBF39F8ED25462FE5007F9860AA0100B7C04951' +
'');
Shieldmask := BitmapFromString(16, 7, 'z78DA7373231618D0188' +
'CDA3514EDA2B5F900F89A86C5');
HideMask := BitmapFromString(18, 8, 'z78DA7373C3070CE808068' +
'FED23CDD723C1C681B2170095BFAB49');
EmptyBeerMask := BitmapFromString(23, 2, 'z78DA73730301031A' +
'0337245BDC306C744302F471092E1B212200F5053865');
LeftCorner := BitmapFromString(4, 4, 'z78DA33753135313137C5' +
'411A600064715CEA914500CACE13F0');
RightCorner := BitmapFromString(4, 4, 'z78DA33753135313137' +
'C5200D30002E35F8C501C9C013F0');
BonesText := BitmapFromString(24, 1, 'z78DA7373B33430317003' +
'931060EA626A6262EE4603714C121940D40300C5511EC7');
BeerText := BitmapFromString(29, 1, 'z78DA7373B334303170039' +
'3C8C00D49DCD4C5D4C4C41C42BAD1513DA62E00B6FA2506');
CoinsText := BitmapFromString(35, 1, 'z78DA7373B33430317003' +
'931060EA626A62628E8B74C3A19ED6E2C8A4011240560F9105008' +
'F812CC8');
end;
//—————————————————————————-//
procedure SetupGoblinColors;
begin
GoblinColors[1] := 8635310;
GoblinColors[2] := 4372133;
GoblinColors[3] := 6269056;
GoblinColors[4] := 3058586;
GoblinColors[5] := 3058063;
GoblinColors[6] := 2595741;
GoblinColors[7] := 2129535;
GoblinColors[8] := 5075294;
GoblinColors[9] := 7050972;
GoblinColors[10] := 7642334;
GoblinColors[11] := 12832983;
GoblinColors[12] := 7237495;
GoblinColors[13] := 8700589;
GoblinColors[14] := 6978694;
GoblinColors[15] := 3844000;
GoblinColors[16] := 7118991;
end;
//—————————————————————————-//
procedure PlayerStats;
var Active: string;
var i: Integer;
begin
if Players[CurrentPlayer].Active=True then
Active:='True'
else
Active:='False';
WriteLn ('<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>');
Writeln (' Name : '+ Players[CurrentPlayer].Name);
Writeln (' Number : '+inttostr(CurrentPlayer));
Writeln (' Active : '+ Active);
if ( Players[CurrentPlayer].Worked > 0 ) then
Writeln (' Worked : '+ inttostr(Players[CurrentPlayer].Worked));
Writeln (' Location : '+ Players[CurrentPlayer].loc);
Writeln (' Time Left : '+ IntToStr ( PlayerTime - ((RunningTime - StartTime) / 60000 ) ) + ' min
WriteLn ('<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>');
for I := 0 to HowManyPlayers - 1 do
begin
if Players.Active=True then Active:='T' else Active:='F';
WriteLn ( ' ' + Inttostr ( I) + ' : ' + Players.Name + ' = ' + Active
+'. - Lvl : '
+' '+inttostr(Players.level[1])
+' '+inttostr(Players.level[2])
+' '+inttostr(Players.level[3])+
+' '+inttostr(Players.level[5])+
+' '+inttostr(Players.level[8])+'. '
+'W : '+IntToStr(Players.Worked)+' min. '
+'K : '+ IntToStr(Players.Killed)+' Goblins. '
+'L: '+Players.loc);
end
WriteLn ('<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>');
end;
//—————————————————————————-//
Procedure ProgressReport;
begin
writeln(' ');
WriteLn ('/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\');
WriteLn (' – GoblinSchredduler '+VersionNumber+' – Progress Report – by WT-Fakawi – '+ 'HGA=' +IntToStr(HGA));
Writeln ('<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>');
Writeln(' Worked for '+ TimeRunning);
Writeln(' Attacked '+inttostr(Goblins)+' Goblins.');
if Bones > 0 then Writeln(' Buried '+inttostr(Bones)+' Bones.');
if Deaths > 0 then Writeln(' Died '+inttostr(Deaths)+' Times.');
if Tellies > 0 then Writeln(' Tellied '+inttostr(Tellies)+' Times.');
if Doors > 0 then Writeln(' Opened '+inttostr(Doors)+' Doors.');
if Beers > 0 then Writeln(' Drank '+inttostr(Beers)+' Beers.');
if Hides > 0 then Writeln(' Dropped '+inttostr(Hides)+' Hides.');
if Daggers > 0 then Writeln(' Dropped '+inttostr(Daggers)+' Daggers.');
if Shields > 0 then Writeln(' Dropped '+inttostr(Shields)+' Shields.');
writeln(' B1= ' + IntToStr(Gb[0]) + ' B2= ' + IntToStr(Gb[1]) +' B3= ' + IntToStr(Gb[2]) +' B4= ' + IntToStr(Gb[3]));
writeln(' 1=' + IntToStr(G[1]) + ' 2=' + IntToStr(G[2]) +
' 3=' + IntToStr(G[3]) + ' 4=' + IntToStr(G[4]) +
' 5=' + IntToStr(G[5]) + ' 6=' + IntToStr(G[6]) +
' 7=' + IntToStr(G[7]) + ' 8=' + IntToStr(G[8]) +
' 9=' + IntToStr(G[9]) + ' 10=' + IntToStr(G[10]) +
' 11=' + IntToStr(G[11]) + ' 12=' + IntToStr(G[12]) +
' 13=' + IntToStr(G[13]) + ' 14=' + IntToStr(G[14]) +
' 15=' + IntToStr(G[15]) + ' 16=' + IntToStr(G[16]));
PlayerStats;
NewBones:= Bones;
Reportvars[1] := NewBones - OldBones;
SRLRandomsReport;
OldBones:= Bones;
end;
//—————————————————————————-//
function WeAreInLumbridge: Boolean;
begin
if FindSymbol(x, y, 'water') then
begin
Players[CurrentPlayer].Loc := 'Lumbridge';
Result := True;
end;
end;
//—————————————————————————-//
function WeAreInGoblinHouse: Boolean;
begin
if FindSymbol(x, y, 'fish') then
begin
Players[CurrentPlayer].Loc := 'Goblin';
Result := True;
end;
end;
function FindGobDoorDeformed(var ObjX, ObjY: Integer; UpText1, UpText2: string;
BMP, a, b, c, d: Integer): Boolean;
var
acc, ref: Extended;
XT, YT, times, tol: Integer;
begin
ref := 0.9;
tol := 0;
for times := 1 to 5 do
begin
FindDeformedBitmapToleranceIn(BMP, XT, YT, a, b, c, d, tol, 2, True, acc);
if (acc >= ref) then
begin
MMouse(XT, YT, 0, 0);
Wait(40);
if (IsUpText(UpText1) or IsUpText(UpText2)) then
begin
ObjX := XT;
ObjY := YT;
Result := True;
Exit;
end;
end;
ref := ref - 0.1;
tol := tol + 5;
Wait(5);
end;
end;
//—————————————————————————-//
Function OpenDoor:Boolean;
var Gx,Gy: Integer;
begin
Gx := MSCx;
Gy := MSCy + 100;
if FindGobDoorDeformed(Gx, Gy, 'Ope','pen', NewDoor, MSx1 + 100, MSCY - 30, MSx2 - 100, MSCY + 30) then
begin
MMouse(GX + 10, Gy, 0, 0);
GetMousePos(Gx, Gy);
Mouse(Gx, Gy, 0, 0, True);
Result := True;
Doors := Doors + 1;
ReportVars[11] := ReportVars[11] + 1;
FFlag(0);
Mouse(280, 90, 10, 10, True);
Exit;
end;
end;
//—————————————————————————-//
procedure FindRandoms;
begin
if ( not ( LoggedIn )) then Exit;
RC;
if InBlack then
begin
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
Wait(1);
if NoGameTab then
begin
Players[CurrentPlayer].loc := 'GameTab';
Logout;
Exit;
end;
FindNormalRandoms;
OpenDoor;
Wait(1);
end;
//—————————————————————————-//
procedure WieldAll;
var i, Dx, Dy:integer;
Begin
if ( not ( LoggedIn )) then Exit;
GameTab(4);
Wait(1000 + Random(1000));
i := 0;
repeat
if (FindColor(Dx, Dy, 65536, 571 + i, 215, 601 + i, 245)) // Do we have an Object?
then
begin
Mouse(dx, dy, 3, 3, False);
if not ChooseOption(x, y, 'W') then
ChooseOption(x, y, 'Cancel')
end
Wait(500 + Random(1000));
i := i + 47;
until(i >= 141);
End;
//—————————————————————————-//
Procedure SetUpScript;
var I : Integer;
begin
LoadBitmaps;
SetupGoblinColors;
SetupGlobalColors;
HGA := 0;
GCIndex := 1;
SetupSRL;
DeclareRuneBitMaps;
DeclarePlayers;
if MySRLID <> '' then
begin
SRLID := MySRLID;
SRLPassword := MySRLPassword;
end;
for I := 0 to 19 do
ReportVars := 0;
ReportVars[12] := 1;
ScriptID := '3';
MarkTime(SST1);
MarkTime(SST2);
Reincarnate := True; // <- RETAIN PLAYERS.ACTIVE TO TRUE AFTER DEATH
SymbolAccuracy := 0.8;
BenMouse := True;
MouseSpeed := GobMouseSpeed;
SetRockDTM;
LoginPlayer;
RCMaster:=RemoteMaster;
GetAllLevels;
end;
//—————————————————————————-//
Function FindLumbridgeRoadColor: Integer;
var FX, FY, d: Integer;
var Found: Boolean;
begin
if ( not ( LoggedIn )) then Exit;
while (D < 85) do
begin
D := D + 5;
if ( CastleFloor = 0 ) then
LoadBitmaps;
If FindBitMapToleranceIn(CastleFloor, FX, FY, 580, 50, 600, 80, D) then
begin
RoadColor:=GetColor(FX, FY);
Found := True;
Result := RoadColor;
break;
end
end
end;
//—————————————————————————-//
procedure SetGoblinTimeOut;
var HP:Integer;
begin
HP := Players[CurrentPlayer].level[8] ;
if ( (HP > 0 ) and (HP < 21) ) then GoblinTimeOut := 20;
if ( (HP > 20) and (HP < 31) ) then GoblinTimeOut := 12;
if ( (HP > 30) and (HP < 41) ) then GoblinTimeOut := 8;
if HP > 40 then GoblinTimeOut := 5;
end;
//—————————————————————————-//
//– Checks and sets Auto Retaliate. True = On, False = Off –//
//—————————————————————————-//
procedure Retaliate(AutoRet:Boolean);
begin
GameTab(1);
if AutoRet then
begin
If not FindColor(x, y, 1777020, 624, 385, 719, 396) then
begin
Mouse(666, 381, 8, 8, True);
end;
end;
if not AutoRet then
begin
If FindColor(x, y, 1777020, 624, 385, 719, 396) then
begin
Mouse(666, 381, 8, 8, True);
end;
end;
end;
//—————————————————————————-//
Procedure SetLowest;
var Ci, HL1, HL2, HL:Integer;
Begin
if ( not ( LoggedIn )) then Exit;
if TabExists(2) then
begin
GetAllLevels;
HL := 100;
for Ci := 1 to 2 do
begin
HL1 := Players[CurrentPlayer].level[Ci];
HL2 := Players[CurrentPlayer].level[Ci+1];
if HL2 > HL1 then
begin
if HL > HL1 then HL := HL1;
end
else
begin
if HL > HL2 then HL := HL2;
end;
end;
SetGoblinTimeOut;
end;
for CI := 1 to 3 do
begin
if Players[CurrentPlayer].level[Ci] = HL then
begin
if CI = 3 then CI := CI + 1;
SetFightMode(CI);
Case CI of
1 : LampSkill := 'attack';
2 : LampSkill := 'strength';
4 : LampSkill := 'defence';
end;
Exit;
end;
End;
End;
//—————————————————————————-//
procedure SetPlayerParams;
begin
if ( not ( LoggedIn )) then Exit;
if Players[CurrentPlayer].skill = 'prayer' then Exit;
WieldAll;
GameTab(1);
If AutoLevels then
SetLowest
else
begin
if Players[CurrentPlayer].Skill = 'attack' then SetFightMode(1);
if Players[CurrentPlayer].Skill = 'strength' then SetFightMode(2);
if Players[CurrentPlayer].Skill = 'defence' then SetFightMode(4);
LampSkill := LowerCase ( Players[CurrentPlayer].Skill );
if Players[CurrentPlayer].Skill = 'auto' then SetLowest;
end;
if Players[CurrentPlayer].Boolean2 = False then
begin
Retaliate(True); // Set Retaliate off only the first time. :)
Players[CurrentPlayer].Boolean2:=True;
end;
FTWaitD(1000 + Random(500));
SetChat('on', 1);
SetChat('friends', 2);
SetChat('off', 3);
SetChat('on', 1);
FindTalk;
end;
//—————————————————————————-//
Function InFightAt(x, y: Integer):Boolean;
var
dx, dy: Integer;
begin
if ( FindColor(dx, dy, GreenStatusColor, x - 20, y - 15, x + 20, y + 10) or
FindColor(dx, dy, RedStatusColor, x - 20, y - 15, x + 20, y + 10) or
FindColor(dx, dy, 16728128, x - 20, y - 15, x + 20, y + 10) or
FindColor(dx, dy, 192, x - 20, y - 15, x + 20, y + 10) ) then
Result:=True;
end;
//—————————————————————————-//
Procedure WalkToGoblinField;
var Xc, Yc :integer;
var Mark6: LongInt;
begin
if ( not ( LoggedIn )) then Exit;
MakeCompass('N');
RadialRoadWalk(RoadColor, 70, 40, 70, -1, 0);
RadialRoadWalk(RoadColor, 140, 0, 70, -1, 0);
if FindSymbol(Xc, Yc, 'arrow') then
begin
Wait(1500);
MouseFindFlag(Xc , Yc + 10, 1, 1);
FFlag(0);
end
else
begin
RadialRoadWalk(RoadColor, 320, 400, 60, -1, 0);
MarkTime(Mark6);
repeat
LinearRoadWalk(RoadColor, 320, 30, 1, 1);
if (not Loggedin) then break;
if(TimeFromMark(Mark6) > 60000) then begin Logout; Exit; end;
until FindSymbol(Xc, Yc, 'fish') or FindSymbol ( Xc, Yc, 'arrow');
end;
if (FindSymbol (Xc, Yc, 'fish')) then
MouseFindFlag(Xc + 2, YC + 10, 1, 1)
else
if ( FindSymbol (Xc, Yc, 'arrow')) then
MouseFindFlag(Xc + (10 + random(10)),Yc - (30-random(10)), 1, 1);
FFlag(0);
ReportVars[10] := ReportVars[10] + 1;
Players[CurrentPlayer].Loc := 'Goblin';
end;
//—————————————————————————-//
Function ClickCountMask(optionx: String; bmp, tol: Integer):Integer;//based off PPLSUQBAWLZ's InventoryCount
var
i, e, ObjectCount : Integer;
begin
GameTab(4);
while (i < 6) do
begin
if (i = 5) and (e < 8) then
begin
i := 0;
e := e + 1;
end;
if (FindBitmapMaskTolerance(bmp, x, y, (570 + 39 * i), (214 + 35 * e), (609 + 39 * i), (249 + 35 * e), tol, 10)) then
begin
MMouse(x, y, 0, 0)
if (not (optionx = '')) then
begin
MouseItem(e * 4 + i + 1, False);
ChooseOption(x,y,optionx);
ObjectCount := ObjectCount + 1;
end
else
MouseItem(e * 4 + i + 1, True);
FTWait(1);
end;
if (i = 4) and (e = 7) then
begin
Result:=ObjectCount;
break;
end;
i := i + 1;
end;
end;
//—————————————————————————-//
Procedure CleanUpInventory;
begin
if PickupBones then Bones := Bones + ClickCountMask('ury', BoneMask, 50); // Buries Bones
if FindBitmapMaskTolerance(BeerMask, x, y, MIx1, MIy1, MIx2, MIy2, 50, 10) then
Beers := Beers + ClickCountMask('rink', BeerMask, 50); // Drink Beers
Wait(40);
if FindBitmapMaskTolerance(DaggerMask, x, y, MIx1, MIy1, MIx2, MIy2, 50, 10) then
Daggers := Daggers + ClickCountMask('rop', DaggerMask, 50); // Drop Daggers
Wait(40);
if FindBitmapMaskTolerance(EmptyBeerMask, x, y, MIx1, MIy1, MIx2, MIy2, 50, 10) then
ClickCountMask('rop', EmptyBeerMask, 50); // Drop EmptyBeers
Wait(40);
if FindBitmapMaskTolerance(ShieldMask, x, y, MIx1, MIy1, MIx2, MIy2, 50, 10) then
Shields := Shields + ClickCountMask('rop', ShieldMask, 50); // Drops Shields
Wait(40);
if FindBitmapMaskTolerance(HideMask, x, y, MIx1, MIy1, MIx2, MIy2, 50, 10) then
begin
Hides := Hides + ClickCountMask('rop', HideMask, 50); // Drops hides
Callibrate('Fast');
end;
end;
//—————————————————————————-//
Function Callibrate(how:string): Boolean;
var Cx, Cy, Tx, Ty, RDTMx, RDTMy:integer;
var WhichAngle: Extended;
begin
if How = 'Full' then
begin
if TabExists(11) then SetRun(True);
If AutoLevels then
SetLowest
HighestAngle;
CleanUpInventory;
FindTalk;
MakeCompass('N');
SetGoblinTimeOut;
ProgressReport;
FindRandoms;
end;
if FindDtmRotated(RockDTM, RDTMx, RDTMy, MMX1, MMY1, MMX2, MMY2, - Pi/4, Pi/4, 0.1,
WhichAngle) then
begin
if rs_OnMinimap(RDTMx + 15, RDTMy + 53) then
begin
if How = 'Full' then MouseFindFlag(RDTMx + 15, RDTMy + 53, 1, -1)
else
if How = 'Fast' then
MouseFindFlag(RDTMx + 15, RDTMy + 62, 1, -1);
FFLag(0);
OpenDoor;
end
else
Begin
MouseFindFlag(RDTMx, RDTMy, 1, -1)
FFlag(0);
if FindDtmRotated(RockDTM, RDTMx, RDTMy, MMX1, MMY1, MMX2, MMY2, - Pi/4, Pi/4, 0.1,
WhichAngle) then
begin
MouseFindFlag(RDTMx + 15, RDTMy + 53, 1, -1)
FFlag(0);
GoblinAttempts := 0;
end
end
Result := True;
end
else if FindSymbol(Cx, Cy, 'arrow') then
begin
Tx := Cx + 10 + random(10);
Ty := Cy - 35 - random(10);
if rs_OnMinimap(Tx, Ty) then
MouseFindFlag(Tx, Ty, 1, 1)
else
MouseFindFlag(Cx, Cy, 1, 1)
FFlag(0);
GoblinAttempts := 0;
Result := True;
end
else if FindSymbol(Cx, Cy, 'fish') then
begin
Tx := Cx + 20 + random(10);
Ty := Cy + 30 + random(10);
if rs_OnMinimap(Tx, Ty) then
MouseFindFlag(Tx, Ty, 1, 1)
else
MouseFindFlag(Cx, Cy, 1, 1)
FFlag(0);
GoblinAttempts := 0;
Result := True;
end
if Not Result then
begin
if not FindColor(x, y, WaterColor, MMx1, MMy1, MMx2, MMy2) then
begin
MouseFindFlag(MMCx - 50, MMCy, -1, 1);
FFlag(0);
if FindColor(x, y, WaterColor, MMx1, MMy1, MMx2, MMy2) then
Result := True
else
Result := False;
end;
end;
end;
//—————————————————————————-//
// – function ChooseOption3: Boolean; – //
// – by Stupid3ooo modded by WT-Fakawi – //
// – Description: – //
// – Finds Popup menu, then clicks on Coins/Beers/Bones IN THAT ORDER! – //
//—————————————————————————-//
Function ChooseOption3:Boolean;
var
i, x1, y1, x2, y2, Fx, Fy: Integer;
begin
if (FindBitmap(LeftCorner, x1, y1)) and (FindBitmap(RightCorner, x2, y2)) then
begin
for i := 1 to 3 do // ALWAYS COWHIDE FIRST!!! :)
begin
case i of
1: BitMap := CoinsText; // Sliced Bitmaps of MenuItemText
2: BitMap := BeerText; // Sliced Bitmaps of MenuItemText
3: BitMap := BonesText; // Works like a charm
end;
If FindBitMap(BitMap, Fx, Fy) then
begin
Mouse(Fx, Fy, 20, 4, True);
FTWait(1);
if not FlagFTWait then
begin
Callibrate('Fast');
Result := False;
Break;
end;
Result := True;
FlagFTWait;
Exit;
end;
end;
if (FindText(Fx, Fy, 'Cancel', upchars, x1, y1, x2, 502)) then
Mouse(Fx + 9, Fy + 3, 2, 2, True);
end;
end;
//—————————————————————————-//
Function FindBones:Boolean;
var Dx, Dy, i, j, x1, x2, y1, y2:integer;
var acc:Extended;
begin
if InvFull then CleanUpInventory;
for j := 1 to 6 do
begin
case j of
1: begin x1:= MSx1; y1 := MSy1 + 20; x2 := MSCx; y2:= MSCy; end;
2: begin x1:= MSCx; y1 := MSy1 + 20; x2 := MSx2; y2:= MSCy; end;
3: begin x1:= MSx1; y1 := MSCy; x2 := MSCx; y2:= MSy2; end;
4: begin x1:= MSCx; y1 := MSCy; x2 := MSx2; y2:= MSy2; end;
5: begin x1:= MSCx - 50; y1 := MSCy - 50; x2 := MSCx + 50; y2:= MSCy + 50; end;
6: begin x1:= MSx1; y1 := MSy1 + 20; x2 := MSx2; y2:= MSy2; end;
end
if WeAreInLumbridge or WeAreDead or (not Loggedin) then Exit;
for i := 0 to 3 do
begin
case i of
0: TheBone := Bone1;
1: TheBone := Bone2;
2: TheBone := Bone3;
3: TheBone := Bone4;
end;
Status('Searching for bones in Quadrant ' + IntToStr(j) + ' for Bone '+IntToStr(i));
if InventoryFull then Exit;
if (not Loggedin) then Exit;
FindDeformedBitmapToleranceIn(TheBone, Dx, Dy, x1, y1, x2 , y2 , 10, 1, True, acc);
// writeln('acc =' + FloatToStr(acc));
begin
if (acc > 0.4) then
begin
MMouse(Dx, Dy, 0, 6);
GetMousePos(Dx, Dy);
FindTalk;
if FindColorTolerance(Dx, Dy, 3703002, 42, 8, 120, 21, 70) then // Orange Color indicating Uptext!
begin
GetMousePos(Dx, Dy);
Mouse(Dx, Dy, 0, 0, False);
if ChooseOption3 then
begin
Result := True;
Gb := Gb + 1;
Exit;
end
else Break;
end
end
end;
Wait(1);
end;
end
end;
//—————————————————————————-//
Procedure WaitGoblin;
var Mark5:Integer;
begin
FFlag(0);
MarkTime(Mark5);
repeat
if((WeAreInLumbridge) or (not (Loggedin)) or (WeAreDead)) then Exit;
FTWaitD(250 + Random(100));
if PickupBones then
if BonesBoost then
if TimeFromMark(Mark5) mod 500 < 150 then Findbones;
if (TimeFromMark(Mark5) > (GoblinTimeOut * 1000) ) then Exit;
until not InFight;
Goblins := Goblins + 1;
ReportVars[0] := ReportVars[0] + 1;
Players[CurrentPlayer].Killed := Players[CurrentPlayer].Killed+1;
end;
//—————————————————————————-//
Function ClickGoblin: Boolean;
var CBx,CBy,Dmx, Dmy: Integer;
begin
if Players[CurrentPlayer].skill = Lowercase('prayer') then
begin
Result := False;
Exit;
end;
for GCIndex := 1 to 16 do
begin
CBx := MSCx;
CBy := MSCy;
if FindColorSpiralTolerance(CBx, CBy, GoblinColors[GCIndex], MSX1, MSY1, MSX2, MSY2, 12) then
begin
GoblinAttempts := GoblinAttempts + 1;
Status('GA = '+IntToStr(GoblinAttempts));
MMouse(CBx, CBy, 0, 0);
if FindColorTolerance(Dmx, Dmy, 318168, 42, 8, 120, 21, 50) then // Yellow
begin
if IsUpText('b') then
begin
if not InFightAt(CBx, CBy) then
begin
Mouse(CBx, CBy, 0, 0, True);
G[GCIndex] := G[GCIndex] + 1;
FTWait(1);
if not FlagFTWait then
begin
Callibrate('Fast');
Exit;
end;
FFlag(1);
if (InChatMulti('alr', 'und ',' att')) then
begin
Result:=False;
WaitGoblin;
Exit;
end;
if (InChatMulti('ome', 'one ',' ing')) then
begin
Result:=False;
Exit;
end
else
begin
Result := True;
GoblinAttempts := 0;
end;
Exit;
end;
end;
end;
end;
end;
end;
//—————————————————————————-//
Function TellyHo:Boolean;
begin
if TabExists(7) then GameTab(7) else Exit;
FTWait(8);
MarkTime(Mark);
SetChat('off', 1);
Cast('Home Teleport');
FTWait(8);
if InChat('to wait') then
begin
Players[CurrentPlayer].Active := False;
Players[CurrentPlayer].Boolean1 := True;
LogOut;
end
else
begin
Repeat
Wait(250);
FindTalk;
until (TimeFromMark(Mark) > 30000); // wait 30 secs for lumby telly
SymbolAccuracy := 0.4;
if ( FindSymbol(x, y, 'guide') or FindSymbol(x, y, 'water')) then
begin
Players[CurrentPlayer].Active := True;
Result:= True;
Tellies := Tellies + 1;
ProgressReport;
LogOut;
end
else
begin
Players[CurrentPlayer].Active := False;
Result:= False;
Players[CurrentPlayer].Boolean1 := True;
LogOut;
end;
end;
GoblinAttempts := 0;
SymbolAccuracy := 0.8;
end;
//—————————————————————————-//
//– Checks False Player and Tellies Home if possible —//
//—————————————————————————-//
procedure LastChance;
var i: Integer;
begin
for i:= 0 to (HowManyPlayers - 1) do
begin
If Players.Boolean1 = False then // last change flag, assume not set.
begin
CurrentPlayer := i;
LoginPlayer;
Wait(4000);
if NoGameTab then
begin
Players.Active := False;
Players.Boolean1 := True;
LogOut;
end
else
begin
GameTab(7);
FTWait(8);
MarkTime(Mark);
SetChat('off', 1);
Cast('Home Teleport');
FTWait(8);
if InChat('to wait') then
begin
Players.Active := False;
Players.Boolean1 := True;
LogOut;
end
else
begin
Repeat
Wait(250);
FindTalk;
until (TimeFromMark(Mark) > 30000); // wait 30 secs for lumby telly
SymbolAccuracy := 0.4;
if ( FindSymbol(x, y, 'guide') or FindSymbol(x, y, 'water')) then
begin
Players.Active := True;
Tellies := Tellies + 1;
ProgressReport;
LogOut;
end
else
begin
Players.Active := False;
Players.Boolean1 := True;
LogOut;
end;
end;
end;
end else Writeln(Players.name + ' is hopelessly lost');
end;
SymbolAccuracy := 0.6;
end;
//—————————————————————————-//
//– As NextPlayer with LastChance —//
//—————————————————————————-//
procedure NextGPlayer(Active: Boolean);
begin
if RandomPlayer then
RandomNextPlayer(Active)
else
begin
if not Active then
Players[CurrentPlayer].Active := False;
Logout;
PlayerCurTime := (GetSystemTime div 1000);
Players[CurrentPlayer].Worked := Players[CurrentPlayer].Worked +
((PlayerCurTime - PlayerStartTime) / 60);
CurrentPlayer := CurrentPlayer + 1;
if CurrentPlayer > HowManyPlayers - 1 then
CurrentPlayer := 0;
while Players[CurrentPlayer].Active = False do
begin
CurrentPlayer := CurrentPlayer + 1;
if CurrentPlayer > HowManyPlayers - 1 then
begin
CurrentPlayer := 0;
LastChance; // <- if allFalse then run lastChance.
end;
end;
LoginPlayer;
end;
end;
//—————————————————————————-//
// Main EventLoop
//—————————————————————————-//
begin
SetupScript;
Repeat
SetPlayerParams;
MakeCompass('N');
if WeAreInLumbridge then
begin
If (FindLumbridgeRoadColor = 0) then RoadColorChecker;
WalkToGoblinField;
end
Callibrate('Full');
CallibrateTime := GetSystemTime;
StartTime := GetSystemTime;
Repeat // Fighting Loop
RunningTime := GetSystemTime;
if ClickGoblin then
WaitGoblin
else if PickupBones then
Findbones;
if Players[CurrentPlayer].skill = 'prayer' then FTWait(1);
if BonesBoost then FindBones;
if HGA < GoblinAttempts then HGA := GoblinAttempts; // Highest GoblinAttempts
If GoblinAttempts > 24 then Callibrate('Full');
If GoblinAttempts > 100 then TellyHo;
If TimeFromMark(CallibrateTime) > (180000 + Random(6000)) then
begin
Callibrate('Full');
MarkTime(CallibrateTime);
end
if (not LoggedIn)
or WeAreDead
or WeAreInLumbridge
or (RunningTime - StartTime > ( PlayerTime * 60000 ) )
then Break;
Until WeAreDead or (not LoggedIn);
if LoggedIn then
begin
SetChat('off', 1);
if WeAreDead then Deaths := Deaths + 1;
repeat
FTWaitD(1000);
until(not(LoggedIn));
NextPlayer(True);
FTWaitD(4000 + Random(2000));
end;
if (not(Loggedin)) then NextGPlayer(False);
until(False);
end.
——————————————————
<!– END TEMPLATE: formanswers –>
