SRL Archive - Archive

sherlockmeister - SRL Member Application Form


sherlockmeister

2008-09-03 06:55:50

<!– BEGIN TEMPLATE: formanswers –>
sherlockmeister - SRL Member Application Form
sherlockmeister

What is the meaning to life?


Where you Referred to SRL? If yes, by whom?



Programming Knowledge


Other Communitys


How Long have You Played Runescape


Are you affilated in anyway with Jagex LTD?
No Comment
—————————————————–
Please write down a paragraph about Yourself.



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

ok here is my zamy monk curser

u have to comment out nextplayer in login.scar

program New;

{.include SRL\SRL\Misc\Smart.scar}
{.include SRL\SRL.scar}
{.include SRL\SRL\Skill\Magic.scar}

procedure DeclarePlayers;
begin
HowManyPlayers := 4;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
LampSkill := 'magic';

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Integers[0] := 50; //casts to do before switching
Players[0].Active := True;

Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';
Players[1].Integers[0] := 50; //casts to do before switching
Players[1].Active := True;

Players[2].Name := '';
Players[2].Pass := '';
Players[2].Nick := '';
Players[2].Integers[0] := 50; //casts to do before switching
Players[2].Active := True;

Players[3].Name := '';
Players[3].Pass := '';
Players[3].Nick := '';
Players[3].Integers[0] := 50; //casts to do before switching
Players[3].Active := True;
end;

function MinTimeout: Integer;
var
I: Integer;
begin
Result := Players[0].Integers[1];
for I := 1 to High(Players) do
if (Players[I].Active) then
Result := Min(Result, Players[I].Integers[1]);
end;

procedure TimeoutScript(Time: Integer);
begin
WriteLn('Timing out script for ' + IntToStr(Time / 1000) + ' secs');
Sleep(Time);
end;

procedure NextPlayer(Active: Boolean);
begin
if RandomPlayer then
RandomNextPlayer(Active)
else
begin
WriteLn('NextPlayer(Active: ' + BoolToStr(Active)+ ');');
Players[CurrentPlayer].Active := Active;
Logout;
PlayerCurTime := (GetSystemTime div 1000);
Players[CurrentPlayer].Worked := Players[CurrentPlayer].Worked +
((PlayerCurTime - PlayerStartTime) / 60);
CurrentPlayer := (CurrentPlayer + 1) mod Length(Players);
while ((Players[CurrentPlayer].Active = False) or
(GetTimeRunning < Players[CurrentPlayer].Integers[1])) do
begin
CurrentPlayer := (CurrentPlayer + 1) mod Length(Players);
if (AllPlayersInactive) then Wait(60000); // Everybody False. Endless Loop.
TimeoutScript(Max(MinTimeout - GetTimeRunning, 0));
Sleep(1000 + Random(100));
end;
SRL_Logs := SRL_Logs + 1;
LoginPlayer;
end;
end;

function Calibrate: Boolean;
begin
if (not LoggedIn) then Exit;
WriteLn('Calibrating compass');
GameTab(Random(15) + 1);
Result := MakeCompass('e');
if (Result) then
SetAngle(True);
end;

procedure TimeoutPlayer;
begin
WriteLn('Timing out player out for 10 mins');
Players[CurrentPlayer].Integers[1] := GetTimeRunning + (10 * 60 * 1000);
end;

procedure Antiban;
begin
if (not LoggedIn) then Exit;
case Random(20) of
0: RandomRClick;
1: RandomRClick;
2: RandomRClick;
3: HoverSkill('random', False);
4: HoverSkill('random', False);
5: PickUpMouse;
6: PickUpMouse;
7: PickUpMouse;
8: BoredHuman;
9: BoredHuman;
end;
MMouse(RandomRange(MSX1, MSX2), RandomRange(MSY1, MSY2), 0, 0);
end;

function CastTheSpell: Boolean;
begin
if (not LoggedIn) then Exit;
GameTab(((7 + Random(14)) mod 15) + 1);
Sleep(1000 + Random(100));
Result := True;
if (not Cast('curse')) then
if (not Cast('weaken')) then
if (not Cast('confuse')) then
if (not Cast('wind strike')) then
Result := False;
end;

function CurseMage(var CastNumber, LastXP, LastChangeTime: Integer): Boolean;
var
X, Y, XP: Integer;
Ast: Boolean;
begin
if (not LoggedIn) then Exit;
if (CastTheSpell) then
begin
Sleep(1000 + Random(100));
if (FindObj(X, Y, 'onk', 3488938, 25)) then
begin
WriteLn('Monk found');
if (Random(2) = 0) then
begin
Mouse(X, Y, 2, 2, False);
Sleep(1000 + Random(100));
Ast := ChooseOption('ast');
end else
begin
Ast := IsUpText('ast');
if (Ast) then
Mouse(X, Y, 2, 2, True);
end;
if (Ast) then
begin
FindNormalRandoms;
Sleep(1000 + Random(100));
CastNumber := CastNumber + 1;
Result := True;
if ((CastNumber mod 5) = 0) then
begin
Result := False;
XP := GetXP('magic');
if (XP > LastXP) then
begin
WriteLn(IntToStr(XP - LastXP) + ' XP gained');
LastXP := XP;
LastChangeTime := GetTimeRunning;
Result := True;
end;
end;
end;
end;
end;
FindNormalRandoms;
AntiBan;
Sleep(1000 + Random(100));
end;

