[============================================]
[ Draynor Hybrid 1.00 ]
[ by Camaro' ]
[============================================]
[ Time Running : 27 Minutes And 56 Seconds ]
[ Total Loads : 7 ]
[ Active Players : 3 ]
[ Anti Bans : 22 ]
[============================================]
[ Draynor Hybrid 1.00 ]
[============================================]
[===========================================================================]
[ Nick | Active | Player Loads | Current Level | Levels Gained | Type ]
[===========================================================================]
[ obz | True | 2 | 41 | 0 | FISH_BAIT ]
[ erb | True | 2 | 69 | 0 | WC_WILLOWS ]
[ obz | True | 3 | 39 | 0 | FISH_NET ]
[===========================================================================]
seems to work well with my changes.
program New;
{$DEFINE SMART}
{$DEFINE REFLECTION}
{$I SRL/SRL.scar}
{$I SRL/SRL/MISC/Reports.scar}
{$I Reflection/Reflection.simba}
{$I SRL\SRL\Misc\Stats.scar}
const
Debug = False;
Version = '1.06'; //Dont Touch
COLOR_WILLOW = 4481105;//Dont Touch
COLOR_FISH = 11248543;//Dont Touch
//Enjoy!
//All bugs should now be fixed! :)
var
Axe, Willow, Fish_Sardine, Fish_Herring, Fish_Rod, Fish_Net: Integer;
Bans, Loads, PLoads: Integer;
DoAction : String;
DraynorBankTile: TTile;
DraynorFishTile: TTile;
DraynorTreeTile: TTile;
procedure DeclarePlayers;
begin
HowManyPlayers := 3;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Stats_UserID := '';
Stats_Password := '';
with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
BoxRewards := ['Coins']; // Box Reward
Active := True; // Active ?
Strings[1] := 'FISH_BAIT'; //WC_WILLOWS or FISH_NET or FISH_BAIT
Integers[1] := 1; //Loads before switch/break
end;
with Players[1] do
begin
Name := '';
Pass := '';
Nick := '';
BoxRewards := ['Coins']; // Box Reward
Active := True; // Active ?
Strings[1] := 'WC_WILLOWS'; //WC_WILLOWS or FISH_NET or FISH_BAIT
Integers[1] := 1; //Loads before switch/break
end;
with Players[2] do
begin
Name := '';
Pass := '';
Nick := '';
BoxRewards := ['Coins']; // Box Reward
Active := True; // Active ?
Strings[1] := 'FISH_NET'; //WC_WILLOWS or FISH_NET or FISH_BAIT
Integers[1] := 1; //Loads before switch/break
end;
end;
procedure Write(S: String);
begin
if (Debug) then
Writeln(TheTime + ': '+S+'');
end;
procedure Antiban;
begin
if Random(20) = 11 then
begin
MMouse(Random(500), Random(500), 0, 0);
Inc(Bans);
Exit;
end;
if Random(25) = 11 then
begin
MakeCompass(RandomRange(20, 350));
Wait(1000 + Random(2000));
MakeCompass('n');
Inc(bans);
Exit;
end;
if Random(44) = 11 then
begin
if (DoAction = 'Willow') then
HoverSkill('Woodcutting', false)
else
HoverSkill('Fishing', False);
inc(bans);
Exit;
end;
end;
function GetObject(HueMod, SatMod: Extended; Color, X1, Y1, X2, Y2, Tolerance, W, H: Integer; Close, Big: Boolean; Uptexts: TStringArray): Boolean;
//Sort Type
//1 - TPAToATPA | 2 - SplitTPA
//Close = True will sort the ATPA closest from you, False = Furthest
//Big = SortATPASize(True);
var
TPA: TPointArray;
X, Y, I, A, CTS: Integer;
ATPA : T2DPointArray;
TB: TBox;
begin
if not LoggedIn then Exit;
if (DoAction = 'Fish_Net') or (DoAction = 'Fish_Bait')then
Write('Fishing...');
if (DoAction = 'Willow') then
Write('Chopping...');
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(HueMod, SatMod);
FindColorsTolerance(TPA, Color, X1, Y1, X2, Y2, Tolerance);
SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(CTS);
if (Length(TPA) < 1) then
begin
Result := False;
Write('Failed finding the correct object');
Exit;
end;
ATPA := TPAToATPAEx(TPA, W, H);
SortATPAFrom(ATPA, Point(MSCX, MSCY));
A := High(ATPA);
for I := 0 to A do
begin
MiddleTPAEx(ATPA[I], X, Y);
TB := GetTPABounds(ATPA[I]);
if (TB.X2 - TB.X1 >= W - 5) and (TB.Y2 - TB.Y1 >= H - 5) then
begin
MMouse(X, Y, 5, 5);
if WaitUpTextMulti(UpTexts, 125) then
begin
GetMousePos(X, Y);
If DoAction = 'Fish_Net' then
begin
Mouse(X, Y, 0, 0, True);
end;
If DoAction = 'Fish_Bait' then
begin
Mouse(X, Y, 0, 0, False);
WaitOption('ait', 125);
end;
If DoAction = 'Willow' then
begin
Mouse(X, Y, 0, 0, True);
end;
FFlag(0);
Wait(500 + Random(500));
FFlag(0);
Wait(500 + Random(500));
Result := True;
Write('Found Object');
Exit;
end;
end;
end;
end;
function FindObject(Obj: string): Boolean;
begin
case Obj of
'Willow': Result := GetObject(0.18, 0.28, COLOR_WILLOW, MSX1, MSY1, MSX2, MSY2, 14, 30, 30, True, True, ['ill', 'low']);//MSI's values
'Fish_Net': Result := GetObject(0.23, 0.36, COLOR_FISH, MSX1, MSY1, MSX2, MSY2, 8, 17, 17, True, True, ['et', 'ish']);//MSI's values
'Fish_Bait': Result := GetObject(0.23, 0.36, COLOR_FISH, MSX1, MSY1, MSX2, MSY2, 8, 17, 17, True, True, ['et', 'ish']);
end;
end;
function FindItemBL(Inv, Item: Integer): Boolean;
var
Outline, x, y, i, Tuna: Integer;
TB: TBox;
begin
TB := InvBox(Inv);
Outline := 0;
for x := TB.x1 to TB.x2 do
for y := TB.y1 to TB.y2 do
if(GetColor(x, y) = SRL_OUTLINE_BLACK)then
Inc(Outline);
Result := (Outline = Item);
end;
function FindItemSlotBL(Item: Integer): Integer;
var
I : Integer;
begin
for I := 1 to 28 do
begin
if (FindItemBL(I, Item)) then
begin
Result := (I);
Exit;
end;
end;
end;
function ClickBank: boolean;
var T : TTile;
I : Integer;
X, Y :integer;
begin
T := GetMyPos;
if (Distance(T.X, T.Y, DraynorBankTile.X, DraynorBankTile.Y) < 4) then
begin
I := Round(RS_GetCompassAngleDegrees);
if (not(InRange(I, 348, 360)) and (not(InRange(I, 0, 17))))then
ClickNorth(True);
MouseBox(216, 90, 237, 205, 3);
if WaitUpText('ank', 100) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
ChooseOption('uick');
Wait(1000 + Random(1000));
end;
end;
end;
function Bank: Boolean;
var T: Integer;
TB, TB2, TB3, TB4: Integer;
FS: Integer;
begin
if not InvFull then Exit;
if not LoggedIn then Exit;
FindNormalRandoms;
Marktime(T);
repeat
if (BankScreen) then
Break;
if (FS < 7) then
begin
if (not(ClickBank)) then
begin
Inc ( FS );
Wait(500 + Random(500));
Continue;
end else
begin
FFlag(0);
Wait(1000 + Random(1000));
if (BankScreen) then
Break;
end;
end else
begin
OpenBankQuiet('db');
FFlag(0);
Wait(1000 + Random(1000));
if (BankScreen) then
Break;
end;
until (TimeFromMark(T) > 120000)
if (TimeFromMark(T) > 120000) then
begin
Write('Bank failed');
Exit;
end;
if Players[CurrentPlayer].Strings[1] = 'FISH_NET' then
begin
TB := FindItemSlotBL(Fish_Net);
if (TB > 0) and (TB < 29) then
begin
MouseItem(TB, False);
if WaitOption('ll', 400) then
begin
Wait(1500 + Random(900));
TB := FindItemSlotBL(Fish_Net);
if (TB > 0) and (TB < 29) then
begin
MouseItem(TB, False);
if WaitOption('ll', 400) then
begin
Wait(1500 + Random(900));
Result := True;
Inc(PLoads);
Inc(Loads);
Inc(Players[CurrentPlayer].Integers[20]);
Inc(Stats_CustomVars[1]);
IncEx(Stats_CustomVars[3], 27)
if (Random(2) = 1) then CloseBank;
Exit;
end;
end;
end;
end;
end;
if Players[CurrentPlayer].Strings[1] = 'FISH_BAIT' then
begin
TB3 := FindItemSlotBL(Fish_Sardine);
if (TB3 > 0) and (TB3 < 29) then
begin
MouseItem(TB3, False);
if WaitOption('ll', 400) then
begin
Wait(1500 + Random(900));
TB4 := FindItemSlotBL(Fish_Herring);
if (TB4 > 0) and (TB4 < 29) then
begin
MouseItem(TB4, False);
if WaitOption('ll', 400) then
begin
Wait(1500 + Random(900));
Result := True;
Inc(PLoads);
Inc(Loads);
Inc(Players[CurrentPlayer].Integers[20]);
Inc(Stats_CustomVars[1]);
IncEx(Stats_CustomVars[3], 26)
if (Random(2) = 1) then CloseBank;
Exit;
end;
end;
end;
end;
end;
if Players[CurrentPlayer].Strings[1] = 'WC_WILLOWS' then
begin
TB2 := FindItemSlotBL(Willow);
if (TB2 > 0) and (TB2 < 29) then
begin
MouseItem(TB2, False);
if WaitOption('All', 400) then
begin
Wait(500 + Random(500));
Result := True;
Inc(PLoads);
Inc(Loads);
Inc(Players[CurrentPlayer].Integers[20]);
Inc(Stats_CustomVars[1]);
IncEx(Stats_CustomVars[2], 27);
if (Random(2) = 1) then CloseBank;
Exit;
end;
end;
end;
end;
function WalkToTrees: Boolean;
begin
if not LoggedIn then Exit;
Write('Walking to trees');
Result := WalkToTile(DraynorTreeTile, 2, 0);
if (not(Result)) then
begin
if (WalkToTile(DraynorBankTile, 0, 0)) then
Result := WalkToTile(DraynorTreeTile, 2, 0);
end;
FFlag(10);
while (IsMoving) do
Wait(200 + Random(200));
end;
function WalkToFish: Boolean;
begin
if not LoggedIn then Exit;
Write('Walking to fish');
Result := WalkToTile(DraynorFishTile, 2, 0);
if (not(Result)) then
begin
if (WalkToTile(DraynorBankTile, 0, 0)) then
Result := WalkToTile(DraynorFishTile, 2, 0);
end;
FFlag(10);
while (IsMoving) do
Wait(200 + Random(200));
end;
function WalkToBank: Boolean;
begin
if not LoggedIn then Exit;
Write('Walking to bank');
Result := WalkToTile(DraynorBankTile, 1, 0);
FFlag(16);
while (IsMoving) do
Wait(200 + Random(200));
end;
procedure TimerCheck;
begin
repeat
if (GetAnimation < 1) then
Break;
if (InvFull) then
Break;
Wait(750 + Random(1000));
if (Random(4) = 1) then
Antiban;
FindNormalRandoms;
until (False)
end;
procedure GetSkill(start: boolean);
begin
GameTab(TAB_STATS);
if (DoAction = 'Willow') then
begin
Players[CurrentPlayer].Integers[25] := GetSkillLevel('Woodcutting');
if (start) then
Players[CurrentPlayer].Integers[23] := GetSkillLevel('Woodcutting');
end;
if (DoAction = 'Fish_Net') or (DoAction = 'Fish_Bait') then
begin
Players[CurrentPlayer].Integers[25] := GetSkillLevel('Fishing');
if (start) then
Players[CurrentPlayer].Integers[23] := GetSkillLevel('Fishing');
end;
end;
procedure SetPlayer;
begin
MakeCompass('N');
SetAngle(True);
if (Players[CurrentPlayer].Strings[1] = 'WC_WILLOWS') then
DoAction := 'Willow';
if (Players[CurrentPlayer].Strings[1] = 'FISH_NET') then
DoAction := 'Fish_Net';
if (Players[CurrentPlayer].Strings[1] = 'FISH_BAIT') then
DoAction := 'Fish_Bait';
if (Players[CurrentPlayer].Integers[20] = 0) then
GetSkill(True)
else
GetSkill(False);
Players[CurrentPlayer].Integers[1] := Players[CurrentPlayer].Integers[1] + Random(3);
//Players[CurrentPlayer].Integers[1] := 1;
end;
{*******************************************************************************
procedure UpdateStats;
By: IceFire908.
Description: Updates all online stats with some insurance against huge invalid numbers.
*******************************************************************************}
procedure UpdateStats;
var
I: Byte;
begin
for I := 1 to 20 do
if (not (InRange(Stats_CustomVars[I], 0, 9999))) then
begin
WriteLn('********************** WARNING Stats_CustomVars[' + IntToStr(I) + '] := ' + IntToStr(Stats_CustomVars[I]) + '; is too large!');
Stats_CustomVars[I] := 0;
end;
SRLRandomsReport;
Stats_SendReport;
Stats_ManageAccounts;
end;
procedure Proggy;
var I : Integer;
begin
ClearDebug;
//int 20 = player loads
//int 25 = current level in wc/fish
//int 23 = start level in wc/ fish
//int 25 - int 23 = levels gained
//Loads amount of loads in all
//bans amount of antibans done
SRLProgressReport(ResultDebugBox, 'Draynor Hybrid', 'Camaro''', '1.00',
['Time Running', 'Total Loads', 'Active Players', 'Anti Bans'],
[TimeRunning, Loads, PlayersActive, Bans ]);
Players[CurrentPlayer].Integers[66] := (Players[CurrentPlayer].Integers[25] - Players[CurrentPlayer].Integers[23] );
SRLPlayerReport(
ResultDebugBox, 0, False,
[False, False, False, False, False, False],
['Player Loads', 'Current Level', 'Levels Gained', 'Type'],
[], [20, 25, 66], [1], []
);
UpdateStats;
end;
procedure ScriptTerminate;
begin
if LoggedIn then
GetSkill(False);
Proggy;
end;
procedure SetGlobals;
begin
Fish_Sardine := 44
Fish_Herring := 71
//Fish_Bait := 91 //this is for one bait ( need to find a way to allow for stacked item)
Fish_Rod := 134
Fish_Net := 141;
Axe := 76;
Willow := 85;
DraynorBankTile := Tile(3092, 3242);
DraynorFishTile := Tile(3086, 3230);
DraynorTreeTile := Tile(3087, 3234);
end;
procedure Update;
var
LatestScript,latestversion : string;
FileNum : integer;
begin
latestversion := GetPage('http://fmerlocations.googlecode.com/svn/trunk/ver.txt');
if StrToFloatDef(latestversion, 0.1) <= StrToFloatDef(Version, 0.1) then // <3 EvilChicken! for StrToFloatDef idea I leech'd from his G.A.R.
begin
writeln('Script up to date! :)');
Wait(750);
Exit;
end;
wait(1000);
if StrToFloatDef(latestversion, 0.1) <= StrToFloatDef(Version, 0.1) then // <3 EvilChicken! for StrToFloatDef idea I leech'd from his G.A.R.
begin
writeln('Script up to date! :)');
Wait(750);
exit;
end;
Writeln('Please wait while I auto download you the newest version of the script.');
LatestScript := GetPage('http://fmerlocations.googlecode.com/svn/trunk/script.txt');
FileNum := RewriteFile(ScriptPath + 'Draynor Hybrid [' + (LatestVersion) + '].simba', true);
WriteFileString(FileNum, LatestScript);
CloseFile(FileNum);
Writeln('Script has been updated successfully.');
Writeln('It is located at: ' + 'Draynor Hybrid [' + (LatestVersion) + '].simba');
Writeln('Please close this script and open it and use it.');
TerminateScript;
end;
var I : Integer;
begin
Update;
Smart_Server := 38;
Smart_Signed := true;
SetupSRL;
SetGlobals;
DeclarePlayers;
Stats_ScriptID := '76';
LoginPlayer;
SetPlayer;
repeat
if (Random(10) = 4) then
GetSkill(false);
if (pLoads > Players[CurrentPlayer].Integers[1] - 1) then
begin
if (BankScreen) then
CloseBank;
Wait(500 + Random(500));
GetSkill(False);
if (PlayersActive < 2) then
begin
Logout;
Proggy;
TerminateScript;
end;
NextPlayer(True);
Wait(5000 + Random(5000));
SetPlayer;
pLoads := 0;
end;
if (not(InvFull)) then
if (DoAction = 'Fish_Net') or (DoAction = 'Fish_Bait') then
WalkToFish;
if (not(InvFull)) then
if (DoAction = 'Willow') then
WalkToTrees;
repeat
if (InvFull) then Break;
if (DoAction = 'Fish_Net') then
if FindObject('Fish_Net') then
TimerCheck;
if (DoAction = 'Fish_Bait') then
if FindObject('Fish_Bait') then
TimerCheck;
if (DoAction = 'Willow') then
if FindObject('Willow') then
TimerCheck;
FindNormalRandoms;
if (Random(3) = 1) then
Antiban;
Wait(150 + Random(150));
until InvFull
if (InvFull) then
begin
WalkToBank;
Bank;
end;
Proggy;
Wait(350 + Random(350));
FindNormalRandoms;
if (not(LoggedIn)) then
begin
NextPlayer(false);
PLoads := 0;
end;
until (InvFull)
end.
Only think i have not done is add pin support