SCAR Code:
program lVlavericksAutoWCERandBurner;
{.include srl/srl.scar}
var
x, y, LogsCut, LogsBurnt, LvlWC, LvlFM :integer;
const
UserName=('');//username...
PassWord=('');//password...
TotalLogsToCut=(2);//how many TOTAL logs to cut
TreeColor=(2252626);//the color of the tree defualt is a regular tree
TinderboxInInv=(6120038);//just leave alone..
TreeininvColor=(5345455);
waitimeinbetweentrees=(10000);//set higher if lower wcing lvls lower if higher wcing lvls
//////////////////////////////////////////////////////////////////////////
//Don't Touch anything Below This Line (unless you know what your doing)//
//////////////////////////////////////////////////////////////////////////
Procedure DeclarePlayers;
Begin
HowManyPlayers:= 1;
NumberOfPlayers( 1 );
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Loc :='Bank';
Players[0].Active:=True;
End;
Procedure Login;
begin
If(findcolor(x, y, 13158, 356, 165, 406, 176)) then
begin
Mouse(x, y, 5, 5, true);
Typesend(username);
wait(250+random(150));
TypeSend(password);
wait(250+random(150));
Wait(10000+random(5000));
Mouse(369, 350, 5, 5, true);
Wait(2500+random(1000));
end;
end;
Procedure LvlUpInWC;
begin
if (findcolor(x, y, 2904680, 39, 387, 77, 739)) then
begin
If (findcolor(x, y, 3570277, 38, 388, 79, 440)) then
LvlWC:=LvlWC + 1;
end;
end;
procedure LvlUpInFM;
begin
if (findcolor(x, y, 3113653, 38, 388, 79, 440)) then
begin
LvlFM:=LvlFM + 1;
end;
end;
Procedure FindNChop;
begin
if (findcolor(x, y, TreeColor, 0, 0, 515, 337)) then
begin
mmouse(x, y, 5, 5);
if isuptext('hop') then
begin
mouse(x, y, 5, 5, true);
LogsCut:=LogsCut + 1;
wait(waitimeinbetweentrees);
end;
end;
end;
Procedure Burnlogs;
begin
if (findcolor(x, y, TreeInInvColor, 556, 211, 732, 461)) then
begin
LogsBurnt:=LogsBurnt+1;
Mouse(577, 228, 7, 7, True);
wait(250+random(350));
Mouse(x, y, 5, 5, true);
Wait(6500+random(1500));
end;
end;
Procedure TurnRunOn;
begin
if (FindColor(x, y, 4681870, 715, 95, 731, 115)) then
begin
Mouse(x, y, 5, 5, true);
Wait(300+random(250));
end;
end;
Procedure Proggie;
begin
Wait(1000+random(500));
Writeln('#############################################')
Writeln('Total Time Running = ' + TimeRunning + '.')
Writeln('Total Amount of Logs Cut = ' + IntToStr(LogsCut) + '.')
Writeln('Total Amount Of Logs Burnt = ' + IntToStr(LogsBurnt) + '.')
Writeln('Total Amount Of WC Lvls Gained = ' + IntToStr(LvlWC) + '.')
Writeln('Total Amount Of FM Lvls Gained = ' + IntToStr(LvlFM) + '.')
Writeln('Remeber to post proggie')
Writeln('Thank you for using Brianbs Autoer!')
Writeln('###########################################')
end;
Procedure GAYBox;
begin
If (findcolor(x, y, 6119014, 554, 210, 731, 459)) then
begin
Writeln('OMFG... sorry box random cant solve logging out')
Mouse(753, 11, 2, 2, true);
Wait(250+random(250))
Mouse(668, 377, 5, 5, true);
Wait(250+random(150));
Terminatescript;
end;
end;
procedure Classroom;
begin
if (findcolor(x, y, 2371247, 33, 367, 79, 432)) then
begin
Writeln('Sorry Classroom Random Cant solve logging out')
Mouse(763, 10, 1, 1, true);
wait(250+random(300));
Mouse(638, 376, 5, 5, true);
Wait(250+random(300));
terminatescript;
end;
end;
Procedure Finished;
begin
if (TotalLogsToCut <= LogsCut) then
begin
Mouse(763, 10, 1, 1, true);
wait(250+random(300));
Mouse(638, 376, 5, 5, true);
Wait(250+random(300));
end;
end;
Procedure Antiban;
begin
Case Random(10) of
0: Boredhuman;
1: PickUpMouse;
2, 3: Hoverskill('random', false);
4, 5: begin
Makecompass('n');
wait(30+random(30));
Makecompass('random');
wait(30+random(30));
Makecompass('random');
end;
6 ,7 ,8: Hoverskill('woodcutting', false);
9: begin
Gametab(1);
wait(250+random(350));
Gametab(2);
Wait(250+random(350));
Gametab(3);
Wait(250+random(350));
Gametab(4);
Wait(150+random(200));
end;
10: Hoverskill('Firemaking', false);
end;
end;
procedure respond1;
begin
if inchat('sup') or inchat('whats up?') then
begin
TypeSend('n2m you?')
end;
end;
Procedure Respond2;
begin
if inchat('hey') or inchat('hi') or inchat('hello') then
begin
TypeSend('hey, hows it going?')
end;
end;
Procedure Respond3;
begin
if inchat('Wc lvl?') or inchat('Woodcutting lvl?') or inchat('Wc lvl') then
begin
end;
end;
begin
setupSRL;
ActivateClient;
Login;
setangle(true);
TurnRunOn;
GameTab(4);
repeat;
FindNChop;
LvlUpInWC;
BurnLogs;
LvlupInFM;
Proggie;
GayBox;
classroom;
Antiban;
Findnormalrandoms;
gametab(4);
Respond1;
Respond2;
finished;
until(TotalLogsToCut <= LogsCut)
end.
Then it opens up this in a new tab by itslef...
SCAR Code:
//-----------------------------------------------------------------//
//-- Scar Standard Resource Library --//
//-- ยป AntiRandom Routines --//
//-----------------------------------------------------------------//
// * procedure SRLRandomsReport; // * by Starblaster100
// * function FindMod: Boolean; // * by Stupid3ooo
// * function FindFight: Boolean; // * by Stupid3ooo
// * function InConvo: Boolean; // * by WT-Fakawi
// * procedure DwarfItem; // * by Sumilion
// * function FindLamp(skill: String): Boolean; // * by pups, Starblaster100 and PriSoner
// * function FindDead : boolean; // * by Stupid3ooo and Cazax
// * function InBlack : boolean; // * by WT-Fakawi
// * function NoGameTab: Boolean; // * by WT-Fakawi
// * function IntArrayMatch(Ar1, Ar2: TIntegerArray): Boolean; // * by Nielsie95
// * function PercentBlackMM: Integer; // * by Nielsie95 and Wizzup?
// * function GetMusic: string; // * by Nielsie95
// * function NoGameTabLocs: Boolean; // * by Nielsie95 and Wizzup?
// * function SolveTalkingRandom(RawMenuText: String): Boolean; // * by SRL Developers Team
// * Function SolveNonTalkingRandoms; // * by Nielsie95 and Wizzup?
// * function ChooseOptionGetMenuText(var RawMenuText: String; x, y: Integer; txt: String): Boolean; // * by Stupid3ooo modded by WT-Fakawi
// * function FindTalk: Boolean; // * by MastaRaymond and little bit of help from Wizzup?
// * function FindInventoryRandoms: Boolean; // * by The SRL Developers Team!
// * function FindNonInventoryRandoms: Boolean; // * by The SRL Developers Team!... all time sexiness by Mutant
// * function FindNormalRandoms: Boolean; // * by The SRL Developers Team!... all time sexiness by Mutant
// * procedure FTWait(Time: Integer); // * by WT-Fakawi
{*******************************************************************************
procedure SRLRandomsReport;
by: Starblaster100
Description: Displays Randoms Report.
*******************************************************************************}
Procedure SRLRandomsReport;
var
i, CurrentInt: Integer;
CurrentStr, Name: String;
Begin
ChangeReportWidth(280);
ClearReport;
AddToReport('/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\');
AddToReport('| SRL ' + IntToStr(SRLVersionNumber) + ' Randoms Report |');
AddToReport('| [url]www.srl-forums.com[/url] |');
AddToReport('|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|');
For i := 0 to 43 do
Begin
Case i of
0: begin CurrentInt := SRL_Logs; Name := '| SRL Logs :'; end;
1: begin CurrentInt := Trades; Name := '| Trades Made :'; end;
2: begin CurrentInt := NoTrades; Name := '| Trades Missed :'; end;
3: begin CurrentInt := Fights; Name := '| Fights :'; end;
4: begin CurrentInt := Talks; Name := '| Talks :'; end;
5: begin CurrentInt := Dwarfs; Name := '| Dwarfs :'; end;
6: begin CurrentInt := Ricks; Name := '| Ricks :'; end;
7: begin CurrentInt := OldMen; Name := '| Old Men :'; end;
8: begin CurrentInt := Jekylls; Name := '| Jekylls :'; end;
9: begin CurrentInt := SandWiches; Name := '| Sandwiches :'; end;
10: begin CurrentInt := NOSandWiches; Name := '| No Sandwiches :'; end;
11: begin CurrentInt := Lamps; Name := '| Lamps Solved :'; end;
12: begin CurrentInt := NoLamps; Name := '| Lamps Missed :'; end;
13: begin CurrentInt := Frogs; Name := '| Frog Solved :'; end;
14: begin CurrentInt := NoFrogs; Name := '| Frog Missed :'; end;
15: begin CurrentInt := Caps; Name := '| Capn Hands :'; end;
16: begin CurrentInt := Certers; Name := '| Certers Solved :'; end;
17: begin CurrentInt := NoCerters; Name := '| Certers Missed :'; end;
18: begin CurrentInt := Demons; Name := '| Demons Solved :'; end;
19: begin CurrentInt := NoDemons; Name := '| Demons Missed :'; end;
20: begin CurrentInt := NewBoxes; Name := '| Boxes Solved :'; end;
21: begin CurrentInt := NoNewBoxes; Name := '| Boxes Missed :'; end;
22: begin CurrentInt := Mods; Name := '| Mods Found :'; end;
23: begin CurrentInt := NoMaze; Name := '| Mazes Missed :'; end;
24: begin CurrentInt := Mimes; Name := '| Mimes Found :'; end;
25: begin CurrentInt := Deaths; Name := '| Deaths :'; end;
26: begin CurrentInt := Quizs; Name := '| Quizes Solved :'; end;
27: begin CurrentInt := NoQuizs; Name := '| Quizes Missed :'; end;
28: begin CurrentInt := RodsFound; Name := '| Rods Found :'; end;
29: begin CurrentInt := WhirlPools; Name := '| WhirlPools :'; end;
30: begin CurrentInt := ScapeRunes; Name := '| ScapeRunes :'; end;
31: begin CurrentInt := AxeAttaches; Name := '| Axes Fixed :'; end;
32: begin CurrentInt := BirdsNest; Name := '| Birds Nests :'; end;
33: begin CurrentInt := EntsAvoided; Name := '| Ents Found :'; end;
34: begin CurrentInt := Pinball; Name := '| Pinballs Solved :'; end;
35: begin CurrentInt := NoPinball; Name := '| Pinballs Missed :'; end;
36: begin CurrentInt := BobIsland; Name := '| Evil Bobs Solved :'; end;
37: begin CurrentInt := Foresters; Name := '| Foresters Solved :'; end;
38: begin CurrentInt := NOForester; Name := '| Foresters Missed :'; end;
39: begin CurrentInt := Leos; Name := '| Leo''s Solved :'; end; //Another space due to the ''
40: begin CurrentInt := NoLeos; Name := '| Leo''s Missed :'; end;
41: begin CurrentInt := Mollys; Name := '| Molly''s Solved :'; end;
42: begin CurrentInt := NoMollys; Name := '| Molly''s Missed :'; end;
43: begin CurrentInt := Pillories; Name := '| Pillory''s Solved :'; end;
44: begin CurrentInt := Mazes; Name := '| Mazes Solved :'; end;
end;
CurrentStr := IntToStr(CurrentInt);
CurrentStr := ' ' +CurrentStr+ ' |';
Delete(CurrentStr, 1, Length(IntToStr(CurrentInt)));
If (CurrentInt > 0) then
AddToReport(Name+ ' '+CurrentStr);
end;
AddToReport('\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/');
SendSRLReport;
end;
{*******************************************************************************
function FindMod: Boolean;
by: Stupid3ooo
Description: Results True if a mod is found, then it waits 10-20 mins and logs back in
*******************************************************************************}
function FindMod: Boolean;
var
tx, ty: Integer;
begin
if (not UseFindMod) or (not LoggedIn) then exit;
if (BmpMod = 0) or (BmpAdmin = 0) then
LoadSRLBitMaps;
if (FindColorTolerance(tx, ty, 14737632, MCX1, MCY1, MCX1 + 40, MCY2, 15)) or
(FindColorTolerance(tx, ty, 589815, MCX1, MCY1, MCX1 + 40, MCY2, 15)) then
if (FindBitmapToleranceIn(bmpMod, tx, ty, MCX1, MCY1, MCX1 + 40, MCY2, 15)) or
(FindBitmapToleranceIn(bmpAdmin, tx, ty, MCX1, MCY1, MCX1 + 40, MCY2, 15)) then
begin
Result := True;
AddToSRLLog('******** FOUND MOD ********');
//WriteFileString(TheFile, '******** FOUND MOD ********' + Chr(13));
TakeScreen('Found mod');
Mods := Mods + 1;
SaveToChatLog;
if (LogoutOnMod) then
begin
Players[CurrentPlayer].Rand := 'Found Mod';
repeat
Logout;
Wait(1500 + Random(500));
until not (LoggedIn);
Wait((60000) + Random(60000));
LoginPlayer;
end;
end;
end;
{*******************************************************************************
function FindFight: Boolean;
by: Stupid3ooo
Description: Results True if in Fight
*******************************************************************************}
function FindFight: Boolean;
var
xf, yf,CurTab: Integer;
begin
if (FindColor(xf, yf, 65280, 217, 129, 297, 209)) then
begin
Curtab := GetCurrentTab;
if CheckHpFirst then
begin
//GameTab(2);
Wait(500 + Random(100));
if (HpPercent < 100) then
begin
Result := True;
AddToSRLLog('******** FOUND FIGHTING RANDOM ********');
//WriteFileString(TheFile, '******** FOUND FIGHTING RANDOM ********' +
// Chr(13))
TakeScreen('Found Fight');
Fights := Fights + 1;
end;
end
else
begin
AddToSRLLog('******** FOUND FIGHTING RANDOM ********');
//WriteFileString(TheFile, '******** FOUND FIGHTING RANDOM ********' +
// Chr(13))
Result := True;
TakeScreen('Found Fight');
Fights := Fights + 1;
end;
GameTab(Curtab);
end;
end;
{*******************************************************************************
function InConvo: Boolean;
by: WT-Fakawi
Description: checks for presence of black separator line indicating a random is talking to us.
*******************************************************************************}
function InConvo: Boolean; // checks for black separator line
Var
x, y: Integer;
begin
if ((not FindColor(x, y, 0, 21, 434, 21, 434)) and (not FindColor(x, y, 0,
475, 434, 475, 434))) then
Result := True;
end;
{*******************************************************************************
procedure DwarfItem;
by: Sumilion
Description: Drops Items left by Dwarf
*******************************************************************************}
procedure DwarfItem;
var
Ix, Iy, Kebab, ItemMark, Beer: Integer;
begin
Kebab := BitmapFromString(8, 9, 'z78DA3330200DB88181011D752' +
'103DAD93BB02A89570F00CD145629');
Beer := BitmapFromString(8, 6, 'z78DA3330C00EDCC0C0800840BC' +
'4A4AD42303031201257A01BC683A21');
GameTab(4);
MarkTime(ItemMark);
while (FindBitmapMaskTolerance(Kebab, Ix, Iy, MIX1, MIY1, MIX2, MIY2, 0, 0) or
FindBitmapMaskTolerance(Beer, Ix, Iy, MIX1, MIY1, MIX2, MIY2, 0, 0)) do
begin
Mouse(Ix, Iy, 5, 5, False);
ChooseOption('rop');
Wait(500 + Random(500));
if (TimeFromMark(ItemMark) > 20000) then Break;
end;
FreeBitmap(Kebab);
FreeBitmap(Beer);
end;
{*******************************************************************************
function FindLamp(skill: String): Boolean;
by: Pups, Starblaster100 and PriSoner fixed by Lee Lok Hin
Description: handles Genie. Results True if lamp found and handled.
skill: Skill to use with lamp eg. 'strength', 'attack', etc.
*******************************************************************************}
function FindLamp(skill: string): Boolean;
var
LampTime, x, y, i: Integer;
begin
GameTab(4);
if FindColorTolerance(x, y, 1084300, MIX1, MIY1, MIX2, MIY2, 40) then
if (FindBitmapToleranceIn(Lamp, x, y, MIX1, MIY1, MIX2, MIY2, 40)) then
begin
Result := True;
Inc(Lamps);
TakeScreen('Lamp Random Solved');
AddToSRLLog('******** SOLVED LAMP RANDOM ********');
//WriteFileString(TheFile, '******** SOLVED LAMP RANDOM ********' + Chr(13));
Mouse(x, y, 1, 1, True);
Wait(1500 + Random(500));
MarkTime(LampTime);
for i:= 1 to 4 do
begin
case (LowerCase(Skill)) of
'attack': Mouse(81, 109, 12, 12, True);
'strength': Mouse(139, 110, 12, 12, True);
'ranged': Mouse(196, 113, 12, 12, True);
'magic': Mouse(257, 117, 12, 12, True);
'defence': Mouse(319, 109, 12, 12, True);
'crafting', 'craft': Mouse(376, 111, 12, 12, True);
'hitpoints', 'hp': Mouse(436, 112, 12, 12, True);
'prayer', 'pray': Mouse(79, 166, 12, 12, True);
'agility': Mouse(141, 166, 12, 12, True);
'herblore': Mouse(199, 171, 12, 12, True);
'thieving', 'thief': Mouse(258, 167, 12, 12, True);
'fishing', 'fish': Mouse(325, 164, 12, 12, True);
'runecraft', 'runecrafting': Mouse(375, 167, 12, 12, True);
'slayer', 'slay': Mouse(436, 173, 12, 12, True);
'farming', 'farm': Mouse(83, 224, 12, 12, True);
'mining', 'mine': Mouse(137, 222, 12, 12, True);
'smithing', 'smith': Mouse(197, 220, 12, 12, True);
'hunting', 'hunt', 'hunter': Mouse(257, 222, 12, 12, True);
'cooking', 'cook': Mouse(318, 227, 12, 12, True);
'firemaking', 'fire': Mouse(378, 226, 12, 12, True);
'woodcutting', 'wc': Mouse(439, 222, 12, 12, True);
'fletching', 'fletch': Mouse(199, 275, 12, 12, True);
'construction': Mouse(255, 277, 12, 12, True);
'summoning': Mouse(323, 276, 12, 12, True);
else Mouse(438, 113, 12, 12, True);
end;
Wait(500 + Random(200) + Random(100));
if FindColorTolerance(x, y, 5602449, 41, 75, 470, 302, 30) then Break;
if (TimeFromMark(LampTime) > 10000) then
begin
Result := False;
Logout;
Players[CurrentPlayer].Rand := 'Lamp';
Exit;
end;
end;
Mouse(416, 281, 7, 1, True);
Wait(500 + Random(150) + Random(150));
end;
end;
{*******************************************************************************
function FindDead: Boolean;
by: Stupid3ooo and Cazax
Description: Checks for text "Ow dear you are dead".
Switches player if Reincarnate = True.
*******************************************************************************}
function FindDead: Boolean;
begin
Result := False;
if FindTextTPA(0, 0, MCX1, MCY1, MCX2, MCY2, 'dear', SmallChars, Nothing) then
if FindTextTPA(0, 0, MCX1, MCY1, MCX2, MCY2, 'dead', SmallChars, Nothing) then
begin
Deaths := Deaths + 1;
Result := True;
SaveToChatLog;
if Reincarnate then Exit
else
begin
if ScreenShots then
TakeScreen('Found Dead');
LogOut;
Players[CurrentPlayer].Rand := 'Oh Dear You Are in Lumby';
Players[CurrentPlayer].Active := False;
end;
end;
end;
{*******************************************************************************
function InBlack: Boolean;
by: WT-Fakawi
Description: Checks for the existence of 4 blackdots in MM indicating a random event has occured.
Checks MMpixels Upper N-E-S-W USE WITH CARE: DONT USE IN DUNGEONS I.E. MININGGUILD.
*******************************************************************************}
function InBlack: Boolean; // random detector. Checks for 4 black dots in MM.
begin
if (GetColor(650, 155) = 65536) then
begin
if ((GetColor(650, 145) = 65536) and
(GetColor(650, 135) = 65536) and
(GetColor(650, 125) = 65536)) then
begin
Result := True;
Exit;
end
else
Result := False;
end;
if (GetColor(650, 15) = 65536) then
begin
if ((GetColor(650, 25) = 65536) and
(GetColor(650, 35) = 65536) and
(GetColor(650, 45) = 65536)) then
begin
Result := True;
Exit;
end
else
Result := False;
end;
if (GetColor(580, 82) = 65536) then
begin
if ((GetColor(590, 82) = 65536) and
(GetColor(600, 82) = 65536) and
(GetColor(610, 82) = 65536)) then
begin
Result := True;
Exit;
end
else
Result := False;
end;
if (GetColor(714, 82) = 65536) then
begin
if ((GetColor(704, 82) = 65536) and
(GetColor(694, 82) = 65536) and
(GetColor(684, 82) = 65536)) then
begin
Result := True;
Exit;
end
else
Result := False;
end;
end;
//----------------------------------------------------------------------------//
//--- Checks for the existence of GameTab 4 in relation to the ---//
//--- non-existence of GameTab 3 (Quests) and Gametab 12 (controls) ---//
//----------------------------------------------------------------------------//
{*******************************************************************************
function NoGameTab: Boolean;
by: WT-Fakawi
Description: Checks for missing GameTabs.
*******************************************************************************}
function NoGameTab: Boolean;
var i,Count: Integer;
begin
for i := 1 to 14 do
if not TabExists(i) then
begin
Wait(1000);
Count:=Count+1;
if Count>=1 then
begin
Result := True;
Exit;
end;
end;
end;
{*******************************************************************************
function IntArrayMatch(Ar1, Ar2: TIntegerArray): Boolean;
by: Nielsie95
Description: Returns True if Ar1 is the same as Ar2.
*******************************************************************************}
function IntArrayMatch(Ar1, Ar2: TIntegerArray): Boolean;
var
i, l: Integer;
begin
l := Length(Ar1);
if (l <> Length(Ar2)) then Exit;
for i := 0 to l -1 do
if (not InIntArray(Ar2, Ar1[i])) then Exit;
Result := True;
end;
{*******************************************************************************
function PercentBlackMM: Integer;
by: Nielsie95 And Wizzup?
Description: The percentage of the minimap which is black (colour 0 with tol 1).
*******************************************************************************}
function PercentBlackMM: Integer;
var
cts: Integer;
p: TPointArray;
begin
cts := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
FindColorsTolerance(p, 0, MMX1, MMY1, MMX2, MMY2, 1);
Result := Round((Length(p) / 15741.0) * 100.0);
ColorToleranceSpeed(cts);
end;
{*******************************************************************************
function GetMusic: string;
by: Nielsie95
Description: Get the music in the area according to gametab 13.
*******************************************************************************}
function GetMusic: string;
var
x, y: Integer;
begin
if (GetCurrentTab <> 13) then
begin
GameTab(13);
Wait(200 + Random(777));
end;
if FindColorTolerance(x, y, 39401, 550, 255, 730, 265, 5) then
Result := Trim(GetTextAtEx(x - 2, y - 10, 5, SmallChars, False, False, 0, 1, 39401,
35, False, tr_AllChars));
end;
{*******************************************************************************
function NoGameTabLocs: Boolean;
by: Nielsie95 And Wizzup?
Description: Checks for missing gametabs to detect and solve randoms.
*******************************************************************************}
function NoGameTabLocs: Boolean;
var
i, c, x, y: Integer;
Tabs: TIntegerArray;
begin
Result := True;
for i := 1 to 14 do
if TabExists(i) then
begin
SetLength(Tabs, c +1);
Tabs[c] := i;
Inc(c);
end;
if (c > 4) and (c < 14) then
begin
case c of //How many Tabs are visible?
5: if IntArrayMatch(Tabs, [8, 9, 10, 13, 14]) then
begin
if IsChatBlackTextAnyLine('Pillory puzzle') then
begin
//Pillory
Players[CurrentPlayer].Rand := 'Pillory';
WriteLn('GTL: ' + Players[CurrentPlayer].Rand);
if (SolvePillory) then
Inc(Pillories);
Players[CurrentPlayer].Active := LoggedIn;
Exit;
end;
case LowerCase(GetMusic) of
'the quizmaster' : begin
//Quiz
Players[CurrentPlayer].Rand := 'Quiz Master';
WriteLn('GTL: ' + Players[CurrentPlayer].Rand + ' using music');
if (FindQuiz) then
Inc(Quizs)
else
Inc(NoQuizs);
Players[CurrentPlayer].Active := LoggedIn;
Exit;
end;
'artistry' : begin
//Mime
Players[CurrentPlayer].Rand := 'Mime';
Players[CurrentPlayer].Active := False;
WriteLn('GTL: ' + Players[CurrentPlayer].Rand + ' using music');
Inc(Mimes);
LogOut;
Exit;
end;
'time out' : begin
//Maze
Players[CurrentPlayer].Rand := 'Maze';
{Players[CurrentPlayer].Active := False; }
WriteLn('GTL: ' + Players[CurrentPlayer].Rand);
if SolveMaze then
Mazes := Mazes + 1
else begin
NoMaze := NoMaze + 1;
Players[CurrentPlayer].Loc := 'NoMaze';
Players[CurrentPlayer].Rand := 'NoMaze';
Players[CurrentPlayer].Active := False;
LogOut;
Exit;
end;
end;
'corporal punishment' : begin
//Drill Demon
Players[CurrentPlayer].Rand := 'Drill Demon';
WriteLn('GTL: ' + Players[CurrentPlayer].Rand + ' using music');
if (SolveDemon) then
Inc(Demons)
else
Inc(NoDemons);
Players[CurrentPlayer].Active := LoggedIn;
Exit;
end;
else
if (IsTextInAreaEx(MCX1, MCY1, MCX2, MCY2, x, y, 'mime', 0, SmallChars, False, False, 0, 1, 0)) then
begin
//Mime
Players[CurrentPlayer].Rand := 'Mime';
Players[CurrentPlayer].Active := False;
WriteLn('GTL: ' + Players[CurrentPlayer].Rand);
Inc(Mimes);
LogOut;
Exit;
end else
if (IsTextInAreaEx(MCX1, MCY1, MCX2, MCY2, x, y, 'amien', 0, NPCChars, False, False, 0, 2, 128)) then
begin
//Drill Demon
Players[CurrentPlayer].Rand := 'Drill Demon';
WriteLn('GTL: ' + Players[CurrentPlayer].Rand);
if (SolveDemon) then
Inc(Demons)
else
Inc(NoDemons);
Players[CurrentPlayer].Active := LoggedIn;
Exit;
end else
if (IsTextInAreaEx(MCX1, MCY1, MCX2, MCY2, x, y, 'maze', 0, SmallChars, False, False, 0, 1, 0)) or
(IsTextInAreaEx(MCX1, MCY1, MCX2, MCY2, x, y, 'maze', 0, NPCChars, False, False, 0, 2, 0)) then
begin
//Maze
Players[CurrentPlayer].Rand := 'Maze';
{Players[CurrentPlayer].Active := False; }
WriteLn('GTL: ' + Players[CurrentPlayer].Rand);
if SolveMaze then
Mazes := Mazes + 1
else
begin
NoMaze := NoMaze + 1;
Players[CurrentPlayer].Loc := 'NoMaze';
Players[CurrentPlayer].Rand := 'NoMaze';
Players[CurrentPlayer].Active := False;
LogOut;
end;
Exit;
end else
if DetectFrogCave then
begin
//FrogCave
Players[CurrentPlayer].Rand := 'Frog Cave';
WriteLn('GTL: ' + Players[CurrentPlayer].Rand);
if (SolveFrogCave) then
Inc(Frogs)
else
Inc(NoFrogs);
Players[CurrentPlayer].Active := LoggedIn;
Exit;
end else
if InQuizRandom then
begin
//Quiz
Players[CurrentPlayer].Rand := 'Quiz Master';
WriteLn('GTL: ' + Players[CurrentPlayer].Rand);
if (FindQuiz) then
Inc(Quizs)
else
Inc(NoQuizs);
Players[CurrentPlayer].Active := LoggedIn;
Exit;
end;
end;
Wait(1);
end;
6: if IntArrayMatch(Tabs, [8, 9, 10, 11, 13, 14]) then
if (IsTextInAreaEx(MCX1, MCY1, MCX2, MCY2, x, y, 'ordaut', 0, NPCChars, False, False, 0, 2, 128)) then
begin
//Mordaut
Players[CurrentPlayer].Rand := 'Mordaut';
Players[CurrentPlayer].Active := False;
WriteLn('GTL: ' + Players[CurrentPlayer].Rand);
LogOut;
Exit;
end else
if (PercentBlackMM > 90) then
begin
//Molly
Players[CurrentPlayer].Rand := 'Molly Evil Twin';
WriteLn('GTL: ' + Players[CurrentPlayer].Rand);
if (SolveMolly) then
Inc(Mollys)
else
Inc(NoMollys);
Players[CurrentPlayer].Active := LoggedIn;
Exit;
end;
7: if IntArrayMatch(Tabs, [8, 9, 10, 11, 12, 13, 14]) then
begin
//Pinball
Players[CurrentPlayer].Rand := 'Pinball';
WriteLn('GTL: ' + Players[CurrentPlayer].Rand);
if (SolvePinball) then
Inc(Pinball)
else
begin
Inc(NoPinball);
Logout;
end;
Players[CurrentPlayer].Active := LoggedIn;
Exit;
end else
if IntArrayMatch(Tabs, [4, 8, 9, 10, 11, 13, 14]) then
begin
Players[CurrentPlayer].Rand := 'Leo the Gravedigger';
WriteLn('GTL: ' + Players[CurrentPlayer].Rand);
if (SolveLeo) then
Inc(Leos)
else
Inc(NoLeos);
Players[CurrentPlayer].Active := LoggedIn;
Exit;
end;
13: if IntArrayMatch(Tabs, [1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14]) then
begin
case LowerCase(GetMusic) of
'in the clink' : begin
//Prison Pete
Players[CurrentPlayer].Rand := 'Prison Pete';
Players[CurrentPlayer].Active := False;
WriteLn('GTL: ' + Players[CurrentPlayer].Rand + ' using music');
Inc(ScapeRunes);
LogOut;
Exit;
end;
'evil bob''s island' : begin
//Evil Bob
Players[CurrentPlayer].Rand := 'Evil Bob Island';
WriteLn('GTL: ' + Players[CurrentPlayer].Rand + ' using music');
if (SolveEvilBob) then
Inc(BobIsland)
else
begin
Players[CurrentPlayer].Active := False;
Inc(ScapeRunes);
LogOut;
end;
Exit;
end;
else
begin
Players[CurrentPlayer].Rand := 'ScapeRune';
Players[CurrentPlayer].Active := False;
WriteLn('GTL: ' + Players[CurrentPlayer].Rand);
Inc(ScapeRunes);
LogOut;
Exit;
end;
end;
Wait(1);
end;
end;
Wait(1);
{//Unknown
Players[CurrentPlayer].Rand := 'No GameTab';
Players[CurrentPlayer].Active := False;
WriteLn('GTL: ' + Players[CurrentPlayer].Rand);
LogOut;
Exit;}
end;
if (FindColor(x, y, 128, 150, 250, 500, 380)) then
if ClickContinue(False, False) then //we are talking
begin
if (PercentBlackMM < 15) then // not InBlack
begin
if (IsTextInAreaEx(MCX1, MCY1, MCX2, MCY2, x, y, 'rester', 0, NPCChars, False, False, 0, 2, 128)) or
(IsTextInAreaEx(MCX1, MCY1, MCX2, MCY2, x, y, 'heasan', 0, NPCChars, False, False, 0, 1, 0)) then
begin
// Freaky Forester
Players[CurrentPlayer].Rand := 'Freaky Forester';
WriteLn('GTL: ' + Players[CurrentPlayer].Rand);
if SolveForester then
Inc(Foresters)
else
begin
Players[CurrentPlayer].Active := False;
Inc(NOForester);
LogOut;
Exit;
end;
end;
end else
if (IsTextInAreaEx(MCX1, MCY1, MCX2, MCY2, x, y, 'maze', 0, NPCChars, False, False, 0, 2, 0)) then
begin
// Maze
Players[CurrentPlayer].Rand := 'Maze';
WriteLn('GTL: ' + Players[CurrentPlayer].Rand);
if SolveMaze then
Inc(Mazes)
else begin
NoMaze := NoMaze + 1;
Players[CurrentPlayer].Loc := 'NoMaze';
Players[CurrentPlayer].Rand := 'NoMaze';
Players[CurrentPlayer].Active := False;
LogOut;
end;
Exit;
end;
end;
Result := False;
end;
{*******************************************************************************
function SolveTalkingRandom(RawMenuText: String): Boolean;
By: SRL Developers Team.
Description: Talking Random Handler. Called by FindTalkingRandom. (FindTalk)
*******************************************************************************}
function SolveTalkingRandom(RawMenuText: string): Boolean;
var
IC, FI: Byte;
begin
TakeScreen('Solving Talking Random - '+RawMenuText);
// Security Guard Handler
if (Pos('uard', RawMenuText) <> 0) or (Pos('ecur', RawMenuText) <> 0) then
begin
for IC := 1 to 2 do
begin
Wait(1000 + Random(500));
ClickToContinue;
Wait(50 + Random(50));
end;
if TalkAfterRandoms then
begin
case Random(5) of
0: TypeSend('stupid guard');
1: TypeSend('so many randoms now..');
2: TypeSend('bye security guard');
3: TypeSend('dumb random');
4: TypeSend('sigh');
end;
end;
Result := True;
SGuard := SGuard + 1;
SRLRandomsReport;
Exit;
end;
// Freaky Forrester Handler.
if (Pos('reak', RawMenuText) <> 0) or (Pos('orest', RawMenuText) <> 0) then
begin
if SolveForester then
begin
Inc(Foresters);
Result := True;
end else
begin
CloseWindow;
Players[CurrentPlayer].Rand := 'Forester';
Logout;
Inc(NoForester);
Result := False;
end;
SRLRandomsReport;
Exit;
end;
// Sandwich Lady Handler.
if (Pos('ady', RawMenuText) <> 0) or (Pos('ich', RawMenuText) <> 0) then
begin
while ClickContinue(True, True) do Wait(500 + Random(500));
if SolveSandWich then
begin
SandWiches := SandWiches + 1;
Result := True;
CloseWindow;
SRLRandomsReport;
Exit;
end
else
begin
NOSandWiches := NOSandWiches + 1;
CloseWindow;
Result := False;
Players[CurrentPlayer].Rand := 'Sandwich Lady';
Logout;
SRLRandomsReport;
Exit;
end;
end;
// Genie Handler.
if (Pos('Geni', RawMenuText) <> 0) or (Pos('enie', RawMenuText) <> 0) then
begin
Wait(1000 + Random(500));
if FindLamp(LampSkill) then
begin
//Lamps := Lamps + 1;
SRLRandomsReport;
Exit;
end
else
begin
NOLamps := NOLamps + 1;
WriteLn('lamp missed');
SRLRandomsReport;
Exit;
end;
end;
// Certer Handler
if (Pos('ile', RawMenuText) <> 0) or (Pos('iles', RawMenuText) <> 0) then
begin
Wait(1000 + Random(500));
if FindCerter then
begin
Certers := Certers + 1;
ClickToContinue;
Wait(1000 + Random(500));
if TalkAfterRandoms then
begin
case Random(5) + 1 of
1: TypeSend('hurrah. 320 coins.');
2: TypeSend('bye iles.');
3: TypeSend('thanks for coins =]');
4: TypeSend('stupid certer');
5: TypeSend('sigh.');
end;
end;
SRLRandomsReport;
Exit;
end
else
begin
NOCerters := NOCerters + 1;
Players[CurrentPlayer].Rand := 'Certer';
WriteLn('Certer Missed');
Logout;
SRLRandomsReport;
Exit;
end;
end;
// Frog Handler
if (Pos('rog', RawMenuText) <> 0) or (Pos('Fro', RawMenuText) <> 0) then
begin
if SolveFrog then
begin
Frogs := Frogs + 1;
if TalkAfterRandoms then
begin
case Random(5) + 1 of
1: TypeSend('yeah a token...');
2: TypeSend('ribbit =]');
3: TypeSend('i kissed the queen =]');
4: TypeSend('stupid frogs');
5: TypeSend('sigh.');
end
end;
SRLRandomsReport;
Exit;
end
else
begin
for FI := 0 to 3 do
ClickToContinue;
Wait(10000);
if DetectFrogCave then if SolveFrogCave then
begin
Frogs := Frogs + 1;
Exit;
end
else
begin
NOFrogs := NOFrogs + 1;
WriteLn('Frogs Missed Twice');
Players[CurrentPlayer].Rand := 'Frog';
Logout;
SRLRandomsReport;
Exit;
end;
end
end;
// Rick Handler
if (Pos('ick', RawMenuText) <> 0) or (Pos('urpen', RawMenuText) <> 0) then
begin
Wait(1000 + Random(500));
ClickToContinue;
Ricks := Ricks + 1;
if TalkAfterRandoms then
begin
case Random(5) + 1 of
1: TypeSend('go away rick turpentine...');
2: TypeSend('yeah, rick gave me 160 coins');
3: TypeSend('bye rick');
4: TypeSend('stupid rick');
5: TypeSend('sigh.');
end;
end;
SRLRandomsReport;
Exit;
end;
// Dwarf Handler. (Might add: DwarfItem)
if (Pos('runk', RawMenuText) <> 0) or (Pos('warf', RawMenuText) <> 0) then
begin
Wait(1000 + Random(500));
ClickToContinue;
Dwarfs := Dwarfs + 1;
if TalkAfterRandoms then
begin
case Random(5) + 1 of
1: TypeSend('hurrah. a beer.');
2: TypeSend('yuk. evil kebab.');
3: TypeSend('thanks for the beer =]');
4: TypeSend('stupid dwarf');
5: TypeSend('sigh.');
end;
end;
SRLRandomsReport;
Exit;
end;
// Cap 'n Hand (ler).
if (Pos('Cap ', RawMenuText) <> 0) or (Pos('Hand', RawMenuText) <> 0) then
begin
Wait(1000 + Random(500));
ClickToContinue;
Caps := Caps + 1;
if TalkAfterRandoms then
begin
case Random(5) + 1 of
1: TypeSend('ayay, captain');
2: TypeSend('yeah 320 coins =]');
3: TypeSend('ow boy capn hand =]');
4: TypeSend('stupid captain');
5: TypeSend('sigh.');
end;
end;
SRLRandomsReport;
Exit;
end;
// Mysterious Old Man Handler.
if (Pos('yste', RawMenuText) <> 0) or (Pos('rious', RawMenuText) <> 0) then
begin
Wait(1000 + Random(500));
ClickToContinue;
Oldmen := Oldmen + 1;
if TalkAfterRandoms then
begin
case Random(5) + 1 of
1: TypeSend('yeah 320 coins');
2: TypeSend('yeah 320 coins =]');
3: TypeSend('stupid old man');
4: TypeSend('bye bye mysterious old man');
5: TypeSend('sigh.');
end;
end;
SRLRandomsReport;
Exit;
end;
//Dr Jekyll Handler
if (Pos('eky', RawMenuText) <> 0) or (Pos('kyll', RawMenuText) <> 0) then
begin
for IC := 1 to 4 do
begin
Wait(1000 + Random(500));
ClickToContinue;
end;
if TalkAfterRandoms then
begin
case Random(5) of
0: TypeSend('potion...');
1: TypeSend('Cya Jekyll');
2: TypeSend('Dumb Potion');
3: TypeSend('Gah');
4: TypeSend('Theres too many randoms now...');
end;
end;
Jekylls := Jekylls + 1;
end;
end;
{*******************************************************************************
Function SolveNonTalkingRandoms;
By: Nielsie95 and Wizzup?
Description: Solves Non Talking Randoms.
*******************************************************************************}
function SolveNonTalkingRandoms: Boolean;
begin
if NoGameTab then
Result := NoGameTabLocs
else
Result := SolveChatRandom;
end;
{*******************************************************************************
function ChooseOptionGetMenuText(var RawMenuText: String; x, y: Integer; txt: String): Boolean;
By: Stupid3ooo, modded by WT-Fakawi.
Description: Finds Popup menu, then clicks on it, returns text next to txt
*******************************************************************************}
function ChooseOptionGetMenuText(var RawMenuText: string; x, y: Integer; txt:
string): Boolean;
var
cx, cy, x1, y1, x2, y2, LeftCorner, RightCorner: 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
if (FindText(cx, cy, txt, upchars, x1, y1, x2, 502)) then
begin
Result := True;
RawMenuText := GetTextAtEx(cx, cy, 0, upchars, True, True, 0, 0, -1, 25,
False, tr_NormalChars);
Mouse(cx + Length(txt) * 3, cy + 3, 2, 2, True);
end
else if (FindText(cx, cy, 'Cancel', upchars, x1, y1, x2, 502)) then
Mouse(cx + 9, cy + 3, 2, 2, True);
end;
FreeBitmap(LeftCorner);
FreeBitmap(RightCorner);
end;
{*******************************************************************************
function FindTalk: Boolean;
by: MastaRaymond and little bit of help from Wizzup?
Description: Searches screen for NickName and handles ALL Talking Randoms.
*******************************************************************************}
Function FindTalk: Boolean;
var
TPA,Matches : TPointArray;
TempATPA : T2DPointArray;
I,CTS,x,y : integer;
Box : TBox;
RawMenuText : String;
begin;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
FindColorsTolerance(TPA, 65535, 3, 3, 515, 336, 0);
if FindTPAinTPA(Players[CurrentPlayer].NickTPA,TPA,Matches) then //Length check inside the function ;)
For I := 0 to High(Matches) do
begin;
FindColorsTolerance(TPA,65535,3, Matches[I].y - 1,516,Matches[I].y + 14,0);
if High(TPA) < 0 then
Continue;
TempATPA := FindGapsTPA(TPA,10);
if Length(TempATPA) > 1 then
begin;
SetLength(TPA,Length(TempATPA));
For x := 0 to High(TempATPA) do
begin;
Box := GetTPABounds(TempATPA[x]);
TPA[x] := Point((Box.x2 + Box.x1) shr 1, Box.y2);
end;
SortTPAFrom(TPA,Point(Matches[I].x,Matches[I].y));
x := TPA[0].x;
y := TPA[0].y;
end else
begin;
Box := GetTPABounds(TempATPA[0]);
x := (Box.x2 + Box.x1) shr 1;
y := Box.y2;
end;
y := y + 8;
MMouse(x, y, 0, 0);
Wait(100 + Random(50));
if IsUpTextMultiCustom(['Talk','lk-to','uard']) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
Wait(450 + Random(125));
if ChooseOptiongetMenuText(RawMenuText, x, y, 'Talk') then
begin
AddToSRLLog('******** FOUND TALKING RANDOM TEXT********: ' + RawMenuText);
//WriteFileString(TheFile, '******** FOUND TALKING RANDOM TEXT********: ' + RawMenuText +Chr(13))
Talks := Talks + 1;
FFlag(0);
Wait(1337 + Random(500));
SolveTalkingRandom(RawMenuText);
Result := True;
Exit;
end;
end;
end;
ColorToleranceSpeed(CTS);
end;
{*******************************************************************************
function FindInventoryRandoms: Boolean;
by: The SRL Developers Team!
Description: Searches for the common Inventory randoms: Lamp and Box.
*******************************************************************************}
function FindInventoryRandoms: Boolean;
var
CurTab:Integer;
begin
CurTab := GetCurrentTab;
GameTab(4);
if FindLamp(LampSkill) then
Result := True;
if FindBox then
begin
SolveBox;
Result := True;
end;
GameTab(CurTab);
end;
{*******************************************************************************
function FindNonInventoryRandoms: Boolean;
by: The SRL Developers Team!... all time sexiness by Mutant
Description: Searches for the common NON-Inventory randoms: Wont switch to GameTab(4)!
*******************************************************************************}
function FindNonInventoryRandoms: Boolean;
var
i: Integer;
begin
for i := 1 to 5 do
begin
case I of
1: SolveNonTalkingRandoms;
2: Respond;
3: Result := FindTalk;
4: Result := FindDead;
5: Result := RC;
end;
if Result then
Break;
end;
end;
{*******************************************************************************
function FindNormalRandoms: Boolean;
by: The SRL Developers Team!... all time sexiness by Mutant
Description: Calls the 'normal' random checks.
*******************************************************************************}
function FindNormalRandoms: Boolean;
var
i: Integer;
begin
for i := 1 to 8 do
begin
case I of
1: SolveNonTalkingRandoms;
2: Respond;
3: Result := FindTalk;
4: Result := FindDead;
5: Result := FindLamp(LampSkill);
6: if FindBox then
Result := SolveBox;
7: Result := RC;
8: Result := FindMod;
end;
if Result then
Break;
//Wait(1);
end;
end;
{*******************************************************************************
procedure FTWait(Time: Integer);
By: WT-Fakawi
Description: Performs Wait and FindTalk. Time is multiple of 250 msec, so FTWait(4)
waits approx 1 sec and performs 4 FindTalks;
*******************************************************************************}
function FTWait(Time: Integer): Boolean;
var
t: Integer;
begin
for T := 1 to Time do
begin
Wait(200 + Random(50));
if FindTalk then
Result := True;
end;
end;
Then it stops and gives me this error in the de-bug box.