SRL Archive - Archive

hunt3rx3 - SRL Member Application


Shatterhand

2012-03-22 14:26:36

How Long have You Played Runescape?
6 Year(s)


Are you affilated in anyway with Jagex LTD?
no

Were you Referred to SRL?
no


What is your general programming knowledge?
C, pascal, learning C++


Are you a member of any other communities?
no


Tell us about yourself…
From: hunt3rx3
Im an old RS player. I study IT at university. I like scripting and botting. :)



Please show us one (or multiple) of your scripts.
program ChaosMossKiller;
{$i srl/srl/misc/smart.simba}
{$i srl/srl.simba}
{$i srl/srl/misc/debug.simba}
procedure DeclarePlayers;
begin
NumberOfPlayers(1);
CurrentPlayer := 0;
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
//========================ChaosMossKiller by hunt3rx3=======================v4.0
//FILL THESE============================================================22 March
//NOTE: YOU MUST SET UP XPBAR FOR TRAINED LEVEL!================================
//==============================================================================
Players[0].Name := ''; //USERNAME
Players[0].Pass := ''; //PASSWORD

Players[0].Strings[0] := 'Strength'; //WHAT U TRAINING: Attack, Strength, Defence (this is only for reports, u have to set attack style urself)
Players[0].Strings[2] := 'C:\Simba\Screenshots\ChaosMossKiller\'; //PATH FOR CREATING SCREENSHOTS (100 kb, jpg)
Players[0].Integers[0] := 20000; //FAILSAFE: THIS IS THE TIME FOR KILLING ONE MOSS GIANT (miliseconds)
Players[0].Integers[1] := 3; //TRAINED LEVEL XPBAR: 1,2,3
Players[0].BoxRewards := ['amp'];
Players[0].LampSkill := SKILL_RANGE; //USE LAMP ON
Players[0].Booleans[0] := True; //HOPPING: True, False
Players[0].Booleans[1] := False; //USING BONECRUSHER: True, False (will show pray xp gain or not)
Players[0].Booleans[2] := True; //TAKING SCREENSHOTS: True, False
//==============================================================================
//===========UPDATES: [url]http://villavu.com/forum/showthread.php?t=74029===========[/url]
//==============================================================================
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Players[CurrentPlayer].Active:=True;
end;




var
X, Y : Integer;
StartTime, StartXp, StartXPtillNext, LastXP, TrainedLevel, WorldHops : Integer;
DoReport : Boolean;



const
Version = 'v4.0';



procedure MakeScreenShot(const FilePath : String); //example: 'C:\Simba\Screenshots\ChaosMossKiller\levelups'
var
fileName : String;
Year, Month, Day : Word;
i : Integer;
begin
if (Players[0].Booleans[2] = False) then //if screenshots are off
Exit;
if not DirectoryExists(FilePath) then
CreateDirectory(FilePath);
DecodeDate(Date,Year,Month,Day);
i := 0;
repeat
i := i+1;
fileName := ToStr(Year)+'-'+ToStr(Month)+'-'+ToStr(Day)+' ('+IntToStr(i)+')';
until not FileExists(FilePath+FileName+'.jpg')
SaveScreenShot(FilePath+FileName+'.jpg'); //example: 2012-3-21 (1).jpg
end;



function CurrentTime: string;
var
hour, mins, sec, mSec: Word;
begin
DecodeTime(Now, hour, mins, sec, mSec);
Result := ('['+Padz(IntToStr(hour), 2) + ':' + Padz(IntToStr(mins), 2) + ':' + Padz(IntToStr(sec), 2)+']');
end;



procedure RotateCam;
begin
ActivateClient;
case Random(2) of
0:begin
Wait(100 + random(50));
KeyDown(VK_RIGHT);
Wait(500 + random(1000));
KeyUp(VK_RIGHT);
Wait(500 + random(1000));
end;
1:begin
Wait(100 + random(50));
KeyDown(VK_LEFT);
Wait(500 + random(1000));
KeyUp(VK_LEFT);
Wait(500 + random(1000));
end;
end;
end;



procedure Report;
var
levelString : String;
xP, xPHour, prayXP, xPtillNext, timeRun : Extended; //i have no clue why, but integer with Round() wont work
done : Boolean;
fails : Integer;
begin

if (Players[CurrentPlayer].Strings[0] = 'Attack') then levelString:= 'ATK';
if (Players[CurrentPlayer].Strings[0] = 'Strength') then levelString:= 'STR';
if (Players[CurrentPlayer].Strings[0] = 'Defence') then levelString:= 'DEF';

fails := 0;
done := True;
repeat //reading xpbar for xp gained
if (fails = 5) then
begin
Writeln(CurrentTime+' Failed to read XPBar. Turning off Reporting.');
DoReport := False;
Exit;
end;
xP := GetXPBar(Players[CurrentPlayer].Integers[1])-StartXP;
if (xP + StartXP = -1) then //if fails to read xpbar it gives -1
begin
done := False;
fails := fails+1;
end;
until done

timeRun:=TimeFromMark(StartTime);
prayXP := Round(xP/240*15);
xPHour := Round(XP * (3600000/TimeRun));
xPtillNext := StartXPtillNext - xP + LastXP; //LastXP = 0 untill we get a levelup

if xPtillNext < 0 then //levelup check
begin

fails := 0;
done := True;
repeat //getting new level and xp till next
if (fails = 5) then
begin
Writeln(CurrentTime+' Failed to get level/XPs. Turning off Reporting.');
DoReport := False;
Exit;
end;
TrainedLevel := GetSkillLevel(Players[CurrentPlayer].Strings[0]);
if (TrainedLevel = -1) then //if fails to get level it gives -1
begin
done := False;
fails := fails+1;
end;
StartXPtillNext := XPTillNextLevel(Players[CurrentPlayer].Strings[0]);
if (StartXPtillNext = -1) then //if fails to read xp it gives -1
begin
done := False;
fails := fails+1;
end;
until done

