putonajonny
2011-12-15 20:29:58
How Long have You Played Runescape?
4 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
I am reliantly new to programming (only being 17) but I have some knowledge of C++ and Java as well as pascal.
Are you a member of any other communities?
Not largely, but I have tried to play a key role in this one, I developed and have maintained a Script Request Compilation Thread here
Tell us about yourself…
Please show us one (or multiple) of your scripts.
The first Script is my Goblin Killer, this used my new way of declaring players, have a look closely and you will see, it is over 600 lines long and works well. It includes my own IsFighting function. It uses Arrays and has great failsafes and antibans
My next Script is a Logging in and out bot that can be customized, it was requested in the link at the top of the script this demonstrates knowledge of Multiplayer Scripts.
My next Script isn't runescape related, it just calculates pi (you know that number in maths) it is just quite fun to use, it can't get it to too much accuracy before the numbers becoming too big for extended's to take but have a go…
I hope you have enjoyed my scripts, this is just a selection so if there is anything key I have missed out chances are it is in one of my other script so just let me know…
Thanks
-putonajonny
4 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
I am reliantly new to programming (only being 17) but I have some knowledge of C++ and Java as well as pascal.
Are you a member of any other communities?
Not largely, but I have tried to play a key role in this one, I developed and have maintained a Script Request Compilation Thread here
Tell us about yourself…
From: putonajonny
I am actually called Sam, I am 17 and I live in the United Kingdom. I became interested in runescape about 4 years ago. I'm currently doing my A-Levels but I'm not sure what I want to do in the distant future, however I have just applied to do Engineering at university next year.
Please show us one (or multiple) of your scripts.
The first Script is my Goblin Killer, this used my new way of declaring players, have a look closely and you will see, it is over 600 lines long and works well. It includes my own IsFighting function. It uses Arrays and has great failsafes and antibans
//This script kills goblins in lumbridge, It will even walk back if you die. Give me feedback in the forms.
program GoblinKiller;
{.include SRL/SRL/Misc/Smart.scar}
{.include SRL/SRL.scar}
{$i sps/sps.simba}
{$i SRL/SRL/Misc/stats.simba}
{$i SRL/SRL/misc/paintsmart.scar}
{.include SRL/SRL/Skill/Fighting.scar}
// {.include SRL/DeclarePlayers.scar}
Var
Location, x, y, TimeLast, Time, bones, i, attackedsinceburried, bonesburried, timespentb, TimeLastPainted, z, t : Integer;
Lumbridge, Goblins1, Goblins2, Goblins3: TPoint;
WalkGoblins: TPointArray;
Colours, BoneColours, PlayersToUse : TIntegerArray;
Ver, CurStatus : String;
DoneAntiban, PermissionToLocate, NoMoreBones, PtoLB, LootBones, JustLootBones : Boolean;
Const
Version = 3;
NCPColour1 = 4363920; //If the script won't fight the goblins then change these
NCPColour2 = 8029837;
NCPColour3 = 5994344;
NCPColour4 = 6516083;
WaitTime = 2000; //Wait Time before attacking another NCP
Tolerance = 3; //Colour Tolerence
HowOften = 0; //How often in seconds should it check the location? If it gets lost a lot lower this, if it is slow and is always checking location increase this
INeedHelp = False; //Do you need help setting this script up?
SRLStats_User = 'IDonthaveAnAccount'; // Your SRL Stats ID (If you dont have one then just leave it as it is)
SRLStats_Password = '12345abcde'; // Your SRL Stats Password (If you dont have one then just leave it as it is)
TimeSpentBurrying = 10; //How much of the time should be spent burrying bones? Scale 1 to 10
ChangePlayerEvery = 60; //How often should it swap players
ReusePlayers = True; //Once all the players have been used should it start again or end?
procedure DeclarePlayers;
begin
LootBones := True; //Loot and bury bones?
JustLootBones := False; //Just loot and bury bones? (no combat) For an explanation of why these aren't constants look here: [url]http://villavu.com/forum/showthread.php?p=863322[/url]
// DeclareThePlayers; //If you are unsure about how to declare players then just run the script, all will become clear.
CurrentPlayer := 0; //You must set up players in the DeclarePlayers.scar file located at C:\Simba\Includes\SRL,
PlayersToUse := [0]; //to learn how to set that up go here: [url]http://putonajonnyscripts.hostoi.com/Help.htm[/url]
//****If that file does not exist then run this script, it will create it.*****
end; //no editing required below here...
Procedure SetBitmaps;
begin
bones := BitmapFromString(21, 18, 'meJx9k1lLQmEQhqVf4g8oiCKIbo' +
'wguu0i2mihbF9tQyRsEdO0PbHEss0WWwxLDGm/if5WDwwMH+dUMBy' +
'G+Wbe953lVLoaKlz1la6G8po6sbLq2hKHIx4/HBubwtGgmaBGodSa' +
'CFQdHV96vX4cp7NcIgr1j0kadnGRDQRWpZzv5dV9LJbUV4ESSYjXw' +
'qenj9u7/MlJBvF+f6DXPSjxQuHt7Ox6fSMWDEZ9vsWJiRmC0qYY+A' +
'eH6c3NOKQLi8H5+WW+pgAwpRDM5pZ2iYMJUTi8wZPHM4eZCrU2my1' +
'EIlsqRuIYdAQHBkdlzjc3j5YesWLxEwpBlioxWgZzaGhcM9/fv0HY' +
'208hFSeff3l9+0Ihc7BgijEKxcTJ5Yqp1Dm9JJOnmUzu4fFZZPf1D' +
'5PJ6IizFOIQ4Wst88eHiHaYA5msXmRPT3sxBKyE1nlNJI7T57cQ0S' +
'b6pQvZHbymNlpg/jgjI5Mzsz58EnZ2E/BChG8/G20E2dG1Hab6a9c' +
'YCs1jFtMrZYAwWqatJtrk8u1Hi7alpVBHZ4+Um2n6v8jhmbVsiplw' +
'twijX6WWqtIql/0HNMvZCNe7vb3HqBsbm/SPU1K7bwKKcnYEdWtbp' +
'1n+F6kFTdYHe1e328JuB/kBYKY/7Q==');
FreeBitmap(bones);
end;
Procedure PrintOnSmart(TP: TStringArray; Placement: TPoint; Colour: integer); //Thanks to BobboHobbo
var
mx, my, Pic, I, B, H, Numb: Integer;
TTP: TPointArray;
Canvas: TCanvas;
begin
SmartSetDebug(True);
GetClientDimensions(mx, my);
Pic := BitmapFromString(mx, my, '');
for I := 0 to High(TP) do
begin
TTP := LoadTextTPA(TP[i], SmallChars, H);
for B := 0 to High(TTP) do
begin
Numb := ((I + 1) * 13);
FastSetPixel(Pic, TTP[b].x + 1, TTP[b].y + Numb + 1,8388736);
FastSetPixel(Pic, TTP[b].x, TTP[b].y + Numb, Colour);
end;
end;
Canvas := TCANVAS.Create;
Canvas.Handle := SmartGetDebugDC;
DrawBitmap(Pic, Canvas, Placement.x, Placement.y);
FreeBitmap(Pic);
end;
Procedure Paint;
begin
If((GetTimeRunning-TimeLastPainted)>5000) then
begin
PrintOnSmart(['Status:', CurStatus ], Point(42, 45), 16695040);
PrintOnSmart(['this script was written by putonajonny'], Point(270,359),16695040);
PrintOnSmart(['Time Running (Perodically Updated)',TimeRunning],Point(563,424),16695040);
TimeLastPainted := GetTimeRunning
end;
end;
function FindHPBars(Sx, Sy, x1, y1, x2, y2: Integer): TBoxArray; //this function is an exact copy of FindAllHPBars except the colours needed changing
var
a, b : TPointArray;
ATPA : T2DPointArray;
H, I : Integer;
begin
FindColorsSpiralTolerance(Sx, Sy, a, 524473, x1, y1, x2, y2, 0);
FindColorsSpiralTolerance(Sx, Sy, b, 51867, x1, y1, x2, y2, 0);
ATPA := TPAToATPAEx(CombineTPA(a, b), 55, 7);
H := High(ATPA);
SetLength(Result, Length(ATPA));
for I := 0 to H do
Result[i] := GetTPABounds(ATPA[i]);
end;
function GetHits(Sx, Sy, x1, y1, x2, y2: Integer): TIntegerArray; //this function is an exact copy of GetHitsIn but i needed to make it call FindHPBars not FindAllHPBars
var
E: Extended;
I, H: Integer;
TBA : TBoxArray;
begin
TBA := FindHPBars(Sx, Sy, x1, y1, x2, y2);
SetArrayLength(Result, GetArrayLength(TBA));
H := High(TBA);
for I := 0 To H Do
begin
E := CountColorTolerance(56488, TBA[i].x1, TBA[i].y1, TBA[i].x2, TBA[i].y2, 43) / 60;
Result[i] := Round(100 * E);
end;
end;
function IsFighting(Tolerance : Integer) : Boolean; //My function
var
Hits : TIntegerArray;
HP : Integer;
begin
Result := False
Hits := GetHits(253, 99, 0, 0, 764, 502);
if GetArrayLength(Hits) = 0 then
Exit;
HP := HPPercent
Result := ((HP-Tolerance) < Hits[0]) and ((HP+Tolerance) > Hits[0]);
if (GetArrayLength(Hits) > 1) and (not Result) then
Result := ((HP-Tolerance) < Hits[1]) and ((HP+Tolerance) > Hits[1]);
end;
Procedure CheckVersion;
Begin
CurStatus := 'Checking that you are running the most recent version'
Ver := GetPage('http://goblinkiller.webuda.com/Ver');
If Version = StrToInt(Ver) then
begin
WriteLn('You are using the most up to date version -Thank you');
end else
begin
If Version > StrToInt(Ver) then
begin
WriteLn('**You seem to be useing some sort of beta version, be careful')
end else
begin
ClearDebug;
WriteLn('Please Update This Script, opening web page...');
OpenWebPage('http://goblinkiller.webuda.com/Redirect');
TerminateScript; //Comment out this to use this version anyway
end;
end;
End;
Procedure CheckRandoms;
begin
CurStatus := 'Checking for Randoms'
Paint;
FindNormalRandoms;
If Not(LoggedIn) Then
begin
WriteLn('I think we failed a random - I will just Check');
LoginPlayer;
FindNormalRandoms;
If Not(LoggedIn) Then
begin
WriteLn('Client has Logged Out So Probably Failed a Random - Terminating Script');
TerminateScript;
end
end;
end;
Procedure CheckLocation;
begin
If((GetTimeRunning<60000) or ((GetTimeRunning-TimeLast)>HowOften*1000) or (PermissionToLocate)) then
begin
CurStatus := 'Checking Location'
Paint;
Wait(4000+Random(2000))
Location := 2;
if (SPS_PosOnMM(Lumbridge)) then
Location := 0; //lumbridge
if (SPS_PosOnMM(Goblins1)) or (SPS_PosOnMM(Goblins2)) or (SPS_PosOnMM(Goblins3)) then
Location := 1; //Goblins
TimeLast := GetTimeRunning
end;
end;
Procedure WalkToGoblins;
begin
CurStatus := 'Walking to Goblins'
Paint;
WalkGoblins := [Point(4708, 3767), Point(4733, 3767), Point(4753, 3761), Point(4759, 3743), Point(4748, 3723),
Point(4731, 3707), Point(4717, 3693), Point(4710, 3676), Point(4698, 3677), Point(4675, 3674),
Point(4648, 3678), Point(4625, 3675), Point(4598, 3677), Point(4580, 3676), Point(4565, 3676), Point(4565, 3650)]
If(SPS_WalkPath(WalkGoblins)) then
WriteLn('At Goblins');
end;
Procedure RectifyLocation;
begin
CurStatus := 'Rectifying Location'
Paint;
Mouse(254, 309, 10, 5, true);
Wait(250+Random(250));
Mouse(544, 24,5,5,true);
If (FindSymbol( x, y, 'fishing shop')) then //attempt 1
begin
WriteLn('using fishing shop to fix location')
CurStatus := 'using fishing shop to fix location'
Paint;
Wait(500+Random(200));
x := x-43
y := y-5
Mouse(x, y,5,5,true);
Wait(2000+Random(2000));
end;
If (FindSymbol( x, y, 'dungeon')) then //attempt 2
begin
WriteLn('using dungeon to fix location')
CurStatus := 'using dungeon to fix location'
Paint;
Wait(500+Random(200));
x := x+66
y := y+7
Mouse(x, y,2,2,true);
Wait(2000+Random(2000));
end;
If (FindSymbol( x, y, 'fish')) then //attempt 3
begin
WriteLn('using fishing spot to fix location')
CurStatus := 'using fishing spot to fix location'
Paint;
Wait(500+Random(200));
x := x+59
y := y+68
Mouse(x, y,2,2,true);
Wait(2000+Random(2000));
end;
If (FindSymbol( x, y, 'water')) then //attempt 4
begin
WriteLn('using water to fix location')
CurStatus := 'using water to fix location'
Paint;
Wait(500+Random(200));
x := x-45
y := y+87
Mouse(x, y,2,2,true);
Wait(2000+Random(2000));
end;
If (FindSymbol( x, y, 'churn')) then //attempt 5
begin
WriteLn('using churn to fix location')
CurStatus := 'using churn to fix location'
Paint;
Wait(500+Random(200));
x := x-52
y := y+108
Mouse(x, y,2,2,true);
Wait(2000+Random(2000));
end;
PermissionToLocate := True
CheckLocation;
case location of //final attempt
2: begin
Mouse(626,152,2,2,True)
Wait(2000+Random(1000));
end;
end;
PermissionToLocate := True
CheckLocation;
case location of
2:
begin
Writeln('Location Not Recognised - Lets Teleport Home')
GameTab(tab_Magic)
Wait(1000+Random(500))
Mouse(575, 230, 5, 5, true)
Time := GetTimeRunning;
Repeat
Wait(2000+Random(500));
If((GetTimeRunning - Time) > 15000) and (Not SPS_PosOnMM(Lumbridge)) then
begin
GameTab(tab_Magic)
Wait(1000+Random(500))
Mouse(575, 230, 5, 5, true)
Time := GetTimeRunning;
end;
Until(SPS_PosOnMM(Lumbridge));
PermissionToLocate := True;
Wait(2000+Random(1000))
end;
end;
end;
Procedure Attack;
begin
CurStatus := 'Attacking'
Paint;
If (FightNPC(Colours, Tolerance, WaitTime)) then
stats_IncVariable('Monsters Killed', 1)
else
SetAngle(True);
DoneAntiban := False;
attackedsinceburried := attackedsinceburried + 1
If (attackedsinceburried>(10-TimeSpentBurrying)) then
begin
PtoLB := True;
attackedsinceburried := 0
end;
end;
Procedure AntiBan;
begin
CurStatus := 'Antiban'
Paint;
If Not(DoneAntiban) then
begin
x := Random(51)
case x of
0: HoverSkill('Attack', False); //Beautiful Antiban
1: HoverSkill('Strength', False);
2: HoverSkill('Defence', False);
3: HoverSkill('hitpoints', False);
4: HoverSkill('smithing', False);
5: HoverSkill('woodcutting', False);
6: HoverSkill('firemaking', False);
7: HoverSkill('magic', False);
8: HoverSkill('woodcutting', False);
9: HoverSkill('fishing', False);
10: HoverSkill('prayer', False);
11: HoverSkill('runecrafting', False);
12..15: PickUpMouse;
16..25: RandomMovement;
26..27: RandomRClick;
28..32: BoredHuman;
33: ExamineInv;
34: RandomAngle(True);
35..48: Wait(1000+random(1000));
49..50: Wait(1000+Random(20000));
end;
DoneAntiban := True;
Wait(2000+Random(500));
end;
end;
function CreateDeclarePlayersFile : integer;
Var DecPlayScript : String;
begin
Result := 0;
If(Not DirectoryExists('C:\Simba\Includes\SRL')) then
CreateDirectory('C:\Simba\Includes\SRL');
If(Not FileExists('C:\Simba\Includes\SRL\DeclarePlayers.scar')) then
begin
Result := 1
DecPlayScript := GetPage('http://putonajonnyscripts.hostoi.com/DeclarePlayers')
If ((CreateFile('C:\Simba\Includes\SRL\DeclarePlayers.scar') = -1) or (not WriteFileString(0, DecPlayScript))) then
Result := 2;
WriteLn(FileSize(0));
CloseFile(0);
end;
end;
Procedure DeclarePlayersFile; //This procedure creates the declare players file if it doesn't exist
begin
Case CreateDeclarePlayersFile of
0: begin
Wait(200+Random(100)); //Didn't need to create the file
WriteLn('Good Luck!');
end;
1: begin
ClearDebug;
WriteLn('*************************************************************************************************')
WriteLn('This seems to be the first time you have used a script using this method of declaring players.')
WriteLn('Opening the help page on how to setup your players.')
WriteLn('***Please now uncomment lines 11 and 41***')
WriteLn('*************************************************************************************************')
OpenWebPage('http://putonajonnyscripts.hostoi.com/Help.htm')
TerminateScript;
end;
2: begin
WriteLn('an error occoured, opening a help page')
OpenWebPage('http://putonajonnyscripts.hostoi.com/Error.htm')
TerminateScript;
end;
end;
end;
Procedure BuryBones;
begin
CurStatus := 'Burying Bones'
Paint;
TimeSpentB := TimeSpentBurrying;
GameTab(25)
If (FindBitmapToleranceIn(bones, x, y, 546, 206, 735, 465, 15)) then
begin
Repeat
FreeBitmap(bones);
MMouse( x, y, 2, 2);
ClickMouse2(True);
bonesburried := bonesburried + 1;
stats_IncVariable('Bones (Burried)',1);
Wait(2000+Random(500));
NoMoreBones := not(FindBitmapToleranceIn(bones, x, y, 546, 206, 735, 465, 15))
TimeSpentB := TimeSpentB - 1
Until(NoMoreBones or (TimeSpentB <1))
end;
FreeBitmap(bones);
end;
Procedure Loot;
begin
CurStatus := 'Looting'
Paint;
BuryBones;
If((LootBones and PtoLB) or (JustLootBones)) then
begin
for i := 0 to GetArrayLength(BoneColours) do
begin
IF(FindColorTolerance(x, y, BoneColours[i], 0, 0, 516, 338, 10)) then
begin
Wait(400+Random(200))
Mouse( x, y, 2, 2, False);
(WaitOption('one', 2000));
stats_IncVariable('Bones (Collected)',1)
BuryBones;
end;
end;
Wait(3000+Random(500));
end;
end;
Procedure BonesProgress;
begin
CurStatus := 'Progress Report'
Paint;
If((((GetTimeRunning-Time)>15000) and (JustLootBones)) or ((GetTimeRunning-Time)>60000)) then
begin
WriteLn('')
WriteLn('')
WriteLn('[-------------------------------------------------------------------------------]');
WriteLn('[' + padr(padl('Bone Burrier by Putonjonny', 38 + Length('Bone Burrier by Putonjonny') / 2), 79) + ']');
WriteLn('[-------------------------------------------------------------------------------]');
WriteLn(PadR('[ Time Running: ' + TimeRunning, 80) + ']');
WriteLn(PadR('[ Bones Burried: ' + IntToStr(bonesburried), 80) + ']');
Writeln('[-------------------------------------------------------------------------------]');
WriteLn('')
Time := GetTimeRunning;
end;
end;
Procedure ChangePlayer;
begin
MarkTime(t)
z := z+1
If(LoggedIn) then
Logout;
if(z = GetArrayLength(PlayersToUse)) then
begin
case ReusePlayers of
True: z := 0;
False: begin
WriteLn('****All players Used and ReusePlayers is False so Ending Script****')
TerminateScript;
end;
end;
end;
SwitchToPlayer(PlayersToUse[z],ReusePlayers)
Repeat
LoginPlayer;
Wait(2000);
Until(LoggedIn)
end;
Procedure OpenHelpPage;
begin
ClearDebug;
WriteLn('You have not uncommented lines 11 and 44 or you have not setup the script correctly')
Wait(1000+Random(100)); //why have I put a random on this :S
WriteLn('You obvoiusly need some help...')
Wait(1000+Random(100));
WriteLn('Reaching out for help...')
Wait(1000+Random(100));
WriteLn('I cant find any...')
Wait(1000+Random(100));
WriteLn('It seems that nobody can help you now...')
Wait(1000+Random(100));
WriteLn('Oh wait...')
Wait(1000+Random(100));
WriteLn('Here we go... :)')
Wait(1000+Random(100));
OpenWebPage('http://putonajonnyscripts.hostoi.com/Help.htm')
WriteLn('')
WriteLn('')
WriteLn('')
Wait(250)
WriteLn('To Clarify: You have not uncommented lines 11 and 44 or you have not setup the script correctly.')
WriteLn('Please set up script again then restart.')
WriteLn('The Webpage that Just Opened should help.')
TerminateScript;
end;
begin
ClearDebug;
DeclarePlayersFile;
If (IneedHelp) then
begin
WriteLn('Opening Help Page');
OpenWebPage('http://goblinkiller.webuda.com/Help');
OpenWebPage('http://putonajonnyscripts.hostoi.com/Help.htm')
TerminateScript;
end;
CheckVersion;
CurStatus := 'Setting Up'
Lumbridge := Point(4706, 3767);
Goblins1 := Point(4570, 3650);
Goblins2 := Point(4570, 3650);
Goblins3 := Point(4570, 3650);
Colours := [NCPColour1,NCPColour2,NCPColour3,NCPColour4];
BoneColours := [13159633,13948382,11974847,9803164,9671578,8421510,14211810];
bonesburried := 0;
z := 0
Smart_Server := 11;
Smart_Members := False;
Smart_Signed := False;
Smart_SuperDetail := False;
SetupSRL;
SetupSRLStats(305, SRLStats_User, SRLStats_Password);
cleardebug;
Paint;
WriteLn('***************Goblin Killer by Putonajonny Version '+IntToStr(Version)+'***************');
CheckVersion;
SetBitmaps;
DeclarePlayers;
If(GetArrayLength(Players) = 0) then
begin
OpenHelpPage;
end;
LoginPlayer;
SPS_Areas := ['11_9'];
SPS_Setup(RUNESCAPE_SURFACE, SPS_Areas);
MarkTime(t);
If (JustLootBones) then
begin
SetAngle(True)
Repeat
If(TimeFromMark(t)>(60000*ChangePlayerEvery)) then
ChangePlayer;
Loot;
BonesProgress;
CheckRandoms;
Stats_Commit;
Until(false)
end;
Repeat
If(TimeFromMark(t)>60000*ChangePlayerEvery) then
ChangePlayer;
Paint;
SetAngle(True);
CheckRandoms;
Stats_Commit;
CheckLocation;
case location of
0: WalkToGoblins;
1:begin
Loot;
If(bonesburried>0) then
BonesProgress;
If(isfighting(10)) then
AntiBan
else
Attack;
end;
2: RectifyLocation;
else
RectifyLocation;
end;
until(false)
end.My next Script is a Logging in and out bot that can be customized, it was requested in the link at the top of the script this demonstrates knowledge of Multiplayer Scripts.
//Script that logs in and out Specific Accounts, can do what you want once logged in.
//Requested Here: [url]http://villavu.com/forum/showthread.php?t=68663[/url]
//Uses Smart
program LogInAndOut;
{.include SRL/SRL/Misc/Smart.scar}
{.include SRL/SRL.scar}
Var
i, j : integer;
//---------------------- edit below this line ----------------------\\
Const
Version = 2;
NumberOfAccounts = 3;
NumberOfTimesToLoginEachAccount = 1;
WhatToDoWhilstLoggedIn = 'wait'; // Valid Arguments:
// wait - waits 20 - 40 seconds
// procedure - does your procedure (edit below)
Procedure DeclarePlayers;
begin
NumberOfPlayers(NumberOfAccounts);
//Player 1
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Active := True;
CurrentPlayer := 0;
//Player 2
Players[1].Name := '';
Players[1].Pass := '';
Players[1].Active := True;
CurrentPlayer := 0;
//Player 3
Players[2].Name := '';
Players[2].Pass := '';
Players[2].Active := True;
CurrentPlayer := 0;
//Keep Copying and Pasting for more
end;
Procedure WhatEverYouWant; //put here what you want this script to do once it loggs in
begin
wait(2000+random(2000))
//place code here
wait(2000+random(2000))
end;
//---------------------- don't edit below this line ----------------------\\
Procedure PlayerSwitch;
begin
i := i + 1;
if (i = NumberOfAccounts) then
begin
i := 0;
j := j + 1;
end;
SwitchToPlayer(i, True);
end;
begin
i := 0
j := 0
Smart_Server := 11;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
cleardebug;
WriteLn('***************LogIn and Out by Putonajonny Version '+IntToStr(Version)+'***************');
WriteLn('if you write anything really useful with this script please post it for everybody to use')
DeclarePlayers;
SwitchToPlayer(0,True);
Repeat
LoginPlayer;
WriteLn('Logged In - Now Waiting')
Case WhatToDoWhilstLoggedIn of
'wait' : Wait(20000+Random(20000)); //Waits Between 20 and 40 Seconds
'procedure' : WhatEverYouWant;
end;
WriteLn('Waited - Now Logging Out')
Logout;
PlayerSwitch;
Until(j = NumberOfTimesToLoginEachAccount);
WriteLn('Hope You Enjoyed')
end.My next Script isn't runescape related, it just calculates pi (you know that number in maths) it is just quite fun to use, it can't get it to too much accuracy before the numbers becoming too big for extended's to take but have a go…
//Ever wanted some Pi? well this gets it for you, just a bit of fun, have a play around with it.
program CalculatePi;
Var
x, y, t, o, pi: extended;
n, j: integer;
Const
Iterations = 100; //Increase this to increase the accuracy of Pi
(* the biggest this can be put to is 46341 but i suggest you start low and go
higher, it is quite interesting to see the accuracy grow. *)
Procedure Percent;
begin
Writeln(InttoStr((n*100)/Iterations)+'%') //Comment out this line to significanty speed things up.
end;
begin
ClearDebug
n := 1 (*hello crazy people*)
t := 0
Repeat
x := (n*n)
y := 1 / x
t := t+y
n := n+1
j := Random(Iterations/100)
case j of
0: Percent;
end
If(x<0) then
Begin
WriteLn('x is too big for an extended to hold')
TerminateScript;
end;
Until(n=Iterations)
o := 6*t
pi := SQRT(o)
Writeln('When we do '+IntToStr(Iterations)+' then:')
Writeln('x =')
Writeln(x)
Writeln('y =')
Writeln(y)
Writeln('n =')
Writeln(n)
Writeln('t =')
Writeln(t)
Writeln('o =')
Writeln(o)
Writeln('pi =')
Writeln(pi)
end.I hope you have enjoyed my scripts, this is just a selection so if there is anything key I have missed out chances are it is in one of my other script so just let me know…
Thanks
-putonajonny