SRL Archive - Archive

Sliver Knight - SRL Member Application Form


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

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 –>

Santa_Clause

2007-10-03 04:20:49

Sorry, no.

Firstly, that won't compile because of a syntax error.

Most of this is antiban/antirandoms/progress report…

BobboHobbo

2007-10-03 05:48:07

From: Santa_Clause
Sorry, no.

Firstly, that won't compile because of a syntax error.

Most of this is antiban/antirandoms/progress report…


I agree with the almighty Santa.

AH farrr pressed yes instead of NO my bad.

Santa_Clause

2007-10-03 05:54:41

Don't give me a big head :D

I always forget to vote now, anyway.

Silver Knight's Australian though…the Australians are really starting to come to SRL.

Let's recount:

  • rkroxpunk
  • The Claw
  • Pancakes
  • Jahuro
  • SantaClause
  • BobboHobbo
  • ZephyrsFury
  • Danrox2004
  • neG
  • XxKanexX
  • Kevin Wolf
  • Haxor

Anyone else?

BobboHobbo

2007-10-03 06:58:42

From: Santa_Clause
Don't give me a big head :D

I always forget to vote now, anyway.

Silver Knight's Australian though…the Australians are really starting to come to SRL.

Let's recount:

  • rkroxpunk
  • The Claw
  • SantaClause
  • BobboHobbo
  • ZephyrsFury
  • XxKanexX
  • Kevin Wolf
  • Haxor

Anyone else?


Yeh go the Auzzies!! i feel so special >;D

MasterKill

2007-10-03 07:41:35

you forgot a ' wich is very anoying :p

*Holding my vote until more people posted*

Negaal

2007-10-03 08:01:20

Mouse(Random(201) + 156, Random(12) + 383, 0, 0, True);
wth is that ? err ,should be:
Mouse (156, 383, 201, 12, True);[/QUOTE


and yes have you ever tested your own script? first of all it should compile… sorry NO

[offtopic]He didn't tryed soup what he cooked:D and i'm not willing to do it aswell[/offtopic]

Macrosoft

2007-10-03 16:34:57

sorry man, work on the script so it compiles, then come back!

Is a no for now, sorry

not a bad looking script though, so keep working on it

RudeBoiAlex

2007-10-03 16:48:32

Was this a remake of solarwinds or copied or somethink

Johura

2007-10-04 00:37:44

From: Santa_Clause
Don't give me a big head :D

I always forget to vote now, anyway.

Silver Knight's Australian though…the Australians are really starting to come to SRL.

Let's recount:

  • rkroxpunk
  • The Claw
  • Pancakes
  • SantaClause
  • BobboHobbo
  • ZephyrsFury
  • Danrox2004
  • neG
  • XxKanexX
  • Kevin Wolf
  • Haxor

Anyone else?


Yep. Born and raised. Actually, i was raised as an italian. So i guess born and proud!

ZephyrsFury

2007-10-04 00:48:25

Lol Rule 1 is that the script must compile… Your comments aren't actually comments and your main loop (at the bottom) is part of a string.

@MasterKill, why on earth would you want to hold your vote?

MasterKill

2007-10-04 01:29:13

sorry einstein says no to :(

plz come back in a month with a ever more good script :)

n3ss3s

2007-10-04 10:39:14

Okey dokey people, time to get the SRLTool ;)


Sorry, better luck next time
  • DTMs / DDTMs
  • Decent complex working script.
  • Break out of potential endless loops
  • RadialWalk / DDTM Walking
  • MultiPlayer

^^^^

Your script looks good, but still needs the above.

[abrakadabra] PSEUDOLOCK! [/abrakadabra]

Santa_Clause

2007-10-05 10:43:56

From: n3ss3s
Okey dokey people, time to get the SRLTool ;)


^^^^

Your script looks good, but still needs the above.

[abrakadabra] PSEUDOLOCK! [/abrakadabra]


No! I want post-count…no pseudolock!

[Offtopic] You using the shorter version I sent you? [/Offtopic]

Sp0rky

2007-10-05 10:52:27

Why do you have solarwind in the address of your script version number text link?

It's a bit strange :p

Tails111

2007-10-06 10:35:58

Odd it is, I thought the script not compiling doesn't matter, I thought no script is auto-deny. What kind of DTMs and DDTMs are you suppose to add in the monastery? The script looks good but it is lacking some vital things, little anti-ban, there is some, and probably enough to not get you banned but we enjoy seeing more.

I vote Yes, because this has a decent amount of anti-ban, I do recommened more colors, and it seems like this would run for a good 2 hours which is nice.

Yes From me.

ZephyrsFury

2007-10-06 10:45:42

I suppose it isn't an auto-decline but still… If he submits a script that doesn't compile then he shouldn't get accepted. (IMO). I mean if you look at the main loop. Its obvious that something is not right. If you try and run the script. Its not going to work so its just a waste of time submiting it. Besides:

Attached SRL Script that must compile and do something useful, No Autotalkers, AutoSpammers, etc that are useless and easy to create.


It might not say auto-decline but it says the script must be SRL, must compile, and not be an autotalker, etc…