procedure UpdateProggy;
var
I: Integer;
begin
WriteLn('');
WriteLn('Worked for: ' + TimeRunning);
for I := 0 to High(Players) do
begin
WriteLn(Players[I].Name + ': ' + BoolToStr(Players[I].Active) + ', Worked: ' +
IntToStr(Players[I].Worked) + ' min, Timeout: ' +
IntToStr(Max(Players[I].Integers[1] - GetTimeRunning, 0) / 1000) + ' sec');
end;
WriteLn('');
end;

procedure MainLoop;
var
CastNumber, LastXP, LastChangeTime, RandomCasts: Integer;
begin
if (not LoggedIn) then
LoginPlayer;
while (True) do
begin
Sleep(1000 + Random(100));
if (not LoggedIn) then
NextPlayer(Players[CurrentPlayer].Active);
if (not Calibrate) then
begin
WriteLn('Unable to calibrate compass');
TimeoutPlayer;
Continue;
end;
CastNumber := 0;
RandomCasts := Random(Players[CurrentPlayer].Integers[0] / 2);
LastXP := GetXP('magic');
LastChangeTime := GetTimeRunning;
while (CastNumber < (Players[CurrentPlayer].Integers[0] + RandomCasts)) do
begin
if (not CurseMage(CastNumber, LastXP, LastChangeTime)) then
begin
WriteLn('Monk not attacked');
if (not LoggedIn) then
Break;
if ((GetTimeRunning - LastChangeTime) > (60 * 1000)) then
begin
WriteLn('No exp gained in past minute');
TimeoutPlayer;
Break;
end;
if (not CastTheSpell) then
begin
WriteLn('Unable to cast the spells anymore');
Players[CurrentPlayer].Active := False;
Break;
end;
if ((rs_GetCompassAngleDegrees < 255) or
(rs_GetCompassAngleDegrees > 285)) then
if (not Calibrate) then
begin
WriteLn('Unable to calibrate compass');
TimeoutPlayer;
Break;
end;
end;
WriteLn(IntToStr(CastNumber) + ' ' +
(IntToStr(Players[CurrentPlayer].Integers[0] + RandomCasts)));
end;
Logout;
UpdateProggy;
end;
end;

begin
SmartSetup('world49', True, True, False);
Sleep(15 * 1000);
SetTargetDC(SmartGetDC);
ClearDebug;
SetupSRL;
DeclarePlayers;
MainLoop;
end.

——————————————————
<!– END TEMPLATE: formanswers –>

sirlaughsalot

2008-09-03 07:55:24

No answers to any of the questions? It looked really good, until, it didnt compile >_<… Why didnt you answer any of the questions? You arent very active here, we need to know your experience and what kind of person you are…

Gu3st...

2008-09-03 08:22:41

Why did you add NextPlayer() in your script? that makes it not compile…

Scaper

2008-09-03 08:30:49

umm answer the questions dude we need to know about you you're attitude etc??

Bonfield

2008-09-03 08:41:52

no to simple sorry

why did u use wind strike? just wondering y you would add random casts what happens if someone wants to do 100 casts so thats their integer0 then your script adds casts that there will not be enough runes making it timeout


also how come u made ur own nexplayer?

       
Ast := ChooseOption('ast');
end else
begin
Ast := IsUpText('ast');
can you do that? i dont think will work setting Ast as ChooseOption and as the UpText in the same procedure

  SmartSetup('world49', True, True, False);
Sleep(15 * 1000);
SetTargetDC(SmartGetDC);

why did u use sleep? wait would have done the same

i hope that helped

MasterKill

2008-09-03 10:02:38

sorry, a no, you made a good start, but this is not good enough yet :(

What factors do you need:

  • DTMs / DDTMs
  • Decent complex working script.
  • FailSafes
  • If reflection then backup with colors, for example: radialroadwalk as backup for walktotile
  • Use and knowledge of functions and there results
  • MultiPlayer
  • Break out of potential endless loops
  • Standards! Required to get people read your script.
  • RadialWalk / DDTM Walking
if you allready have some points don't mind them :)


How do we judge it?

looking at the code, standaards. and whe imagen if it's working yes or no.


How many lines of code do you need

I would say 300+.
Make sure you got fail saves for evry possible option that could be going wrong.


well….

I hope this helped ya. good luck scripting!

boberman

2008-09-03 10:32:10

no from me. No walking, just casting. Plus some functions that really don't do anything like "Calibrate compass" The compass is not a measure of where the map is. I've seen it somewhere near 30 degrees off of what the actual map rotation is.

Even then you don't us the compass for anything so it is just waisted space.

P1nky

2008-09-03 11:08:39

sorry no reasons posted already :S

Naike

2008-09-03 11:24:00

No.. Atleast say some info -_- Otherwise don't bother posting your script..

sherlockmeister

2008-09-03 17:16:16

anyone tried this at least?? in varrock castle with the trapped monk, i got a 9 hour proggy

btw any suggestions for scripts to make that are less simple?

Narcle

2008-09-03 17:24:09

From: sherlockmeister
anyone tried this at least?? in varrock castle with the trapped monk, i got a 9 hour proggy

btw any suggestions for scripts to make that are less simple?


You didn't answer any of the questions about who your are etc.

And "less simple" is have various types of functions listed in Masterkills post.

Making new functions just for your script and such as well would make it "less simple" and shows that you know more then just a basic fighter/power miner/power wc etc.

Illkillutill

2008-09-03 18:09:03

From: N1ke!
No.. Atleast say some info -_- Otherwise don't bother posting your script..


I said no as well. It would be nice if we knew some of your background.

sirlaughsalot

2008-09-03 18:55:18

Yeah and the "no comment" thing with the Jagex affiliation is kinda scary… But i vote nozorz