xPtillNext := StartXPtillNext;
LastXP := Round(xP); //we store the 'xp gained till now' (round is needed cause extended and integer)
Wait(RandomRange(3000,5000));
MakeScreenShot(Players[0].Strings[2]+'levelups\');
end;

Disguise('ChaosMossKiller ['+FloatToStr(XPHour)+']');

ClearDebug;
WriteLn('[=================ChaosMossKiller_'+Version+'==================]');
WriteLn(' Time Running : ' + MsToTime(Round(timeRun),Time_Formal));
WriteLn(' '+levelString+' XP Per Hour : ' + FloatToStr(xPHour));
WriteLn(' '+levelString+' XP Gained : ' + FloatToStr(xP));
Writeln(' '+levelString+' Level : ' + IntToStr(TrainedLevel));
Writeln(' XP till next lvl : ' + FloatToStr(xPtillNext));
if (Players[0].Booleans[1]=True) then //if using bonecruser, then we report pray xp
Writeln(' Pray Xp : ' + FloatToStr(prayXP))
else
Writeln(' WorldHops : ' + IntToStr(WorldHops));
WriteLn('[=======================================================]');
end;



procedure Antiban;
begin
case Random(1400) of
1:
begin
Status('Checking trained level.');
TrainedLevel := GetSkillLevel(Players[CurrentPlayer].Strings[0]);
HoverSkill(Players[CurrentPlayer].Strings[0],false);
Wait(RandomRange(3000,4000));
Status('Back to fighting.');
end;
2:
begin
Status('Checking hp level.');
TrainedLevel := GetSkillLevel(Players[CurrentPlayer].Strings[0]);
HoverSkill(SKILL_HITPOINTS,false);
Wait(RandomRange(3000,4000));
Status('Back to fighting.');
end;
3:
begin
Status('Picking up mouse.');
PickUpMouse;
Status('Back to fighting.');
end;
4..25:
begin
Status('Rotating camera.');
RotateCam;
Status('Back to fighting.');
end;
180..190:
begin
Status('Moving mouse.');
SleepAndMoveMouse(1000 + random(200))
Status('Back to fighting.');
end;
end;
end;



function EatFood(var foodDTMString : String): boolean;
var
foodDTM, fails : Integer;
done : Boolean;
begin
Status('Eating.');
foodDTM :=DTMFromString(foodDTMString);
GameTab(tab_Inv);
Wait(RandomRange(200,400));

fails := 0;
done := False;
repeat

if FindDTM(foodDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x+random(8), y+random(8), 2, 2, true);
Status('Ate food.');
Wait(RandomRange(1000,1500));
Result := True;
done := True;
end
else
fails := fails+1;
if (fails = 5) then
begin
WriteLn(CurrentTime+' Out of food.');
Result := False;
done := True;
end;
until done

FreeDTM(foodDTM);
end;



function HopWorld : Boolean;
var
failTime : Integer;
begin
Status('Hopping.');
WorldHops := WorldHops+1;

ExitToLobby;

MarkTime(failTime);
repeat
if TimeFromMark(failTime)>30000 then
begin
Writeln(CurrentTime+' Failed to exit to lobby when hopping.');
Result := False;
Exit;
end;
until LobbyScreen;
OpenWorldScreen;
SelectWorld(RandomWorld(true,false));

LoginPlayer;

MarkTime(failTime);
repeat
if TimeFromMark(failTime)>60000 then
begin
Writeln(CurrentTime+' Failed to login after hopping.');
Result := False;
Exit;
end;
until LoggedIn
Wait(RandomRange(3000,6000));
ToggleXPBar(true);
SetAngle(SRL_ANGLE_HIGH);
Result := True;
end;



function DoChecks : Boolean;
var
lobs : String;
done : Boolean;
begin
Status('Login check.');
if not LoggedIn then
begin
Writeln(CurrentTime+' We got logged out somehow.');
Result := False;
Exit;
end;

Status('Looking for randoms.');
FindNormalRandoms;

Status('Looking for noobs.')
if Length(GetMinimapDotsin('player',610,68,648,102)) > 0 then
begin
Status('Found a noob.');
MakeScreenShot('C:\Simba\Screenshots\ChaosMossKiller\noobs\');
DisGuise('Hopping');
Wait(RandomRange(5000,10000));
if (HopWorld = False) then
Exit;
end;

Status('Checking HP.');
if (HPPercent<70) then
begin
lobs := 'mggAAAHicY2NgYPjPxMDAzczAwMcMYX8E4p9ALMbIwMAKxNxArMAI4fMC8f4EGaAuJgwsAiSxYUYcGAIAcgoGSA==';
if not EatFood(lobs) then
begin
Result := False;
Exit;
end;
end;
Result := True;
end;



procedure Main;
var
xpos, ypos : Integer;
redbarTime, greenbarTime, detectTime : Integer;
redbarDTM, greenbarDTM : Integer;
lobsDTMString : String;
found, done : Boolean;
fails : Integer;
begin
Status('Collecting infos.');
fails := 0;
done := True;
repeat
TrainedLevel := GetSkillLevel(Players[CurrentPlayer].Strings[0]);
if (TrainedLevel = -1) then
begin
done := False;
fails := fails+1;
end;
StartXPtillNext := XPTillNextLevel(Players[CurrentPlayer].Strings[0]);
if (StartXPtillNext = -1) then
begin
done := False;
fails := fails+1;
end;
StartXP := GetXPBar(Players[CurrentPlayer].Integers[1]);
if (StartXP = -1) then
begin
done := False;
fails := fails+1;
end;
if (fails = 5) then
begin
Writeln(CurrentTime+' Startup fail. Cant get level/read xps.');
Exit;
end;
until done
LastXP := 0;
WorldHops := 0;
DoReport := True;

ClearDebug;
WriteLn('[=================ChaosMossKiller_'+Version+'==================]');
WriteLn('');
Writeln(' Trained level : ' +IntToStr(TrainedLevel));
Writeln(' XP till next : ' +IntToStr(StartXPtillNext));
Writeln(' XP Bar : ' +IntToStr(StartXP));
WriteLn(' Starting script...');
WriteLn('');
WriteLn('[=======================================================]');

MarkTime(starttime);
SetAngle(SRL_ANGLE_HIGH);
while (LoggedIn) do
begin
repeat until SmartEnabled

done:=False;
MarkTime(detectTime);
repeat //looking for Mosses
if (TimeFromMark(detectTime)>180000) then
begin
Writeln(CurrentTime+' Cant find monsters.');
Exit;
end;
Status('Looking for Moss.');

GetMousePos(xpos,ypos); //we store the last mouse pos, so if the Moss is close to it, we will left click, otherwise right click
X := MSCX;
Y := MSCY;

if FindObjTPAMulti(X,Y,[3298673,1582635,1450792,2446413,3167827],7,-1,60,60,40,['ttack M']) then
begin
Status('Attacking Moss.');
if (abs(x-xpos)<100) and (abs(y-ypos)<100) then
begin
Mouse(x,y,3,3,mouse_left); //left click
Wait(1000);
end
else
begin
Mouse(x,y,3,3,mouse_right); //right click
ChooseOption('ttack');
Wait(1000);
end;

MarkTime(greenbarTime);
greenbarDTM:= DTMFromString('mbQAAAHicY2VgYJBmZGCQAGIxIBYHYikgngMUn8kAoedD8exTQEIDCasxMPAzYGJGLBgMAKR9Bec=');
repeat
if FindDTM(greenbarDTM,x,y,MSX1,MSY1,MSX2,MSY2) then //if green bar pop ups, we managed to attack Moss
begin
Status('We are fighting.');
done:=True;
end;
until done or (TimeFromMark(greenbarTime)>1700)
FreeDTM(greenbarDTM);
end
else //if cant find Moss
begin
if (DoChecks = False) then Exit;
RotateCam; //rotating camera for better view
end;

until done //done = we are fighting



redbarDTM:= DTMFromString('mWAAAAHicY2FgYOBjZGDgAmJOKH0IKHYAiA8D8TEg3sfBwmDNzgTHrEAxZMyIhkEAABsyBO0=');
done := False;
MarkTime(redbarTime);
repeat //now looking for redbar (end of fight)
Wait(250);
Antiban;
if (TimeFromMark(redbarTime) > Players[CurrentPlayer].Integers[0]) then
begin
Status('No redbar found, time is up.');
done := True;
end
else if FindDTM(redbarDTM,x,y,MSX1,MSY1,MSX2,MSY2) then //if found redbar
begin
Status('Killed Moss. Took '+MsToTime(TimeFromMark(redbarTime),Time_Formal)+'.');
done := True;
end;
until done //done = we killed the Moss
FreeDTM(redbarDTM);


if DoReport then //Reporting gets turned off once it fails to read the XPBar for 5 times
Report;
Wait(4000); //have to wait a bit to prevent clicking on the dying Moss again

if (DoChecks = False) then Exit;

end;
end;



procedure SetupScript;
begin
Disguise('ChaosMossKiller_'+Version);
Status('Starting up.');
Smart_Server := 10;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := True;
SetupSRL;
DeclarePlayers;
ActivateClient;
ClearDebug;
if not SmartEnabled then
SmartSetEnabled(true);

if not LoggedIn then
LoginPlayer;
end;





begin
SetupScript;
Main;

MakeScreenShot(Players[0].Strings[2]+'stops\');
Writeln(CurrentTime+' Script stopped.');
Disguise('Stopped');

end.

program ChaosMossKiller;
{$i srl/srl/misc/smart.simba}
{$i srl/srl.simba}
{$i srl/srl/misc/debug.simba}

procedure DeclarePlayers;
begin
NumberOfPlayers(1);
CurrentPlayer := 0;
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
//========================ChaosMossKiller by hunt3rx3=======================v5.0
//NOTES: ================================================================1 April
//=======*YOU MUST SET UP XPBAR FOR TRAINED LEVEL!==============================
//=======*DONT USE B2P WITH BONECRUSHER!========================================
//=======*CHARM LOOTER WORKS WELL ONLY WITH BONECRUSHER!========================
//=======*ONLY EATS LOBSTERS!===================================================
//==============================================================================
with Players[0] do
begin
Name := ''; //USERNAME
Pass := ''; //PASSWORD

Strings[0] := 'Strength'; //WHAT U TRAINING: Attack, Strength, Defence (this is only for reports, u have to set attack style urself)
Integers[0] := 2; //TRAINED LEVEL XPBAR: 1,2,3
Integers[1] := 20000; //FAILSAFE: THIS IS THE TIME FOR KILLING ONE MOSS GIANT (miliseconds)
Integers[2] := 600; //EAT AT: 100-999
BoxRewards := ['amp']; //RANDOM REWARD
LampSkill := SKILL_RANGE; //USE LAMP ON
Booleans[0] := True; //BONES TO PEACHES: True, False
Booleans[1] := True; //PICK UP CHARMS: True, False (NOTE: it works well with bonecrusher only, cause its hard to detect charms when they are covered with bones)
Booleans[2] := True; //TAKING SCREENSHOTS: True, False
Strings[2] := 'C:\Simba\Screenshots\ChaosMossKiller\'; //PATH FOR CREATING SCREENSHOTS (~100 kb, jpeg)
end;
//==============================================================================
//===========UPDATES: [url]http://villavu.com/forum/showthread.php?t=74029===========[/url]
//==============================================================================
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Players[CurrentPlayer].Active:=True;
end;



var
X, Y : Integer;
StartTime, StartXp, StartXPtillNext, TrainedLevel, WorldHops : Integer;
LastXP : Extended;
GoldCharms, GreenCharms, BlueCharms, CrimsonCharms : Integer;
DoReport, B2P : Boolean;



const
Version = 'v5.0';
DebugMode = False;



procedure MakeScreenShot(const FilePath : String); //example: 'C:\Simba\Screenshots\ChaosMossKiller\levelups'
var
fileName : String;
Year, Month, Day : Word;
i : Integer;
begin
if (Players[0].Booleans[2] = False) then //if screenshots are off
Exit;
if not DirectoryExists(FilePath) then
CreateDirectory(FilePath);
DecodeDate(Date,Year,Month,Day);
i := 0;
repeat
i := i+1;
fileName := ToStr(Year)+'-'+ToStr(Month)+'-'+ToStr(Day)+' ('+IntToStr(i)+')';
until not FileExists(FilePath+FileName+'.jpg')
SaveScreenShot(FilePath+FileName+'.jpg'); //example: 2012-3-21 (1).jpg
end;



function CurrentTime: string;
var
hour, mins, sec, mSec: Word;
begin
DecodeTime(Now, hour, mins, sec, mSec);
Result := ('['+Padz(IntToStr(hour), 2) + ':' + Padz(IntToStr(mins), 2) + ':' + Padz(IntToStr(sec), 2)+']');
end;



procedure RotateCam;
begin
ActivateClient;
case Random(2) of
0:begin
Wait(100 + random(50));
KeyDown(VK_RIGHT);
Wait(500 + random(1000));
KeyUp(VK_RIGHT);
Wait(500 + random(1000));
end;
1:begin
Wait(100 + random(50));
KeyDown(VK_LEFT);
Wait(500 + random(1000));
KeyUp(VK_LEFT);
Wait(500 + random(1000));
end;
end;
end;



procedure Report;
var
levelString : String;
xP, xPHour, prayXP, xPtillNext, timeRun : Extended; //i have no clue why, but integer with Round() wont work
done : Boolean;
fails : Integer;
begin

if (Players[CurrentPlayer].Strings[0] = 'Attack') then levelString:= 'ATK';
if (Players[CurrentPlayer].Strings[0] = 'Strength') then levelString:= 'STR';
if (Players[CurrentPlayer].Strings[0] = 'Defence') then levelString:= 'DEF';

fails := 0;
done := True;
repeat //reading xpbar for xp gained
if (fails = 5) then
begin
Writeln(CurrentTime+' Failed to read XPBar. Turning off Reporting.');
DoReport := False;
Exit;
end;
xP := GetXPBar(Players[CurrentPlayer].Integers[0])-StartXP;
if (xP + StartXP = -1) then //if fails to read xpbar it gives -1
begin
done := False;
fails := fails+1;
end;
until done

timeRun:=TimeFromMark(StartTime);
prayXP := Round(xP/240*15);
xPHour := Round(XP * (3600000/TimeRun));
xPtillNext := StartXPtillNext - xP + LastXP; //LastXP = 0 untill we get a levelup

if xPtillNext < 0 then //levelup check
begin

fails := 0;
done := True;
repeat //getting new level and xp till next
if (fails = 5) then
begin
Writeln(CurrentTime+' Failed to get level/XPs. Turning off Reporting.');
DoReport := False;
Exit;
end;
TrainedLevel := GetSkillLevel(Players[CurrentPlayer].Strings[0]);
if (TrainedLevel = -1) then //if fails to get level it gives -1
begin
done := False;
fails := fails+1;
end;
StartXPtillNext := XPTillNextLevel(Players[CurrentPlayer].Strings[0]);
if (StartXPtillNext = -1) then //if fails to read xp it gives -1
begin
done := False;
fails := fails+1;
end;
until done

xPtillNext := StartXPtillNext;
LastXP := Round(xP); //we store the 'xp gained till now' (round is needed cause extended and integer)
Wait(RandomRange(3000,5000));
MakeScreenShot(Players[0].Strings[2]+'levelups\'); //this will make a screenshot :)
end;

Disguise('ChaosMossKiller ['+FloatToStr(XPHour)+']');

ClearDebug;
WriteLn('[=================ChaosMossKiller_'+Version+'==================]');
WriteLn(' Time Running : ' + MsToTime(Round(timeRun),Time_Formal));
WriteLn(' '+levelString+' XP Per Hour : ' + FloatToStr(xPHour));
WriteLn(' '+levelString+' XP Gained : ' + FloatToStr(xP));
Writeln(' '+levelString+' Level : ' + IntToStr(TrainedLevel));
Writeln(' XP till next lvl : ' + FloatToStr(xPtillNext));
if (Players[CurrentPlayer].Booleans[1] = True) then //charms or worldhops
Writeln(' Charms : ' + IntToStr(GoldCharms) + '/' + IntToStr(GreenCharms) + '/' + IntToStr(BlueCharms) + '/' + IntToStr(CrimsonCharms))
else
Writeln(' WorldHops : ' + IntToStr(WorldHops));
WriteLn('[=======================================================]');
end;



procedure Antiban;
begin
case Random(1400) of
1:
begin
Status('Checking trained level.');
TrainedLevel := GetSkillLevel(Players[CurrentPlayer].Strings[0]);
HoverSkill(Players[CurrentPlayer].Strings[0],false);
Wait(RandomRange(3000,4000));
GameTab(tab_Inv);
Status('Back to fighting.');
end;
2:
begin
Status('Checking hp level.');
TrainedLevel := GetSkillLevel(Players[CurrentPlayer].Strings[0]);
HoverSkill(SKILL_HITPOINTS,false);
Wait(RandomRange(3000,4000));
GameTab(tab_Inv);
Status('Back to fighting.');
end;
3:
begin
Status('Checking random level.');
TrainedLevel := GetSkillLevel(Players[CurrentPlayer].Strings[0]);
HoverSkill('random',false);
Wait(RandomRange(3000,4000));
GameTab(tab_Inv);
Status('Back to fighting.');
end;
4:
begin
Status('Picking up mouse.');
PickUpMouse;
Status('Back to fighting.');
end;
5..10:
begin
Status('Rotating camera.');
RotateCam;
Status('Back to fighting.');
end;
180..190:
begin
Status('Moving mouse.');
SleepAndMoveMouse(1000 + random(200));
Status('Back to fighting.');
end;
end;
end;



function BreakB2P : Boolean;
var
tab : Integer;
fails : Integer;
done : Boolean;
begin
tab := DTMFromString('78DA633CCCC4C070899101194CEEED655006D23051C64B4035A751D530303061AAB94540CD11A09A0704D46C07AAB947849A9BA86A92E3E351D56C03AA398BDF1C007BAC0F1B');
if not (GetCurrentTab = tab_Inv) then
GameTab(tab_Inv);
Wait(RandomRange(200,400));

fails := 0;
done := False;
repeat
if FindDTM(tab, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(X,Y,5,5,mouse_left); //clickig on B2P tab
Wait(RandomRange(6000,8000)); //it takes long to break it
Result := True;
done := True;
end else

begin
if not (GetCurrentTab = tab_Inv) then //sometimes it fails to switch tabs for the first time
GameTab(tab_Inv);
fails := fails+1;
end;

if (fails = 5) then //trying to find DTM 5 times max
begin
Result := False;
done := True;
end;
until done

FreeDTM(tab);

end;



function Eat(var foodDTMString : String): boolean;
var
foodDTM, fails : Integer;
done : Boolean;
ColorString : String; //this is for a return value, not using it
begin
foodDTM := DTMFromString(foodDTMString);
if not (GetCurrentTab = tab_Inv) then
GameTab(tab_Inv);
Wait(RandomRange(200,400));

fails := 0;
done := False;
repeat
if FindDTM(foodDTM, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
repeat
Mouse(X,Y,5,5,mouse_left);
Wait(RandomRange(2000,3000));
if (GetMMLevels('hp', ColorString) > Players[CurrentPlayer].Integers[2]) then
begin //checking if HP is increased
done := True;
Result := True;
end;
until done
done := True;
end else

begin
if not (GetCurrentTab = tab_Inv) then //sometimes it fails to switch tabs for the first time
GameTab(tab_Inv);
fails := fails+1;
end;

if (fails = 5) then //trying to find DTM 5 times max
begin
Result := False;
done := True;
end;
until done

FreeDTM(foodDTM);

end;



function FindMoss : Boolean;
var
TPA1, TPA2, TPA3, TPA4, TPA12, TPA34, TPA : TPointArray;
ATPA : Array of TPointArray;
i, xmid, ymid : Integer;
begin

FindColorsTolerance(TPA1,3823447,MSX1+10,MSY1+10,MSX2-10,MSY2,14);
FindColorsTolerance(TPA2,5665130,MSX1+10,MSY1+10,MSX2-10,MSY2,8);
FindColorsTolerance(TPA3,2375742,MSX1+10,MSY1+10,MSX2-10,MSY2,9);
FindColorsTolerance(TPA4,2179404,MSX1+10,MSY1+10,MSX2-10,MSY2,8);

TPA12 := CombineTPA(TPA1, TPA2);
TPA34 := CombineTPA(TPA3, TPA4);
TPA := CombineTPA(TPA12, TPA34); //final TPA

SortTPAFrom(TPA,Point(MSCX,MSCY)); //sorting points, first point is the closest to middle
InvertTPA(TPA); //inverting, last point is the closest to middle
for i:=0 to High(TPA) do
if (Abs(TPA[i].x - MSCX) < 30) and (Abs(TPA[i].y - MSCY) < 30) then //finding the first point which is less than 30 pixel distance from middle
Break;
SetArrayLength(TPA,i); //excluding points near middle

if (High(TPA)> 0) then
begin
ATPA := SplitTPA(TPA,10); //splitting TPAs
SortATPASize(ATPA,True); //sorting TPAs, first is the biggest
for i:=0 to High(ATPA) do
begin
if High(ATPA[i]) < 300 then //finding the first TPA with less than 300 points
Break;
end;
SetArrayLength(ATPA,i); //excluding TPAs with less than 300 points
SortATPAFromFirstPoint(ATPA,Point(MSCX,MSCY)); //sorting TPAs, first is closest to middle
if DebugMode then
begin
ClearDebug;
for i:=0 to High(ATPA) do
Writeln(IntToStr(High(ATPA[i])));
DebugATPABounds(ATPA);
end;

if High(ATPA) = -1 then //sometimes sorting fails and we get -1 as return value
Exit;

if MiddleTPAEx(ATPA[0],xmid,ymid) then //getting the middle point of the TPA
begin
MMouse(xmid,ymid,0,0);
Wait(100);
if IsUpTextEx('ttack') or IsUpText('ttack') or IsUpTextRe('ttack') then //3 different methods to get uptexts
begin
Result := True;
GetMousePos(X,Y); //return values
Exit;
end;
end;
end;

Result := False;
end;



function FindBones : Boolean;
var

TPA1, TPA2, TPA : TPointArray;
ATPA : Array of TPointArray;
i : Integer;
xmid, ymid : Integer;
begin

FindColorsTolerance(TPA1,11975103,MSX1+10,MSY1+10,MSX2-10,MSY2,25);
FindColorsTolerance(TPA2,11975103,MSX1+10,MSY1+10,MSX2-10,MSY2,25);

TPA := CombineTPA(TPA1, TPA2); //final TPA

SortTPAFrom(TPA,Point(MSCX,MSCY)); //sorting points, first point is the closest to middle
InvertTPA(TPA); //inverting, last point is the closest to middle
for i:=0 to High(TPA) do
if (Abs(TPA[i].x - MSCX) < 30) and (Abs(TPA[i].y - MSCY) < 30) then //finding the first point which is less than 30 pixel distance to middle
Break;
SetArrayLength(TPA,i); //excluding the rest

if (High(TPA)> 0) then
begin

ATPA := SplitTPA(TPA,10); //splitting TPAs
SortATPASize(ATPA,True); //sorting TPAs, first is the biggest
for i:=0 to High(ATPA) do
begin
if High(ATPA[i]) < 100 then break; //finding the first TPA with less than 100 points
end;
SetArrayLength(ATPA,i); //excluding TPAs with less than 100 points
SortATPAFromFirstPoint(ATPA,Point(MSCX,MSCY)); //sorting TPAs, first is closest to middle
if DebugMode then
DebugATPABounds(ATPA);
SetArrayLength(ATPA,1);

if High(ATPA) = -1 then //sometimes sorting fails and we get -1 as return value
Exit;

if MiddleTPAEx(ATPA[0],xmid,ymid) then //getting the middle point of the TPA
begin
MMouse(xmid,ymid,0,0);
Wait(100);
if IsUpTextEx('ake') or IsUpText('ake') or IsUpTextRe('ake') then //3 different methods to get uptexts
begin
Result := True;
GetMousePos(X,Y); //return values
Exit;
end;
end;
end;

Result := False;

end;



function FindGoldCharm : Boolean;
var
TPA1, TPA2, TPA3, TPA4, TPA12, TPA34, TPA : TPointArray;
ATPA : Array of TPointArray;
i : Integer;
xmid, ymid : Integer;
begin

FindColorsTolerance(TPA1,5802395,MSX1+10,MSY1+10,MSX2-30,MSY2,25);
FindColorsTolerance(TPA2,6397612,MSX1+10,MSY1+10,MSX2-30,MSY2,25);
FindColorsTolerance(TPA3,5802395,MSX1+10,MSY1+10,MSX2-30,MSY2,25);
FindColorsTolerance(TPA4,5803931,MSX1+10,MSY1+10,MSX2-30,MSY2,25);

TPA12 := CombineTPA(TPA1,TPA2);
TPA34 := CombineTPA(TPA3,TPA4);
TPA := CombineTPA(TPA12,TPA34);

SortTPAFrom(TPA,Point(MSCX,MSCY)); //sorting points, first point is the closest to middle
InvertTPA(TPA); //inverting, last point is the closest to middle
for i:=0 to High(TPA) do
if (Abs(TPA[i].x - MSCX) < 30) and (Abs(TPA[i].y - MSCY) < 30) then //finding the first point which is less than 30 pixel distance to middle
Break;
SetArrayLength(TPA,i); //excluding the rest


if (High(TPA)> 0) then
begin
ATPA := SplitTPA(TPA,15);
SortATPASize(ATPA,True);
if DebugMode then
begin
DebugATPABounds(ATPA);
Writeln('Gold charm (30)');
for i:=0 to High(ATPA) do
Writeln(IntToStr(High(ATPA[i]))); //listing the sizes of the TPAs in the array
end;

for i:=0 to High(ATPA) do
begin
if (High(ATPA[i]) < 30) then break; //excluding TPAs (less than 30 points)
end;
SetArrayLength(ATPA,i); //done
SortATPAFromFirstPoint(ATPA,Point(MSCX,MSCY));
if DebugMode then //debug
DebugATPABounds(ATPA);
SetArrayLength(ATPA,1); //closest TPA

if High(ATPA) = -1 then //its -1 if failed with something
Exit;

if MiddleTPAEx(ATPA[0],xmid,ymid) then
begin
MMouse(xmid,ymid,0,0);
Wait(100);
if IsUpTextEx('ake') or IsUpText('ake') or IsUpTextRe('ake') then
begin
Result := True;
GetMousePos(X,Y);
Exit;
end;
end;
end;

Result := False;

end;



function FindGreenCharm : Boolean;
var
TPA1, TPA2, TPA3, TPA4, TPA12, TPA34, TPA : TPointArray;
ATPA : Array of TPointArray;
i : Integer;
xmid, ymid : Integer;
begin

FindColorsTolerance(TPA1,9019285,MSX1+10,MSY1+10,MSX2-10,MSY2,10);
FindColorsTolerance(TPA2,8492683,MSX1+10,MSY1+10,MSX2-10,MSY2,10);
FindColorsTolerance(TPA3,8295302,MSX1+10,MSY1+10,MSX2-10,MSY2,10);
FindColorsTolerance(TPA4,9019285,MSX1+10,MSY1+10,MSX2-10,MSY2,3);

TPA12 := CombineTPA(TPA1,TPA2);
TPA34 := CombineTPA(TPA3,TPA4);
TPA := CombineTPA(TPA12,TPA34);

SortTPAFrom(TPA,Point(MSCX,MSCY)); //sorting points, first point is the closest to middle
InvertTPA(TPA); //inverting, last point is the closest to middle
for i:=0 to High(TPA) do
if (Abs(TPA[i].x - MSCX) < 30) and (Abs(TPA[i].y - MSCY) < 30) then //finding the first point which is less than 30 pixel distance to middle
Break;
SetArrayLength(TPA,i); //excluding the rest


if (High(TPA)> 0) then
begin
ATPA := SplitTPA(TPA,15);
SortATPASize(ATPA,True);
if DebugMode then
begin
DebugATPABounds(ATPA);
Writeln('Green charm (22)');
for i:=0 to High(ATPA) do
Writeln(IntToStr(High(ATPA[i]))); //listing the sizes of the TPAs in the array
end;

for i:=0 to High(ATPA) do
begin
if (High(ATPA[i]) < 22) then break; //excluding TPAs (less than 22 points)
end;
SetArrayLength(ATPA,i); //done
SortATPAFromFirstPoint(ATPA,Point(MSCX,MSCY));
if DebugMode then //debug
DebugATPABounds(ATPA);
SetArrayLength(ATPA,1); //closest TPA

if High(ATPA) = -1 then //its -1 if failed with something
Exit;

if MiddleTPAEx(ATPA[0],xmid,ymid) then
begin
MMouse(xmid,ymid,0,0);
Wait(100);
if IsUpTextEx('ake') or IsUpText('ake') or IsUpTextRe('ake') then
begin
Result := True;
GetMousePos(X,Y);
Exit;
end;
end;
end;

Result := False;

end;



function FindBlueCharm : Boolean;
var
TPA1, TPA2, TPA3, TPA4, TPA12, TPA34, TPA : TPointArray;
ATPA : Array of TPointArray;
i : Integer;
xmid, ymid : Integer;
begin

FindColorsTolerance(TPA1,10330764,MSX1+10,MSY1+10,MSX2-10,MSY2,10);
FindColorsTolerance(TPA2,9276254,MSX1+10,MSY1+10,MSX2-10,MSY2,10);
FindColorsTolerance(TPA3,8947019,MSX1+10,MSY1+10,MSX2-10,MSY2,10);
FindColorsTolerance(TPA4,6381098,MSX1+10,MSY1+10,MSX2-10,MSY2,10);

TPA12 := CombineTPA(TPA1,TPA2);
TPA34 := CombineTPA(TPA3,TPA4);
TPA := CombineTPA(TPA12,TPA34);

SortTPAFrom(TPA,Point(MSCX,MSCY)); //sorting points, first point is the closest to middle
InvertTPA(TPA); //inverting, last point is the closest to middle
for i:=0 to High(TPA) do
if (Abs(TPA[i].x - MSCX) < 30) and (Abs(TPA[i].y - MSCY) < 30) then //finding the first point which is less than 30 pixel distance to middle
Break;
SetArrayLength(TPA,i); //excluding the rest


if (High(TPA)> 0) then
begin
ATPA := SplitTPA(TPA,15);
SortATPASize(ATPA,True);
if DebugMode then
begin
DebugATPABounds(ATPA);
Writeln('Blue charm (15)');
for i:=0 to High(ATPA) do
Writeln(IntToStr(High(ATPA[i]))); //listing the sizes of the TPAs in the array
end;

for i:=0 to High(ATPA) do
begin
if (High(ATPA[i]) < 15) then break; //excluding TPAs (less than 15 points)
end;
SetArrayLength(ATPA,i); //done
SortATPAFromFirstPoint(ATPA,Point(MSCX,MSCY));
if DebugMode then //debug
DebugATPABounds(ATPA);
SetArrayLength(ATPA,1); //closest TPA

if High(ATPA) = -1 then //its -1 if failed with something
Exit;

if MiddleTPAEx(ATPA[0],xmid,ymid) then
begin
MMouse(xmid,ymid,0,0);
Wait(100);
if IsUpTextEx('ake') or IsUpText('ake') or IsUpTextRe('ake') then
begin
Result := True;
GetMousePos(X,Y);
Exit;
end;
end;
end;

Result := False;

end;



function FindCrimsonCharm : Boolean;
var
TPA1, TPA2, TPA3, TPA4, TPA12, TPA34, TPA : TPointArray;
ATPA : Array of TPointArray;
i : Integer;
xmid, ymid : Integer;
begin

FindColorsTolerance(TPA1,2435707,MSX1+10,MSY1+10,MSX2-10,MSY2,5);
FindColorsTolerance(TPA2,3098221,MSX1+10,MSY1+10,MSX2-10,MSY2,5);
FindColorsTolerance(TPA3,3094893,MSX1+10,MSY1+10,MSX2-10,MSY2,5);
FindColorsTolerance(TPA4,3099757,MSX1+10,MSY1+10,MSX2-10,MSY2,5);

TPA12 := CombineTPA(TPA1,TPA2);
TPA34 := CombineTPA(TPA3,TPA4);
TPA := CombineTPA(TPA12,TPA34);

SortTPAFrom(TPA,Point(MSCX,MSCY)); //sorting points, first point is the closest to middle
InvertTPA(TPA); //inverting, last point is the closest to middle
for i:=0 to High(TPA) do
if (Abs(TPA[i].x - MSCX) < 30) and (Abs(TPA[i].y - MSCY) < 30) then //finding the first point which is less than 30 pixel distance to middle
Break;
SetArrayLength(TPA,i); //excluding the rest


if (High(TPA)> 0) then
begin
ATPA := SplitTPA(TPA,15);
SortATPASize(ATPA,True);
if DebugMode then
begin
DebugATPABounds(ATPA);
Writeln('Crimson charm (15)');
for i:=0 to High(ATPA) do
Writeln(IntToStr(High(ATPA[i]))); //listing the sizes of the TPAs in the array
end;

for i:=0 to High(ATPA) do
begin
if (High(ATPA[i]) < 15) then break; //excluding TPAs (less than 15 points)
end;
SetArrayLength(ATPA,i); //done
SortATPAFromFirstPoint(ATPA,Point(MSCX,MSCY));
if DebugMode then //debug
DebugATPABounds(ATPA);
SetArrayLength(ATPA,1); //closest TPA

if High(ATPA) = -1 then //its -1 if failed with something
Exit;

if MiddleTPAEx(ATPA[0],xmid,ymid) then
begin
MMouse(xmid,ymid,0,0);
Wait(100);
if IsUpTextEx('ake') or IsUpText('ake') or IsUpTextRe('ake') then
begin
Result := True;
GetMousePos(X,Y);
Exit;
end;
end;
end;

Result := False;

end;



function HopWorld : Boolean;
var
failTime : Integer;
begin
Status('Hopping.');
WorldHops := WorldHops+1;

ExitToLobby;

MarkTime(failTime);
repeat
if TimeFromMark(failTime)>30000 then
begin
Writeln(CurrentTime+' Failed to exit to lobby when hopping.'); //sometimes RS crashes when going to lobby (black screen)
Result := False;
Exit;
end;
until LobbyScreen;

OpenWorldScreen;
SelectWorld(RandomWorld(true,false)); //member world, not pvp

LoginPlayer;

MarkTime(failTime);
repeat
if TimeFromMark(failTime)>60000 then
begin
Writeln(CurrentTime+' Failed to login after hopping.'); //sometimes RS crashes at login (black screen)
Result := False;
Exit;
end;
until LoggedIn

Wait(RandomRange(3000,6000));
ToggleXPBar(true);
SetAngle(SRL_ANGLE_HIGH);
Result := True;
end;



procedure LoginCheck;
begin
Status('Login check.');
if not LoggedIn then
begin
Writeln(CurrentTime+' We got logged out somehow.'); //this script wont login after disconnect
TerminateScript;
end;
end;



function DoChecks : Boolean;
var
lobs : String;
peaches : String;
ColorString : String;
begin
LoginCheck;

Status('Looking for randoms.');
FindNormalRandoms;

Status('Looking for noobs.')
if Length(GetMinimapDotsin('player',610,68,648,102)) > 0 then
begin
Status('Found a noob.');
MakeScreenShot('C:\Simba\Screenshots\ChaosMossKiller\noobs\');
DisGuise('Hopping');
Wait(RandomRange(5000,10000));
if (HopWorld = False) then
Exit;
end;

Status('Checking HP.');
if (GetMMLevels('hp', ColorString) < Players[CurrentPlayer].Integers[2]) then
begin
if not B2P then //if not using B2P yet then we eat simple food
begin
Status('Eating.');
lobs := 'mggAAAHicY2NgYPjPxMDAzczAwMcMYX8E4p9ALMbIwMAKxNxArMAI4fMC8f4EGaAuJgwsAiSxYUYcGAIAcgoGSA==';
if not Eat(lobs) then
begin //if out of food
if not (Players[0].Booleans[0]) then //if not using B2P, then we log out
begin
Result := False;
Exit;
end else
B2P := True; //lets start using B2P
end;
end;
if B2P then
begin
Status('Eating peaches.');
peaches := '78DA632C60626070626440069B3B52194480344C94310FA8C60C550D030313AA9A32A01A0B026A6A806A1C08A8A906AA7127A006E4663F026A52883007A4C69E809A4CC2FE0200D76708C1'
if not Eat(peaches) then //if out of peaches
begin
Status('Breaking B2P.');
if not BreakB2P then //if out of tablets
begin
Writeln(CurrentTime+' Out of B2P tablets.');
Result := False;
Exit;
end;
if not Eat(peaches) then //if broke tablet but cant see peaches
begin
Writeln(CurrentTime+' Failed to eat peaches.');
Result := False;
Exit;
end;
end;
end;
if (GetMMLevels('hp', ColorString) < Players[CurrentPlayer].Integers[2]) then
begin
Writeln(CurrentTime+' Failed to get hp up..');
Result := False;
Exit;
end;
end;


if (Players[0].Booleans[0]) then
begin //if using B2P then we need to collect bones
if not InvFull then
begin
if FindBones then
begin
Status('Picking up bones.');
Mouse(X,Y,0,0,mouse_right);
ChooseOption('ake Big');
Wait(1000);
repeat until not IsMoving //waits till we stopped moving
Wait(500);
end;
end;
end;


if (Players[0].Booleans[1]) then //if charms enabled
begin
Status('Looking for charms');
if FindGoldCharm then
begin
Status('Picking up gold charm.');
Mouse(X,Y,0,0,mouse_right);
if ChooseOption('ake Go') then
begin
GoldCharms := GoldCharms + 1;
Wait(1000);
repeat until not IsMoving //waits till we stopped moving
Wait(500);
end;
end;
if FindGreenCharm then
begin
Status('Picking up green charm.');
Mouse(X,Y,0,0,mouse_right);
if ChooseOption('ake Gre') then
begin
GreenCharms := GreenCharms + 1;
Wait(1000);
repeat until not IsMoving //waits till we stopped moving
Wait(500);
end;
end;
if FindBlueCharm then
begin
Status('Picking up blue charm.');
Mouse(X,Y,0,0,mouse_right);
if ChooseOption('ake Bl') then
begin
BlueCharms := BlueCharms + 1;
Wait(1000);
repeat until not IsMoving //waits till we stopped moving
Wait(500);
end;
end;
if FindCrimsonCharm then
begin
Status('Picking up crimson charm.');
Mouse(X,Y,0,0,mouse_right);
if ChooseOption('ake Cr') then
begin
CrimsonCharms := CrimsonCharms + 1;
Wait(1000);
repeat until not IsMoving //waits till we stopped moving
Wait(500);
end;
end;
end;
Result := True;

end;



procedure SetupScript;
begin
Disguise('ChaosMossKiller');
Status('Starting script.');
Smart_Server := 10;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := True;
SetupSRL;
if not SmartActive then
TerminateScript;
DeclarePlayers;
ActivateClient;
ClearDebug;
//if not SmartEnabled then //this is for SMART 7.0
//SmartSetEnabled(true);
repeat
LoginPlayer;
until LoggedIn;
Wait(2000);
end;



procedure Startup;
var
fails : Integer;
done : Boolean;
begin
Status('Collecting infos.');
fails := 0;
done := True;
repeat
TrainedLevel := GetSkillLevel(Players[CurrentPlayer].Strings[0]);
if (TrainedLevel = -1) then
begin
done := False;
fails := fails+1;
end;
StartXPtillNext := XPTillNextLevel(Players[CurrentPlayer].Strings[0]);
if (StartXPtillNext = -1) then
begin
done := False;
fails := fails+1;
end;
StartXP := GetXPBar(Players[CurrentPlayer].Integers[0]);
if (StartXP = -1) then
begin
done := False;
fails := fails+1;
end;
if (fails = 1) then
begin
Writeln(CurrentTime+' Startup fail. Cant get level/read xps.');
TerminateScript;
end;
until done
LastXP := 0;
WorldHops := 0;
if not DebugMode then
DoReport := True
else
DoReport := False;
B2P := False;
GoldCharms := 0;
GreenCharms := 0;
BlueCharms := 0;
CrimsonCharms := 0;

ClearDebug;
WriteLn('[=================ChaosMossKiller_'+Version+'==================]');
WriteLn('');
Writeln(' Trained level : ' +IntToStr(TrainedLevel));
Writeln(' XP till next : ' +IntToStr(StartXPtillNext));
Writeln(' XP Bar : ' +IntToStr(StartXP));
WriteLn(' Starting script...');
WriteLn('');
WriteLn('[=======================================================]');

MarkTime(starttime);
SetAngle(SRL_ANGLE_HIGH);
end;



procedure Main;
var
xpos, ypos : Integer;
redbarTime, greenbarTime, detectTime : Integer;
redbarDTM, greenbarDTM : Integer;
done : Boolean;
begin

Startup;

while (LoggedIn) do
begin
repeat until SmartEnabled

done:=False;
MarkTime(detectTime);
repeat //looking for Mosses
if (TimeFromMark(detectTime)>180000) then
begin
Writeln(CurrentTime+' Cant find monsters.');
Exit;
end;
LoginCheck; //login check
Status('Looking for Moss.');

GetMousePos(xpos,ypos); //we store the last mouse pos, so if the Moss is close to it, we will left click, otherwise right click
//X := MSCX;
//Y := MSCY;
//if FindObjTPAMulti(X,Y,[3298673,1582635,1450792,2446413,3167827],7,-1,60,60,40,['ttack M']) then
if FindMoss then
begin
Status('Attacking Moss.');
if (abs(x-xpos)<80) and (abs(y-ypos)<80) then
begin
Mouse(x,y,0,0,mouse_left); //left clicking if destination is close to mouse position (less than 80 pixel distance)
Wait(1000);
end
else
begin
Mouse(x,y,0,0,mouse_right); //right click
ChooseOption('ttack');
Wait(1000);
end;

MarkTime(greenbarTime);
greenbarDTM:= DTMFromString('mbQAAAHicY2VgYJBmZGCQAGIxIBYHYikgngMUn8kAoedD8exTQEIDCasxMPAzYGJGLBgMAKR9Bec=');
repeat
if FindDTM(greenbarDTM,x,y,MSX1,MSY1,MSX2,MSY2) then //if green bar pop ups, we managed to attack Moss
begin
Status('We are fighting.');
done:=True;
end;
until done or (TimeFromMark(greenbarTime)>1700)
FreeDTM(greenbarDTM);
end
else //if cant find Moss
begin
if (DoChecks = False) then Exit;
case Random(10) of
0: RotateCam; //rotating camera for better view
end;
end;

until done //done = we are fighting


redbarDTM:= DTMFromString('mWAAAAHicY2FgYOBjZGDgAmJOKH0IKHYAiA8D8TEg3sfBwmDNzgTHrEAxZMyIhkEAABsyBO0=');
done := False;
MarkTime(redbarTime);
repeat //now looking for redbar (end of fight)
Wait(250);
Antiban;
if (TimeFromMark(redbarTime) > Players[CurrentPlayer].Integers[1]) then
begin
Status('No redbar found, time is up.');
done := True;
end
else if FindDTM(redbarDTM,x,y,MSX1,MSY1,MSX2,MSY2) then //if found redbar
begin
Status('Killed Moss. Took '+MsToTime(TimeFromMark(redbarTime),Time_Formal)+'.');
done := True;
end;
until done //done = we killed the Moss
FreeDTM(redbarDTM);


if DoReport then //Reporting gets turned off once it fails to read the XPBar for 5 times
Report;
Wait(4000); //have to wait a bit to prevent clicking on the dying Moss again

if (DoChecks = False) then Exit;

end;
end;






begin

SetupScript;
Main;

MakeScreenShot(Players[0].Strings[2]+'stops\');
Writeln(CurrentTime+' Script stopped.');
Disguise('Stopped');

end.

EDIT: Script is updated, it uses TPAs for monster, bones and charms.

DemiseScythe

2012-03-22 15:59:04

Script looks alright and your seem to revise it often on your public script thread, your activity could be higher but you been here for 2+ Months so at least you are not a newcomer, good luck.

Sin

2012-03-22 16:03:40

I don't seem to see any TPAs, FindObj isn't the best way to go.
I also don't see any Radial Walk.



procedure RotateCam;
begin
ActivateClient;
case Random(2) of
0:begin
Wait(100 + random(50));
KeyDown(VK_RIGHT);
Wait(500 + random(1000));
KeyUp(VK_RIGHT);
Wait(500 + random(1000));
end;
1:begin
Wait(100 + random(50));
KeyDown(VK_LEFT);
Wait(500 + random(1000));
KeyUp(VK_LEFT);
Wait(500 + random(1000));
end;
end;
end
A simple MakeCompass shall do for that.
You're active, but not THAT active, it's a no from me this time, sorry.

'Toxin

2012-03-22 16:14:04

I consider 2 months still new-commer, and also, as Sin stated… I mainly look for other scripting methods using TPA's preferably isntead of findObj. You will see that many other members seem to vote against scripts that use findObj simply because of the simplicity of it, and the fact that it isn't AS reliable as a TPA can be, if used properly. So it's a no from me.

cause

2012-03-22 16:31:05

I liked the screenshot procedure, yes from me. For those who voted no because of activity:
Over 2 posts a day isn't active enough?

Sin

2012-03-22 16:32:39

I suddenly feel like a spammer.


But no, 2 posts/day isn't enough imho, it takes 5 posts to fill up the Activity bar…

cause

2012-03-22 16:39:32

I don't think forum activity should relate to spending more than a half hour a day on the forums, 18 posts a day is more than that…

Sabzi

2012-03-22 16:41:27

From: cause
I don't think forum activity should relate to spending more than a half hour a day on the forums, 18 posts a day is more than that…


This.

And yes.

Kyle Undefined

2012-03-22 16:42:33

Holding my vote, really don't know which way to go as of yet.

the flea

2012-03-22 20:24:24

I voted yes, your activity is enough for me to consider you being active.

Your script whilst not the best is still a decent script, You don't show any knowledge of TPA's but I didn't know TPA's when I got in so I wont hold that against you.
I like how you commented the code also not many people take the time to do this but I think it shows a good understanding.

Kyle Undefined

2012-03-23 09:54:38

Looked through your code, and your past posts, voted Yes.

EtherFreak

2012-03-24 22:59:47

Its a no from me for now. You havn't told us enough about you. I like to see at least a paragraph of information about each applicant.

BobboHobbo

2012-03-25 06:00:28

Im going towards no, your longevity isnt quite long enough. Im a strict bastard.

Shatterhand

2012-03-25 07:36:39

From: BobboHobbo
Im going towards no, your longevity isnt quite long enough. Im a strict bastard.

Great, I will wait two years till next apply. -.-

Shatterhand

2012-03-31 09:39:59

I have updated the script, it uses now TPAs.

Sin

2012-03-31 09:47:53

From: hunt3rx3
Great, I will wait two years till next apply. -.-


No need to show attitude.

Markus

2012-04-10 06:13:37

Hey, I'm sorry but it looks like you aren't getting in this time. I'm going to close this so you can reapply in 2 weeks, but you're on the right track though. Good luck! And be a bit nice ok? ;)