Sliver Knight
2007-10-03 03:46:42
<!– BEGIN TEMPLATE: formanswers –>
Sliver Knight - SRL Member Application Form
Sliver Knight
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
Java ,PHP
Other Communitys
www.waushare.com
How Long have You Played Runescape
5 yEARS
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
I have been a member of this comunity for a while i have slowly been learing how to script, picking up things from tuts and other scripts i have no realised and scripts yet but i have amde a few privet scripts.
I lernt Java scriptting in making my website, www.hactec.com(just got new hosting)for the .com
I have 16 years of age, i live in Austrila and i think i am ready for the srl members section and i think i can get soem good scripts out to this community.
It is not updated for [srl4] yet beacuse i fished a mounth ago then i went on vancation well here it is then…
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
<!– END TEMPLATE: formanswers –>
Sliver Knight - SRL Member Application Form
Sliver Knight
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
Java ,PHP
Other Communitys
www.waushare.com
How Long have You Played Runescape
5 yEARS
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
I have been a member of this comunity for a while i have slowly been learing how to script, picking up things from tuts and other scripts i have no realised and scripts yet but i have amde a few privet scripts.
I lernt Java scriptting in making my website, www.hactec.com(just got new hosting)for the .com
I have 16 years of age, i live in Austrila and i think i am ready for the srl members section and i think i can get soem good scripts out to this community.
It is not updated for [srl4] yet beacuse i fished a mounth ago then i went on vancation well here it is then…
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
program Silverknight;
{.include srl/srl.scar}
{.include srl/srl/skill/Fighting.scar}
(*Set up the following user constants*)
const
MSpeed = 4; //Mouse motion speed (approx, script will generate random values for antiban).
HealHealth = 70; //Minimum HP percentage to heal at. (Use 100 to heal always and -1 to heal never (for other types of monsters)).
PlayerTime = 20; //Time for each player in minutes.
MyNumberOfPlayers = 1; //The number of players that will be autoing.
MonsterName = 'onk'; //A few letters from the unique name of the monster you wish to fight.
MonsterTolerance = 2; //Find tolerance.
const
MyScriptVersion = 0.59;
var
MColours : array[1..4] of integer;
MCIndex : integer;
TotalMonksAttacked : integer;
PlayerTimeInSeconds : integer;
PST1, PRT, LT : integer;
BreakNow, FirstRun : Boolean;
VersionPage : String;
SST1, SST2, FindNorMalRandomsTime, FindFastRandomsTime: LongInt;
(*Set up the players*)
procedure DeclarePlayers;
begin
HowManyPlayers := MyNumberOfPlayers;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='asdf'; //Your RuneScape username.
Players[0].Pass :='asdf'; //Your RuneScape password.
Players[0].Nick :='asdf'; //Three letters from the middle of your RuneScape username.
Players[0].Active := True; //Will this player be autoing or not?
Players[0].Skill := 'Strength'; //The skill you want to train with this script. Attack, Strength, Defence.
end;
procedure SetupMonsterColours;
begin
MColours[1] := 8562644;
MColours[2] := 8497364;
MColours[3] := 8562644;
MColours[4] := 8497364;
end;
function MilToSec(Mil : Integer) : Integer;
begin
Result := Round(Mil / 1000);
end;
function SecToMil(Sec : Integer) : Integer;
begin
Result := Sec * 1000;
end;
function MinToSec(Min : Integer) : Integer;
begin
Result := Min * 60;
end;
function SecToMin(Sec : Integer) : Integer;
begin
Result := Round(Sec / 60);
end;
procedure SetPlayerParams;
begin
if (not(LoggedIn)) then Exit;
GameTab(1);
if Players[CurrentPlayer].Skill = 'Attack' then SetFightMode(1);
if Players[CurrentPlayer].Skill = 'Strength'then SetFightMode(2);
if Players[CurrentPlayer].Skill = 'Defence' then SetFightMode(4);
LampSkill := LowerCase(Players[CurrentPlayer].Skill);
FindTalk;
end;
function FindFastRandoms: Boolean;
var
i: Integer;
begin
for i:=1 to 8 do
begin
case I of
1: If FindDead then
Result := True;
2: If FindMod then
Result := True;
3: If FindMime then
Result := True;
4: If FindMaze then
Result := True;
5: If FindQuiz then
Result := True;
6: If FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
8: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
8: RC;
end;
wait(1);
end;
end;
procedure FTWaitD (Time : Integer);
var T, I : integer;
begin
try
T := (Time div 1000)+1;
for I := 1 to T do
begin
Sleep(250);
FindTalk;
end
except
begin
Sleep(Time);
FindTalk;
end;
end;
FindFastRandoms;
MarkTime(FindNorMalRandomsTime);
if FindNorMalRandomsTime-SST1 >(10000+Random(5000)) then
begin
Status('FindNorMalRandoms.');
FindNorMalRandoms;
MarkTime(SST1);
Status('FindNorMalRandoms took:'+IntToStr(SST1-FindNorMalRandomsTime)+' msec');
end;
MarkTime(FindFastRandomsTime);
if FindFastRandomsTime-SST2 >(1500+Random(1500)) then
begin
Status('FindFastRandoms.');
FindFastRandoms;
MarkTime(SST2);
Status('FindFastRandoms took:'+IntToStr(SST2-FindFastRandomsTime)+' msec');
end;
end;
function SFindMonster: Boolean;
begin
x := MSCX;
y := MSCY;
for MCIndex := 1 to 4 do
begin
if(FindObj3(x, y, MonsterName, MColours[MCIndex], MonsterTolerance)) then
begin
WriteLn('Found monster, proceeding.');
Result:= True;
Break;
end else
begin
case Random(10) of
0 : MakeCompass('N');
1 : FTWaitD(4 + Random(4));
2 : FTWaitD(4 + Random(4));
3 : MakeCompass('E');
4 : FTWaitD(4 + Random(4));
5 : FTWaitD(4 + Random(4));
6 : MakeCompass('S');
7 : FTWaitD(4 + Random(4));
8 : FTWaitD(4 + Random(4));
9 : MakeCompass('W');
end;
Result:= False;
end;
end;
end;
Procedure RClickMonk; //This procedure clicks the monk.
begin
Case Random(2) of
0: begin
WriteLn('Normal click the monk.');
Mouse(x, y, 0, 0, True);
FTWaitD(12); //To wait for possible lag.
end;
1: begin
WriteLn('Right click the monk.');
Mouse(x, y, 0, 0, False);
Sleep(10 + Random(10));
ClickOption('ttac', 1);
FTWaitD(12); //To wait for possible lag.
end;
end;
end;
procedure MonkHealIfNeeded;
begin
repeat
WriteLn('Hitpoints: ' + IntToStr(GetHp) + '/' + IntToStr(GetSkillLevel('Hitpoints')) + ' (' + IntToStr(HpPercent) + '%' + ')');
WriteLn('');
if (HpPercent <= HealHealth) then
begin
WriteLn('Hitpoints is less than HealHealth, finding a monk to get healed');
if(SFindMonster) then
begin
WriteLn('Hitpoints is less than HealHealth, finding a monk to get healed');
WriteLn('A monk was found, attempting to heal.');
if(not (infight) or not(IsFightAt(x, y))) then
begin
WriteLn(' ''->[ We are not in a fight, proceeding to heal.');
wait(200);
FFlag(0);
MouseSpeed := MSpeed + Random(3);
//Start actual healing code...
WriteLn('Right click the monk.');
Mouse(x, y, 0, 0, False);
Sleep(10 + Random(10));
ClickOption('alk-to', 1);
FTWaitD(12);
ClickToContinue;
FTWaitD(7 + Random(2));
Mouse(Random(201) + 156, Random(12) + 383, 0, 0, True);
ClickToContinue;
FTWaitD(7 + Random(2));
ClickToContinue;
FTWaitD(7 + Random(2));
ClickToContinue;
FTWaitD(7 + Random(2));
ClickToContinue;
FTWaitD(12 + Random(2)); //Wait for the monk to finish healing...
end;
if(InFight) then
begin
WriteLn('We are in a fight, abort healing process.');
repeat
FTWaitD(4);
until(not(InFight));
end;
end;
end else //If we don't need healing...
begin
FTWaitD(4 + Random(3));
end;
until(HpPercent >= HealHealth);
end;
Procedure AttackMonk;
begin
if (HpPercent > HealHealth) then
begin
if(SFindMonster) then
begin
WriteLn('A monk was found, attempting to attack.');
if(not (InFight) or not(IsFightAt(x, y))) then
begin
WriteLn('We are not in a fight or target is not in a fight, attacking.');
Players[CurrentPlayer].Killed := Players[CurrentPlayer].Killed + 1;
RClickMonk;
FTWaitD(1);
MouseSpeed := MSpeed + Random(3);
WriteLn('Wait until the monk is killed.');
repeat
FTWaitD(4 + Random(2));
case Random(40) of
0 : MakeCompass('N');
1 : MMouse(Random(750), Random(450), 10, 10);
2 : FTWaitD(4 + Random(4));
3 : MakeCompass('E');
4 : MMouse(Random(750), Random(450), 10, 10);
5 : FTWaitD(4 + Random(4));
6 : MakeCompass('S');
7 : MMouse(Random(750), Random(450), 10, 10);
8 : FTWaitD(4 + Random(4));
9 : MakeCompass('W');
10: HoverSkill(Players[CurrentPlayer].Skill, False); //If this line has errors, please remove it.
11: FTWaitD(4 + Random(4));
12: FTWaitD(4 + Random(4));
13: FTWaitD(4 + Random(4));
14: FTWaitD(4 + Random(4));
15: FTWaitD(4 + Random(4));
16: FTWaitD(4 + Random(4));
17: FTWaitD(4 + Random(4));
18: FTWaitD(4 + Random(4));
19: FTWaitD(4 + Random(4));
20: FTWaitD(4 + Random(4));
21: FTWaitD(4 + Random(4));
22: FTWaitD(4 + Random(4));
23: FTWaitD(4 + Random(4));
24: FTWaitD(4 + Random(4));
25: FTWaitD(4 + Random(4));
26: FTWaitD(4 + Random(4));
27: FTWaitD(4 + Random(4));
28: FTWaitD(4 + Random(4));
29: FTWaitD(4 + Random(4));
30: FTWaitD(4 + Random(4));
end;
until(not(InFight));
if(not(WeAreDead)) then //Something should have died in a fight, make sure it's not us!
begin
WriteLn('The monster is dead. Proceeding...');
end else
begin
WriteLn('+===================================');
WriteLn('| ' + Trim(Players[CurrentPlayer].Name) + ' is dead.');
WriteLn('+===================================');
Players[CurrentPlayer].Integer1 := Players[CurrentPlayer].Integer1 + 1; //Increment the dead counter.
end;
end;
if(InFight) then
begin
WriteLn('We are in a fight, abort fight process.');
repeat
FTWaitD(10);
until(not(InFight));
end;
end;
end else //If we are low on hit points...
begin
MonkHealIfNeeded;
end;
end;
procedure PrintSleep(s: String);
begin
ClearDebug;
WriteLn(s);
Wait(100);
end;
procedure Animate;
begin
PrintSleep('[ Monk Terminator by Silver~~~ ]');
PrintSleep(' [ Monk Terminator by Silver~~~ ]');
PrintSleep(' [ Monk Terminator by Silver~~~ ]');
PrintSleep(' [ Monk Terminator by Silver~~~ ]');
PrintSleep(' [ Monk Terminator by Silver~~~ ]');
PrintSleep(' [ Monk Terminator by Silver~~~ ]');
PrintSleep(' [ Monk Terminator by Silver~~~ ]');
PrintSleep(' [ Monk Terminator by Silver~~~ ]');
PrintSleep(' [ Monk Terminator by Silver~~~ ]');
PrintSleep(' [ Monk Terminator by Silver~~~ ]');
PrintSleep(' [Monk Terminator by Silver~~~]');
PrintSleep(' ..::[ Monk Terminator by Silver~~~ ]::..');
WriteLn('');
end;
function CheckForUpdates : boolean;
begin
VersionPage := GetPage('http://solarwind.frih.net/Silverknight/Version.txt');
if(VersionPage = '') then
begin
WriteLn('Error.');
Result := True;
TerminateScript;
end else
begin
if(MyScriptVersion < StrToFloat(VersionPage)) then
begin
WriteLn('New version available, please update.');
Result := True;
TerminateScript;
end;
if(MyScriptVersion > StrToFloat(VersionPage)) then
begin
WriteLn('This is impossible! Your version is newer than the latest!');
Result := True;
end;
end;
end;
procedure PlayerStats;
var
Active: string;
i : Integer;
begin
if(Players[CurrentPlayer].Active = True) then
begin
Active := 'True';
end else
begin
Active := 'False';
end;
WriteLn('');
WriteLn('+---------------------------------------------------------------------------------------------------+');
WriteLn('| Silverknight's Monk Terminator v' + FloatToStr(MyScriptVersion));
Writeln('| ');
WriteLn('| Name: ' + Players[CurrentPlayer].Name);
WriteLn('| Number: ' + IntToStr(CurrentPlayer));
WriteLn('| Autoing: ' + Active);
WriteLn('| Died: ' + IntToStr(Players[CurrentPlayer].Integer1) + ' times.');
if ( Players[CurrentPlayer].Worked > -1 ) then
begin
WriteLn('| Player worked: ' + inttostr(Players[CurrentPlayer].Worked / 60) + ' Minutes.');
end else
begin
//WriteLn('ELSE Player worked: ' + inttostr(Players[CurrentPlayer].Worked / 60) + ' Minutes.');
end;
if(PlayerTimeInSeconds > (TimeFromMark(PST1) / 1000)) then
begin
WriteLn('| Player time left: ' + IntToStr(SecToMin(PRT - MilToSec(TimeFromMark(PST1)))) + ' Minutes');
end else
begin
//WriteLn('ELSE Player time left: ' + IntToStr((PRT - (TimeFromMark(PST1) / 1000)) / 60) + ' Minutes');
end;
WriteLn('| Total time worked: ' + ScriptTime2(1) + '.');
WriteLn('+---------------------------------------------------------------------------------------------------+');
for i := 0 to HowManyPlayers - 1 do
begin
if (Players[i].Active = True) then Active := 'T' else Active := 'F';
WriteLn('| ' + Inttostr (i) + ': ' + Players[i].Name + ': Active: ' + Active + ' '
+ 'At: ' + inttostr(Players[i].level[1]) + ' '
+ 'St: ' + inttostr(Players[i].level[2]) + ' '
+ 'Df: ' + inttostr(Players[i].level[3]) + ' '
+ 'HP: ' + inttostr(Players[i].level[8]) + ' '
+ 'Worked: ' + IntToStr(Players[i].Worked / 60) + ' Minutes. '
+ 'Killed: ' + IntToStr(Players[i].Killed) + ' Monks. ');
end;
WriteLn('+---------------------------------------------------------------------------------------------------+');
WriteLn('');
end;
Procedure ProgressReport;
begin
GetAllLevels;
PlayerStats;
SRLRandomsReport;
end;
procedure Setup2;
begin
WriteLn('Login player if needed...');
LoginPlayer;
WriteLn('Set player parameters...');
SetPlayerParams;
WriteLn('Set highest vertical view angle...');
HighestAngle;
WriteLn('Set to perfect north...');
MakeCompass('N');
end;
procedure InitializeVariables;
begin
PlayerTimeInSeconds := PlayerTime * 60;
end;
procedure Setup;
begin
ClearDebug;
Animate;
CheckForUpdates;
MouseSpeed := MSpeed + Random(3);
ActivateClient;
Sleep(1000);
WriteLn('Starting Script.');
WriteLn('');
WriteLn('Initialize startup sequence...');
WriteLn('Initialize script variables...');
InitializeVariables;
WriteLn('Declare player array...');
DeclarePlayers;
Setup2;
WriteLn('Set to run mode...');
SetRun(True);
WriteLn('Initialize monster colours array...');
SetupMonsterColours;
BreakNow := False;
end;
{======================================================================================================]
[ ]
[ Main loop ]
[ ]
[======================================================================================================}
begin //Begin main loop.
ClearDebug;
SetUpSRL;
FirstRun := True;
Setup;
repeat
if(not(FirstRun)) then //This whole block makes sure that Setup2 is not run twice on the first time the script is started.
begin
Setup2;
end else
begin
FirstRun := False;
end;
PRT := PlayerTimeInSeconds + Random (250);
MarkTime(PST1);
repeat
//WriteLn('Debug: ' + IntToStr(Players[CurrentPlayer].Worked) + ' S before increment. ' + IntToStr(TimeFromMark(PST1)));
Players[CurrentPlayer].Worked := Players[CurrentPlayer].Worked + (MilToSec(TimeFromMark(PST1)) + 0);
//WriteLn('Debug: ' + IntToStr(Players[CurrentPlayer].Worked) + ' S after increment. ' + IntToStr(TimeFromMark(PST1)));
ProgressReport;
MarkTime(PST1);
if(not(LoggedIn)) or ((TimeFromMark(PST1) / 1000) > PRT) then
begin
//WriteLn('Next player. ' + IntToStr(MilToSec(TimeFromMark(PST1))) + ' ' + IntToStr(PlayerTimeInSeconds));
WriteLn('Next player.');
Break;
BreakNow := True;
end;
AntiBan;
FTWaitD(2 + Random(3));
MonkHealIfNeeded;
AttackMonk;
TotalMonksAttacked := TotalMonksAttacked + 1;
until(WeAreDead or not(LoggedIn) or BreakNow);
if LoggedIn then
begin
FTWaitD(4 + Random(4));
Logout;
if(MyNumberOfPlayers = 1) then
begin
WriteLn('There is only one player autoing, will logout and sleep for a while');
LT := MinToSec(Random(20));
WriteLn('Will logout and sleep for: ' + IntToStr(SecToMin(LT)) + ' minutes.');
Sleep(SecToMil(LT));
end;
WriteLn('Switching player now.');
NextPlayer(True);
Sleep(1000 + Random(2000));
end;
if(not(Loggedin)) then NextPlayer(True);
until(false); //Make the loop never ending.
end. //End main loop.
——————————————————<!– END TEMPLATE: formanswers –>