DannyRS
2012-12-22 21:49:22

About
Public Release: http://villavu.com/forum/showthread.php?t=94406
Been working on combat stuff and was testing here, and ended up with this lol,
Don't want to release publicly yet, but someone might want / like to use, so here we are ;), should be fully AFKable
XP Gain isnt great and is obviously inefficient but its more than 0 :)
SetUp
Auto Retaliate On

Uses My Graphics Setup (Probably Doesn't Matter Besides RSZoomedOutMax) (Pic):
Found Here
SetUp EoC CoolDowns at Top :)
Program DannyRSFightCaver;
{$Define SMART}
{$I SRL/SRL.Simba}
{$I Sps/Sps.Simba}
{$I SRL/SRL/Misc/Debug.Simba}
{$I SRL/SRL/Misc/SmartGraphics.Simba}
//Setup
Const
Debug = False; //Debug Mode
DebugATPAImage = False; //Debug ATPAImages Mode
DMP = True; // *** If the SPS Map is Not found found,
//Download them and save them automatically,
//you should leave this as true ***
UseQuickPrayer = True; //Put Melee Prayer On QuickPrayer Select
Using2HandedWeapon = True; //Are You Using A 2Handed Weapon?
//EoC Abilities (Bank If Not In Use)
AbilityOne = 'slice'; //First EoC Ability CD - BoundKey 1
AbilityTwo = 'punish'; //Second EoC Ability CD - BoundKey 2
AbilityThree = 'fury'; //Third EoC Ability CD - BoundKey 3
AbilityFour = 'sever'; //Fourth EoC Ability CD - BoundKey 4
AbilityFive = 'cleave'; //Fith EoC Ability CD - BoundKey 5
AbilitySix = 'dismember'; //Sixth EoC Ability CD - BoundKey 6
ThreshHoldAbilityKey = '7'; //ThreshHold EoC Ability BoundKey
ThreshHoldAbilityCD = 60000; //ThreshHold EoC Ability CD (Beserk Recommended)
ThreshHoldAbilityTwoKey = '8'; //Second ThreshHold EoC Ability BoundKey
ThreshHoldAbilityTwoCD = 20000; //Second ThreshHold EoC Ability CD
//(Best Damage For Current Weapon Recommended)
ScriptVersion = 'V1.1';
//LOGIN STUFF
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
WORLDSWITCHERENABLED:=False;
end;
Var //dont touch
CheckBoxBank,CheckBoxCave,CheckBoxMiddleCave,CheckBoxOutsideCave: TBox;
AbilityOneCDTimer,AbilityTwoCDTimer,AbilityThreeCDTimer: Integer;
AbilityFourCDTimer,AbilityFiveCDTimer,AbilitySixCDTimer: Integer;
ThreshHoldAbilityCDTimer,ThreshHoldAbilityTwoCDTimer: Integer;
AbilityOneCD,AbilityTwoCD,AbilityThreeCD,AbilityFourCD,AbilityFiveCD,AbilitySixCD: Integer;
UseAbilityOne,UseAbilityTwo,UseAbilityThree,UseAbilityFour,UseAbilityFive,UseAbilitySix: Boolean;
StartingExperience: Integer;
{*******************************************************************************
All of these mouse movements and typing are credited to benland100 and flight.
thanks to Ashaman88 for his awesome scripts, i used his as a template
*******************************************************************************}
//By Bandland100, modified by Ashaman88 to shift mouse speeds after every step
//
procedure SuperWindMouse(xs, ys, xe, ye, gravity, wind, minWait, maxWait, maxStep, targetArea: extended);
var
veloX,veloY,windX,windY,veloMag,dist,randomDist,lastDist,step: extended;
lastX,lastY,MSP,W: integer;
sqrt2,sqrt3,sqrt5: extended;
begin
MSP := MouseSpeed;
sqrt2:= sqrt(2);
sqrt3:= sqrt(3);
sqrt5:= sqrt(5);
while hypot(xs - xe, ys - ye) > 1 do
begin
dist:= hypot(xs - xe, ys - ye);
wind:= minE(wind, dist);
if dist >= targetArea then
begin
windX:= windX / sqrt3 + (random(round(wind) * 2 + 1) - wind) / sqrt5;
windY:= windY / sqrt3 + (random(round(wind) * 2 + 1) - wind) / sqrt5;
end else
begin
windX:= windX / sqrt2;
windY:= windY / sqrt2;
if (maxStep < 3) then
begin
maxStep:= random(3) + 3.0;
end else
begin
maxStep:= maxStep / sqrt5;
end;
end;
veloX:= veloX + windX;
veloY:= veloY + windY;
veloX:= veloX + gravity * (xe - xs) / dist;
veloY:= veloY + gravity * (ye - ys) / dist;
if hypot(veloX, veloY) > maxStep then
begin
randomDist:= maxStep / 2.0 + random(round(maxStep) div 2);
veloMag:= sqrt(veloX * veloX + veloY * veloY);
veloX:= (veloX / veloMag) * randomDist;
veloY:= (veloY / veloMag) * randomDist;
end;
lastX:= Round(xs);
lastY:= Round(ys);
xs:= xs + veloX;
ys:= ys + veloY;
case Random(50) of
1..25: W := (MSP + (Random((MSP/4))));
26..50: W := (MSP - (RandomRange((MSP/2), MSP-1)));
end;
if (W < 1) then
W := 1;
if (lastX <> Round(xs)) or (lastY <> Round(ys)) then
MoveMouse(Round(xs), Round(ys));
step:= hypot(xs - lastX, ys - lastY);
//W := round((maxWait - minWait) * (step / maxStep) + minWait);
wait(W);
lastdist:= dist;
end;
if (Round(xe) <> Round(xs)) or (Round(ye) <> Round(ys)) then
MoveMouse(Round(xe), Round(ye));
MouseSpeed := MSP;
end;
Procedure HumanMMouse(eX, eY, ranX, ranY: Integer);
var
randSpeed: extended;
X,Y,X2,Y2,j,Dist,MP: integer;
begin
j := MouseSpeed;
GetMousePos(X, Y);
Dist := Distance(X, Y, eX, eY);
MP := Round(Dist/150);
if MP < 0 then
MP := 1;
randSpeed := (random(MouseSpeed) / 2.0 + MouseSpeed) / 10.0;
X2 := RandomRange(eX-(j*MP), eX+(j*MP));
Y2 := RandomRange(eY-(j*MP), eY+(j*MP));
SuperWindMouse(X, Y, X2, Y2, 11, 8, 10.0 / randSpeed, 12.0 / randSpeed, 10.0 * randSpeed, 10.0 * randSpeed);
GetMousePos(X, Y);
MMouse(eX, eY, ranX, ranY);
MouseSpeed := j;
end;
Procedure HumanMouseBox(X1, Y1, X2, Y2: Integer);
Var
FX, FY: Integer;
Begin
GaussBox(FX,FY,X1,Y1,X2,Y2);
HumanMMouse(FX,FY,0,0)
End;
{*******************************************************************************
procedure FastClick(button: Integer);
By: Flight
Description: Quickly click the mouse.
*******************************************************************************}
procedure FastClick(button: variant);
var
x, y: integer;
ibutton: Integer;
begin
if VariantIsBoolean(button) then
begin
if (button) then
iButton := mouse_left
else
iButton := mouse_right;
end else
iButton := button;
if (iButton = mouse_move) then Exit;
GetMousePos(x, y);
HoldMouse(x, y, iButton);
Wait(RandomRange(60, 150));
GetMousePos(x, y);
ReleaseMouse(x, y, iButton);
end;
Procedure OffMM(RedTu, LeWait, rWait: Integer);
Var
W,H,RX,RY,T,RT: Integer;
Begin
GetClientDimensions(W,H);
H:=H+50;
RX := RandomRange(0, W);
RY := RandomRange(0, H);
Case (RedTu) Of
0..1: HumanMMouse(W/2, RandomRange(-110,-60), RX, 0);
2: HumanMMouse(RandomRange(-50,-10), H/2, 0, RY);
3: HumanMMouse(W/2, h+RandomRange(10,50), RX, 0);
4: HumanMMouse(W+RandomRange(10,50), H/2, 0, RY);
End;
RT:=(Random(rWait));
MarkTime(T);
Repeat
Wait(Random(100));
Until TimeFromMark(T)>(LeWait+RT);
End;
Procedure UseKey(Text: String);
Var
I: Integer;
Begin
For I:=1 To Length(Text) Do
SendKeys(Text[I],RandomRange(90,160),RandomRange(90,160));
Wait(RandomRange(10,50));
End;
Function WaitLoggedIn(Time:Integer): Boolean;
Var
T: Integer;
Begin
MarkTime(T);
Repeat
SRL_ResetNavBar;
If TimeFromMark(T)>Time Then
Begin
Result:=False;
Exit;
End;
Until (GetColor(472, 490) = 16777215);
Result:=True;
End;
//
{*******************************************************************************
DannyRS's Part
*******************************************************************************}
//
Procedure LeftClickSpot(X1, Y1, X2, Y2: Integer);
var Y1NOBanner, Y2NOBanner: Integer;
Begin
Y1NOBanner:=Y1 - 50; Y2NOBanner:=Y2 - 50;
HumanMMouse(RandomRange(X1,X2),RandomRange(Y1NOBanner,Y2NOBanner),0,0);
Wait(9+Random(37));
FastClick(True);
Wait(124+Random(163));
End;
Procedure RightClickSpot(X1, Y1, X2, Y2: Integer);
var Y1NOBanner, Y2NOBanner: Integer;
Begin
Y1NOBanner:=Y1 - 50; Y2NOBanner:=Y2 - 50;
HumanMMouse(RandomRange(X1,X2),RandomRange(Y1NOBanner,Y2NOBanner),0,0);
Wait(9+Random(37));
FastClick(False);
Wait(124+Random(163));
End;
Procedure DragMouseSpot(X1, Y1, X2, Y2: Integer);
var Y1NOBanner, Y2NOBanner: Integer;
Begin
Y1NOBanner:=Y1 - 50; Y2NOBanner:=Y2 - 50;
HumanMMouse(RandomRange(X1,X2),RandomRange(Y1NOBanner,Y2NOBanner),0,0);
Wait(9+Random(37));
End;
Procedure ClickCurrent(ToDo: Boolean);
Begin
Wait(9+Random(37));
FastClick(ToDo);
Wait(124+Random(193));
End;
Procedure DeBugMessage(ToWrite: String);
Begin
If(Debug)Then
Writeln(ToWrite);
End;
Function InCombat: Boolean;
Var
x, y: Integer;
Begin
If(Not FindColorTolerance(x, y, 7601917, 550, 202, 552, 204, 15)) Then
Begin
LeftClickSpot(525, 225, 550, 250);
Wait(324+Random(193));
End;
If(FindColorTolerance(x, y, 2897213, 719, 239, 721, 241, 15)) Then
Begin
Result:=False;
End Else
Begin
Result:=True;
End;
End;
Function FindCustomObj(HM, SM, TOL, COL, XV, YV, S1, S2, XP, YP, XM, YM: Variant): Boolean;
Var
tmpCTS, i, l, r, counter:integer;
CustomObjTPA:TPointArray;
CustomObjATPA:T2DPointArray;
x,y:integer;
Begin
tmpCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(HM, SM);
FindColorsTolerance(CustomObjTPA, COL, MSX1+XP, MSY1+YP, MSX2-XM, 262, TOL);
CustomObjATPA := SplitTPAEx(CustomObjTPA, XV, YV);
SortATPASize(CustomObjATPA,True);
If DebugATPAImage Then
DebugATPABounds(CustomObjATPA);
SetColorToleranceSpeed(tmpCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
L := High(CustomObjATPA)
marktime(counter);
for i := 0 to L do
begin
MiddleTPAEx(CustomObjATPA[i], x, y);
r := random(L);
HumanMMouse(RandomRange(x-8,x+8), RandomRange(y+10,y+18), 0, 0);
DebugMessage('We Saw The Cave Entrance');
ClickCurrent(False);
If (ChooseOptionMulti([S1,S2])) Then
Begin
Result:=True;
Exit;
End;
wait(randomrange(30, 160));
If (TimeFromMark(counter) > 1200) Then
Begin
DebugMessage('We Failed to See The Cave Entrance in Time');
Break;
End;
end;
Result:=False;
End;
Procedure LogOutGame;
Var
xpos, ypos: Integer;
x, y: Integer;
attempts: Integer;
done: Boolean;
Begin
done:= false;
repeat
begin
if(FindColorSpiralTolerance(x, y, 143319, 703, 28, 705, 30, 10))then
begin
//click x
xpos:= RandomRange(746,759);
ypos := RandomRange(3,15);
HumanMMouse(xpos,ypos,0,0);
Wait(5+Random(17));
FastClick(true);
Wait(1427+Random(193));
//click logout
xpos:= RandomRange(572,710);
ypos := RandomRange((351),(372));
HumanMMouse(xpos,ypos,0,0);
Wait(15+Random(17));
FastClick(true);
Wait(1527+Random(193));
done:= true;
end
else
begin
attempts:= attempts+1;
Wait(263+Random(193));
end;
end;
until (attempts > 10) or (done);
if(attempts > 10)then
begin
if(Debug)then begin Writeln('Failed to Logout'); end; TerminateScript;
end
else
begin
attempts:= 0;
end;
End;
Procedure MinimizeEoCBar(ToDo: Boolean);
Var x, y: Integer;
Begin
If ToDo = True Then
Begin
If (FindColorTolerance(x, y, 13224393, 517, 263, 517, 263, 5)) Then
LeftClickSpot(505,318,510,324);
End Else
If ToDo = False Then
Begin
If (Not FindColorTolerance(x, y, 13224393, 517, 263, 517, 263, 5)) Then
LeftClickSpot(505,382,510,385);
End;
End;
Function SPS_CustomBlindWalk(P: TPoint): Boolean;
Var
Tries: Integer;
M: TPoint;
ctrlPoints: TPointArray;
Begin
Repeat
M := SPS_GetMyPos;
If (PointInBox(M, CheckBoxBank)) Then Begin Result:=False; Exit; End;
If (Length(ctrlPoints) = 0) Then
ctrlPoints := TPABetweenPoints(Point(M.X, M.Y), Point(P.X, P.Y), 20 + Random(15), 10);
Inc(Tries);
If (Tries > 4) Then
Exit;
Result := SPS_WalkPath(ctrlPoints);
Until(Result) Or (PointInBox(M, CheckBoxBank));
End;
Procedure UseEoCAbility;
Var
x, y: Integer;
Begin
Wait(59+Random(57));
Case Random(12) Of
7: Begin
DeBugMessage('Moving Cursor Somewhere While Fighting');
DragMouseSpot(5,50,515,305);
End;
End;
If (FindColorTolerance(x, y, 5820148, 478, 282, 480, 284, 15)) Then
Begin
If (TimeFromMark(ThreshHoldAbilityCDTimer) > ThreshHoldAbilityCD) Then
Begin
DeBugMessage('Using ThreshHoldAbility One');
UseKey(ThreshHoldAbilityKey);
Wait(1800+Random(837));
MarkTime(ThreshHoldAbilityCDTimer);
Exit;
End;
If (TimeFromMark(ThreshHoldAbilityTwoCDTimer) > ThreshHoldAbilityTwoCD) Then
Begin
DeBugMessage('Using ThreshHoldAbility Two');
UseKey(ThreshHoldAbilityTwoKey);
Wait(1800+Random(837));
MarkTime(ThreshHoldAbilityTwoCDTimer);
Exit;
End;
End;
If (UseAbilityOne) And (TimeFromMark(AbilityOneCDTimer) > AbilityOneCD) Then
Begin
UseKey('1');
Wait(1200+Random(837));
MarkTime(AbilityOneCDTimer);
Exit;
End;
If (UseAbilityTwo) And (TimeFromMark(AbilityTwoCDTimer) > AbilityTwoCD) Then
Begin
UseKey('2');
Wait(1200+Random(837));
MarkTime(AbilityTwoCDTimer);
Exit;
End;
If (UseAbilityThree) And (TimeFromMark(AbilityThreeCDTimer) > AbilityThreeCD) Then
Begin
UseKey('3');
Wait(1200+Random(837));
MarkTime(AbilityThreeCDTimer);
Exit;
End;
If (UseAbilityFour) And (TimeFromMark(AbilityFourCDTimer) > AbilityFourCD) Then
Begin
UseKey('4');
Wait(1200+Random(837));
MarkTime(AbilityFourCDTimer);
Exit;
End;
If (UseAbilityFive) And (TimeFromMark(AbilityFiveCDTimer) > AbilityFiveCD) Then
Begin
UseKey('5');
Wait(1200+Random(837));
MarkTime(AbilityFiveCDTimer);
Exit;
End;
If (UseAbilitySix) And (TimeFromMark(AbilitySixCDTimer) > AbilitySixCD) Then
Begin
UseKey('6');
Wait(1200+Random(837));
MarkTime(AbilitySixCDTimer);
Exit;
End;
DeBugMessage('No Abilities Off CoolDown');
End;
Procedure ProgressReport;
Var
XP, XPH: Integer;
WeaponType: String;
Begin
ClearDebug;
XP := (GetXPBarTotal - StartingExperience);
XPH := Round(XP * (3600.0 / (GetTimeRunning / 1000.0)));
If (Using2HandedWeapon) Then
WeaponType:='2Handed'
Else
WeaponType:='1Handed';
Writeln('=========DannyRS-FightCaver===============');
Writeln('=========Version: '+ScriptVersion+'====================');
Writeln('Time Running: ' + TimeRunning);
Writeln('Experience Earned: ' + IntToStr(XP));
Writeln('Experience/Hour: ' + IntToStr(XPH));
Writeln('Weapon Type: ' + WeaponType);
Writeln('==========================================');
End;
Procedure MainLoop;
Var
x, y: Integer;
Done: Boolean;
Check: Boolean;
SecondRun: Boolean;
MPOS: TPoint;
Begin
Writeln('Welcome to FightCaver by DannyRS');
Writeln('Start Experience: ' + IntToStr(GetXPBarTotal));
//Pause Before Start Script
Writeln('Starting in 3...');
Wait(1000);
Writeln('Starting in 2...');
Wait(1000);
Writeln('Starting in 1...');
Wait(1000);
MarkTime(AbilityOneCDTimer);
MarkTime(AbilityTwoCDTimer);
MarkTime(AbilityThreeCDTimer);
MarkTime(AbilityFourCDTimer);
MarkTime(AbilityFiveCDTimer);
MarkTime(AbilitySixCDTimer);
MarkTime(ThreshHoldAbilityCDTimer);
MarkTime(ThreshHoldAbilityTwoCDTimer);
SecondRun:= False;
Repeat Begin
Done:= False;
Check:= False;
If Not LoggedIn Then
Begin
Writeln('Not In-Game Trying Log-In');
If Not WaitLoggedIn(1000) Then
Begin
LoginPlayer;
Wait(1583+Random(3293));
LeftClickSpot(528, 63, 556, 83);
Wait(1583+Random(1293));
End;
End;
If Not Debug Then
ProgressReport;
//Press Enter Minimize EoC Bar And Re-Open to Lock Chat If Not Locked
// If Blue Chat Text Is Seen In Your Chat Spot
If (FindColorTolerance(x, y, 16711680, 97, 460, 102, 470, 25)) Then
Begin
DeBugMessage('Chat Not Locked');
TypeSendEx('1', True);
Wait(283+Random(193));
MinimizeEoCBar(True);
Wait(283+Random(193));
MinimizeEoCBar(False);
End;
MPOS:= SPS_GetMyPos;
//Are We At The Bank?
If (PointInBox(MPOS, CheckBoxBank)) Then
Begin
DeBugMessage('We Are at The Bank, Entering');
Wait(483+Random(1293));
MakeCompass('W');
If Not FindCustomObj(0.00, 0.00, 5, 0, 10, 10, 'nter', 'ave', 10, 40, 20, 100) Then
FindCustomObj(0.00, 0.00, 5, 1, 10, 10, 'nter', 'ave', 10, 40, 20, 100);
Wait(3483+Random(1393));
MakeCompass('N');
Wait(4283+Random(2293));
End Else //Are We Outside Away From The Bank?
If (PointInBox(MPOS, CheckBoxOutsideCave)) Then
Begin
DeBugMessage('Moving Back to Bank');
SPS_CustomBlindWalk(Point(88,167));
Wait(483+Random(1293));
End;
//Click MS To Start Mobs Spawning
If (FindColorTolerance(x, y, 606747, 289, 471, 291, 473, 15)) Then
Begin
DeBugMessage('Clicking To Remove NPC Guys Message');
Wait(283+Random(193));
LeftClickSpot(235,258,275,296);
Wait(483+Random(193))
End;
If (InCombat) Then
Begin
DeBugMessage('We Have A Target Using EoCAbility');
UseEoCAbility;
If (Using2HandedWeapon) Then
Wait(283+Random(493));
Continue;
End;
MPOS:= SPS_GetMyPos;
//Are We Inside Cave?
If (PointInBox(MPOS, CheckBoxCave)) Then
Begin
DeBugMessage('We Are in The Cave');
Wait(183+Random(293));
If(Not FindColorTolerance(x, y, 453607, 617, 76, 637, 95, 35)) Then
Begin
If (Not PointInBox(SPS_GetMyPos, CheckBoxMiddleCave)) Then
Begin
If Not (InCombat) Then
Begin
DeBugMessage('We Are Not in The Middle And Have No Target Moving Back There');
SPS_CustomBlindWalk(Point(426,160));
End;
End;
DeBugMessage('We Have No Target Near Us, Waiting');
Wait(483+Random(493));
End Else
Begin
DeBugMessage('We Have A Target Near Us Using EoCAbility');
UseEoCAbility;
If (Using2HandedWeapon) Then
Wait(283+Random(493));
//Use Prayer If Off CD And Not Out Of Prayer Points
If (UseQuickPrayer) And (FindColorTolerance(x, y, 6367291, 718, 76, 718, 76, 10)) And (Not FindColorTolerance(x, y, 255, 740, 70, 755, 80, 20)) Then
Begin
If (PointInBox(Sps_GetMyPos, CheckBoxBank)) Then
Continue
Else
Begin
DeBugMessage('TogglePrayer On');
LeftClickSpot(715,112,730,125);
End;
End;
Continue;
End;
End;
MPOS:= SPS_GetMyPos;
If Not (PointInBox(MPOS, CheckBoxCave)) And Not (PointInBox(MPOS, CheckBoxOutsideCave)) Then
Begin
DeBugMessage('We Are Lost Trying To Find Bank Blindly');
LeftClickSpot(580,80,590,90);
Wait(7283+Random(4493));
End;
DeBugMessage('Reached End of Main Loop');
SecondRun:= True;
End; Until Done;
End;
{*******************************-CREDIT-***************************************
All Credit To Ashaman and where ever he learned it, For the map grabbing !!
*******************************************************************************}
Procedure DownloadSPSImage(ImageName: String; Location: String);
Var
Image, Path: string;
FP: Integer;
Begin
If(Debug)Then Begin Writeln('Downloading SPS Map Image'); End;
Image:= GetPage(Location);
Path:= IncludePath + 'SPS\img\runescape_other\' + ImageName + '.png';
Path:= Trim(Path);
FP:= CreateFile(Path);
WriteFileString(FP, Image);
CloseFile(FP);
End;
Function GrabSPSMaps: Boolean;
Var
SWMap,SWName: String;
Begin
SWName:= 'DRSFCSPS';
SWMap:= 'http://i.imgur.com/DOtTk.png';
If DMP Then
Begin
If (Not FileExists(IncludePath + 'SPS\img\runescape_other\DRSFCSPS.png')) Then
DownloadSPSImage(SWName, SWMap);
End;
Result:= (FileExists(IncludePath + 'SPS\img\runescape_other\DRSFCSPS.png'));
End;
Procedure RequirementsCheck;
Begin
If (Not GrabSPSMaps) Then
RaiseException(erCustomError, 'SPS Maps Do Not Exist OR They Are Named Incorrectly!');
End;
Procedure SetMyEoCBar;
Begin
Writeln('Loading EoCBar Stuff');
Writeln('Loading AbilityOne: ' + AbilityOne );
Case LowerCase(AbilityOne) Of
'slice': AbilityOneCD := 3000;
'punish': AbilityOneCD := 5000;
'fury': AbilityOneCD := 20000;
'sever': AbilityOneCD := 30000;
'cleave': AbilityOneCD := 10000;
'dismember': AbilityOneCD := 30000;
'backhand': AbilityOneCD := 15000;
'kick': AbilityOneCD := 15000;
'smash': AbilityOneCD := 10000;
'decimate': AbilityOneCD := 10000;
End;
Writeln('Loading AbilityTwo: ' + AbilityTwo);
Case LowerCase(AbilityTwo) Of
'slice': AbilityTwoCD := 3000;
'punish': AbilityTwoCD := 5000;
'fury': AbilityTwoCD := 20000;
'sever': AbilityTwoCD := 30000;
'cleave': AbilityTwoCD := 10000;
'dismember': AbilityTwoCD := 30000;
'backhand': AbilityTwoCD := 15000;
'kick': AbilityTwoCD := 15000;
'smash': AbilityTwoCD := 10000;
'decimate': AbilityTwoCD := 10000;
End;
Writeln('Loading AbilityThree: ' + AbilityThree);
Case LowerCase(AbilityThree) Of
'slice': AbilityThreeCD := 3000;
'punish': AbilityThreeCD := 5000;
'fury': AbilityThreeCD := 20000;
'sever': AbilityThreeCD := 30000;
'cleave': AbilityThreeCD := 10000;
'dismember': AbilityThreeCD := 30000;
'backhand': AbilityThreeCD := 15000;
'kick': AbilityThreeCD := 15000;
'smash': AbilityThreeCD := 10000;
'decimate': AbilityThreeCD := 10000;
End;
Writeln('Loading AbilityFour: ' + AbilityFour);
Case LowerCase(AbilityFour) Of
'slice': AbilityFourCD := 3000;
'punish': AbilityFourCD := 5000;
'fury': AbilityFourCD := 20000;
'sever': AbilityFourCD := 30000;
'cleave': AbilityFourCD := 10000;
'dismember': AbilityFourCD := 30000;
'backhand': AbilityFourCD := 15000;
'kick': AbilityFourCD := 15000;
'smash': AbilityFourCD := 10000;
'decimate': AbilityFourCD := 10000;
End;
Writeln('Loading AbilityFive: ' + AbilityFive);
Case LowerCase(AbilityFive) Of
'slice': AbilityFiveCD := 3000;
'punish': AbilityFiveCD := 5000;
'fury': AbilityFiveCD := 20000;
'sever': AbilityFiveCD := 30000;
'cleave': AbilityFiveCD := 10000;
'dismember': AbilityFiveCD := 30000;
'backhand': AbilityFiveCD := 15000;
'kick': AbilityFiveCD := 15000;
'smash': AbilityFiveCD := 10000;
'decimate': AbilityFiveCD := 10000;
End;
Writeln('Loading AbilitySix: ' + AbilitySix );
Case LowerCase(AbilitySix) Of
'slice': AbilitySixCD := 3000;
'punish': AbilitySixCD := 5000;
'fury': AbilitySixCD := 20000;
'sever': AbilitySixCD := 30000;
'cleave': AbilitySixCD := 10000;
'dismember': AbilitySixCD := 30000;
'backhand': AbilitySixCD := 15000;
'kick': AbilitySixCD := 15000;
'smash': AbilitySixCD := 10000;
'decimate': AbilitySixCD := 10000;
End;
If AbilityOne = ('') Then
UseAbilityOne:=False
Else
UseAbilityOne:=True;
If AbilityTwo = ('') Then
UseAbilityTwo:=False
Else
UseAbilityTwo:=True;
If AbilityThree = ('') Then
UseAbilityThree:=False
Else
UseAbilityThree:=True;
If AbilityFour = ('') Then
UseAbilityFour:=False
Else
UseAbilityFour:=True;
If AbilityFive = ('') Then
UseAbilityFive:=False
Else
UseAbilityFive:=True;
If AbilitySix = ('') Then
UseAbilitySix:=False
Else
UseAbilitySix:=True;
End;
Procedure SetMyGlobals;
Begin
if(Debug)then begin
Writeln('loading Globals'); end;
CheckBoxBank:=IntToBox(60, 126, 131, 208);
CheckBoxCave:=IntToBox(298, 36, 595, 314);
CheckBoxMiddleCave:=IntToBox(388, 122, 470, 202);
CheckBoxOutsideCave:=IntToBox(60, 61, 232, 323);
End;
Procedure FreeMyGlobals;
Begin
//FreeBitmap(DRSFCSPS);
End;
Procedure PollPos;
Var Done: Boolean;
Begin
Repeat
Begin
Writeln(toStr(SPS_GetMyPos));
Wait(1000+Random(50));
End;
Until Done;
End;
Procedure Setup;
Begin
{$IFDEF SIMBAMAJOR980}
SMART_SERVER := 10;
SMART_MEMBERS := TRUE;
SMART_SIGNED := TRUE;
SMART_SUPERDETAIL := FALSE;
SRL_SIXHOURFIX := TRUE;
{$ELSE}
SRL_SIXHOURFIX := TRUE;
SMART_FIXSPEED := TRUE;
{$ENDIF}
SetupSRL;
ClearDebug;
DeclarePlayers;
RequirementsCheck;
SPS_Setup(RUNESCAPE_OTHER, ['DRSFCSPS']);
SetMyEoCBar;
If Not LoggedIn Then
Begin
Writeln('Not In-Game Trying Log-In');
If Not WaitLoggedIn(1000) Then
LoginPlayer;
Wait(1583+Random(3293));
End;
LeftClickSpot(528, 63, 556, 83);
ToggleXPBar(True);
StartingExperience := GetXPBarTotal;
MinimizeEoCBar(False);
SetMyGlobals;
AddOnTerminate('FreeMyGlobals');
SmartSetRefresh(90);
End;
begin
Setup;
ActivateClient;
ClearDebug;
//PollPos;
MainLoop;
//LogOutGame;
end.