TRiLeZ
2009-06-24 12:32:10
4 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
HTML, PHP, Delphi, C, C++, C#, Java
Are you a member of any other communities?
Moparscape forums, Moparisthebest, RSBot, Scion Bot.
Tell us about yourself…
From: TRiLeZ
I am a kid that likes technology and is really into it.
Please show us one (or multiple) of your scripts.
program CowFighter;
{.Script Info:
# ScriptName = Cow Fighter v3.1 [SMART] BETA 2
# Author = TRiLeZ |
# Description = A complex cow fighter that will amaze you! |
# Version = 3.1 BETA 2 |
# Date = 6/24/09 |
| Instructions: |
| Setup: |
| 1. Fill in the Const secttion |
| 2. Fill in the DeclarePlayers procedure |
| 3. Run the script! |
| 4. Sit back and let it auto |
| |
| Info: |
| -Must be where cows are |
| -Only bring 3 items |
| -Walks back from dead! |
| -Attack the cows under fally! |
| -Needs Reflection! |
| |
| Help: |
| -Report Bugs to me by PM on SRL Forums! (My username is TRiLeZ) |
| |
| Possible Combat Styles: |
| -Attack, Strength, Defence, Even, Mage, MageDef, Accurate, Rapid, |
| LongRange |
| |
| Skill Numers: |
| -Attack = 0 |
| -Defence = 1 |
| -Strength = 2 |
| -Hitpoints = 3 |
| -Range = 4 |
| -Prayer = 5 |
| -Magic = 6 |
| |
|______________________________________________________________________________|
/Script Info}
{.Include SRL/SRL/Misc/Smart.Scar}
{.include srl/srl.scar}
{.include srl/srl/skill/ranging.scar}
{.include srl/srl/reflection/Reflection.scar}
{.include srl/srl/misc/DoorProfiles.scar}
var
x,y,i,q: Integer;
gCowKill,gBones,gDeathsTRiLeZ,gStartXP,gNowXP,gTxp,gArrowsUsed,gArrows: Integer;
gHides: integer;
Skill: string;
const
SmartWorld = 154;//Change to world you want to auto on
Username = ''; //Name used to id you on my stats website
procedure DeclarePlayers;
begin
HowManyPlayers := 1;// Change this accordingly
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :=''; // Character Name
Players[0].Pass :=''; // Character Pass
Players[0].Nick :=''; // Nickname 3 - 4 Letter's of char name
Players[0].Active := True; // To be ran in the script?
Players[0].Strings[1] := ''; // Combat Styles - See line 25
Players[0].Integers[9] := 0; // The skill number to record XP gain - See line 29
Players[0].Strings[3] := ''; // Only if using Mage or MageDef! Type in spell name in undercase letters!
Players[0].Integers[10] := 0; // Picking up, 0 for nothing, 1 for bones, 2 for hides
Players[0].Pin := ''; //Bank Pin
{
Players[1].Name :=''; // Character Name
Players[1].Pass :=''; // Character Pass
Players[1].Nick :=''; // Nickname 3 - 4 Letter's of char name
Players[1].Active := True; // To be ran in the script?
Players[1].Strings[1] := ''; // Combat Styles - See line 25
Players[1].Integers[9] := 0; // The skill number to record XP gain - See line 29
Players[1].Strings[3] := ''; // Only if using Mage or MageDef! Type in spell name in undercase letters!
Players[1].Integers[10] := 0; // Picking up, 0 for nothing, 1 for bones, 2 for hides
Players[1].Pin := ''; //Bank Pin
}
{
Players[2].Name :=''; // Character Name
Players[2].Pass :=''; // Character Pass
Players[2].Nick :=''; // Nickname 3 - 4 Letter's of char name
Players[2].Active := True; // To be ran in the script?
Players[2].Strings[1] := ''; // Combat Styles - See line 25
Players[2].Integers[9] := 0; // The skill number to record XP gain - See line 29
Players[2].Strings[3] := ''; // Only if using Mage or MageDef! Type in spell name in undercase letters!
Players[2].Integers[10] := 0; // Picking up, 0 for nothing, 1 for bones, 2 for hides
Players[2].Pin := ''; //Bank Pin
}
{
Players[3].Name :=''; // Character Name
Players[3].Pass :=''; // Character Pass
Players[3].Nick :=''; // Nickname 3 - 4 Letter's of char name
Players[3].Active := True; // To be ran in the script?
Players[3].Strings[1] := ''; // Combat Styles - See line 25
Players[3].Integers[9] := 0; // The skill number to record XP gain - See line 29
Players[3].Strings[3] := ''; // Only if using Mage or MageDef! Type in spell name in undercase letters!
Players[3].Integers[10] := 0; // Picking up, 0 for nothing, 1 for bones, 2 for hides
Players[3].Pin := ''; //Bank Pin
}
end;
{*******************************************************************************
function PostReport(ScriptName, Website, Proggy : String): Boolean;
By: Camo Kyle & Floor66
Description: Posts the Progress Report to my database which you can see
*******************************************************************************}
function PostReport(ScriptName, Website, Proggy : string): Boolean;
var
Dbase : string;
Client : Integer;
begin
Client := InitializeHTTPClient(False, False);
ClearPostData(Client);
Wait(10);
AddPostVariable(Client, 'proggy', Proggy);
AddPostVariable(Client, 'scn', ScriptName);
Dbase := PostHTTPPageEx(Client, Website);
FreeHTTPClient(Client);
Result := true;
end;
procedure SetUpAutoCast(AutoSpell: string; Defensive: Boolean); //Works better than the srl one
begin
GameTab(1);
case Defensive of
True: Mouse(690, 270, 8, 8, True);
False: Mouse(695, 330, 8, 8, True);
end;
Wait(1200+Random(600));
case LowerCase(AutoSpell) of
'wind strike': Mouse(583,240,3,3,true);
'water strike': Mouse(624,240,3,3,true);
'earth strike': Mouse(663,240,3,3,true);
'fire strike': Mouse(703,240,3,3,true);
'wind bolt': Mouse(584,299,3,3,true);
'water bolt': Mouse(625,299,3,3,true);
'earth bolt': Mouse(664,299,3,3,true);
'fire bolt': Mouse(704,299,3,3,true);
'wind blast': Mouse(582,363,3,3,true);
'water blast': Mouse(624,363,3,3,true);
'earth blast': Mouse(663,363,3,3,true);
'fire blast': Mouse(703,363,3,3,true);
'wind wave': Mouse(585,424,3,3,true);
'water wave': Mouse(625,424,3,3,true);
'earth wave': Mouse(664,424,3,3,true);
'fire wave': Mouse(704,424,3,3,true);
end;
Wait(1200+Random(600));
end;
procedure PickSkill;
begin
if (Players[CurrentPlayer].Strings[1] = 'even') then
begin
if (GetMySkill(0,true) < GetMySkill(1,true)) and (GetMySkill(2,true) < GetMySkill(2,true)) then SetFightMode(1)
else
if (GetMySkill(1,true) < GetMySkill(2,true)) and (GetMySkill(0,true) < GetMySkill(2,true)) then SetFightMode(4)
else
if (GetMySkill(2,true) < GetMySkill(0,true)) and (GetMySkill(1,true) < GetMySkill(2,true)) then SetFightMode(2);
end;
end;
procedure SetCStyle;
begin
GameTab(1);
case Players[CurrentPlayer].Strings[1] of
'strength': SetFightMode(2);
'attack': SetFightMode(1);
'defence': SetFightMode(4);
'even': PickSkill;
'mage': SetUpAutoCast(Players[CurrentPlayer].Strings[3], false);
'mageDef': SetUpAutoCast(Players[CurrentPlayer].Strings[3], true);
'accurate': Mouse(602, 272,0,0,true);
'rapid': Mouse(677, 273,0,0,true);
'longRange': Mouse(602, 319,0,0,true);
end;
end;
procedure NowEXP;
begin
gNowXp := SmartGetFieldArrayInt(0, Experiences, Players[CurrentPlayer].Integers[9]);
gTxp := (gNowXp-gStartXp);
end;
procedure ProgressReport;
begin
if not LoggedIn then exit;
ClearDebug;
if (HowManyPlayers = 1) then
begin
Writeln('****************************************************************************');
Writeln('Cow Fighter v3.1 [SMART] BETA 2 by TRiLeZ ' + ' Used by: ' + Username);
Writeln('****************************************************************************');
Writeln('Running Time: '+TimeRunning);
Writeln('Killed: '+inttostr(gCowKill)+' Cows.');
Writeln('Xp Gained: '+inttostr(gTxp)+' of '+Skill);
case Players[CurrentPlayer].Integers[10] of
1: Writeln('Bones Picked Up: '+inttostr(gBones));
2: Writeln('Cowhides Picked Up: '+inttostr(gHides));
end;
Writeln('Deaths: '+inttostr(gDeathsTRiLeZ));
if (Players[CurrentPlayer].Strings[1] = 'accurate') or
(Players[CurrentPlayer].Strings[1] = 'rapid') or
(Players[CurrentPlayer].Strings[1] = 'longRange') then
Writeln('Arrows Used: '+inttostr(gArrowsUsed));
Writeln('****************************************************************************');
end;
if (HowManyPlayers > 1) then
begin
Players[CurrentPlayer].Integers[1]:= Players[CurrentPlayer].Integers[1] + gCowKill;
gCowKill:= 0;
Players[CurrentPlayer].Integers[2]:= gNowXp-gStartXp;
Players[CurrentPlayer].Integers[3]:= Players[CurrentPlayer].Integers[3] + gBones;
gBones:= 0;
Players[CurrentPlayer].Integers[11]:= Players[CurrentPlayer].Integers[11] + gHides;
gHides:= 0;
Players[CurrentPlayer].Integers[5]:= Players[CurrentPlayer].Integers[5] + gDeathsTRiLeZ;
gDeathsTRiLeZ:= 0;
Players[CurrentPlayer].Integers[6]:= Players[CurrentPlayer].Integers[5] + gArrowsUsed;
Writeln('********************************************************************');
Writeln('Cow Fighter v3.1 [SMART] BETA 2 by TRiLeZ ' + ' Used by: ' + Username);
Writeln('********************************************************************');
Writeln('| Nick | Killed | XP Gained | Bones | Deaths | Arrows Used | Hides |');
Writeln(' ******** ******** *********** ******* ****** ******** *************');
for i:= 0 to HowManyPlayers-1 do
begin
Writeln('| '+Padr(Players[i].Nick, 7)+'| '+Padr(IntToStr(Players[i].Integers[1]),7)+'| '
+Padr(IntToStr(Players[i].Integers[2]),10)+'| '+Padr(IntToStr(Players[i].Integers[3]),6)+'| '
+Padr(IntToStr(Players[i].Integers[5]),7)+'| '+Padr(IntToStr(Players[i].Integers[6]),12)+'| '
+Padr(IntToStr(Players[i].Integers[11]),6)+'| ');
end;
Writeln('**********************************************************************');
Writeln(' Total Running Time: '+TimeRunning);
Writeln('**********************************************************************');
end;
end;
procedure OpenDoor;
var
P: TPoint;
begin
Status('Finding Door');
KeyDown(VK_Down);
ClickDoor(8695,'n','Open');
KeyDown(VK_Up);
end;
procedure RandomEmote;
begin
if not IsInteractingWithMe('Cow') then
begin
GameTab(12);
case Random(20) of
0: Mouse(569,232,5,5,true);
1: Mouse(613,232,5,5,true);
2: Mouse(654,232,5,5,true);
3: Mouse(701,232,5,5,true);
4: Mouse(569,282,5,5,true);
5: Mouse(613,282,5,5,true);
6: Mouse(654,282,5,5,true);
7: Mouse(701,282,5,5,true);
8: Mouse(569,332,5,5,true);
9: Mouse(613,332,5,5,true);
10: Mouse(654,332,5,5,true);
11: Mouse(701,332,5,5,true);
12: Mouse(569,382,5,5,true);
13: Mouse(613,382,5,5,true);
14: Mouse(654,382,5,5,true);
15: Mouse(701,382,5,5,true);
16: Mouse(569,332,5,5,true);
17: Mouse(613,332,5,5,true);
18: Mouse(654,332,5,5,true);
19: Mouse(701,332,5,5,true);
end;
WaitForAnim(1000);
While (GetAnimation > 0) do wait(20);
end;
end;
procedure AntiBan;
var
Close: integer;
begin
if not LoggedIn then Exit;
case Random(7+random(2)) of
0: wait(500+random(3000));
1: begin
case Random(2) of
0: HoverSkill('random', false);
1: begin
if IsInteractingWithMe('Cow') then Exit;
HoverSkill('random', false);
GetMousePos(x,y);
Mouse(x,y,5,5,true);
Wait(1600+random(500));
Close := DTMFromString('78DA63CC666260686340010F7654317000694' +
'620FE0F048C25403575A86A96D6DAC3D580006332916AFA08A829' +
'21AC06000EE41086');
if FindDTM(Close,x,y,MSX1,MSY1,MSX2,MSY2) then
begin
Mouse(x,y,3,3,false);
ChooseOption('Close');
Wait(800+Random(200));
end else
begin
Mouse(498,21,8,8,false);
Wait(800+Random(250));
if ChooseOption('Close') then Wait(300+Random(200))
else
begin
Mouse(449,51,8,8,false);
ChooseOption('Close');
Wait(800+Random(200));
end;
FreeDTM(Close);
end;
end;
end;
end;
2: PickUpMouse;
3: BoredHuman;
4: RandomRClick;
5: RandomEmote;
end;
end;
procedure Intro;
begin
ClearReport;
ChangeReportWidth(300);
AddtoReport(' _ _ _ _ _ _ _ _ _ _ _ _ _');
Wait(500);
AddtoReport('|_ _|| |_| ||_|| | | O_||__ /');
Wait(500);
AddtoReport(' | | | _ \ | || |_ | \_ / /_');
Wait(500);
AddtoReport(' |_| |_| \_\|_||_ _||_ _| /_ _ |');
Wait(500);
AddtoReport('Cow Fighter v3.1 [SMART] BETA 2 By TRiLeZ');
Disguise('Cow Fighter v3.1 [SMART] BETA 2');
Status('Running...');
end;
procedure SetupScript;
var
v: string;
begin
v:= GetPage('http://scardevreflection.googlecode.com/svn/trunk/RSBuild.txt');
if not (RSBuild = StrToInt(GetNumbers(v))) then UpdateHooks;
DeclarePlayers;
for i := 0 to howmanyplayers - 1 do
begin
Players[i].Strings[1] := LowerCase(Players[i].Strings[1]);
Players[i].Strings[3] := LowerCase(Players[i].Strings[3]);
end;
LoginPlayer;
Wait(800+Random(200));
end;
procedure SetupPlayer;
begin
q:= 1;
KeyDown(VK_Up);
SetRun(True);
gStartXp := SmartGetFieldArrayInt(0, Experiences, Players[CurrentPlayer].Integers[9]);
if (Players[CurrentPlayer].Strings[1] = 'accurate') or
(Players[CurrentPlayer].Strings[1] = 'rapid') or
(Players[CurrentPlayer].Strings[1] = 'longRange') then
begin
gArrows:= ArrowAmount;
end;
case Players[CurrentPlayer].Integers[9] of
0: Skill:= 'Attack';
1: Skill:= 'Defence';
2: Skill:= 'Strength';
3: Skill:= 'HitPoints';
4: Skill:= 'Range';
5: Skill:= 'Prayer';
6: Skill:= 'Magic';
end;
end;
function DeathWalkPath: TPointArray;
begin
Result := [Point(3227, 3219), Point(3229, 3219), Point(3232, 3227), Point(3222, 3238),
Point(3209, 3238), Point(3195, 3238), Point(3180, 3236), Point(3166, 3233), Point(3150, 3229),
Point(3134, 3228), Point(3119, 3227), Point(3106, 3236), Point(3105, 3248), Point(3093, 3249),
Point(3079, 3251), Point(3072, 3265), Point(3059, 3276), Point(3043, 3275), Point(3033, 3286),
Point(3039, 3295)];
end;
procedure WalkFromDead;
var
I: Integer;
Path: TPointArray;
begin
gDeathsTRiLeZ := gDeathsTRiLeZ + 1;
Status('Walking back to cows from death');
SetRun(true);
Path := DeathWalkPath;
for i:=0 to High(Path) do
begin
WalkToTile(Path[i], 0, 3);
if (i = High(Path)) then break;
while(not TileOnMM(Path[(i+1)]))do
Wait(RandomRange(100, 150));
end;
MMouse(578,226,3,3);
Wait(500+Random(200));
for i:= 1 to 3 do
begin
if IsUpText('Wield') or IsUpText('Wear') then
begin
GetMousePos(x,y);
Mouse(x,y,0,0,true);
end;
MMouse(x+42,226,3,3);
Wait(500+Random(200));
end;
MakeCompass('N');
OpenDoor;
Wait(1250+Random(250));
Mouse(608,42,4,4,true);
SetAngle(true);
Flag;
Mouse(91,493,0,0,true);
Flag;
Wait(2000+Random(200));
end;
function FindDeadTRiLeZ: Boolean;
begin
Result := False;
if FindBlackChatMessage('Oh dear, you are dead!') then
begin
Result := True;
SaveToChatLog;
if (SRL_Procs[srl_OnFindDead] <> nil) then
SRL_Procs[srl_OnFindDead]();
TakeScreen('Found Dead');
WalkFromDead;
end;
end;
procedure ArrowCheck;
begin
if (Players[CurrentPlayer].Strings[1] = 'Accurate') or
(Players[CurrentPlayer].Strings[1] = 'rapid') or
(Players[CurrentPlayer].Strings[1] = 'longRange') then
begin
Wait(200+random(100));
if (ArrowAmount = 0) then
begin
Writeln('No arrows left to continue');
if IsInteractingWithMe('Cow') then
begin
GameTab(5);
Mouse(587,304,10,10,true);
repeat
wait(20);
until not IsInteractingWithMe('Cow');
end;
Logout;
Exit;
end else
gArrowsUsed:= (gArrows-ArrowAmount);
end;
end;
procedure MageCheck;
begin
if (Players[CurrentPlayer].Strings[1] = 'mage') or
(Players[CurrentPlayer].Strings[1] = 'mageDef') then
begin
repeat
Wait(20);
if not IsInteractingWithMe('Cow') then
begin
Writeln('You dont have enough runes to continue');
Logout;
Exit;
end;
until (GetAnimation = 1162);
end;
end;
function CowInFight: Boolean;
var
X1,Y1,X2,Y2,cx,cy: Integer;
begin
GetMousePos(cx,cy);
X1:=cx-45; Y1:=cy-45;
X2:=cx+45; Y2:=cy+45;
if FindColorSpiralTolerance(cx,cy,56488,X1,Y1,X2,Y2,10) or
FindColorSpiralTolerance(cx,cy,334812,X1,Y1,X2,Y2,10) then
Result:= True
else
Result:= False;
end;
function FindFreeCow(var cx, cy: Integer; Color: TIntegerArray;
Tol, Step, xs, ys, xe, ye: Integer): Boolean;
var
CurX, CurY, a, b, c, i: Integer;
Start: Boolean;
begin
for b := 0 to (GetArrayLength(Color)-1) do
begin
if (FindColorSpiralTolerance(cx, cy, color[b], xs, ys, xe, ye, Tol)) then
begin
Start := True;
Break;
end;
end;
if (Start) then
begin
CurX := Round((xs + xe) div 2);
CurY := Round((ys + ye) div 2) - Step;
i := 1;
repeat
for c := 1 to i do
begin
case a of
0: begin //To allow for beginning offset and loop
a := a + 1;
i := 0;
CurY := CurY + Step;
end;
1: CurX := CurX + Step;
2: CurY := CurY - Step;
3: CurX := CurX - Step;
4: CurY := CurY + Step;
end;
if (CurX >= xs) and (CurX <= xe) and (CurY >= ys) and (CurY <= ye) then
begin
try
for b := 0 to (GetArrayLength(Color)-1) do
begin
if (FindColorTolerance(cx, cy, Color[b], CurX-(Step/2), CurY-(Step/2), CurX+(Step/2), CurY+(Step/2), Tol)) then
begin
MMouse(cx, cy, 3, 3);
Wait(50 + Random(50));
If (IsUpTextMultiCustom(['Cow'])) then
begin
if not CowInFight then
begin
GetMousePos(cx, cy);
Result := True;
Exit;
end;
end;
end;
end;
except
end;
end;
end;
a := a + 1;
if a mod 5 = 0 then a := 1;
if (a = 1) or (a = 3) then i := i + 1;
until (Result) or ((CurX > xe) and (CurY > ye))
end;
end;
function FindCow(var cx, cy: Integer; Tol: Integer): Boolean;
var
Color: TIntegerArray;
begin
Color:= [8421504,12238531,7635346,7045533,5594475,10791857,4018778,6650774];
Result := FindFreeCow(cx, cy, Color, Tol, 50, MSX1, MSY1, MSX2, MSY2);
end;
procedure BuryBones;
var
x,y,Bones: Integer;
begin
GameTab(4);
Wait((100)+ Random(80));
Bones := DTMFromString('78DA63CC616260F8C18002CE1C3DCAC00AA41' +
'981F83F10306600D57C475573E2E001B81A10602C06AAF989AA66' +
'FFB6ADA86A32816AFEA1AA99337102AA9A7CA09ACFA86AF66DD98' +
'2A20600F06D15CE');
repeat
if FindDTM(Bones,x,y,MIX1,MIY1,MIX2,MIY2) then
begin
Mouse(x,y,3,3,false);
ChooseOption('Bury');
Wait(650+random(200));
end;
Wait(400+Random(200));
until not FindDTM(Bones,x,y,MIX1,MIY1,MIX2,MIY2);
FreeDTM(Bones);
end;
function FindWallColor: Integer;
var
TPA : TPointArray;
I, Col : Integer;
begin
if FindColorsTolerance(TPA, 15462895, MMX1, MMY1, MMX2, MMY2, 35) then
begin
Col := GetColor(TPA[i].X, TPA[i].Y);
Result:= Col;
end;
end;
function FindFloorColor: Integer;
var
TPA : TPointArray;
I, Col : Integer;
begin
if FindColorsTolerance(TPA, 10137790, MMX1, MMY1, MMX2, MMY2, 2) then
begin
Col := GetColor(TPA[i].X, TPA[i].Y);
Result:= Col;
Writeln('Floor Color= '+inttostr(Col));
end else
if FindColorsTolerance(TPA, 9744314, MMX1, MMY1, MMX2, MMY2, 2) then
begin
Col := GetColor(TPA[i].X, TPA[i].Y);
Result:= Col;
Writeln('Floor Color= '+inttostr(Col));
end else
if FindColorsTolerance(TPA, 9414324, MMX1, MMY1, MMX2, MMY2, 2) then
begin
Col := GetColor(TPA[i].X, TPA[i].Y);
Result:= Col;
Writeln('Floor Color= '+inttostr(Col));
end else
if FindColorsTolerance(TPA, 10137790, MMX1, MMY1, MMX2, MMY2, 2) then
begin
Col := GetColor(TPA[i].X, TPA[i].Y);
Result:= Col;
Writeln('Floor Color= '+inttostr(Col));
end else
if FindColorsTolerance(TPA, 9219247, MMX1, MMY1, MMX2, MMY2, 2) then
begin
Col := GetColor(TPA[i].X, TPA[i].Y);
Result:= Col;
Writeln('Floor Color= '+inttostr(Col));
end;
end;
function FindTreeColor: Integer;
var
TPA : TPointArray;
I, Col : Integer;
begin
if FindColorsTolerance(TPA, 410389, MMX1, MMY1, MMX2, MMY2, 25) then
begin
Col := GetColor(TPA[i].X, TPA[i].Y);
Result:= Col;
end;
end;
function FindLadderColor2: Integer;//SRL function dosnt pickup this ladder well
var
TPA : TPointArray;
I, Col : Integer;
begin
if FindColorsTolerance(TPA, 78936, MMX1, MMY1, MMX2, MMY2, 4) then
begin
Col := GetColor(TPA[i].X, TPA[i].Y);
Result:= Col;
Writeln('Ladder Color= '+inttostr(Col));
end else
if FindColorsTolerance(TPA, 929381, MMX1, MMY1, MMX2, MMY2, 4) then
begin
Col := GetColor(TPA[i].X, TPA[i].Y);
Result:= Col;
Writeln('Ladder Color= '+inttostr(Col));
end else
if FindColorsTolerance(TPA, 10063, MMX1, MMY1, MMX2, MMY2, 4) then
begin
Col := GetColor(TPA[i].X, TPA[i].Y);
Result:= Col;
Writeln('Ladder Color= '+inttostr(Col));
end else
if FindColorsTolerance(TPA, 800860, MMX1, MMY1, MMX2, MMY2, 4) then
begin
Col := GetColor(TPA[i].X, TPA[i].Y);
Result:= Col;
Writeln('Ladder Color= '+inttostr(Col));
end;
end;
procedure OpenGate;
begin
Status('Opening Gate');
if FindObjCustom(x,y,['Gate'],[5533052,3427931,5401465,5467258],4) then
begin
Mouse(x,y,3,3,false);
if ChooseOption('Open') then
begin
WaitToMove(500);
while CharacterMoving do wait(10);
Wait(400+Random(200));
end;
end;
end;
function DDTMWalk(WalkNumber: Integer): Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: array[0..3] of TDTMPointDef;
TempTDTM: TDTM;
begin
case WalkNumber of
1:
begin
dtmMainPoint.x := 713;
dtmMainPoint.y := 137;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := FindWallColor;
dtmMainPoint.Tolerance := 0;
dtmSubPoints[0].x := 713;
dtmSubPoints[0].y := 137;
dtmSubPoints[0].AreaSize := 6;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := FindWallColor;
dtmSubPoints[0].Tolerance := 0;
dtmSubPoints[1].x := 716;
dtmSubPoints[1].y := 147;
dtmSubPoints[1].AreaSize := 6;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := FindTreeColor;
dtmSubPoints[1].Tolerance := 0;
dtmSubPoints[2].x := 699;
dtmSubPoints[2].y := 153;
dtmSubPoints[2].AreaSize := 6;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := FindTreeColor;
dtmSubPoints[2].Tolerance := 0;
dtmSubPoints[3].x := 729;
dtmSubPoints[3].y := 149;
dtmSubPoints[3].AreaSize := 6;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := FindTreeColor;
dtmSubPoints[3].Tolerance := 0;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
2:
begin
dtmMainPoint.x := 685;
dtmMainPoint.y := 187;
dtmMainPoint.AreaSize := 1;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := FindFallyRoadColor;
dtmMainPoint.Tolerance := 0;
dtmSubPoints[0].x := 685;
dtmSubPoints[0].y := 187;
dtmSubPoints[0].AreaSize := 1;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := FindFallyRoadColor;
dtmSubPoints[0].Tolerance := 0;
dtmSubPoints[1].x := 697;
dtmSubPoints[1].y := 187;
dtmSubPoints[1].AreaSize := 1;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := FindTreeColor;
dtmSubPoints[1].Tolerance := 0;
dtmSubPoints[2].x := 679;
dtmSubPoints[2].y := 200;
dtmSubPoints[2].AreaSize := 1;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := FindFallyRoadColor;
dtmSubPoints[2].Tolerance := 0;
dtmSubPoints[3].x := 688;
dtmSubPoints[3].y := 215;
dtmSubPoints[3].AreaSize := 1;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := FindFallyRoadColor;
dtmSubPoints[3].Tolerance := 0;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
3:
begin
dtmMainPoint.x := 744;
dtmMainPoint.y := 148;
dtmMainPoint.AreaSize := 1;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := FindFallyRoadColor;
dtmMainPoint.Tolerance := 0;
dtmSubPoints[0].x := 744;
dtmSubPoints[0].y := 148;
dtmSubPoints[0].AreaSize := 1;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := FindFallyRoadColor;
dtmSubPoints[0].Tolerance := 0;
dtmSubPoints[1].x := 754;
dtmSubPoints[1].y := 148;
dtmSubPoints[1].AreaSize := 1;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := FindFallyRoadColor;
dtmSubPoints[1].Tolerance := 0;
dtmSubPoints[2].x := 767;
dtmSubPoints[2].y := 166;
dtmSubPoints[2].AreaSize := 1;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := FindLadderColor2;
dtmSubPoints[2].Tolerance := 8;
dtmSubPoints[3].x := 766;
dtmSubPoints[3].y := 146;
dtmSubPoints[3].AreaSize := 1;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := FindFloorColor;
dtmSubPoints[3].Tolerance := 10;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
4:
begin
dtmMainPoint.x := 757;
dtmMainPoint.y := 213;
dtmMainPoint.AreaSize := 1;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := FindFloorColor;
dtmMainPoint.Tolerance := 10;
dtmSubPoints[0].x := 757;
dtmSubPoints[0].y := 213;
dtmSubPoints[0].AreaSize := 1;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := FindFloorColor;
dtmSubPoints[0].Tolerance := 10;
dtmSubPoints[1].x := 757;
dtmSubPoints[1].y := 215;
dtmSubPoints[1].AreaSize := 1;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := FindWallColor;
dtmSubPoints[1].Tolerance := 0;
dtmSubPoints[2].x := 755;
dtmSubPoints[2].y := 213;
dtmSubPoints[2].AreaSize := 1;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := FindWallColor;
dtmSubPoints[2].Tolerance := 0;
dtmSubPoints[3].x := 761;
dtmSubPoints[3].y := 220;
dtmSubPoints[3].AreaSize := 4;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 195836;
dtmSubPoints[3].Tolerance := 35;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
5:
begin
dtmMainPoint.x := 615;
dtmMainPoint.y := 171;
dtmMainPoint.AreaSize := 1;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := FindFallyRoadColor;
dtmMainPoint.Tolerance := 0;
dtmSubPoints[0].x := 615;
dtmSubPoints[0].y := 171;
dtmSubPoints[0].AreaSize := 1;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := FindFallyRoadColor;
dtmSubPoints[0].Tolerance := 0;
dtmSubPoints[1].x := 616;
dtmSubPoints[1].y := 156;
dtmSubPoints[1].AreaSize := 1;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := FindFallyRoadColor;
dtmSubPoints[1].Tolerance := 0;
dtmSubPoints[2].x := 624;
dtmSubPoints[2].y := 157;
dtmSubPoints[2].AreaSize := 1;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := FindFallyRoadColor;
dtmSubPoints[2].Tolerance := 0;
dtmSubPoints[3].x := 632;
dtmSubPoints[3].y := 178;
dtmSubPoints[3].AreaSize := 4;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := FindLadderColor2;
dtmSubPoints[3].Tolerance := 8;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
6:
begin
dtmMainPoint.x := 741;
dtmMainPoint.y := 320;
dtmMainPoint.AreaSize := 1;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := FindFallyRoadColor;
dtmMainPoint.Tolerance := 0;
dtmSubPoints[0].x := 741;
dtmSubPoints[0].y := 320;
dtmSubPoints[0].AreaSize := 1;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := FindFallyRoadColor;
dtmSubPoints[0].Tolerance := 0;
dtmSubPoints[1].x := 747;
dtmSubPoints[1].y := 292;
dtmSubPoints[1].AreaSize := 1;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := FindFallyRoadColor;
dtmSubPoints[1].Tolerance := 0;
dtmSubPoints[2].x := 751;
dtmSubPoints[2].y := 299;
dtmSubPoints[2].AreaSize := 1;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := FindTreeColor;
dtmSubPoints[2].Tolerance := 0;
dtmSubPoints[3].x := 768;
dtmSubPoints[3].y := 290;
dtmSubPoints[3].AreaSize := 1;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := FindFloorColor;
dtmSubPoints[3].Tolerance := 8;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
end;
end;
procedure WalkToBank;
begin
if not LoggedIn then Exit;
Status('Walking to Bank');
if DTMRotated(DDTMWalk(1),x,y,MMX1,MMY1,MMX2,MMY2) then
begin
Mouse(x,y,0,0,true);
Flag;
Wait(500+Random(250));
end else
if RadialRoadWalk(FindWallColor, 304, 330, 62, -1, 0) then
begin
Flag;
Wait(500+Random(250));
end else
if WalkToTile(Point(3021, 3326), 0, 5) then
begin
Flag;
Wait(500+Random(250));
end else
begin
Writeln(Players[CurrentPlayer].Nick+' got lost.');
Logout;
end;
if DTMRotated(DDTMWalk(2),x,y,MMX1,MMY1,MMX2,MMY2) then
begin
Mouse(x,y,0,0,true);
Flag;
Wait(500+Random(250));
end else
if RadialRoadWalk(FindFallyRoadColor, 300, 280, 60, -1, 0) then
begin
Flag;
Wait(500+Random(250));
end else
if WalkToTile(Point(3006, 3330), 0, 5) then
begin
Flag;
Wait(500+Random(250));
end else
begin
Writeln(Players[CurrentPlayer].Nick+' got lost.');
Logout;
end;
if DTMRotated(DDTMWalk(3),x,y,MMX1,MMY1,MMX2,MMY2) then
begin
Mouse(x,y,0,0,true);
Flag;
Wait(500+Random(250));
end else
if RadialRoadWalk(FindFallyRoadColor, 5, 20, 68, -1, 0) then
begin
Flag;
Wait(500+Random(250));
end else
if WalkToTile(Point(3007, 3345), 0, 5) then
begin
Flag;
Wait(500+Random(250));
end else
begin
Writeln(Players[CurrentPlayer].Nick+' got lost.');
Logout;
end;
if DTMRotated(DDTMWalk(4),x,y,MMX1,MMY1,MMX2,MMY2) then
begin
Mouse(x,y,0,0,true);
Flag;
Wait(500+Random(250));
end else
if FindSymbol(x,y,'Bank') then
begin
Mouse(x,y,3,3,true);
Flag;
Wait(500+Random(250));
end else
if RadialRoadWalk(FindFloorColor, 360, 401, 70, -1, 0) then
begin
Flag;
Wait(500+Random(250));
end else
if WalkToTile(Point(3011, 3355), 0, 5) then
begin
Flag;
Wait(500+Random(250));
end else
begin
Writeln(Players[CurrentPlayer].Nick+' got lost.');
Logout;
end;
if WalkToTile(Point(3013, 3356),0,5) then
begin
Flag;
Wait(500+Random(250));
end else
begin
Writeln(Players[CurrentPlayer].Nick+' got lost.');
Logout;
end;
end;
procedure DepositCowHides;
var
CowHide: integer;
begin
if not LoggedIn then Exit;
Status('Depositing Cowhides');
if not OpenBankFast('feb') then R_OpenBankBooth('feb');
Wait(750+Random(500));
if PinScreen then
begin
InPin(Players[CurrentPlayer].Pin)
Wait(750+Random(500));
end else
if BankScreen then
begin
CowHide := DTMFromString('78DA63DCC3C4C010C6C8800C766FDCC0C006A' +
'441A2FF81807117508D37AA9AADAB56C1D58000E331A09A005435' +
'1B972E45557310A8260155CDBE2D5B50D56C02AA89425573E1D44' +
'914350017D01437');
if FindDTM(CowHide,x,y,MIX1,MIY1,MIX2,MIY2) then
begin
Mouse(x,y,3,3,false);
ChooseOption('Deposit-All');
Wait(500+Random(250));
CloseBank;
end;
FreeDTM(CowHide);
end;
end;
procedure WalkToPen;
begin
if not LoggedIn then Exit;
Status('Walking to cow pen');
if DTMRotated(DDTMWalk(5),x,y,MMX1,MMY1,MMX2,MMY2) then
begin
Mouse(x,y,0,0,true);
Flag;
Wait(500+Random(250));
end else
if RadialRoadWalk(FindFallyRoadColor, 195, 220, 68, -1, 0) then
begin
Flag;
Wait(500+Random(250));
end else
if WalkToTile(Point(3007, 3340), 0, 5) then
begin
Flag;
Wait(500+Random(250));
end else
begin
Writeln(Players[CurrentPlayer].Nick+' got lost.');
Logout;
end;
if DTMRotated(DDTMWalk(6),x,y,MMX1,MMY1,MMX2,MMY2) then
begin
Mouse(x,y,0,0,true);
Flag;
Wait(500+Random(250));
end else
if RadialRoadWalk(FindFallyRoadColor, 180, 218, 65, -1, 0) then
begin
Flag;
Wait(500+Random(250));
end else
if WalkToTile(Point(3006, 3325), 0, 5) then
begin
Flag;
Wait(500+Random(250));
end else
begin
Writeln(Players[CurrentPlayer].Nick+' got lost.');
Logout;
end;
if FindSymbolIn(x,y,'tree',749,120,830,276) then
begin
Mouse(x,y,3,3,true);
Flag;
Wait(500+Random(250));
end else
if WalkToTile(Point(3017, 3318),0,5) then
begin
Flag;
Wait(500+Random(250));
end else
begin
Writeln(Players[CurrentPlayer].Nick+' got lost.');
Logout;
end;
if WalkToTile(Point(3031, 3314),0,5) then
begin
Flag;
Wait(500+Random(250));
end else
begin
Writeln(Players[CurrentPlayer].Nick+' got lost.');
Logout;
end;
OpenGate;
if WalkToTile(Point(3032, 3306),6,5) then
begin
Flag;
Wait(500+Random(250));
end;
end;
procedure DepositHides;
begin
if not LoggedIn then Exit;
Status('Walking to bank');
if not InvFull then Exit;
WalkToTile(Point(3032, 3313),0,5);
Flag;
Wait(750+Random(250));
OpenGate;
WalkToBank;
DepositCowHides;
WalkToPen;
end;
procedure AttackCow;
var
Close,MMCow: integer;
begin
FindDeadTRiLeZ;
repeat
if (not LoggedIn) then exit;
FindNormalRandoms;
FindDeadTRiLeZ;
ArrowCheck;
case Players[CurrentPlayer].Integers[10] of
1: if InvFull then BuryBones;
2: if InvFull then DepositHides;
end;
Status('Finding Cow');
if FindCow(x,y,1) then
begin
if IsInteractingWithMe('Cow') then Break;
Mouse(x,y,0,0,false);
if IsInteractingWithMe('Cow') then Break;
if ChooseOption('Attack') then
begin
FindDeadTRiLeZ;
FindNormalRandoms;
WaitToMove(600);
while CharacterMoving do wait(10);
WaitForAnim(1200);
while (GetAnimation > 0) do wait(10);
if FindBlackChatMessage('reach that!') and not IsInteractingWithMe('Cow') then
begin
WalkToTile(Point(3032,3314),0,5);
Flag;
Wait(500+Random(250));
OpenGate;
end;
end;
end else
begin
Close := DTMFromString('78DA63CC666260686340010F7654317000694' +
'620FE0F048C25403575A86A96D6DAC3D580006332916AFA08A829' +
'21AC06000EE41086');
if FindDTM(Close,x,y,MSX1,MSY1,MSX2,MSY2) then
begin
Mouse(x,y,3,3,false);
ChooseOption('Close');
Wait(800+Random(200));
end else Wait(200+random(150));
FreeDTM(Close);
MMCow := DTMFromString('78DA636C636260086500034608C5F0E70F138' +
'33294FF1F0818416A8251D564342B31A821F1195B30CDC150D389' +
'A926015D0DC8AE48FC6A00ADA20F39');
if FindDTM(MMCow,x,y,MMX1,MMY1,MMX2,MMY2) then
begin
Mouse(x,y,3,3,true);
Flag;
Wait(500+Random(250));
end;
FreeDTM(MMCow);
end;
until IsInteractingWithMe('Cow');
Status('Fighting Cow');
MageCheck;
FindNormalRandoms;
AntiBan;
NowEXP;
repeat
ArrowCheck;
wait(10);
until not IsInteractingWithMe('Cow');
gCowKill:= gCowKill+1;
NowEXP;
end;
procedure PickupBones;
var
Drop: integer;
begin
if (Players[CurrentPlayer].Strings[1] = 'attack') or
(Players[CurrentPlayer].Strings[1] = 'strength') or
(Players[CurrentPlayer].Strings[1] = 'defence') or
(Players[CurrentPlayer].Strings[1] = 'even') then
begin
MakeCompass('n');
Drop := DTMFromString('78DA630C676460500362206062808005CAA20' +
'C1C401A24FA1F081823802C6554352BE7CE85AB0101C638204B03' +
'55CD86258B51D50462AA39B47307AA1A3F20CB0855CD9573E750D' +
'4000013F8100F');
if FindDTM(Drop,x,y,MSX1,MSY1,MSX2,MSY2) then
begin
Mouse(x,y,4,4,false);
Wait(250+Random(100));
if FindText(x,y,'Bones',upchars,115,93,373,337) then
begin
Mouse(x,y,1,1,true);
gBones := gBones+1;
wait(650+random(150));
end;
end else
if FindColorSpiralTolerance(x,y,1319583,184, 100,339, 253, 4) then
begin
Mouse(x,y,4,4,false);
Wait(250+Random(100));
if FindText(x,y,'Bones',upchars,115,93,373,337) then
begin
Mouse(x,y,1,1,true);
gBones := gBones+1;
wait(650+random(150));
end;
end;
FreeDTM(Drop);
if InvFull then DepositHides;
end;
end;
procedure PickupHides;
var
Drop: integer;
begin
if (Players[CurrentPlayer].Strings[1] = 'attack') or
(Players[CurrentPlayer].Strings[1] = 'strength') or
(Players[CurrentPlayer].Strings[1] = 'defence') or
(Players[CurrentPlayer].Strings[1] = 'even') then
begin
MakeCompass('n');
Drop := DTMFromString('78DA630C676460500362206062808005CAA20' +
'C1C401A24FA1F081823802C6554352BE7CE85AB0101C638204B03' +
'55CD86258B51D50462AA39B47307AA1A3F20CB0855CD9573E750D' +
'4000013F8100F');
if FindDTM(Drop,x,y,MSX1,MSY1,MSX2,MSY2) then
begin
Mouse(x,y,4,4,false);
Wait(250+Random(100));
if FindText(x,y,'Cowhide',upchars,115,93,373,337) then
begin
Mouse(x,y,1,1,true);
gHides := gHides+1;
wait(650+random(150));
end;
end else
if FindColorSpiralTolerance(x,y,1319583,184, 100,339, 253, 4) then
begin
Mouse(x,y,4,4,false);
Wait(250+Random(100));
if FindText(x,y,'Cowhide',upchars,115,93,373,337) then
begin
Mouse(x,y,1,1,true);
gHides := gHides+1;
wait(650+random(150));
end;
end;
FreeDTM(Drop);
if InvFull then DepositHides;
end;
end;
procedure CheckBreak;
begin
if HowManyPlayers = 1 then
begin
if (gCowKill = (q*50)) then
begin
Status('Taking a 15-30 second break and switching worlds');
Logout;
Wait(15000+random(30000));
OpenWorldScreen;
SelectWorld(RandomWorld(false,false));
LoginPlayer;
q:= q+1;
end;
end;
if HowManyPlayers > 1 then
begin
if (Players[CurrentPlayer].Integers[1] = (q*50)) then
begin
Status('Taking a 15-30 second break and switching worlds');
Logout;
Wait(15000+random(30000));
RandomWorld(false,false);
LoginPlayer;
q:= q+1;
end;
end;
end;
procedure MainLoop;
begin
repeat
SetupPlayer;
SetCStyle;
repeat
if (not LoggedIn) then break;
FindNormalRandoms;
Antiban;
FindDeadTRiLeZ;
AttackCow;
case Players[CurrentPlayer].Integers[10] of
1:begin
Wait(4000);
PickupBones;
end;
2:begin
Wait(4000);
PickupHides;
end;
end;
ProgressReport;
SetRun(true);
CheckBreak;
until (not LoggedIn);
Status('Running...');
if (not LoggedIn) then
begin
if (CurrentPlayer = HowManyPlayers-1) then Break;
NextPlayer(false);
end;
until(false);
Postreport('Cow Fighter v3.1 [SMART] BETA 2', 'http://stats.trilez.comuf.com/add.php', GetDebugText);
end;
begin
Smart_Server:= SmartWorld;
SetupSRL;
Intro;
ClearDebug;
SetupScript;
MainLoop;
end.