SRL Archive - RS3 Outdated / Broken Scripts

Request For Requests


the nerd

2007-03-02 02:41:38

Is there anyone that need new, or customized function or procedures. Cuz im better at creating functions and stuff that scripts. SO if anyone need a function for a script that there making then plz post them here.

Sp0rky

2007-03-02 06:09:02

Can you improve my procedure? >_>

It gives 'Sure, I'll give it a go.' a few times round the loop, then fucks up. So I'd love a really nice procedure to click it. :P


Procedure TalkTo;
begin
ClickToContinue;
wait(2000);
ClickNpcChatText('give it a go.');
wait(1000);
ClickToContinue;
wait(1000);
ClickToContinue;
wait(1000);
end;

Buckleyindahouse

2007-03-02 08:07:29

Well idk but maybe this?

Yours:
 Procedure TalkTo;
begin
ClickToContinue;
wait(2000);
ClickNpcChatText('give it a go.');
wait(1000);
ClickToContinue;
wait(1000);
ClickToContinue;
wait(1000);
end;


Mines :

Procedure TalkTo;
Begin
If(ClickToContinue)Then
Begin
Repeat
FTWait(3);
ClickToContinue;
Until(ClickNpcChatText('give it a go'))
End;
End;

JuKKa

2007-03-02 17:57:05

that wouldnt work because give it a go comes as second more like:


function ClicktoGo : boolean;
Begin
if ClickToContinue then
begin
Repeat
FTWait(3)
ClickToContinue;
Until(ClickNpcChatText('give it a go.'));
result:= true;
end;
if result then
begin
repeat
FTwait(3)
Clicktocontinue
until(not clicktocontinue)
end;
end;

Boreas

2007-03-03 00:53:09

function OrderIntArray(TheArray:array of integer):array of integer;

Put in an array of integer, spits out array in order, lowest to highest.

Also same but with array of Tpoint, that can sort by x or by y. Or make a separate function for x and for y, idc.

RudeBoiAlex

2007-03-03 06:32:50

The Nerd how youre tut islnad im i need of that

the nerd

2007-03-05 07:32:17

From: Boreas
function OrderIntArray(TheArray:array of integer):array of integer;

Put in an array of integer, spits out array in order, lowest to highest.

Also same but with array of Tpoint, that can sort by x or by y. Or make a separate function for x and for y, idc.


I managed to make the function which was not very easy, but I did it. A function sorts TPoints from highest to lowest by either x or y.


{*******************************************************************************
Function SortTPoints(Tpoints:TPointArray;SortByX:Boolean):TPointArray;
By: THE NERD
Description: Sorts TPointArrays from lowest to highest by either x or by
depending on what you enter for SortByX
*******************************************************************************}

Function SortTPoints(Tpoints:TPointArray;SortByX:Boolean):TPointArray;
var
Numberinarray, I, II, C, NumberofSofar, CurrentNum, LargestNum:integer;
Temp, Final: TPointArray;

begin
NumberInArray := getarraylength(TPoints);

SetArrayLength(Temp, NumberInArray);
SetArrayLength(Final, NumberInArray);

CurrentNum := 0;

For I := 0 to Numberinarray - 1 do
begin
Temp[I].x := TPoints[I].x;
Temp[I].y := TPoints[I].y;
end;

If (SortByX) Then
begin
For II := 0 to Numberinarray - 1 do
begin
NumberofSofar := 0;
For I := 0 to Numberinarray - 1 do
begin
If (Temp[II].x >= Temp[I].x) Then
begin
NumberofSofar := NumberofSofar + 1;
end;
If (NumberofSofar >= Numberinarray) Then
begin
LargestNum := Temp[II].x;
end;
end;
end;

Repeat
For II := 0 to Numberinarray - 1 do
begin
NumberofSofar := 0;
For I := 0 to Numberinarray - 1 do
begin
If (Temp[II].x <= Temp[I].x) Then
begin
NumberofSofar := NumberofSofar + 1;
end;
If (NumberofSofar >= Numberinarray) Then
begin
If (CurrentNum < NumberInArray) Then
begin
Final[CurrentNum].x := Temp[II].x;
Final[CurrentNum].y := Temp[II].y;
CurrentNum := CurrentNum + 1;
Temp[II].x := LargestNum + 1;
end;
end;
end;
end;
Until (CurrentNum >= NumberInArray);
end;

If Not (SortByX) Then
begin
For II := 0 to Numberinarray - 1 do
begin
NumberofSofar := 0;
For I := 0 to Numberinarray - 1 do
begin
If (Temp[II].y >= Temp[I].y) Then
begin
NumberofSofar := NumberofSofar + 1;
end;
If (NumberofSofar >= Numberinarray) Then
begin
LargestNum := Temp[II].y;
end;
end;
end;

Repeat
For II := 0 to Numberinarray - 1 do
begin
NumberofSofar := 0;
For I := 0 to Numberinarray - 1 do
begin
If (Temp[II].y <= Temp[I].y) Then
begin
NumberofSofar := NumberofSofar + 1;
end;
If (NumberofSofar >= Numberinarray) Then
begin
If (CurrentNum < NumberInArray) Then
begin
Final[CurrentNum].y := Temp[II].y;
Final[CurrentNum].x := Temp[II].x;
CurrentNum := CurrentNum + 1;
Temp[II].y := LargestNum + 1;
end;
end;
end;
end;
Until (CurrentNum >= NumberInArray);
end;

Result := Final;
end;

And also one that does the same, but with integers.


{*******************************************************************************
Function Sort(NumbersArray:Array Of Integer):Array of Integer;
By: THE NERD
Description: Sorts an array of integers from lowest to highest
*******************************************************************************}

Function Sort(NumbersArray:Array Of Integer):Array of Integer;
var
Numberinarray, I, II, C, NumberofSofar, CurrentNum, LargestNum:integer;
Temp, Final: Array of Integer;

begin
NumberInArray := getarraylength(NumbersArray);

SetArrayLength(Temp, NumberInArray);
SetArrayLength(Final, NumberInArray);

CurrentNum := 0;

For I := 0 to Numberinarray - 1 do
begin
Temp[I] := NumbersArray[I];
end;

For II := 0 to Numberinarray - 1 do
begin
NumberofSofar := 0;
For I := 0 to Numberinarray - 1 do
begin
If (Temp[II] >= Temp[I]) Then
begin
NumberofSofar := NumberofSofar + 1;
end;
If (NumberofSofar >= Numberinarray) Then
begin
LargestNum := Temp[II];
end;
end;
end;
Repeat
For II := 0 to Numberinarray - 1 do
begin
NumberofSofar := 0;
For I := 0 to Numberinarray - 1 do
begin
If (Temp[II] <= Temp[I]) Then
begin
NumberofSofar := NumberofSofar + 1;
end;
If (NumberofSofar >= Numberinarray) Then
begin
If (CurrentNum < NumberInArray) Then
begin
Final[CurrentNum] := Temp[II];
CurrentNum := CurrentNum + 1;
Temp[II] := LargestNum + 1;
end;
end;
end;
end;
Until (CurrentNum >= NumberInArray);

Result := Final;
end;

Boreas

2007-03-05 08:14:03

Good job, thanks!