Pancakes

2007-10-06 11:00:23

Its no from me. Bite me.

RAM

2007-10-06 11:12:31

Please Post a Sample of your Work. Only SCAR Scripts Accepted


I guess this is a bit vague…people have submitted only procedures/functions before, thinking it was a "sample" of their script….

Personally, I like to see scripts that have been posted in the free section,received feedback and progress reports.. even if it is not that great, at least it shows they are making an attempt at a working script, and are receptive to criticism…

So yeah, if it doesn't compile…I don't think it shows they fully comprehend SRL and its proper application.

IMHO ~RAM

GoF

2007-10-06 12:28:12

How come this app is still open?

So obviosly a copy of solars monk killer.. I'm glad I still have a copy of it.

Solar's monkterminator:


{.Script Info:
# ScriptName = Solarwind's Monk Terminator.
# Author = Solarwind
# Description = Kills monks and auto heals.
# Version = 0.55
# Date = January 9, 2007.
# Comments = Please post progress reports!
/Script Info}

{======================================================================================================]
[ _____ ___ __ ]
[ /\ _ '\ /\_ \ __ /\ \ ]
[ \ \,\L\_\ ___\//\ \ __ _ __ __ __ __/\_\ ___ \_\ \ ]
[ \/_\__ \ / __`\\ \ \ /'__`\ /\`'__\/\ \/\ \/\ \/\ \ /' _ `\ /'_` \ ]
[ /\ \L\ \/\ \L\ \\_\ \_/\ \L\.\_\ \ \/ \ \ \_/ \_/ \ \ \/\ \/\ \/\ \L\ \ ]
[ \ `\____\ \____//\____\ \__/.\_\\ \_\ \ \___x___/'\ \_\ \_\ \_\ \___,_\ ]
[ \/_____/\/___/ \/____/\/__/\/_/ \/_/ \/__//__/ \/_/\/_/\/_/\/__,_ / ]
[ ]
[ ]
[ _____ _ _____ _ _ ]
[ | |___ ___| |_ |_ _|___ ___ _____|_|___ ___| |_ ___ ___ ]
[ | | | | . | | '_| | | | -_| _| | | | .'| _| . | _| ]
[ |_|_|_|___|_|_|_,_| |_| |___|_| |_|_|_|_|_|_|__,|_| |___|_| ]
[ ]
[ ]
[======================================================================================================]
[ ]
[ ]
[ Release History: ]
[ ]
[ v0.25: First alpha release. Script is pretty stable, misclicks a little and has a few flaws. ]
[ v0.32: Second alpha release. Added many more new features. Is now multiplayer. ]
[ v0.47: Third alpha release. Fixed more bugs including multiplayer bugs and timing bugs. Added ]
[ better monk colours and fidning features. Added antiban more random event finding. ]
[ v0.49: First beta release. Player time almost fixed, fixed more bugs. ]
[ v0.53: Second stable beta release. Player time issue is 100% fixed. Added more features and made ]
[ the script more efficeint and safer to use. Added more antiban. ]
[ ]
[ ]
[ ]
[======================================================================================================]
[ ]
[ ]
[ Credits: ]
[ A major thanks to Kaldo for the main idea for the script and function ideas. I wouldn't have ]
[ started this project without him. ]
[ ]
[ Thanks to all my testers for testing and giving me feedback/suggestions on this script. ]
[ ]
[ ]
[ Once complete, this script will be a flawless, mean, lean army making machine! So, please help ]
[ test this script and please post progress reports. ]
[ ]
[ ]
[ ]
[======================================================================================================]
[ ]
[ ]
[ Instructions: ]
[ Set up the following: ]
[ User constants. ]
[ Player array. ]
[ ]
[ ]
[======================================================================================================}

program MonkTerminator;

{.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.55;

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: GetXP(Players[CurrentPlayer].Skill);
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 Solarwind ]');
PrintSleep(' [ Monk Terminator by Solarwind ]');
PrintSleep(' [ Monk Terminator by Solarwind ]');
PrintSleep(' [ Monk Terminator by Solarwind ]');
PrintSleep(' [ Monk Terminator by Solarwind ]');
PrintSleep(' [ Monk Terminator by Solarwind ]');
PrintSleep(' [ Monk Terminator by Solarwind ]');
PrintSleep(' [ Monk Terminator by Solarwind ]');
PrintSleep(' [ Monk Terminator by Solarwind ]');
PrintSleep(' [ Monk Terminator by Solarwind ]');
PrintSleep(' [Monk Terminator by Solarwind]');
PrintSleep(' ..::[ Monk Terminator by Solarwind ]::..');
WriteLn('');
end;


function CheckForUpdates : boolean;
begin

VersionPage := GetPage('http://solarwind.frih.net/MonkTerminator/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('| Solarwind''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 - Players[CurrentPlayer].Worked)) + ' 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.

ShowerThoughts

2007-10-06 12:56:53

big NO ^RAM^

RAM

2007-10-06 14:19:18

Thanks, I have a new looser of the day ;)…. I guess that would explain why he hasn't responded….

~RAM