Not now it isn't :)
I took 2 hours to update this script to full working order :)
Here have it!
//----------------------------------------------------------------------------//
// -- Ratz!
// -- Combat Overdrive
// -- by WT-Fakawi with a helping hand from NaumanAkhlaQ
// -- 0.70
// -- ATTENTION: *** SCSS ONLY *** :ATTENTION
// --
// -- - Combat - Magic - Prayer - Woodcutting - Firemaking - Cooking - Collecting
//----------------------------------------------------------------------------//
// --
// -- !!!! FOR THE SRL COMMUNITY ONLY !!!!!
// -- !!!! DO NOT DISTRIBUTE THIS SCRIPT !!!!!
// -- !!!! USE FOR YOUR OWN PRIVATE PURPOSES !!!!
// --
// -- You are free to copy/paste/modify this script or parts
// -- of this script as long as you credit me and the SRL-community.
//----------------------------------------------------------------------------//
// --
// -- This Script trains Combat, Magic, Woodcutting, Firemaking and Cooking.
// -- INSTRUCTIONS
// -- 1. Place you Combat 20+ Players West of Port Sarim at the Altar
// -- next to the Rats just above the Graveyard.
// -- 2. Equip your Players with 3 pieces of armour, 1-3 axes and a tinderbox.
// -- 3. Sample the Minimap RockColor and the WaterColor in Line 161.
// --
//----------------------------------------------------------------------------//
// --
// -- This script Attacks Goblins and Rats, Picks up Coins, Bones, Junk and Meat.
// -- It will cut Trees, Light Logs and Cook the Meat.
// -- Use SCSS client (comes with SRL)
// --
//----------------------------------------------------------------------------//
// --
// -- Script entirely based on timed loops.
// -- Kills Goblins.
// -- Kills Rats.
// -- Collects stackable items: coins and runes.
// -- Collects Bones and Meat (and some junk)
// -- Cuts Trees.
// -- Lights Logs.
// -- Cooks Meat.
// -- Eats Meat.
// -- Buries Bones.
// -- Drops Ashes, Talismans, Kebabs, Beers, Necklaces, Broken Axes,
// -- Axe Sticks, Bolts and Arrows, Chiefs Hat and Goblin Mails.
// --
// --
// -- Enjoy!
//----------------------------------------------------------------------------//
// -- Version History.
// -- 0.69 compatibelized for SRL 4
// -- 0.67 First attempt in logics. Script reverts to bonefinding when
// -- there are no NPC in mainscreen.
// -- Enhanced coin finding. Searches for coins during combat.
// -- Added chasemouse. Hunts down a Goblin.
// -- 0.62 Added FullHit Check and FullHitBar Check. Faster then ever!
// -- 0.60. Total revamp. Redid a lot of the code.
// -- Added DDTM for better callibration, woodcutting/firemaking cycle,
// -- Combat Frenzy, TurboFight.
// --
// -- 0.44 Chopped it into tiny fragments for DIVI.
// --
// -- 0.39
// -- Added better callibration, better statistics. Its generally more stable now
// --
// -- 0.37
// -- First Release
//----------------------------------------------------------------------------//
program RatZ;
{.include SRL\SRL.scar}
{.include SRL\SRL\Skill\Magic.scar}
{.include SRL\SRL\Skill\Runecrafting.scar}
{.include SRL\SRL\Skill\Fighting.scar}
// _____ _
// | __ \ | |
// | | | | ___ ___| | __ _ _ __ ___
// | | | |/ _ \/ __| |/ _` | '__/ _ \
// | |__| | __/ (__| | (_| | | | __/
// |_____/ \___|\___|_|\__,_|_| \___|
var
Dumx,Dumy:integer;
var
CallibrateTime, WoodCutTime, CookTime,
CleanUpMiscTime, StartLoopTime, EndLoopTime, ML, PlayTime: integer; // Timers
var
NPCColors: array[1..16] of integer;
TreeColors : Array [1..3] of Integer;
var
Mark, TheBone, Rat,Bone, Bone1, Bone2, Bone3, Bone4, RawBeef: integer;
var
Tree, TinderBox, Fire: integer;
var
LogMask, AxeMask, BrokenAxeMask, AshMask, TalismanMask, KebabMask,
BeerMask, NecklaceMask, AxeStickMask,BoltsMask, ArrowsMask,
GoblinMailMask, ChefsHatMask, SqShieldMask, SymbolMask,
BonesText, RawRatMeatText, CoinsText, RuneText, x ,y: integer; // Masks
var
NPCCount, CastCount, TreeCount, LogCount, CookedMeatCount, EatMeatCount: Integer; // counters
var // more counters
AshCount, TalismanCount, KebabCount, BeerCount, NecklaceCount, StickCount, BraxeCount,
BoltsCount, ArrowCount, GoblinMailCount, ChefHatCount, SqShieldCount, BoneCount,
FullHitCount, RawMeatCount: integer;
var
CastEnabled, StickyCast, FullHitFlag: Boolean;
var
SST1, SST2, FindNorMalRandomsTime, FindFastRandomsTime: LongInt;
var
NPCDot, DropDot, PlayerDot, FiveDamage, FullHitBar, RockDTM,
RockColor, RatzWaterColor, GoodClick, BadClick: Integer;
//----------------- USER ADJUSTABLE PARAMS --------------------------------//
const UseSCSS = True;
const FawkiDebug = False; // Set to true for extensive Debugs
const GoblinTimeOut = 6000; // milliseconds before clicking next goblin.
const PickupAny = True; // If you want the Script to Pick up Anything
const PlayerTime = 60; // PlayerTime in minutes
const BuryBonesToo = True; // True for Bury, false for Drop
const RemoteMaster = ''; // fill in the Nickname of the RC master
const MySRLID = ''; // Your SRLID here
const MySRLPassword = ''; // Your SRL Password here
const RatzMouseSpeed = 20; // Set preferred speed. Set as HIGH as possible. Goblins are quick.
const LengthOfFrenzyLoop = 4; // Length of CombatFrenzy in MINUTES before starting WC/FM/Cook loop. recommended 1 - 6
const HowMuchMeatInInVent = 6; // How many pieces of cooked meat to keep in invent
//----------------------------------------------------------------------------//
const MouseHit = 255;
const MouseMis = 65535;
const PickUpColor = 3553023;
const VersionNumber = 'RatZ C.O. 0.70'; // Compliant with SRL 4
//----------------------------------------------------------------------------//
Function Callibrate:Boolean; Forward;
Function QuickCal:Boolean; Forward;
Function NoAxes: Boolean; Forward;
Procedure CleanUpInventory; Forward;
Procedure Down; Forward;
Procedure Up; Forward;
Procedure BuryBones; Forward;
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
procedure SetupMiniMapColors;
begin
RatzWaterColor := 56 ;
RockColor := 55 ;
end;
Procedure DeclarePlayers;
begin
NumberOfPlayers(6); // set arraylength
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 := 'auto';
Players[2].Name :='';
Players[2].Pass :='';
Players[2].Nick :='';
Players[2].Active :=True;
Players[2].Skill := 'auto';
Players[3].Name :='';
Players[3].Pass :='';
Players[3].Nick :='';
Players[3].Active :=True;
Players[3].Skill := 'auto';
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';
end;
Procedure FillMem;
begin
Bone1 := BitmapFromString(4, 3, 'B6ABABB6ABAB3D3115' +
'3D3115C9C1C1C9C1C13D31153D31153D3115DBD6D6A49897A 4989' +
'7');
Bone2 := BitmapFromString(4, 2, 'D7D2D1C9C1C1A79B9B' +
'A79B9BF0EEEEB3A8A83D31153D3115');
Bone3 := BitmapFromString(3, 2, '433418BEB5B53D3115' +
'D3CDCDD3CDCDD3CDCD');
Bone4 := BitmapFromString(2, 2, '958B8A8E8484E8E5E5' +
'382B12');
Tree:= BitmapFromString(8, 1, '68783458583D383824' +
'707834485022687834384822586036');
Fire := BitmapFromString(1, 11, '3B3000F4C63FF8C83FF4C73EE6' +
'BC39E6BC39BC922CE6BE45BC9E38BC9E3B352A00');
Rat := BitmapFromString(16, 1, 'A19696AFA2A2B0A4A4B6ABAAB7A' +
'DACB7ADACB4A9A9B4A9A9B0A4A4AB9F9FAB9F9FAB9F9FAB9F 9F9C' +
'91919C91919C9191');
TinderBox := BitmapFromString(13, 1, '604109604109604109604' +
'109604109604109938989988E8D91878789807F7B7272635C 5B45' +
'4141');
LogMask := BitmapFromString(31, 25, 'z78DAED97810D002008C35' +
'EE20AFF3FC90F0806852EB207A88EC030EBD1726530C5D938 FCA7' +
'24B7C8575AAF5FCA712D5397D0695D7EFD49AEDB2DEAE4710 6E62' +
'EF349983BD77781CF9CEFA5211FF221AF9F90BAE4CC1BE434 E757' +
'DE869555EE7232F39B56FE519954845FDD2F1893E2');
AxeMask := BitmapFromString(10, 10, 'z78DA7373230D185000283' +
'16130E825353470A921DE3DE499409EDB480D25FCE10000B7 2C7C' +
'E1');
BrokenAxeMask := BitmapFromString(9, 10, 'z78DA7373230D1890' +
'05C8D34BAA2EE2D5E3F21131FEC56FCBE091A53C34007F307 225');
AshMask := BitmapFromString(13, 11, 'z78DA3330C007DC8806C4A' +
'84756634081BD982A89318D7859E26D27C6FD065405949B49 2DB7' +
'51CB7783C71CEAC61A000029B371');
TalismanMask := BitmapFromString(13, 19, 'z78DA3330201FB881' +
'810195C0E0348D16AE420606540583CDD7F4895337B2C0D04 ACFA' +
'32E1C3C66522BFF52D7770054742568');
KebabMask := BitmapFromString(10, 14, 'z78DA73734300030A00B' +
'54C186C2E1928F70C7E5DE4E9252F54E9E32F4A621C007B84 A7D1' +
'');
BeerMask := BitmapFromString2(False, 'a6AFEC78DAB55049128' +
'03008FB1208857AACDBFF9F64C3C1F1A04EDD72483B218550 2262' +
'19A862992A493F564ED9363681A2128ACE50B4E03E05A7F02 FE1E' +
'CD0A6CB7AA86B1C36A48DBD87921873CD194A1130238F6554 5D50' +
'7547072E19090DFD913740CD78E6DF836EE2FDDB37FEEBE9D 7FEB' +
'36A7BC2FFB66EF9D5AF3CCF765901E53');
NecklaceMask := BitmapFromString(11, 8, 'z78DA73730301030A80DB1' +
'037C10D0950AECB8D6860405540790840D8003F406BC5');
AxeStickMask := BitmapFromString(16, 28, 'z78DA3330A0267043' +
'0206343019BFC850319FD6E133545C3E74C37CD4E5C3C9E5B 8CCA' +
'19DF9A32E1F7539A926D0CEFC51970F4597D3C77CCC761D75 4D06' +
'004C8F1583');
BoltsMask := BitmapFromString(8, 11, 'z78DA33302016B86100FC6A30' +
'C5F18BD0473DE5E203E572E24DA0443D00EAB46DD5');
ArrowsMask := BitmapFromString(9, 3, 'z78DA73730301033070430206' +
'480097382E5952D5E3370700F92B2599');
GoblinMailMask := BitmapFromString(16, 16, 'z78DA33300001370C60' +
'4031A09639F4379F7293F18727B5CCC765E3F00EDB51F3476 376E' +
'4848F1BD1803C570100D1DE2F88');
ChefsHatMask := BitmapFromString(14, 21, 'z78DA3330A0267003038' +
'31160A61B06A0DC9CC1165623273647CD1C3573D4CCC15086 B811' +
'0148750300DCD059C4');
SqShieldMask := BitmapFromString(15, 10, 'z78DA3330180520E00606' +
'43C5646433DD7000DAB996545BC8730FF12EA1C4A79826503 7BE8' +
'8092B0043FCB209');
SymbolMask := BitmapFromString(15, 15, 'z78DA3330C007DCF002' +
'031201F17A4955694016C0A5971233F19B430B93A9652679E 13F6' +
'AF2608B47FAA43A5AE7415A971BD42DEB0085B411D0');
NPCDot := BitmapFromString(4, 3, 'FEFE13FCFC02F5F500DDDD00F' +
'CFC02FCFC02EDED00CCCC00000001DDDD00CCCC00000001') ;
PlayerDot := BitmapFromString(4, 5, 'z78DA3330000137570434C010' +
'8140576710C41471310241B02643572310743605418888010 2182' +
'28B0000E71C1BCB');
DropDot := BitmapFromString(4, 2, 'FF3636FE2020FC0606E90000FE0' +
'C0CFC0606F10000CE0000');
FiveDamage := BitmapFromString(4, 4, 'z78DA7373C3070C30007E714CBD006' +
'B2A16A5');
FullHitBar := BitmapFromString(30, 1, 'z78DA7373330002B7214' +
'50200CCCB26E9');
BonesText := BitmapFromString(24, 1, 'z78DA7373B33430317003' +
'931060EA626A6262EE4603714C121940D40300C5511EC7');
RawRatMeatText := BitmapFromString(25, 1, 'z78DA7373B334303170C' +
'3209181A98BA989893984C4A506591CBF7A6264017C562008 ');
CoinsText := BitmapFromString(35, 1, 'z78DA7373B33430317003' +
'931060EA626A62628E8B74C3A19ED6E2C8A4011240560F910 5008' +
'F812CC8');
RuneText := BitmapFromString(29, 1, 'z78DA7373B3343031700393C8C' +
'0D4C5D4C4C41C42BA61A821551C02283707009DAC24CD');
RawBeef := BitmapFromString(31, 29, 'beNqtlj1Lw1AUhs3sH3D0J' +
'4iDm6PUxUkX0U0dFAVRFCkoonTooFAKgg5FEDoUv8XityiFoi Lo0E' +
'FBQUEFEQdx6+JTzjVektwktg1nKCV9zpv3nvekNTXVuCxXVeu yttP' +
'pTCq1nEwmYrH41OTk6EiV+NZuJiOVrKul+DA9Psb3DfX1FZL3 1tel' +
'hCzw+dmZqsAPt7comyzwVCIRi0Yrc8Y6zWYpnSxw/Mf5CsRbZ/v7l' +
'IOsixfny4Pnjg4pExlb+rq7yoJb+dMTyiR7IR4fGejv6mj/J1xl5C' +
'qXM5GZdqYFcktzc2i4YiLY0w0bvjQ/R4iANzU2hoCXsNf5PExm43h' +
'nR59qT7cHe3s6WyNB06Kw/kyHJwxhWyQisg1whQ3D1OHsFo4SuJBd' +
'cIUNz9SHBE90uIN8e3VpikYgnKOcGB6SIfGUDdyxK+zf6mWaQ B3ut' +
'rpwc+Op3B+eXlzEbV/ZCu4ZPR+4bCoMZ7z9h+S+UOA0A+E6f2NlBb' +
'dZU5J3g2wFR/x/j1J2oK/sEvzx7o6Mkxq3sZ5YDIGM4fJ2MMsuwYv' +
'F4tPDA+Jpwclm11ZNXfiec8RqIRP5wLwDf397hc8j0AL/aUGg6OIm' +
'M37IJu8EJ0i2gn9/fcF/eX6mhRyBbK2DzQ3pAln+S8Bntu3VHeKlp' +
'vifHx/2I9CCcMm+JWK0EL4EB0MMefd7I+jigaP/4vwcPkax0CQ4Yn' +
'UIT/6u3zste4+BlX2OOSIbsvyzkpvLeNE7uoAlMpLHUIJ/AEvmd5w' +
'=');
Bone := BitmapFromString(38, 27, 'beNrtlLFKw1AUhvso+gi+hlu7' +
'2U06SXCQ4hRcpDhIcJDgIMGhGAchHYRbQbhdhDgU4iCkW5cOf QCHD' +
'g71u73lEkKskqShYH8uITm53P+c//z31GpbbBTi98i/catkHI9i8e' +
'DzsrezyzN6DdfNOJ1MZS9Y1juMxGOwPjEpRz4JCkRV+7Stg+G LDLq' +
'+d+V0FpFSEA4kRQVdzzpsJeNa1fFH7JzZ7SOrWW+YYA7dVPID iWLu' +
'pdM6aLIMi1m6RjJJ5pCPEcw+Z9FbSNqN+r4xjG7f/fOEpTwzXNKl0' +
'sgNupNUb/41R0DZF2YDKZVrFW17k7m2DWm4Fx2k5pMX/9Yjgvj8wk' +
'IESQOp+ZVq+h+RFApJOZ+jcCkK02XnXFHjUqy7oPawseip1ud u60/' +
'7Kce/zh471MvCvbl9m3EdRjEVpQyTdA61F7kpmY7S13/1gcWty0BT' +
'o6Av9FhbfWBxOn0X1EC78+xjq0TFfgXOZKBVyahm+Em7SsYS2 7Sxd' +
'Fv8d3wDlWrpUQ==');
end;
//----------------------------------------------------------------------------//
procedure SetupColors;
begin
NPCColors[1] := 8229020; // grey suit
NPCColors[2] := 7642334; // orange shoes
NPCColors[3] := 12832983; // white shoes
NPCColors[4] := 10526869;
NPCColors[5] := 8700589; // light green
NPCColors[6] := 6978694; // grey suit
NPCColors[7] := 3844000; // gobbie green
NPCColors[8] := 7118991; // gobbie green
NPCColors[9] := 12763576; // new rat colors
NPCColors[10] := 8624549;
NPCColors[11] := 10526869;
NPCColors[12] := 11118749;
NPCColors[13] := 4145502;
NPCColors[14] := 12895419;
NPCColors[15] := 10000268;
NPCColors[16] := 9944242; // green head
TreeColors[1] := 876624; // Tree Colors are used with tolerances Don't Change
TreeColors[2] := 3442808;
TreeColors[3] := 4161648;
end;
//----------------------------------------------------------------------------//
Procedure AssembleRockDTM;
var
DTMSubPoints: array[0..2] of TDTMPointDef;
DTMMainPoint: TDTMPointDef;
TempTDTM: TDTM;
begin
DTMMainPoint.x:=638;
DTMMainPoint.y:=76;
DTMMainPoint.areasize:=1;
DTMMainPoint.areashape:=0;
DTMMainPoint.color:=0;
DTMMainPoint.tolerance:=255;
DTMSubPoints[0].x:=664;
DTMSubPoints[0].y:=65;
DTMSubPoints[0].areasize:=1;
DTMSubPoints[0].areashape:=0;
DTMSubPoints[0].color:=RockColor;
DTMSubPoints[0].tolerance:=0;
DTMSubPoints[1].x:=672;
DTMSubPoints[1].y:=72;
DTMSubPoints[1].areasize:=1;
DTMSubPoints[1].areashape:=0;
DTMSubPoints[1].color:=RockColor;
DTMSubPoints[1].tolerance:=0;
DTMSubPoints[2].x:=664;
DTMSubPoints[2].y:=85;
DTMSubPoints[2].areasize:=1;
DTMSubPoints[2].areashape:=0;
DTMSubPoints[2].color:=RockColor;
DTMSubPoints[2].tolerance:=0;
TempTDTM.MainPoint := DTMMainPoint;
TempTDTM.SubPoints := DTMSubPoints;
RockDTM := AddDTM(TempTDTM);
end;
// _____
// | __ \
// | |__) | __ ___ __ _ _ __ ___ ___ ___
// | ___/ '__/ _ \ / _` | '__/ _ \/ __/ __|
// | | | | | (_) | (_| | | | __/\__ \__ \
// |_| |_| \___/ \__, |_| \___||___/___/
// __/ |
// |___/
procedure PlayerStats;
var Active: string;
var i: Integer;
begin
writeln('***************************************** *****');
writeln('Name : '+ Players[CurrentPlayer].Name);
writeln('Number : '+ inttostr(CurrentPlayer));
writeln('Worked for : '+ inttostr(Players[CurrentPlayer].Worked)+' minutes.');
if Players[CurrentPlayer].Active=True then Active:='True' else Active:='False';
writeln('Active : '+ Active);
writeln('***************************************** *****');
for i := 0 to HowManyPlayers-1 do
begin
if Players[i].Active=True then Active:='T' else Active:='F';
writeln( (inttostr(i))+' : '+Players[i].name + ' = '+Active
+'. '
+'AT '+inttostr(Players[i].level[1])+'. '
+'ST '+inttostr(Players[i].level[2])+'. '
+'DF '+inttostr(Players[i].level[3])+'. '
+'PR '+inttostr(Players[i].level[5])+'. '
+'HP '+inttostr(Players[i].level[8])+'. '
+'MG '+inttostr(Players[i].level[6])+'. '
+'CO '+inttostr(Players[i].level[18])+'. '
+'FM '+inttostr(Players[i].level[19])+'. '
+'WC '+inttostr(Players[i].level[20])+'. '
+'W : '+IntToStr(Players[i].Worked)+' min. '
+'L: '+Players[i].loc
+'R: '+Players[i].Rand);
end;
writeln('***************************************** *****');
end;
//----------------------------------------------------------------------------//
procedure ProgressReport;
begin
begin
WriteLn(' ');
WriteLn('<============== -'+VersionNumber+'- Progress Report ===============>');
writeln('Worked for '+ TimeRunning);
writeln('Killed '+ IntToStr(NPCCount)+ ' Rats and Goblins');
writeln('One Hitters: '+ IntToStr(FullHitCount));
writeln('Good Clicks: '+ IntToStr(GoodClick));
writeln('Chase Clicks: '+ IntToStr(BadClick));
writeln('Chopped '+ IntToStr(TreeCount)+ ' Trees');
writeln('Lit '+ IntToStr(LogCount)+ ' Logs');
if CastCount > 0 then writeln('Casted '+ IntToStr(CastCount)+ ' Spells');
writeln('Ate '+ IntToStr(EatMeatCount)+ ' Meat');
writeln('Cooked '+ IntToStr(CookedMeatCount)+ ' Times');
writeln('Cooked '+ IntToStr(RawMeatCount)+ ' Meat');
writeln('Buried '+ IntToStr(BoneCount)+ ' Bones');
WriteLn('<============== -'+VersionNumber+'- Dropping Stats ===============>');
if AshCount > 0 then writeln('Dropped '+ IntToStr(AshCount)+ ' Ashes');
if TalismanCount > 0 then writeln('Dropped '+ IntToStr(TalismanCount)+ ' Talismans');
if KebabCount > 0 then writeln('Dropped '+ IntToStr(KebabCount)+ ' Kebabs');
if BeerCount > 0 then writeln('Dropped '+ IntToStr(BeerCount)+ ' Beers');
if NecklaceCount > 0 then writeln('Dropped '+ IntToStr(NecklaceCount)+ ' Necklaces');
if StickCount > 0 then writeln('Dropped '+ IntToStr(StickCount)+ ' Sticks');
if BraxeCount > 0 then writeln('Dropped '+ IntToStr(StickCount)+ ' Broken Axes');
if BoltsCount > 0 then writeln('Dropped '+ IntToStr(BoltsCount)+ ' Bolts');
if ArrowCount > 0 then writeln('Dropped '+ IntToStr(ArrowCount)+ ' Arrows');
if GoblinMailCount > 0 then writeln('Dropped '+ IntToStr(GoblinMailCount)+ ' GoblinMails');
if ChefHatCount > 0 then writeln('Dropped '+ IntToStr(ChefHatCount)+ ' ChefHats');
if SqShieldCount > 0 then writeln('Dropped '+ IntToStr(SqShieldCount)+ ' SqShields');
PlayerStats;
SRLRandomsReport;
SendSRLReport;
Writeln(' ');
end;
end;
// _____ _
// | __ \ | |
// | |__) |__ _ _ __ __| | ___ _ __ ___ ___
// | _ // _` | '_ \ / _` |/ _ \| '_ ` _ \/ __|
// | | \ \ (_| | | | | (_| | (_) | | | | | \__ \
// |_| \_\__,_|_| |_|\__,_|\___/|_| |_| |_|___/
function RTreeColor : Integer;
var I : Integer;
begin
repeat
I := Random ( 4 + 1 );
until (I = 1) or (I = 2) or (I = 3);
Result := TreeColors [I];
end;
//----------------------------------------------------------------------------//
Function FindFastRandoms: Boolean;
var
i: Integer;
begin
for i:=1 to 2 do
begin
case I of
1: FindNormalRandoms;
2: FindNoNInventoryRandoms;
end;
end;
end;
//----------------------------------------------------------------------------//
// -- Performs Wait and FindTalk. + calls FindNormalRandoms every 10 secs and
// -- FindFastRandoms every 3 secs.
//----------------------------------------------------------------------------//
Procedure FTWaitAll(Time:Integer);
var t: integer;
begin
For T:=1 to Time do
begin
Wait(200+Random(50));
if FawkiDebug then writeln('FindTalk...' + IntToStr(T) + '...');
FindTalk;
RC;
end;
Respond;
FindFastRandoms;
MarkTime(FindNorMalRandomsTime);
if FindNorMalRandomsTime-SST1 >(10000+Random(5000)) then
begin
if FawkiDebug then begin ClearDebug; writeln('Finding SlowRandoms.'); end;
FindNorMalRandoms;
FindTalk;
RC;
Respond;
MarkTime(SST1);
end;
MarkTime(FindFastRandomsTime);
if FindFastRandomsTime-SST2 >(1500+Random(1500)) then
begin
if FawkiDebug then writeln('Finding FastRandoms.');
FindFastRandoms;
FindTalk;
RC;
Respond;
MarkTime(SST2);
if FawkiDebug then writeln('FindFastRandoms took:'+IntToStr(SST2-FindFastRandomsTime)+' msec');
end;
Wait(250);
end;
//----------------------------------------------------------------------------//
// -- Performs FlagWait and FindTalk....
//----------------------------------------------------------------------------//
function FlagFTWait:Boolean;
var FlagMark: Integer;
begin
MarkTime(FlagMark);
if not FlagPresent then
begin
Result:=False;
Exit;
end
else
begin
repeat
FTWaitAll(1);
if not(Loggedin) then break;
until ( (not FlagPresent) or (TimeFromMark(FlagMark) > 6000) ); // waits until flag is gone or 6 seconds.
Result:=True;
Wait(250);
end;
end;
//----------------------------------------------------------------------------//
procedure FindRandoms;
begin
FindNormalRandoms;
if InBlack then
begin
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
Wait(1);
if NoGameTab then
begin
Players[CurrentPlayer].loc := 'GameTab';
Logout;
Exit;
end;
Wait(1);
end;
//----------------------------------------------------------------------------//
// Finds Normal Randoms and Woodcutting Randoms
//----------------------------------------------------------------------------//
procedure FindWCRandoms;
begin
FindRandoms;
if NoAxes then begin Logout; exit; end;
if ( FindFight ) then
begin
MFF ( MMCX, MMY1 + 10, 1, 5 );
Flag;
FTWaitAll(30);
MFF ( MMCX, MMY2-10, 5, 5 );
Flag;
end;
end;
//----------------------------------------------------------------------------//
Procedure MyAntiBan;
var
DBanMe : Integer;
begin
DBanMe:= Random(4);
case DBanMe of
0: PickUpMouse;
1: DragItem(1, 1 + Random(18));
2: GameTab(1 + Random(12));
3: DoEmote(1 + Random(20));
end;
end;
// _____
// / ____|
// | | ___ _ __ ___
// | | / _ \| '__/ _ \
// | |___| (_) | | | __/
// \_____\___/|_| \___|
//----------------------------------------------------------------------------//
// -- Handles ClickToContinue but without NPCChars, so little bandwidth
//----------------------------------------------------------------------------//
Function ClickToContinueFast: Boolean;
var CTCTime,x,y:integer;
Begin
MarkTime(CTCTime);
if FindColor(x,y,16711680,219,436,258,451) then
begin
Mouse (250,440,100,10,True);
Result:=True;
FTWaitAll(2);
IdleTime(500,1,0.5);
if (TimeFromMark(CTCTime) >3000) then Exit;
ClickToContinueFast;
end;
end;
//----------------------------------------------------------------------------//
//--- Like ClickNpcChatText, only this one Right-Clicks. ---//
//----------------------------------------------------------------------------//
function ClickNpcChatTextRight(txt : String) : Boolean;
var
tx,ty,s:integer;
begin
s := CreateBitmapMaskFromText(txt, npcchars);
if FindBitmapMaskTolerance(s, tx, ty, 9, 348, 523, 471, 50, 10) then
begin
Mouse(tx, ty, 0, 0, False);
Result:=True;
end;
FreeBitmap(s);
end;
// __ __ _ _ __ __
// | \/ (_) (_) \/ |
// | \ / |_ _ __ _| \ / | __ _ _ __
// | |\/| | | '_ \| | |\/| |/ _` | '_ \
// | | | | | | | | | | | | (_| | |_) |
// |_| |_|_|_| |_|_|_| |_|\__,_| .__/
// | |
// |_|
// All credits to Boreas!
function FindAllBitmapsIn(TheBmp,startx,starty,endx,endy:in teger):array of tpoint;
var tmpbool:boolean;
AL:integer;
curx,cury,tmpx,tmpy,height:integer;
begin
tmpbool:=FindBitmapIn(TheBmp,tmpx,tmpy,startx,star ty,endx,endy);
if tmpbool then
begin
curx:=startx;
cury:=starty;
tmpbool:=FindBitmapIn(TheBmp,tmpx,tmpy,startx,star ty,endx,endy);
height:=0;
repeat
height:=height+1;
tmpbool:=FindBitmapIn(TheBmp,tmpx,tmpy,startx,tmpy ,endx,tmpy+height);
until tmpbool;
repeat
tmpbool:=FindBitmapIn(TheBmp,tmpx,tmpy,curx,cury,e ndx,cury+height);
if tmpbool then
begin
curx:=tmpx+1;
AL:=getarraylength(result);
setarraylength(result,AL+1);
result[AL].x:=tmpx;
result[AL].y:=tmpy;
end;
if not tmpbool then
begin
curx:=startx;
cury:=cury+1;
end;
until cury=endy+1;
end;
end;
//----------------------------------------------------------------------------//
function FindClosestNPC: TPoint;
var
i, Cx, Cy, Dist, Fx, Fy: Integer;
begin
for Dist := 5 to 62 do
begin
for i := 160 to 520 do
begin
Cx := Round( Dist * Sin(i * Pi / 180)) + MMCx;
Cy := Round(- Dist * Cos(i * Pi / 180)) + MMCy;
if FindColor(Fx, Fy, 195836, Cx, Cy, Cx + 1, Cy + 1) then
begin
Result.x := Fx;
Result.y := Fy;
Exit;
end;
end;
end
end;
//----------------------------------------------------------------------------//
Function CountNPCS:Integer;
var NPCS:array of Tpoint;
var Count:integer;
begin
NPCS := (FindAllBitmapsIn(NPCDot, MMx1,MMy1,MMx2,MMy2));
Count := getarraylength(NPCS);
Result := Count;
setarraylength(NPCS,0);
end;
//----------------------------------------------------------------------------//
Function CountDrops:Integer;
var Drops:array of Tpoint;
var Count:integer;
begin
Drops := (FindAllBitmapsIn(DropDot, MMx1 + 20,MMy1 + 20,MMx2 - 20,MMy2 - 20));
Count := getarraylength(Drops);
if Count > 15 then Count := 15;
Result := Count;
setarraylength(Drops,0);
end;
//----------------------------------------------------------------------------//
Function CountLegits:Integer;
var Legits:array of Tpoint;
var Count:integer;
begin
Legits := (FindAllBitmapsIn(PlayerDot, MMx1, MMy1, MMx2, MMy2));
Count := getarraylength(Legits);
if Count > 15 then Count := 15;
Result := Count;
setarraylength(Legits,0);
end;
//----------------------------------------------------------------------------//
Function NPCInMain:Boolean;
var
Dx, Dy: Integer;
begin
result := FindColor(Dx, Dy, 195836, MMCx - 28 , MMCy - 20, MMCx + 28, MMCy + 20)
end;
// __ __ _ _
// \ \ / / | | | |
// \ \ /\ / /__| |__| | __ ___ _____
// \ \/ \/ / _ \ __ |/ _` \ \ / / _ \
// \ /\ / __/ | | | (_| |\ V / __/
// \/ \/ \___|_| |_|\__,_| \_/ \___|
function WeAreInLumbridgeCastle: Boolean;
var
x,y:integer;
begin
if FindSymbol(x, y, 'water') then
begin
Players[CurrentPlayer].Loc := 'Lumbridge';
Result := True;
end;
end;
//----------------------------------------------------------------------------//
Function WeHave(What, tol:integer; var WhereX,WhereX:integer):boolean;
begin
GameTab(4);
Result:=FindBitmapToleranceIn(What, WhereX, WhereX, MIX1, MIY1, MIX2, MIY2, tol)
end;
//----------------------------------------------------------------------------//
Function WeHaveMask(What, tol:integer; var WhereX,WhereY:integer):boolean;
begin
GameTab(4);
Result:=FindBitmapMaskTolerance(What, WhereX, WhereY, MIX1, MIY1, MIX2, MIY2, tol, 2)
end;
//----------------------------------------------------------------------------//
Function WeHaveRawMeat(var WhereX, WhereY:integer):boolean;
Var RawBeef:Integer;
begin
RawBeef := BitmapFromString(31, 29, 'beNqtlj1Lw1AUhs3sH3D0J' +
'4iDm6PUxUkX0U0dFAVRFCkoonTooFAKgg5FEDoUv8XityiFoi Lo0E' +
'FBQUEFEQdx6+JTzjVektwktg1nKCV9zpv3nvekNTXVuCxXVeu yttP' +
'pTCq1nEwmYrH41OTk6EiV+NZuJiOVrKul+DA9Psb3DfX1FZL3 1tel' +
'hCzw+dmZqsAPt7comyzwVCIRi0Yrc8Y6zWYpnSxw/Mf5CsRbZ/v7l' +
'IOsixfny4Pnjg4pExlb+rq7yoJb+dMTyiR7IR4fGejv6mj/J1xl5C' +
'qXM5GZdqYFcktzc2i4YiLY0w0bvjQ/R4iANzU2hoCXsNf5PExm43h' +
'nR59qT7cHe3s6WyNB06Kw/kyHJwxhWyQisg1whQ3D1OHsFo4SuJBd' +
'cIUNz9SHBE90uIN8e3VpikYgnKOcGB6SIfGUDdyxK+zf6mWaQ B3ut' +
'rpwc+Op3B+eXlzEbV/ZCu4ZPR+4bCoMZ7z9h+S+UOA0A+E6f2NlBb' +
'dZU5J3g2wFR/x/j1J2oK/sEvzx7o6Mkxq3sZ5YDIGM4fJ2MMsuwYv' +
'F4tPDA+Jpwclm11ZNXfiec8RqIRP5wLwDf397hc8j0AL/aUGg6OIm' +
'M37IJu8EJ0i2gn9/fcF/eX6mhRyBbK2DzQ3pAln+S8Bntu3VHeKlp' +
'vifHx/2I9CCcMm+JWK0EL4EB0MMefd7I+jigaP/4vwcPkax0CQ4Yn' +
'UIT/6u3zste4+BlX2OOSIbsvyzkpvLeNE7uoAlMpLHUIJ/AEvmd5w' +
'=');
begin
GameTab(4);
Result:=FindBitmapToleranceIn(RawBeef, WhereX, WhereY, MIX1, MIY1, MIX2, MIY2, 50)
end;
end;
//----------------------------------------------------------------------------//
Function WeHaveCookedMeat(var WhereX,WhereY:integer):boolean;
var CookedMeat:Integer;
begin
Cookedmeat := BitmapFromString(26, 25, 'beNqt1DEKwlAMBuCObq4ugl27' +
'1UUEXdzawcHJwQMIegxHV2/gKTydgR9CSF5ifPrIIEU+kpCkaereb' +
'egRl82Egn4cl+1fKGjXbfeLxhRrFend9ysKSUGrKLZIVRfraR WVPg' +
'5riiCxoZt/pQUURb9okyl57ZJlxhoQhBoJS1GZnsaOh1itm00pis5' +
'HxPZfUeTkEVsma3GT84mhb15WvN12MeVgWM2b8EADhf6DgvY8 7YqT' +
'GWj4ojT0LanZg8YTy4kFWnLMZGKsJceMa+SjIROj9zqPBEoz3 iOmc' +
'DTUQrEWmx5lNQtKU4ba8eKmA8yYxYn1ntXkXWIKf9ZlvgGRxF 0B');
begin
GameTab(4);
Result:=FindBitmapToleranceIn(CookedMeat,WhereX,Wh ereY,MIX1,MIY1,MIX2,MIY2,50)
end;
end;
//----------------------------------------------------------------------------//
Function WeHaveLogs(var WhereX,WhereY:integer):boolean;
begin
GameTab(4);
Result:=FindBitmapMaskTolerance(LogMask,WhereX,Whe reY,MIX1,MIY1,MIX2,MIY2,10,2)
end;
//----------------------------------------------------------------------------//
Function WeHaveBrokenAxe(var WhereX,WhereY:integer):boolean;
begin
GameTab(4);
Result:=FindBitmapMaskTolerance(BrokenAxeMask, WhereX, WhereY, MIX1, MIY1, MIX2, MIY2, 10, 2)
end;
//----------------------------------------------------------------------------//
Function WeHaveBones:boolean;
var
Tx, Ty:Integer;
Begin
begin
GameTab(4);
Result := FindBitmapToleranceIn(Bone,Tx,Ty,MIX1,MIY1,MIX2,MI Y2,10);
end;
end;
//----------------------------------------------------------------------------//
Function ThereIsFire(var WhereX,WhereY:integer):boolean;
var
acc,ref : Extended;
var
XT, YT,times,tol : Integer;
begin
ref:=0.8; tol:=1;
for times:=1 to 4 do
begin
FindDeformedBitmapToleranceIn(Fire, XT, YT, MSCX-(25*times),MSCY-(25*times),MSCX+(25*times),MSCY+(25*times), tol, 2, True, acc);
if (acc >= ref) then
begin
WhereX:=XT;
WhereY:=YT;
Result := True;
if FawkiDebug then writeln('Found Fire');
Exit;
end;
ref := ref - 0.1;
tol:=tol+10;
wait(1);
end;
Result:=False;
if FawkiDebug then writeln('Couldnt Find Fire');
end;
//----------------------------------------------------------------------------//
function NoAxes: Boolean;
var CFAx, CFAy: integer;
begin
if FawkiDebug then writeln('CheckForAxes');
GameTab(4);
FTWaitAll(2);
if (not FindBitmapMaskTolerance(AxeMask,CFAx,CFAy,MIX1,MIY 1,MIX2,MIY2,20,2)) then
begin
GameTab(5);
FTWaitAll(2);
if (not FindBitmapMaskTolerance(AxeMask,CFAx,CFAy,MIX1,MIY 1,MIX2,MIY2,20,2)) then
begin
Result:=True;
end;
end;
end;
//----------------------------------------------------------------------------//
Function HaveRune(WhichRune:Integer): Boolean;
begin
Result:= FindBitmapToleranceIn(WhichRune,Dumx, Dumy,MIX1,MIY1,MIX2,MIY2,10);
end;
//----------------------------------------------------------------------------//
Function CanCast(Cast:String):Boolean;
Var WaterRune,EarthRune,BodyRune,AirRune,MindRune : Integer;
bEGIN
BodyRune := DTMFromString('78DA63BCCFC8C0C0CBC4800CA20283C0342 39' +
'4CF7813C8624455030370352F812C365435121212A86A1E00 5952' +
'A86A5A2AAB51D55CC2740F869A174096107E37030077440AD 9');
WaterRune := DTMFromString('78DA63BCC7C8C0D00AC4488083A71A4CC34 41' +
'9AF0159D5A86AB2139351D53C05B22A50D5282A2862AAE940 5593' +
'1C1985AAE62E90D58BAAA6A7A90555CD454C37C3004C14000 ABE0' +
'D1F');
EarthRune := DTMFromString('78DA637CC0C8C0701A889180970E8486893 2D' +
'E04B2F6A3AA09F2F54255F304538D9EA626AA9A1740D64934 BB5C' +
'9D50D5DC01B2AEA0AA99DAD989AAE611907509554D756131A A9AE' +
'B987665272663AA3984AA26392A0A450D000C841551');
AirRune := DTMFromString('78DA631461626068616440060FEFDE05D33 05' +
'1460EA09A1A543505E9E9A86AE431D5ECDAB001558D1C504D 37AA' +
'9AB69A1A54357C40353DA86AE2C2C351D58863AAC1708F0C5 04D1' +
'3AA9AFEE62654353C986AD0FD0E00C92D12DC');
MindRune := DTMFromString('78DA639CC6C8C0B01C8891407D592998868 93' +
'2F602590B51D5345554A0AA9983A966DEC409986AD6A2AAB9 5327' +
'82AA6612116AA60359EB50D5146566A2AA990F642D23604E0 FA61' +
'A0C73A60259F3F19B0300F9021820');
begin
GameTab(4);
if Cast=('confuse') then
begin
if Players[CurrentPlayer].level[6] >=3 then
begin
If FindDTM(WaterRune,x,y,MIX1,MIY1,MIX2,MIY2) and
FindDTM(EarthRune,x,y,MIX1,MIY1,MIX2,MIY2) and
FindDTM(BodyRune,x,y,MIX1,MIY1,MIX2,MIY2) then
begin
Result:=True;
if FawkiDebug then Writeln('CanCast');
end;
end;
end;
if Cast=('wind') then
begin
If FindDTM(MindRune,x,y,MIX1,MIY1,MIX2,MIY2) and
FindDTM(AirRune,x,y,MIX1,MIY1,MIX2,MIY2) then
begin
Result:=True;
if FawkiDebug then Writeln('CanCast');
end;
end;
End;
end;
// _____ _ _ _ _
// | __ (_) | | | | | |
// | |__) | ___| | _| | | |_ __
// | ___/ |/ __| |/ / | | | '_ \
// | | | | (__| <| |__| | |_) |
// |_| |_|\___|_|\_\\____/| .__/
// | |
// |_|
{************************************************* ******************************
function ChooseOption3: Boolean;
By: Stupid3ooo modded by WT-Fakawi
Description: Finds Popup menu, then clicks on Meat, Coins, Runes and Bones in that order!!!
************************************************** *****************************}
Function ChooseOptionMeat:Boolean;
var
x1, y1, x2, y2, LeftCorner, RightCorner, Fx, Fy, BitMap, I: Integer;
begin
LeftCorner := BitmapFromString(4, 4, 'z78DA33753135313137C5' +
'411A600064715CEA914500CACE13F0');
RightCorner := BitmapFromString(4, 4, 'z78DA33753135313137' +
'C5200D30002E35F8C501C9C013F0');
if (FindBitmap(LeftCorner, x1, y1)) and (FindBitmap(RightCorner, x2, y2)) then
begin
for I := 1 to 4 do
begin
case I of
1: BitMap := RawRatMeatText; // Sliced Bitmaps of MenuItemText
2: BitMap := CoinsText; // Works like a charm
3: BitMap := RuneText;
4: BitMap := BonesText;
end;
If FindBitMap(BitMap, Fx, Fy) then
begin
Mouse(Fx, Fy, 20, 4, True);
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;
FreeBitmap(LeftCorner);
FreeBitmap(RightCorner);
end;
//----------------------------------------------------------------------------//
Function PickupGold: Boolean;
var Gx, Gy:Integer;
begin
if FindColorSpiralTolerance(Gx, Gy,1413553,MSX1,MSY1,MSX2,MSY2,4) then
begin
MMouse(Gx, Gy, 0, 0);
FTWaitAll(1);
if IsUpText('oi') then
begin
Mouse(Gx, Gy, 0, 0, False);
RunControl(True);
ChooseOptionMeat;
RunControl(False);
if InChat('spac') then CleanupInventory;
if FawkiDebug then writeln('Pick up Meat');
Result:=True;
end;
end;
end;
//----------------------------------------------------------------------------//
Function PickUpMeat: Boolean;
var RX,RY:integer;
begin
if (not Loggedin) then Exit;
if FindColorSpiralTolerance(RX,RY,1122975,MSX1+40,MSY 1+40,MSX2-40,MSY2-40,10) then
begin
MMouse(Rx,Ry,0,0);
FTWaitAll(1);
if IsUpText('ake') then
begin
Mouse(Rx,Ry,0,0,False);
ChooseOptionMeat;
if InChat('spac') then CleanupInventory;
if FawkiDebug then writeln('Pick up Meat');
FTWaitAll(1);
Result:=True;
end;
end;
FTWaitAll(1);
FlagFTWait;
end;
//----------------------------------------------------------------------------//
Function PickUpBones:Boolean;
var Dx, Dy, i: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 (not Loggedin) then Exit;
FindDeformedBitmapToleranceIn(TheBone, Dx, Dy, MSX1 + 50, MSY1 + 50, MSX2 - 50, MSY2 - 50, 5, 1, True, acc);
if FawkiDebug then writeln('No Bones ' + FloatToStr(acc));
begin
if WeAreInLumbridgeCastle or FindDead or (not Loggedin) then Exit;
if (acc >= 0.3) then
begin
if FawkiDebug then writeln('Bones Found');
MMouse(Dx, Dy, 0, 0);
if IsUpText('tt') then Mouse(Dx, Dy, 0, 0,True); // bash a rat
FindTalk;
if PickupAny then
begin
if IsUpText('apron') then
begin
Mouse(616,103,10,10,True);
FFlag(0);
Exit;
end;
if IsUpText('ake') then
begin
Mouse(Dx, Dy, 0, 0, False);
ChooseOptionMeat;
if InChat('spac') then BuryBones;
Exit;
end;
end
else
begin
if IsUpText('ak') then
begin
Mouse(Dx, Dy, 0, 0, False);
ChooseOptionMeat;
if InChat('spac') then BuryBones;
FindTalk;
if FawkiDebug then writeln('Pick up Deformed');
Result := True;
FlagFTWait;
Exit;
end;
end;
end;
end;
FTWaitAll(1);
end;
end;
//----------------------------------------------------------------------------//
Function PickUpNear: Boolean;
var
Px, Py, Size, PuMark: Integer;
begin
Px := MMCx;
Py := MMCy;
Size := 20;
if FindColorSpiral(Px, Py, 2105598, MMCx - Size, MMCy - Size, MMCx + Size, MMCy + Size) then
begin
Result := True;
MarkTime(PuMark);
Mouse(Px, Py, 2, 2, True);
FFlag(0);
repeat
if QuickCal then Exit;
if TimeFromMark(PuMark) > 20000 then Exit;
if NPCInMain then Exit;
Wait(100);
PickUpBones;
Wait(100);
PickupMeat;
Px := MMCx;
Py := MMCy;
until not FindColorSpiral(Px, Py, 2105598, MMCx - Size, MMCy - Size, MMCx + Size, MMCy + Size);
end
else
Result := False;
end;
//----------------------------------------------------------------------------//
Procedure PickUpCycle;
var
i:Integer;
begin
for i:= 0 to 3 do
begin
PickUpMeat;
Wait(100);
PickUpBones;
Wait(100);
end;
end;
// _ _ _ _ _
// | | | | | | | | |
// | |__| | ___ __ _| | |_| |__
// | __ |/ _ \/ _` | | __| '_ \
// | | | | __/ (_| | | |_| | | |
// |_| |_|\___|\__,_|_|\__|_| |_|
Function EatMeat: Boolean;
var CMx,CMy:integer;
begin
if WeHaveCookedMeat(CMx,CMy) then
begin
EatMeatCount := EatMeatCount + 1;
Mouse(CMx + 2, CMy + 2, 4, 4, True);
FTWaitAll(1);
Result:=True;
end;
end;
//----------------------------------------------------------------------------//
Procedure EatTilEight;
Var Cooked: Integer;
begin
Cooked := BitmapFromString(26, 25, 'beNqt1DEKwlAMBuCObq4ugl' +
'271UUEXdzawcHJwQMIegxHV2/gKTydgR9CSF5ifPrIIEU+kpCkaer' +
'ebegRl82Egn4cl+1fKGjXbfeLxhRrFend9ysKSUGrKLZIVRfr aRWV' +
'Pg5riiCxoZt/pQUURb9okyl57ZJlxhoQhBoJS1GZnsaOh1itm00pi' +
's5HxPZfUeTkEVsma3GT84mhb15WvN12MeVgWM2b8EADhf6Dgv Y87Y' +
'qTGWj4ojT0LanZg8YTy4kFWnLMZGKsJceMa+SjIROj9zqPBEo z3iO' +
'mcDTUQrEWmx5lNQtKU4ba8eKmA8yYxYn1ntXkXWIKf9ZlvgGR xF0B' +
'');
while CountItemsBmp('inv',Cooked,50) > HowMuchMeatInInVent do
begin
if not LoggedIn then Exit;
EatMeat;
FTWaitAll(3);
end;
end;
//----------------------------------------------------------------------------//
Function RestoreHealth:Boolean;
var
x,y:integer;
begin
if WeHaveCookedMeat(x,y) then
begin
while HPPercent < 90 do
begin
if WeHaveCookedMeat(x,y) then
begin
EatMeat;
FTWaitAll(2);
end
else
begin
Result:=False;
Exit;
end;
end;
Result:=True;
end;
end;
// ______ _ _ _ _
// | ____(_) | | | | (_)
// | |__ _ __ _| |__ | |_ _ _ __ __ _
// | __| | |/ _` | '_ \| __| | '_ \ / _` |
// | | | | (_| | | | | |_| | | | | (_| |
// |_| |_|\__, |_| |_|\__|_|_| |_|\__, |
// __/ | __/ |
// |___/ |___/
Procedure SetLowest;
var Ci, HL1, HL2, HL:Integer;
Begin
GetAllLevels;
if Players[CurrentPlayer].Skill = 'auto' then
begin
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);
Exit;
end;
End;
end
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);
end;
End;
//----------------------------------------------------------------------------//
Function InFightAt(x, y: Integer):Boolean;
var
dx, dy: Integer;
begin
GetMousePos(Dx, Dy);
if x - 50 < 1 then x := 1;
if y - 60 < 1 then Y := 1;
Result := FindColor(dx, dy, 255, x - 50, y - 60, x + 50, y + 50)
end;
//----------------------------------------------------------------------------//
Function FindG:Boolean;
var
tempx, tempy: Integer;
begin
Result := IsTextInAreaEx(7, 7, 71, 20, tempx, tempy, 'G', 100, upchars, True,
True, 0, 2, -1);
end;
//----------------------------------------------------------------------------//
Function ClickNPC: Boolean;
var CBx, CBy, Dx, Dy, GCIndex, UpThrust: Integer;
SB:TBox;
begin
SB.x1 := 150;
SB.y1 := 125;
SB.x2 := 300;
SB.y2 := 200;
if CastEnabled then
begin
Cast('wind strike');
StickyCast:=True;
CastCount:=CastCount+1;
end;
for GCIndex := 1 to 16 do
begin
CBx := Random(MMx2);
CBy := Random(MMy2);
if CBx > MSCx - 100 then CBx := MSCx + 100 + (Random(MMx2) - (MSCx + 100));
if CBy > MSCy - 100 then CBy := MSCy + 100 + (Random(MMx2) - (MSCy + 100));
if FindColorSkipBox(CBx, CBy, NPCColors[GCIndex], MSx1, MSy1, MSx2, MSy2, SB) then
begin
MMouse(CBx, CBy, 0, 0);
if FindColorTolerance(Dx, Dy, 318168, 42, 8, 120, 21, 50) then // Yellow
begin
if IsUpText('G') then
begin
if not InFightAt(CBx, CBy) then
begin
RunControl(True);
Mouse(CBx, CBy, 0, 0, False);
if ChooseOption('tt') then
begin
if FindBlackChatMessage('eone') then
begin
Result := False;
RunControl(False);
Exit;
end
else
begin
Result := True;
NPCCount:= NPCCount + 1;
ReportVars[1] := ReportVars[1] + 1;
RunControl(False);
Exit;
end
end
else
begin
Result := False;
RunControl(False);
Exit;
end;
end;
end;
end;
end else
begin
UpThrust := UpThrust + 10;
end;
end;
RunControl(False);
end;
//----------------------------------------------------------------------------//
Function ClickRat: Boolean;
var CBx,CBy: Integer;
begin
if CastEnabled then
begin
Cast('wind strike');
StickyCast:=True;
CastCount:=CastCount+1;
end;
if FindColoredAreaTolerance(CBx, CBy, 9934476, MSX1, MSY1 + 20, MSX2, MSY2, 9, 5) then //3*3 white color
begin
MMouse(CBx, CBy, 0, 0);
if IsUpText('G') then
begin
GetMousePos(CBx,CBy);
if not InFightAt(CBx, CBy) then
begin
RunControl(True);
Mouse(CBx, CBy, 0, 0, False);
if ChooseOption('tt') then
begin
if FindBlackChatMessage('eone') then
begin
Result := False;
RunControl(False);
Exit;
end
else
begin
Result := True;
NPCCount:= NPCCount + 1;
ReportVars[1] := ReportVars[1] + 1;
RunControl(False);
Exit;
end
end
else
begin
Result := False;
RunControl(False);
Exit;
end;
RunControl(False);
Exit;
end;
end;
end;
RunControl(False);
end;
//----------------------------------------------------------------------------//
Function FastFight: Boolean;
var CBx,CBy,GCIndex, SquareX, SquareY, Dumx, Dumy, i: Integer;
begin
if CastEnabled then
begin
Cast('confuse');
StickyCast:=True;
CastCount:=CastCount+1;
end;
for GCIndex := 1 to 16 do
begin
CBx := Random(MMx2);
CBy := Random(MMy2);
if CBx > MSCx - SquareX then CBx := MSCx + SquareX + (Random(MMx2) - (MSCx + SquareX));
if CBy > MSCy - SquareY then CBy := MSCy + SquareY + (Random(MMx2) - (MSCy + SquareY));
if FindColorSpiralTolerance(CBx, CBy, NPCColors[GCIndex], MSX1, MSy1 + 20, MSX2, MSY2, 3) then
begin
MMouse(CBx, CBy, 0, 0);
Wait(10);
if FindColorTolerance(Dumx, Dumy, 318168, 42, 8, 120, 21, 50) then // Yellow
begin
if IsTextInAreaEx(7, 7, 71, 20, Dumx, Dumy, 'G', 100, upchars, True,
True, 0, 2, -1) then
begin
if not InFightAt(CBx, CBy) then
begin
RunControl(True);
Mouse(CBx, CBy, 0, 0, True);
FullHitFlag := False;
for i := 0 to 10 do
begin
if FindColor(Dumx, Dumy, MouseHit, CBx - 8, CBy - 8, CBx + 8, CBy + 8) then
begin
GoodClick:=GoodClick + 1;
Break;
end;
if FindColor(Dumx, Dumy, MouseMis, CBx - 8, CBy - 8, CBx + 8, CBy + 8) then
begin
BadClick := BadClick + 1;
FullHitFlag := False;
RunControl(False);
Exit;
end;
Wait(10);
end;
FlagFTWait;
Result := True;
NPCCount:= NPCCount + 1;
ReportVars[1] := ReportVars[1] + 1;
FullHitFlag := False;
RunControl(False);
Exit;
end
else
begin
Result := False;
FullHitFlag := False;
RunControl(False);
Exit;
end;
end;
end;
end;
end;
RunControl(False);
QuickCal;
FullHitFlag := False;
end;
//----------------------------------------------------------------------------//
function InFight2: Boolean;
var
x,y:integer;
begin
if ( FindColor(x, y, 65280, 230, 130, 280, 180) or FindColor(x, y, 255, 230, 130, 280, 180) )
then
begin
result:= true;
if FawkiDebug then writeln('infight Returns True');
end
else
begin
result:=false;
if FawkiDebug then writeln('Not Infight');
end;
end;
//----------------------------------------------------------------------------//
function FindFiveDamage:Boolean;
var
Dx, Dy, FDx, FDy:integer;
begin
if FindColor(Dx, Dy, 192, MSCx-50, MSCy-50, MSCx + 50, MSCy + 50) then
Result := FindBitmapMaskTolerance(FiveDamage, FDx, FDy, Dx, Dy, Dx + 10, Dy + 10, 0, 0);
if Result then
begin
FullHitCount := FullHitCount + 1;
FullHitFlag := True;
end;
end;
//----------------------------------------------------------------------------//
function IsFullHitBar:Boolean;
var
Dx, Dy:integer;
begin
Dx := MMCx;
Dy := MMCy;
if FindColor(Dx, Dy, 192, MSCx-50, MSCy-50, MSCx + 50, MSCy + 50) then
Result := FindBitmapIn(FullHitBar, Dx, Dy, MSCx - 100, MSCy - 60, MSCx + 100, MSCy + 60);
if Result then
begin
FullHitFlag := True;
end;
end;
//----------------------------------------------------------------------------//
Function Moving:Boolean;
var
c: array[0..7] of Integer;
i: Integer;
begin
if Not LoggedIn then
begin
Result := False;
Exit;
end;
for i := 0 to 1 do
begin
c[((i * 4) + 0)] := GetColor(MSCx - 40, MSCy - 40);
c[((i * 4) + 1)] := GetColor(MSCx + 40, MSCy + 40);
c[((i * 4) + 0)] := GetColor(MSCx - 40, MSCy - 40);
c[((i * 4) + 1)] := GetColor(MSCx + 40, MSCy + 40);
Wait(100);
end;
if ( c[0] = c[4] ) and ( c[1] = c[5] ) and ( c[2] = c[6] ) and ( c[3] = c[7] )
then
Result := False
else
Result:= True;
end;
//----------------------------------------------------------------------------//
Procedure WaitFight;
var Mark5, FlagMark, WGC, i:Integer;
begin
FlagFTWait;
While Moving do FindTalk;
MarkTime(FlagMark);
repeat
if not(Loggedin) then break;
for i := 1 to 5 do
begin
if FindFiveDamage then
begin
if FawkiDebug then Writeln('Full Damage Detected...Exit Fighting Loop');
Exit;
end;
Wait(50);
end;
if IsFullHitBar then Exit;
until ( (not FlagPresent) or (TimeFromMark(FlagMark) > 3000) );
MarkTime(Mark5);
repeat
for i := 1 to 5 do
begin
if FindFiveDamage then
begin
if FawkiDebug then Writeln('Full Damage Detected...Exit Fighting Loop');
Exit;
end;
Wait(50);
end;
if not(Loggedin) then Exit;
if IsFullHitBar then Exit;
until ( (InFight2) or (TimeFromMark(Mark5) > 10000) );
MarkTime(Mark5);
repeat
if ( not (Loggedin)) or (FindDead) then Exit;
for WGC := 1 to 3 do
begin
FTWaitAll(1);
FindTalk;
if (TimeFromMark(Mark5) > GoblinTimeOut) then Exit;
PickUpBones;
if (TimeFromMark(Mark5) > GoblinTimeOut) then Exit;
PickupMeat;
if (TimeFromMark(Mark5) > GoblinTimeOut) then Exit;
end;
until not InFight2;
FlagFTWait;
Players[CurrentPlayer].Integers[0] := Players[CurrentPlayer].Integers[0] + 1;
FTWait(4);
end;
//----------------------------------------------------------------------------//
Procedure WaitFastFight;
var Mark5, FlagMark,i:Integer;
begin
FlagFTWait;
While Moving do FindTalk;
MarkTime(FlagMark);
repeat
for i := 1 to 5 do
begin
if FindFiveDamage then
begin
if FawkiDebug then Writeln('Full Damage Detected...Exit Fighting Loop');
Exit;
end;
Wait(50);
end;
if IsFullHitBar then Exit;
until ( (not FlagPresent) or (TimeFromMark(FlagMark) > 3000) ); // waits until flag is gone or six seconds.
MarkTime(Mark5);
repeat
for i := 1 to 5 do
begin
if FindFiveDamage then
begin
if FawkiDebug then Writeln('Full Damage Detected...Exit Fighting Loop');
Exit;
end;
Wait(50);
end;
if IsFullHitBar then Exit;
until ( (InFight2) or (TimeFromMark(Mark5) > 1500) );
PickupGold;
PickUpMeat;
MarkTime(Mark5);
repeat
for i := 1 to 5 do
begin
if FindFiveDamage then
begin
if FawkiDebug then Writeln('Full Damage Detected...Exit Fighting Loop');
Exit;
end;
Wait(50);
end;
if IsFullHitBar then Exit;
until not InFight2;
FindFastRandoms;
FlagFTWait;
Players[CurrentPlayer].Integers[0] := Players[CurrentPlayer].Integers[0]+1;
FTWait(4);
end;
//----------------------------------------------------------------------------//
procedure ClickClosest;
var
TheNPC: TPoint;
begin
TheNPC := FindClosestNPC;
Mouse(TheNPC.x, TheNPC.y, 0, 0, True);
FFlag(0);
FindTalk;
Wait(1000);
FullHitFlag := False;
end;
//----------------------------------------------------------------------------//
procedure CombatFrenzy;
var
CFMark:Integer;
begin
MarkTime(CFMark);
Repeat
if NPCInMain then
begin
if FastFight then
WaitFastFight
end
else
begin
QuickCal;
// if CountDrops > 5 then PickupGold;
FullHitFlag := False;
if not PickUpNear then ClickClosest;
if StickyCast then
begin
Mouse(MMCX-3,MMCY-3,6,6,True);
StickyCast:=False;
end;
end;
if Not LoggedIn Then Exit;
until (TimeFromMark(CFMark) > LengthOfFrenzyLoop * 60000); // Combatfrenzy lasts 4 minutes
end;
//----------------------------------------------------------------------------//
Function NPCCycle:Boolean;
Begin
if Not LoggedIn Then Exit;
if CountLegits = 0 then
begin
if FastFight then
begin
WaitFight;
Result:=True;
end
end
else
if ClickNPC then
begin
WaitFight;
Result:=True;
end
else
begin
ClickClosest;
if FawkiDebug then writeln('not clicked NPC');
if StickyCast then
begin
Mouse(MMCX-3,MMCY-3,6,6,True);
StickyCast:=False;
end;
end;
if CountLegits = 0 then
begin
if FastFight then
begin
WaitFight;
Result:=True;
end
end
else
if ClickRat then
begin
WaitFight;
Result:=True;
end
else
ClickClosest;
PickUpMeat;
FlagFTWait;
PickUpMeat;
FindRandoms;
end;
// _____ _
// / ____| | |
// | (___ ___| |_ _ _ _ __
// \___ \ / _ \ __| | | | '_ \
// ____) | __/ |_| |_| | |_) |
// |_____/ \___|\__|\__,_| .__/
// | |
// |_|
Procedure Down;
begin
ActivateClient;
SendArrowSilentWait(2, 1000 + Random(500));
end;
//----------------------------------------------------------------------------//
Procedure Up;
begin
ActivateClient;
SendArrowSilentWait(0, 1000 + Random(500));
end;
//----------------------------------------------------------------------------//
Procedure UpTime(Time:Integer);
begin
ActivateClient;
SendArrowSilentWait(0, Time + Random(Time/10));
end;
//----------------------------------------------------------------------------//
procedure SetPlayerParams;
begin
setlowest;
FTWaitAll(3);
SetChat('on', 1);
SetChat('friends', 2);
SetChat('on', 3);
SetChat('on', 1);
FindTalk;
end;
//----------------------------------------------------------------------------//
Procedure SetUp;
var i:integer;
begin
SetupSRL;
SetupMiniMapColors;
SRLID := MySRLID;
SRLPassword := MySRLPassword;
RCMaster :=RemoteMaster;
for I := 0 to 19 do
ReportVars[I] := 0;
ReportVars[12] := 1; // Sets Total times Run One Time each setup
ScriptID := '41';
Fillmem;
DeclarePlayers;
MouseSpeed:=RatzMouseSpeed;
LoginPlayer;
SetupColors;
AssembleRockDTM;
MarkTime(SST1);
MarkTime(SST2);
ClearDebug;
ClearReport;
end;
//----------------------------------------------------------------------------//
procedure InitPlayer;
begin
SetChat('on', 1);
SetChat('friends', 2);
SetChat('off', 3);
SetChat('on', 1);
setlowest;
MakeCompass('N');
Up;
if Players[CurrentPlayer].Booleans[0] = False then
begin
Retaliate(True); // Set Retaliate nn only the first time. :)
Players[CurrentPlayer].Booleans[0]:=True;
end;
MarkTime(CallibrateTime);
MarkTime(PlayTime);
MarkTime(WoodCutTime);
MarkTime(CookTime);
MarkTime(CleanUpMiscTime);
FindWindowBySize(766, 504);
ActivateClient;
FixChat;
end;
// _____ _ _ _ _ _
// / ____| | | (_) | | |
// | | __ _| | |_| |__ _ __ __ _| |_ ___
// | | / _` | | | | '_ \| '__/ _` | __/ _ \
// | |___| (_| | | | | |_) | | | (_| | || __/
// \_____\__,_|_|_|_|_.__/|_| \__,_|\__\___|
Function Callibrate:Boolean;
var CALx,CALy,cx,i: integer;
var WhichAngle: Extended;
begin
RestoreHealth;
if HPPercent < 50 then
begin
// in case of weird error...
Wait(500);
GameTab(2);
if not LoggedIn then Exit;
if HPPercent < 30 then ; else exit;
if HPPercent = 0 then
for i := 0 to 10 do writeln('HP = 0 ERROR. CALLIBRATE. HP = 0 ERROR. CALLIBRATE');
// end weird error
MFF(MMCX,MMCY-40,3,-3);
FlagFTWait;
MFF(MMCX,MMCY-40,3,-3);
FlagFTWait;
RestoreHealth;
for cx:=0 to 10 do
begin
FindNormalRandoms;
FTWait(2);
end;
if HPPercent < 50 then
begin
Players[CurrentPlayer].loc :=' HP Drop';
Logout;
end
else
begin
MFF(MMCX,MMCY+40,3,3);
FlagFTWait;
MFF(MMCX,MMCY+40,3,3);
FlagFTWait;
end;
end;
If not FindColor(CALx,CALy,RatzWaterColor,MMX1,MMY1,MMX2, MMY2) then
begin
if FawkiDebug then Status('No Water Found');
MFF(MMCX - Random(4), MMCY+40+Random(20), 1, 1);
FlagFTWait;
FindTalk;
Result:=True;
Callibrate;
Exit;
end;
if FindDtmRotated(RockDTM, CALx, CALy, MMX1, MMY1, MMX2, MMY2, rs_GetCompassAngleRadians-pi/4, rs_GetCompassAngleRadians+pi/4, 0.05,
WhichAngle) then
begin
if rs_OnMiniMap(CALx, CALy) then
begin
MFF(CALx, CALy, 1, 1);
FlagFTWait;
Exit;
end;
end;
If FindSymbol(CALx,CALy,'altar') then
begin
if FawkiDebug then writeln('Found Altar at '+inttostr(CALx)+' '+inttostr(CALy));
if rs_OnMiniMap(CALx, CALy) then
begin
MFF(CALx,CALy-30,1,0);
FFlag(5);
FindTalk;
Result:=True;
Exit;
end;
end;
If FindSymbol(CALx,CALy,'fish') then
begin
if FawkiDebug then writeln('Found Fish at '+inttostr(CALx)+' '+inttostr(CALy));
if rs_OnMiniMap(CALx, CALy) then
begin
MFF(CALx+20,CALy-60,1,0);
FFlag(5);
FindTalk;
Result:=True;
Exit;
end;
end;
If FindSymbol(CALx,CALy,'fish store') then
begin
if FawkiDebug then writeln('Found fishstore at '+inttostr(CALx)+' '+inttostr(CALy));
MFF(633,135,0,-1);
FFlag(5);
FindTalk;
Result:=True;
Exit;
end;
If FindSymbol(CALx,CALy,'food store') then
begin
if FawkiDebug then writeln('Found foodstore at '+inttostr(CALx)+' '+inttostr(CALy));
MFF(644,118,0,-1);
FFlag(5);
FindTalk;
Result:=True;
Exit;
end;
If FindSymbol(CALx,CALy,'mining site') then
begin
if FawkiDebug then writeln('Found Mining site at '+inttostr(CALx)+' '+inttostr(CALy));
MFF(697,116,-1,-1);
FlagFTWait;
FindTalk;
MFF(647,150,-1,-1);
FlagFTWait;
Result:=True;
Exit;
end;
If FindSymbol(CALx,CALy,'quest') then
begin
if FawkiDebug then writeln('Found quest at '+inttostr(CALx)+' '+inttostr(CALy));
MFF(700,110,-1,-1);
FlagFTWait;
FindTalk;
MFF(670,117,-1,-1);
FlagFTWait;
Result:=True;
Exit;
end;
If FindColor(CALx,CALy,RatzWaterColor,624,108,634,118 ) then
begin
if FawkiDebug then writeln('Found Water LEFT');
MFF(688,94,-1,-1);
FlagFTWait;
FindTalk;
Result:=True;
Exit;
end;
If FindColor(CALx,CALy,RatzWaterColor,MMCX+40,MMY1,MM X2,MMY2) then
begin
if FawkiDebug then writeln('Found Water RIGHT');
MFF(MMX1+20+Random(20), MMCY-20+Random(20), 1, 1);
FlagFTWait;
FindTalk;
Result:=True;
Exit;
end;
end;
//----------------------------------------------------------------------------//
Function CallibrateToRats:Boolean;
var CALx,CALy,cx,i: integer;
var WhichAngle: Extended;
begin
RestoreHealth;
if HPPercent < 50 then
begin
// in case of weird error...
Wait(500);
GameTab(2);
if HPPercent < 30 then ; else exit;
if HPPercent = 0 then
for i := 0 to 10 do writeln('HP = 0 ERROR. CALLIBRATE. HP = 0 ERROR. CALLIBRATE');
// end weird error
if not LoggedIn then Exit;
MFF(MMCX,MMCY-40,3,-3);
FlagFTWait;
MFF(MMCX,MMCY-40,3,-3);
FlagFTWait;
RestoreHealth;
for cx:=0 to 10 do
begin
FindNormalRandoms;
FTWait(2);
end;
if HPPercent < 50 then
begin
Players[CurrentPlayer].loc :=' HP Drop';
Logout;
end
else
begin
MFF(MMCX,MMCY+40,3,3);
FlagFTWait;
MFF(MMCX,MMCY+40,3,3);
FlagFTWait;
end;
end;
If not FindColor(CALx,CALy,RatzWaterColor,MMX1,MMY1,MMX2, MMY2) then
begin
if FawkiDebug then Status('No Water Found');
MFF(MMCX+Random(4), MMCY+40+Random(20), 1, 1);
FlagFTWait;
FindTalk;
Result:=True;
CallibrateToRats;
Exit;
end;
if FindDtmRotated(RockDTM, CALx, CALy, MMX1, MMY1, MMX2, MMY2, rs_GetCompassAngleRadians-pi/4, rs_GetCompassAngleRadians+pi/4, 0.05,
WhichAngle) then
begin
MFF(CALx, CALy, 1, 1);
FlagFTWait;
Exit;
end;
If FindSymbol(CALx,CALy,'altar') then
begin
if FawkiDebug then writeln('Found Altar at '+inttostr(CALx)+' '+inttostr(CALy));
if rs_OnMiniMap(CALx, CALy) then
begin
MFF(CALx,CALy-20,1,0);
FlagFTWait;
FindTalk;
Result:=True;
Exit;
end;
end;
If FindSymbol(CALx,CALy,'fish store') then
begin
if FawkiDebug then writeln('Found fishstore at '+inttostr(CALx)+' '+inttostr(CALy));
MFF(647,150,-1,-1);
FlagFTWait;
FindTalk;
Result:=True;
Exit;
end;
If FindSymbol(CALx,CALy,'food store') then
begin
if FawkiDebug then writeln('Found foodstore at '+inttostr(CALx)+' '+inttostr(CALy));
MFF(647,150,-1,-1);
FlagFTWait;
FindTalk;
Result:=True;
Exit;
end;
If FindSymbol(CALx,CALy,'mining site') then
begin
if FawkiDebug then writeln('Found Mining site at '+inttostr(CALx)+' '+inttostr(CALy));
MFF(697,116,-1,-1);
FlagFTWait;
FindTalk;
MFF(647,150,-1,-1);
FlagFTWait;
FindTalk;
Result:=True;
Exit;
end;
If FindSymbol(CALx,CALy,'quest') then
begin
if FawkiDebug then writeln('Found quest at '+inttostr(CALx)+' '+inttostr(CALy));
MFF(700,110,-1,-1);
FlagFTWait;
FindTalk;
MFF(670,117,-1,-1);
FlagFTWait;
FindTalk;
Result:=True;
Exit;
end;
If FindColor(CALx,CALy,RatzWaterColor,624,108,634,118 ) then
begin
if FawkiDebug then writeln('Found Water LEFT');
MFF(688,94,-1,-1);
FlagFTWait;
FindTalk;
Result:=True;
Exit;
end;
If FindColor(CALx,CALy,RatzWaterColor,MMCX,MMY1,MMX2, MMY2) then
begin
if FawkiDebug then writeln('Found Water RIGHT');
MFF(MMX1+30+Random(20), MMCY+Random(20), 1, 1);
FlagFTWait;
FindTalk;
Result:=True;
Exit;
end;
end;
Function QuickCal:Boolean;
var CALx,CALy: integer;
begin
If FindColor(CALx,CALy,RatzWaterColor,MMX2-20,MMY1,MMX2,MMY2) then
begin
if FawkiDebug then writeln('Found Water RIGHT');
MFF(MMX1+40+Random(20), MMCY+Random(20), 1, 1);
FlagFTWait;
Result := True;
end
else
Result := False;
end;
// ______ _ __ __ _ _
// | ____(_) | \/ | | | (_)
// | |__ _ _ __ ___| \ / | __ _| | ___ _ __ __ _
// | __| | | '__/ _ \ |\/| |/ _` | |/ / | '_ \ / _` |
// | | | | | | __/ | | | (_| | <| | | | | (_| |
// |_| |_|_| \___|_| |_|\__,_|_|\_\_|_| |_|\__, |
// __/ |
// |___/
Function FireMakingCycle:Boolean; // Checks Invent, burns logs
var x, y, TBx,TBy,LMx,LMy, LogMark:Integer;
Begin
if WeHaveLogs(LMx,LMy) then
begin
if findBitMapToleranceIn(TinderBox,TBx,TBy,MIX1,MIY1, MIX2,MIY2,50) then
begin
Mouse(TBx,TBy,6,6,True);
Mouse(LMx+10,LMy+10,10,10,True);
FTWaitAll(4);
if InChat('can') then
begin
if FawkiDebug then writeln('Cant light fire here. Callibrating');
MarkTime(LogMark);
repeat
if TimeFromMark(LogMark)>10000 then Exit;
MMouse(MSCx,MSCy,200,200);
GetMousePos(x,y);
if not loggedin then break;
until IsUpText('alk')
Mouse(x,y,0,0,True);
FlagFTWait;
end;
// You need a fire making level of 30 to burn Willow or Yew logs
if InChat('Yew') then
begin
Mouse(LMx,LMy,8,0,False);
FTWaitAll(1);
ChooseOption('rop');
end;
if FindBlackChatMessage('att') then
begin
MarkTime(LogMark);
repeat
SolveChatRandom;
FTWaitAll(1);
if TimeFromMark(LogMark)>15000 then
begin
if FawkiDebug then Writeln('Breaking out of firemaking loop');
Result:=False;
Exit;
end;
until FindBlackChatMessage('cat');
if FindBlackChatMessage('cat') then
begin
Result:=True;
LogCount:=LogCount+1;
ReportVars[4] := ReportVars[4] + 1;
if FawkiDebug then writeln('lighted a log');
end;
end;
end;
end;
end;
// __ __ _ _____ _ _ _
// \ \ / / | |/ ____| | | | | (_)
// \ \ /\ / /__ ___ __| | | _ _| |_| |_ _ _ __ __ _
// \ \/ \/ / _ \ / _ \ / _` | | | | | | __| __| | '_ \ / _` |
// \ /\ / (_) | (_) | (_| | |___| |_| | |_| |_| | | | | (_| |
// \/ \/ \___/ \___/ \__,_|\_____\__,_|\__|\__|_|_| |_|\__, |
// __/ |
// |___/
function FindTree: Boolean;
var
x, y, Tree: Integer;
var ChopTime, StopTime, ChP : Integer;
begin
Tree := BitmapFromString(1, 29, 'z78DAB33436373231B51C22240' +
'052AE2407');
x := Random(MSx2) + 1 ;
y := Random(MSy2) + 1;
if FindBitmapSpiralTolerance(Tree, x, y, MSx1, MSy1 + 20, MSx2, MSy2, 20) then
begin
MMouse(x, y, 0, 10);
GetMousePos(x,y);
if IsUpText('ree') or ( IsUpText('Oak') and (Players[CurrentPlayer].level[20] > 15 ) ) then
begin
Mouse (x, y, 0, 0, True );
TreeCount:=TreeCount+1;
ReportVars[2] := ReportVars[2] + 1;
FlagFTWait;
FTWaitAll(16);
if FindBlackChatMessage('ful') then
begin
CleanupInventory;
Result := False;
Exit;
end;
if not InChat('wing') then
begin
Result:=False;
Exit;
end;
MarkTime ( ChopTime );
repeat
MarkTime ( StopTime );
FTWaitAll(5);
FindWCRandoms;
if ( ChopTime + 12000 < StopTime ) then Break;
ChP:=ChP+1;
SolveChatRandom;
writeln('Chop pass:'+IntToStr(ChP));
if InChat('ance') then Exit;
until ( InChat('ogs') );
if InChat('get') then
begin
Result := True;
TreeCount:=TreeCount+1;
ReportVars[2] := ReportVars[2] + 1;
end;
end;
end;
FreeBitmap(Tree);
end;
//----------------------------------------------------------------------------//
function FindTreeDeformed(var ObjX, ObjY :integer; UpText1, UpText2: String; BMP, a, b, c, d: integer): Boolean;
var
acc, ref : Extended;
var
XT, YT,times,tol : Integer;
begin
ref:=0.9; tol:=0;
for times:=1 to 4 do
begin
FindDeformedBitmapToleranceIn(BMP, XT, YT, a, b, c, d, tol, 0, True, acc);
if (acc >= ref) then
begin
MMouse(XT + 8, YT, 0, 0);
if (IsUpText(UpText1) or IsUpText(UpText2)) then
begin
ObjX:=XT;
ObjY:=YT;
Result := True;
Exit;
end;
end;
ref := ref - 0.1;
tol:=tol+10;
if FawkiDebug then Writeln('A '+FLoatToStr(acc)+'. R '+ FLoatToStr(ref)+ '. T '+IntToStr(tol));
FTWaitAll(1);
end;
end;
//----------------------------------------------------------------------------//
function ChopTree : Boolean;
var CX, CY, RT, ChopTime, StopTime, ChP : Integer;
begin
RT := RTreeColor;
if ( FindTreeDeformed(CX, CY, 'Tre' , 'ree', Tree, MSX1,MSY1,MSX2,MSY2 )) then
begin
Mouse ( CX+20, CY, 10, 0, True );
TreeCount:=TreeCount+1;
FlagFTWait;
FTWaitAll(16);
if FindBlackChatMessage('ful') then
begin
CleanupInventory;
Result := False;
Exit;
end;
if not InChat('axe') then
begin
Result:=False;
Exit;
end;
MarkTime ( ChopTime );
repeat
MarkTime ( StopTime );
FTWaitAll(5);
FindWCRandoms;
if ( ChopTime + 12000 < StopTime ) then Break;
ChP:=ChP+1;
SolveChatRandom;
if FawkiDebug then writeln('Chop pass:'+IntToStr(ChP));
if InChat('ance') then Exit;
until ( InChat('get') );
if InChat('ogs') then
begin
Result := True;
ReportVars[2] := ReportVars[2] + 1;
end;
end;
end;
//----------------------------------------------------------------------------//
Function WoodCuttingCycle:Boolean; // Checks Invent, Chops Tree
Begin
if ChopTree then Result:=True;
PickUpMeat;
FlagFTWait;
PickUpMeat;
end;
//---------------------1 1/2 min WCFM-frenzy----------------------------------//
procedure WCFMFrenzy;
begin
Callibrate;
// SetRun(False);
FTWait(1);
Down;
MarkTime(Mark);
repeat
FindTree;
FTWait(1);
until ( TimeFromMark(Mark) > 40000 ) or InvFull;
Up;
MarkTime(Mark);
LogCount := LogCount + CountItemsBmp('inv',LogMask, 10);
repeat
FireMakingCycle;
until not WeHaveLogs(Dumx,Dumy) or ( TimeFromMark(Mark) > 50000 );
end;
// _____ _ _
// / ____| | | (_)
// | | ___ ___ | | ___ _ __ __ _
// | | / _ \ / _ \| |/ / | '_ \ / _` |
// | |___| (_) | (_) | <| | | | | (_| |
// \_____\___/ \___/|_|\_\_|_| |_|\__, |
// __/ |
// |___/
Function CookingCycle:Boolean; // Checks Invent, Cooks meat.
var RMx, RMy, FIx, FIy, MeatMark, ChP:Integer;
Begin
if ( WeHaveRawMeat(RMx,RMy) and ThereIsFire(FIx,FIy) )then
begin
RawMeatCount := RawMeatCount + CountItemsBmp('inv',RawBeef, 50);
Mouse(RMx,RMy,2,2,True);
FTWaitAll(1);
Mouse(FIx-4,FIy+4,4,4,True);
FlagFTWait;
FTWaitAll(6);
ClickNPCChatTextRight('eat');
FTWaitAll(1);
ChooseOption('ll');
MarkTime(MeatMark);
CookedMeatCount:=CookedMeatCount + 1;
repeat
FTWaitAll(8);
if TimeFromMark(MeatMark) > 25000 then Exit;
ChP:=ChP+1;
If FawkiDebug then Writeln('Cooking Pass:'+IntToStr(ChP));
SolveChatRandom;
until not WeHaveRawMeat(RMx,RMy);
ReportVars[3] := ReportVars[3] + 1;
Result:=True;
end;
EatTilEight;
end;
// _____ _
// |_ _| | |
// | | _ ____ _____ _ __ | |_ ___ _ __ _ _
// | | | '_ \ \ / / _ \ '_ \| __/ _ \| '__| | | |
// _| |_| | | \ V / __/ | | | || (_) | | | |_| |
// |_____|_| |_|\_/ \___|_| |_|\__\___/|_| \__, |
// __/ |
// |___/
Procedure DropBrokenAxes;
var Bx, By:integer;
begin
GameTab(2);
if ( FindBitmapMaskTolerance(BrokenAxeMask,Bx,By,MIX1,M IY1,MIX2,MIY2,10,2)
or FindBitmapMaskTolerance(AxeStickMask,Bx,By,MIX1,MI Y1,MIX2,MIY2,10,2) ) then
begin
Mouse(Bx,By,2,2,True);
FTWaitAll(4);
end;
end;
//----------------------------------------------------------------------------//
procedure BuryBones;
var
Bx, By: Integer;
begin
if BuryBonesToo then
begin
while FindBitmapToleranceIn(Bone, Bx, By, MIx1, MIy1, MIx2, MIy2, 50) do
begin
Mouse(Bx, By, 8, 8, True);
FTWait(6);
end;
if InFight Then
begin
MFF(MMCX,MMCY-60,3,-3);
FlagFTWait;
FTWaitAll(24);
MFF(MMCX,MMCY+60,3,-3);
FlagFTWait;
RestoreHealth;
end;
end
else
wait(1);
end;
//----------------------------------------------------------------------------//
procedure DropMisc;
var
BurntMeat, x,y:Integer;
begin
GameTab(4);
If FawkiDebug then Writeln('Dropping Broken Pickaxes');
FTWaitAll(2);
DropBrokenAxes;
BuryBones;
if FindBitmapMaskTolerance(AshMask, x, y, MIX1, MIY1, MIX2, MIY2, 50, 10) then
begin
Mouse(x,y,1,1,false);
ChooseOption('rop'); // Drops Ashes
FTWaitAll(2);
If FawkiDebug then Writeln('Dropping Ashes');
end;
if FindBitmapMaskTolerance(TalismanMask, x, y, MIX1, MIY1, MIX2, MIY2, 50, 10) then
begin
Mouse(x,y,1,1,false);
ChooseOption('rop'); // Drops Talismans
FTWaitAll(2);
If FawkiDebug then Writeln('Dropping Talismans');
end;
if FindBitmapMaskTolerance(KebabMask, x, y, MIX1, MIY1, MIX2, MIY2, 50, 10) then
begin
Mouse(x,y,1,1,false);
ChooseOption('rop'); // Drops Kebabs
FTWaitAll(2);
If FawkiDebug then Writeln('Dropping Kebabs');
end;
if FindBitmapMaskTolerance(BeerMask, x, y, MIX1, MIY1, MIX2, MIY2, 50, 50) then
begin
Mouse(x,y,1,1,false);
ChooseOption('rop'); // Drops Beers
FTWaitAll(2);
If FawkiDebug then Writeln('Dropping Beers');
end;
if FindBitmapMaskTolerance(NecklaceMask, x, y, MIX1, MIY1, MIX2, MIY2, 50, 10) then
begin
Mouse(x,y,1,1,false);
ChooseOption('rop');
FTWaitAll(2);
If FawkiDebug then Writeln('Dropping Necklaces');
end;
if FindBitmapMaskTolerance(BoltsMask, x, y, MIX1, MIY1, MIX2, MIY2, 50, 10) then
begin
Mouse(x,y,1,1,false);
ChooseOption('rop'); // Drops Bolts
FTWaitAll(2);
If FawkiDebug then Writeln('Dropping Bolts');
end;
if FindBitmapMaskTolerance(ArrowsMask, x, y, MIX1, MIY1, MIX2, MIY2, 50, 10) then
begin
Mouse(x,y,1,1,false);
ChooseOption('rop'); // Drops Arrows
FTWaitAll(2);
If FawkiDebug then Writeln('Dropping Arrows');
end;
if FindBitmapMaskTolerance(GoblinMailMask, x, y, MIX1, MIY1, MIX2, MIY2, 50, 10) then
begin
Mouse(x,y,1,1,false);
ChooseOption('rop'); // Drops GoblinMails
FTWaitAll(2);
If FawkiDebug then Writeln('Dropping GoblinMails');
end;
if FindBitmapMaskTolerance(ChefsHatMask, x, y, MIX1, MIY1, MIX2, MIY2, 20, 10) then
begin
Mouse(x,y,1,1,false);
ChooseOption('rop'); // Drops ChefsHat
FTWaitAll(2);
If FawkiDebug then Writeln('Dropping ChefsHat');
end;
if FindBitmapMaskTolerance(SqShieldMask, x, y, MIX1, MIY1, MIX2, MIY2, 20, 10) then
begin
Mouse(x,y,1,1,false);
ChooseOption('rop'); // Drops SqShield
FTWaitAll(2);
If FawkiDebug then Writeln('Dropping ChefsHat');
end;
end;
//----------------------------------------------------------------------------//
Procedure CleanUpInventory;
var LogsMark:Integer;
begin
If FawkiDebug then Writeln('Dropping Burned Meat');
FTWaitAll(2);
If FawkiDebug then Writeln('Burying Bones');
BuryBones; // bury bones
DropMisc;
MarkTime(LogsMark);;
repeat
FireMakingCycle;
until not WeHaveLogs(Dumx,Dumy) or ( TimeFromMark(LogsMark) > 50000 );
if CookingCycle then EatMeat;
EatTilEight;
FTWaitAll(1);
end;
//----------------------------------------------------------------------------//
procedure SOSDrop;
begin
MFF(MMCX,MMCY-60,3,-3);
FlagFTWait;
CleanupInventory;
DropMisc;
RestoreHealth;
MFF(MMCX,MMCY+60,3,-3);
FlagFTWait;
end;
// ---------------------- __ __ _ ------------------------- //
// ---------------------- | \/ | (_) ------------------------- //
// ---------------------- | \ / | __ _ _ _ __ ------------------------- //
// ---------------------- | |\/| |/ _` | | '_ \ ------------------------- //
// ---------------------- | | | | (_| | | | | | ------------------------- //
// ---------------------- |_| |_|\__,_|_|_| |_| ------------------------- //
begin
Setup;
repeat
InitPlayer;
Up;
repeat
MarkTime(StartLoopTime);
Callibrate;
ProgressReport;
If CanCast('wind') then CastEnabled:=True else CastEnabled:=False;
CombatFrenzy;
Callibrate;
BuryBones;
WCFMFrenzy;
CookingCycle;
CleanUpInventory;
MyAntiBan;
MakeCompass('N');
If not Loggedin then break;
if NoAxes then
begin
Logout; // logout and set to 'false'. No more axes...
Break;
end;
SetLowest;
ML:=ML+1;
MarkTime(EndLoopTime);
Writeln('Main Loop number '+IntToStr(ML)+' took '+ IntToStr(( (EndLoopTime-StartLoopTime)/60000) )+ ' min ' + IntToStr( ((EndLoopTime-StartLoopTime) mod 60) )+ ' secs' );
until (TimeFromMark(PlayTime))> (PlayerTime * 60000);
if (LoggedIn) then
begin
SetChat('off', 1);
repeat
Wait(1000);
FindRandoms;
until(not(LoggedIn));
NextPlayer(True);
end;
if (not(Loggedin)) then NextPlayer(False);
until(False);
end.
Have Fun :)
What I changed:
Added Bitmaps
Changed Procedures
Tested it for a bit.
GL!!!
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.