SCAR Code:
{.Script Info:
# ScriptName = Goblin Scheduler
# Author = WT-Fakawi
# Description = Kills Goblins at GoblinHouse NE of LumCastle
# Version = 0.44
# Date = 08/20/06
# Comments = SRL 3.0 upwards compatible.
/Script Info}
//----------------------------------------------------------------------------//
// * SRL 3.0 Goblin Scheduler 0.42
// *
// * by WT-Fakawi
// *
// *
// *
// * It's been 11 Months now since I released my first SCAR script.
// * Below is my latest creation. It resembles in no way it's original, except
// * for the concept. That has stayed the same.
// *
//----------------------------------------------------------------------------//
// *
// * This script kills Goblins @ the GoblinHouse NE of Lumbridge Castle.
// * If is designed for MultiPlayer i.e. one at a time, many in a row.
// * Provided with enough noob-players, it will easily run 24+ hours,
// * WITHOUT GETTING YOU BANNED.
// *
// * --------------------------- [ ABOUT SRL ] --------------------------- * //
// *
// * -----The SRL-Library is managed and maintained by the SRL-Community.-----//
// * ----------------It is deviced to emulate human behaviour.----------------//
// *
{/ * ----------------- [ 7 Golden rules of SRL autoing ] ------------------ * //
Rule #1. Respect Jagex.
- SRL users RESPECT Jagex. We enjoy playing Runescape, not for the game,
but for the intellectual challenge. We play somewhat different than legitimite
players, but we try to act natural. SRL IS NOT INVOLVED INTO ANYTHING ILLEGAL.
The Include is free for everyone to use. Yes we play against Jagex Rules, but
all within LEGAL and MORAL boundaries.
Rule #2. Make sure you have over 20 players.
- Tutorial Island only takes about 5 minutes to finish. It will take you 4 hours.
Try making them in batches of 6, thats only 30 minutes. Give them PROPER names.
Refer to the SRL-Manual for further info.
Rule #3. Switch players once every half hour.
- Switching players once every 30-50 minutes drastically reduces the amount
of Randoms you will encounter. You will hardly get any.
Rule #4. Cherish your players.
- Don't use Lvl-3 'mules'. That is very disrespectful and utterly stupid.
Lvl-3 'mules' have "BAN ME" written all over their default face.
Treat your players with respect, treat them as individuals. They are your Army,
they work for you. Don't leave them unattended. Level them up.
Switch scripts. Don't rape 'm...
Play legit with them once and a while.
If you manage to archieve an outstanding ranking (81+) on one of them,
QUIT autoing on that particular Player. He has become to valuable.
Rule #5.Break out of every loop.
- Endless loop are strictly forbidden. Build failsafes into ALL your loops.
Preferably:
If not Loggedin then Break;
Make sure your LAST LINE says:
if (not(Loggedin)) then NextPlayer(False);
Why? Because we dont want our program to "hang" when we wake up,
return from school or work.
Rule #6. Use the regular RuneScape Client(!) and always auto unsigned.
- Make sure you get a unique UID each period you auto.
Rule #7. Try to stay online 24/7.
- This is my favourite rule. Just love those 24 hour reports.
<=================Progress Report================>
Worked for 102 Hours, 26 Minutes and 57 Seconds
Attacked 15888 Goblins.
Random Event Report:
Talked to 17 random event[s].
Opened 410 door[s].
Logged in 346 Time[s].
<================================================>
ENJOY!
WT-Fakawi.
}
//----------------------------------------------------------------------------//
// *
// * NAME : Goblin Scheduler 0.39
// * WRITER : WT-Fakawi
// * CATEGORY : Fighting
// * DESCRIPTION : Kills Goblins at Goblinhouse NE of Lumby Castle
// * USAGE : Start @ Lumbridge Castle Square of @ Goblin House
// * AUTOCOLOR : Yes
// * NOTES : First SRL-script ever made.
// * : COMPLETE REMAKE FOR SRL 3.0
//----------------------------------------------------------------------------//
// 1. USE the DEFAULT Runescape Client with Low Detail, Very Bright.
// 2. Set your Screen to 32 bit TRUE color.
// 3. Find yourself a quiet World.
// 4. Position your char at Lumbridge Castle, with ONLY three wieldable
// pieces of armour.
//-----------------------------------------------------------------------
program GoblinScheduler;
{.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: integer;
var
StartTime, PlayTime, RunningTime, CallibrateTime, BoneTime: LongInt;
var
TheBone, Bone, Bone1, Bone2, Bone3, Bone4, Bone5, Goblins, GoblinAttempts, CastCount: integer;
var
BeerMask : integer;
var
GoblinColors: array[1..8] of integer;
var
GCIndex: integer;
var
CastEnabled: Boolean;
var
SST1, SST2, FindNorMalRandomsTime, FindFastRandomsTime: LongInt;
//----------------------------------------------------------------------------//
const RemoteMaster = 'xxx'; //<- fill in the Nickname of the RC master
const PlayerTime = 30; // Time for Each Player In MINUTES!!!
const DebugInfo = False; // set True if you want Debug Reports
const GoblinTimeOut = 12000; // milliseconds before clicking next goblin.
const AutoLevels = True ; // Set True to even Skills (Recommended...)
const PickupAny = False; // If you want the Script to Pick up Anything
const CastSpells = False; // If you want the Script to Train magic with runes picked up
const USEPlayerManager = True; // You must Set this to True everytime you change your player array
const MissedColor = 16728128;
const HitColor = 192;
//----------------------------------------------------------------------------//
Const VersionNumber = '0.46';
//----------------------------------------------------------------------------//
Procedure DeclarePlayers;
begin
HowManyPlayers:=5;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 1;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := ''; // 2-4 letters of username
Players[0].Active := True;
Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := ''; // 2-4 letters of username
Players[1].Active := True;
Players[2].Name := '';
Players[2].Pass := '';
Players[2].Nick := ''; // 2-4 letters of username
Players[2].Active := True;
Players[3].Name := '';
Players[3].Pass := '';
Players[3].Nick := ''; // 2-4 letters of username
Players[3].Active := True;
Players[4].Name := '';
Players[4].Pass := '';
Players[4].Nick := ''; // 2-4 letters of username
Players[4].Active := True;
end;
//----------------------------------------------------------------------------//
//---> Simple Status or Writeln procedure
//----------------------------------------------------------------------------//
procedure FawkiDebug ( S : string );
begin
if ( DebugInfo ) then
Writeln ( S )
else
Status ( S );
end;
//----------------------------------------------------------------------------//
Function FindFastRandoms: Boolean;
var
i: Integer;
begin
for i:=1 to 8 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;
8: RC;
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;
//----------------------------------------------------------------------------//
Procedure LoadBitmaps;
begin
CastleFloor := BitmapFromString(8, 8, 'z78DA333334753475341B2507' +
'880400B5B154C1');
NewDoor := BitmapFromString(4, 4, 'z78DA3373313535743675313' +
'135B0B4703473343286906638C4CD8D4C2D4811070002361519');
Bone := BitmapFromString(4, 4, '000001000001000001D2CCCC9B9' +
'090A19595CEC7C79B909089807FDED9D9CAC3C29A8E8E000001C7' +
'BFBFA99D9D000001');
Bone1 := BitmapFromString(4, 3, 'B6ABABB6ABAB3D3115' +
'3D3115C9C1C1C9C1C13D31153D31153D3115DBD6D6A49897A4989' +
'7');
Bone2 := BitmapFromString(4, 2, 'D7D2D1C9C1C1A79B9B' +
'A79B9BF0EEEEB3A8A83D31153D3115');
Bone3 := BitmapFromString(3, 2, '433418BEB5B53D3115' +
'D3CDCDD3CDCDD3CDCD');
Bone4 := BitmapFromString(2, 2, '958B8A8E8484E8E5E5' +
'382B12');
Bone5 := BitmapFromString(4, 4, '000001000001000001D2CCCC9B9' + // centre of bonebmp
'090A19595CEC7C79B909089807FDED9D9CAC3C29A8E8E000001C7' +
'BFBFA99D9D000001');
BeerMask := BitmapFromString(11, 14, 'z78DA3330C00EDCC0C080' +
'02402D13908101C58016A6D1DA04FCE1404F1368170E9498435E9' +
'CD2531779BE03008015BB2D');
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;
end;
//----------------------------------------------------------------------------//
function getcombatlevelb:integer;
var
melon, i: integer;
eagle : string;
begin
melon:=getcurrenttab;
gametab(1);
eagle:= GetTextAtEx(671, 230, 100, StatChars, False, True, 0, 5, -1, 2, True, tr_Digits);
if (Trim(eagle) = '') then
for i := 1 to 5 do
begin
eagle := GetTextAtEx(671 + i, 230, 100, StatChars, False, True, 0, 5, -1, 2, True, tr_Digits);
if (Trim(eagle) <> '') then Exit;
end;
if (not (Trim(eagle) = '')) then
result := StrToInt(Trim(eagle));
wait(500+random(200));
gametab(melon);
end;
//----------------------------------------------------------------------------//
procedure PlayerStats;
var Active: string;
var i, temp: 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);
Temp:=(GetSystemTime div 1000);
Temp := Temp - StartTime;
if ( playtime < temp ) then
Writeln (' Time Left : '+ IntToStr ( Temp - PlayTime / 60 ) + ' min[s].');
WriteLn ('<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>');
for I := 0 to HowManyPlayers - 1 do
begin
if Players[i].Active=True then Active:='True' else Active:='False';
WriteLn ( 'Player ' + Inttostr ( I) + ' : ' + Players[i].Name + ' = ' + Active);
WriteLn ( 'Att ' + inttostr(Players[i].level[1]) +', Str '+inttostr(Players[i].level[2])+', Def '+inttostr(Players[i].level[3]));
WriteLn ( 'Cmb '+inttostr(Players[i].integer1) +', Hps ' +inttostr(Players[i].level[8]) + ', Pry '+inttostr(Players[i].level[5]));
WriteLn ( 'Worked For: '+IntToStr(Players[i].Worked)+' min, Killed : '+ IntToStr(Players[i].Killed)+', Loc: '+Players[i].loc);
WriteLn ('');
end
WriteLn ('<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>');
end;
//----------------------------------------------------------------------------//
Procedure ProgressReport;
begin
writeln(' ');
WriteLn ('/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\');
WriteLn ('| --> Goblin GoblinScheduler -> '+VersionNumber+' <- Progress Report --> by WT-Fakawi <-- |');
Writeln ('<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>');
Writeln(' Worked for '+ TimeRunning);
Writeln(' Attacked '+inttostr(Goblins)+' Goblins.');
Writeln(' Cast '+inttostr(CastCount)+' Spells.');
writeln(' Died '+inttostr(Deaths)+' Times.');
writeln(' Opened '+inttostr(Doors)+' Doors.');
PlayerStats;
SRLRandomsReport;
end;
//----------------------------------------------------------------------------//
function WeAreInLumbridgeCastle: 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;
//----------------------------------------------------------------------------//
Procedure OpenDoor;
var XN,YN: Integer;
begin
if FindBitMapToleranceIn(NewDoor, xn, yn, MSCX - 100, MSCY - 30, MSCX + 100, MSCY + 30, 20) then
begin
FawkiDebug ('Opening Door...');
Doors := Doors + 1;
ReportVars[11] := ReportVars[11] + 1;
Mouse(xn, yn, 0, 0, True);
end;
end;
//----------------------------------------------------------------------------//
Procedure MyAntiBan;
begin
if not (LoggedIn) then Exit;
begin
case Random(60) of
0: HoverSkill('attack', false);
5: AlmostLogout;
10:begin
GameTab(1 + Random(12));
Wait(1500 + Random(500));
GameTab(4);
end;
15: HoverSkill('random', false);
20: begin
case random(10) of
0: TypeSend('Attack lvls?');
3: TypeSend('Strength levels');
5: TypeSend('defence lvls');
7: TypeSend('prayer levels');
9: TypeSend('hp?');
end;
end;
25: begin
GameTab(Random(5));
Wait(1500 + Random(500));
GameTab(4);
end;
30: begin
GameTab(1);
Wait(1500 + Random(500));
GameTab(4);
end;
end;
end
end;
//----------------------------------------------------------------------------//
procedure FindRandoms;
begin
if ( not ( LoggedIn )) then Exit;
RC;
if ( not ( UseBoxSolver )) then
if FindNewBox and
not ( GambleNewBox ) then
begin
Players[CurrentPlayer].loc := 'NewBox';
Logout;
Exit;
end;
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 inc,dx,dy:integer;
Begin
if ( not ( LoggedIn )) then Exit;
GameTab(4);
Wait(1000 + Random(1000));
inc := 0;
repeat
if (FindColor(dx, dy, 65536, 571 + inc, 215, 601 + inc, 245)) // Do we have an Object?
then
begin
Mouse(dx, dy, 0, 0, False);
if not ChooseOption(x, y, 'W') then
ChooseOption(x, y, 'Cancel')
end
Wait(500 + Random(1000));
inc := inc + 47;
until(inc >= 141);
End;
//----------------------------------------------------------------------------//
Procedure SetUpScript;
var I : Integer;
begin
LoadBitmaps;
SetupGoblinColors;
GCIndex := 1;
SetupSRL;
DeclareRuneBitMaps;
DeclarePlayers;
//----------------------------------------------------------------------------//
//----> MYSQL Sets All Unused Vars to Zero
//----------------------------------------------------------------------------//
for I := 0 to 19 do
ReportVars[I] := 0;
ReportVars[12] := 1; // Sets Total times Run One Time each setup
ScriptID := '3';
MarkTime(SST1);
MarkTime(SST2);
Reincarnate := True;
SymbolAccuracy := 0.6;
BenMouse := False;
MouseSpeed := 15;
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);
FawkiDebug ('FindLumbridgeRoadColor Road Color : ' + inttostr(RoadColor));
Found := True;
Result := RoadColor;
break;
end
end
end;
//----------------------------------------------------------------------------//
Procedure SetLowest;
var Ci, HL1, HL2, HL:Integer;
Begin
if ( not ( LoggedIn )) then Exit;
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;
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;
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;
FTWaitD(1000 + Random(500));
SetChat('on', 1);
SetChat('friends', 2);
SetChat('off', 3);
SetChat('on', 1);
FindTalk;
StartTime := GetSystemTime ;
end;
//----------------------------------------------------------------------------//
Function InFightAt(x, y: Integer):Boolean;
var
dx, dy: Integer;
begin
if ( FindColor(dx, dy, GreenStatusColor, x - 20, y - 10, x + 20, y + 10) or
FindColor(dx, dy, RedStatusColor, x - 20, y - 10, x + 20, y + 10) or
FindColor(dx, dy, MissedColor, x - 20, y - 10, x + 20, y + 10) or
FindColor(dx, dy, HitColor, x - 20, y - 10, 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, 60, 140, 70, -1, 0);
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');
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);
Flag;
ReportVars[10] := ReportVars[10] + 1;
end;
//----------------------------------------------------------------------------//
Procedure CleanUpInventory;
begin
ClickAllItemsBmpTolWait('ury', Bone, 50, 250); // bury bones
ClickAllItemsBmpMaskTolWait('rink', BeerMask, 50, 10, 1000); // Drops Beers
end;
//----------------------------------------------------------------------------//
procedure Callibrate;
var XC,YC:integer;
begin
GoblinAttempts := 0;
HighestAngle;
MakeCompass('N');
FindRandoms;
if FindSymbol(XC, YC, 'arrow') then
begin
MouseFindFlag(XC + (10 + random(10)),YC - (35-random(10)), 1, 1);
Flag;
GoblinAttempts := 0;
FawkiDebug ('Callibrated by ArrowSymbol');
end
else
if FindSymbol ( XC, YC, 'fish') then
begin
MouseFindFlag(XC + (20 + random(10)),YC + (30 + random(10)), 1, 1);
Flag;
GoblinAttempts := 0;
FawkiDebug ('Callibrated by FishSymbol');
end;
FindTalk;
CleanUpInventory;
FindTalk;
SetRun(True);
If AutoLevels then
SetLowest
else
GetAllLevels;
Players[currentplayer].integer1:=getcombatlevel
ProgressReport;
FindRandoms;
end;
//----------------------------------------------------------------------------//
Function FindBoneDeformed:Boolean;
var Dx, Dy, i, Mark4, FLx, FLy:integer;
var acc:Extended;
begin
for I := 1 to 4 do
begin
case I of
1: TheBone := Bone1;
2: TheBone := Bone2;
3: TheBone := Bone3;
4: TheBone := Bone4;
end;
if InventoryFull then Exit;
if (not Loggedin) then Exit;
FindDeformedBitmapToleranceIn(TheBone, Dx, Dy, MSX1 + 50, MSY1 + 50, MSX2 - 50, MSY2 - 50, 5, 1, True, acc);
FawkiDebug ('acc = ' + FloatToStr(acc));
begin
if WeAreInLumbridgeCastle or WeAreDead or (not Loggedin) then Exit;
if (acc >= 0.3) then
begin
FawkiDebug ('Found Deformed');
MMouse(Dx, Dy, 0, 0);
FindTalk;
if PickupAny then
begin
if IsUpText('ake') then Mouse(Dx, Dy, 0, 0, True);
MarkTime(Mark4);
repeat
Wait(500);
FindTalk;
Wait(500);
until ( (not FindColor(FLx,FLy,255,MMCX-40,MMCY-40,MMCX+40,MMCY+40)) or (TimeFromMark(Mark4) > 6000) );
Exit;
end
else
begin
if (IsUpText('ake Bo') or IsUpText('ke Bon')) then
begin
Mouse(Dx, Dy, 0, 0, False);
FindTalk;
FawkiDebug ('Pick up Deformed');
ChooseOption(x, y, 'Take');
MarkTime(Mark4);
repeat
Wait(500);
FindTalk;
Wait(500);
until ( (not FindColor(FLx,FLy,255,MMCX-40,MMCY-40,MMCX+40,MMCY+40)) or (TimeFromMark(Mark4) > 6000) );
Result := True;
Exit;
end;
end;
end;
end;
FTWaitD((200) + Random(200));
end;
end;
//----------------------------------------------------------------------------//
Function ClickGoblin: Boolean;
var CBx,CBy: Integer;
begin
if CastEnabled then
begin
Cast('confuse');
CastCount:=CastCount+1;
ReportVars[1] := ReportVars[1] + 1;
end;
GoblinAttempts := GoblinAttempts + 1;
for GCIndex:=1 to 8 do
begin
if FindColorSpiralTolerance(CBx, CBy, GoblinColors[GCIndex], MSX1, MSY1, MSX2, MSY2, 12) then
begin
MMouse(CBx, CBy, 0, 0);
if IsUpTextMulti('Go','obl','lin') then
begin
if not InFightAt(CBx, CBy) then
begin
Mouse(CBx, CBy, 0, 0, True);
FTWait(8);
FFlag(1);
if (InChatMulti('alr', 'und ',' att')) then
begin
Result:=True;
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;
//----------------------------------------------------------------------------//
Procedure WaitGoblin;
var Mark5, WGC:Integer;
begin
MarkTime(Mark5);
repeat
if((WeAreInLumbridgeCastle) or (not (Loggedin)) or (WeAreDead)) then Exit;
for WGC := 1 to 3 do
begin
FTWaitD(1000 + Random(100));
if (TimeFromMark(Mark5) > GoblinTimeOut + Random ( GoblinTimeOut / 2 )) then Exit;
end;
until not InFight;
Goblins := Goblins + 1;
ReportVars[0] := ReportVars[0] + 1;
Players[CurrentPlayer].Killed := Players[CurrentPlayer].Killed+1;
end;
//----------------------------------------------------------------------------//
Function HaveRune(WhichRune:Integer): Boolean;
var DumX, DumY : Integer;
begin
Result:= FindBitmapToleranceIn(WhichRune,Dumx, Dumy,MIX1,MIY1,MIX2,MIY2,10);
end;
//----------------------------------------------------------------------------//
Function CanCast:Boolean;
begin
if Players[CurrentPlayer].level[6] >=3 then
begin
If HaveRune(WaterRune) and HaveRune(EarthRune) and HaveRune(BodyRune) then
begin
Result:=True;
FawkiDebug ('CanCast');
end;
end;
end;
//----------------------------------------------------------------------------//
// Main EventLoop
//----------------------------------------------------------------------------//
begin
SetupScript;
Repeat
SetPlayerParams;
MakeCompass('N');
if WeAreInLumbridgeCastle then
begin
If (FindLumbridgeRoadColor = 0) then RoadColorChecker;
WalkToGoblinField;
end
Callibrate;
MarkTime(CallibrateTime);
MarkTime(BoneTime);
Repeat
if ClickGoblin then
WaitGoblin
else
FTWait(1);
If GoblinAttempts > (150 + Random(25)) then Callibrate;
If TimeFromMark(CallibrateTime) > (180000 + Random(6000)) then
begin
Callibrate;
MarkTime(CallibrateTime);
end
RunningTime := GetSystemTime;
if (not LoggedIn)
or WeAreDead
or WeAreInLumbridgeCastle
or (RunningTime - StartTime >( (PlayerTime * 60000 )+ Random (Playertime * 100) ) )
then Break;
Until WeAreDead or (not LoggedIn);
if LoggedIn then
begin
SetChat('off', 1);
repeat
FTWaitD(1000);
until(not(LoggedIn));
Writeln('Switching User Now');
NextPlayer(True);
FTWaitD(8000 + Random(2000));
end;
if (not(Loggedin)) then NextPlayer(False);
until(False);
end.