SRL Archive - SRL Archives

Princes Procedures and Functions...


The Prince of Randomness?

2006-02-28 22:31:56

Heres Some Procedures…
Procedures So far 2
Functions So far 0



RandomTab! (and HoverMouse)


AntiBan


{**************************************************************************
Procedure:RandomTab
By:The Prince of Randomness
Description:AntiBan Uses tabs Randomly for AntiBan
***************************************************************************}
Var Tab:integer;

{*******************************************************************************
procedure HoverSkill;
By: Dankness
Description: Hovers mouse over selected skill to "check exp"
*******************************************************************************}

procedure hoverskill(skill:string);
var row,col:integer;
begin
case lowercase(skill) of
'attack' :begin row:=1; col:=1; end;
'strength' :begin row:=2; col:=1; end;
'defence' :begin row:=3; col:=1; end;
'range' :begin row:=4; col:=1; end;
'prayer' :begin row:=5; col:=1; end;
'magic' :begin row:=6; col:=1; end;
'runecraft' :begin row:=7; col:=1; end;
'hitpoints' :begin row:=1; col:=2; end;
'agility' :begin row:=2; col:=2; end;
'herblore' :begin row:=3; col:=2; end;
'thieving' :begin row:=4; col:=2; end;
'crafting' :begin row:=5; col:=2; end;
'fletching' :begin row:=6; col:=2; end;
'slayer' :begin row:=7; col:=2; end;
'smithing' :begin row:=1; col:=3; end;
'mining' :begin row:=2; col:=3; end;
'fishing' :begin row:=3; col:=3; end;
'cooking' :begin row:=4; col:=3; end;
'firemaking' :begin row:=5; col:=3; end;
'woodcutting':begin row:=6; col:=3; end;
'farming' :begin row:=7; col:=3; end;
'random' :begin row:=random(6)+1; col:=random(2)+1; end;
end;
gametab(2);
if useBenMouse then
mmouse(532+(64*col),191+(31*row),10,10)
else
mmouse2(532+(64*col),191+(31*row),10,10);
wait(5000+random(5000));
end;

{**************************************************************************
RandomDeclare Procedures
By:The Prince of Randomness
description: Declares all Randoms
****************************************************************************}

Procedure DeclareRandomTabs;
var i:integer;
Begin
I:=Random(8+1);
Begin
If(i=1)Then
Begin
GameTab(1);
Tab:=1;
If(i=2)Then
Begin
GameTab(2);
Tab:=2;
If(i=3)Then
Begin
GameTab(3);
Tab:=3;
If(i=4)Then
Begin
GameTab(4);
Tab:=4;
If(i=5)Then
Begin
GameTab(5);
Tab:=5;
If(i=6)Then
Begin
GameTab(6);
Tab:=6;
If(i=7)Then
Begin
GameTab(7);
Tab:=7;
If(i=8)Then
Begin
GameTab(8);
Tab:=8;
End;
End;
End;
End;
End;
End;
End;
End;
End;
End;



Procedure DeclareRandomFight;
Var i:integer;
Begin
if(Tab=1)Then
Begin
i:=Random(4+1);
Begin
If(i=1)Then
Begin
SetFightMode(1);
If(i=2)Then
Begin
SetFightMode(2);
If(i=3)Then
Begin
SetFightMode(3);
If(i=4)Then
Begin
SetFightMode(4);
End;
End;
End;
End;
End;
End;
End;


Procedure DeclareRandomSkill;
Begin
hoverskill('random');
End;

{**************************************************************************
Procedure The Hover Over Wielded items
By:The Prince of Randomness
******************************************************************************}
Procedure HoverMouse(X,Y,WaitTime,RangeOfWidth:integer);
Var
TimeVar,Tol:integer;
Begin
Tol:= 10*RangeOfWidth;
MarkTime(TimeVar);
Repeat
MMouse(X,Y,Tol,Tol);
Until(TimeFromMark(TimeVar)>WaitTime);
End;

Procedure HoverOverWeapon;
Begin
GameTab(5);
wait(random(300) + 300);
If(not(GetColor(590,302)=2304814))Then
Begin
HoverMouse(590,302,2000,10);
End;
end;

Procedure HoverOverHat;
Begin
GameTab(5);
wait(random(300) + 300);
If(not(GetColor(225,15)=2304814))Then
Begin
HoverMouse(640,215,2000,10);
End;
End;

Procedure HoverOverCape;
Begin
GameTab(5);
wait(random(300) + 300);
If(not(GetColor(607,267)=4540745))Then
Begin
HoverMouse(607,267,2000,10);
End;
End;

Procedure HoverOverNecklace;
Begin
GameTab(5);
wait(random(300) + 300);
If(not(GetColor(649, 271)=4803917))Then
Begin
HoverMouse(649,271,2000,10);
End;
End;

Procedure HoverOverArrows;
Begin
GameTab(5);
wait(random(300) + 300);
If(not(GetColor(690,265)=2304814))Then
Begin
HoverMouse(680,265, 2000,3);
End;
End;

Procedure HoverOverBody;
Begin
GameTab(5);
wait(random(300) + 300);
If(not(GetColor(649, 308)=4803917))Then
Begin
HoverMouse(649,308,2000,3);
End;
End;

Procedure HoverOverShield;
Begin
GameTab(5);
wait(random(300) + 300);
If(not(GetColor(704, 304)=2304814))Then
Begin
HoverMouse(704,304,2000,3);
End;
End;

Procedure HoverOverLegs;
Begin
GameTab(5);
wait(random(300) + 300);
If(not(GetColor(648, 339)=2304814))Then
Begin
HoverMouse(648, 339,2000,3);
End;
End;

Procedure HoverOverGloves;
Begin
GameTab(5);
wait(random(300) + 300);
If(not(GetColor(225,15)=2304814))Then
Begin
HoverMouse(580,375,2000,3);
End;
End;

Procedure HoverOverBoots;
Begin
GameTab(5);
wait(random(300) + 300);
If(not(GetColor(646, 384)=5067346))Then
Begin
HoverMouse(646, 384,2000,3);
End;
End;

Procedure HoverOverRing;
Begin
GameTab(5);
wait(random(300) + 300);
If(not(GetColor(703, 383)=2304814))Then
Begin
HoverMouse(703,383,2000,3);
End;
End;

Procedure DeclareRandomWear;
var i:integer;
Begin
i:=Random(11+1);
Begin
if(i=1)Then
Begin
HoverOverRing;
if(i=2)Then
Begin
HoverOverBoots;
if(i=3)Then
Begin
HoverOverGloves;
if(i=4)Then
begin
HoverOverLegs;
if(i=5)Then
Begin
HoverOverShield;
if(i=6)Then
Begin
HoverOverBody;
if(i=7)Then
Begin
HoverOverArrows;
if(i=8)Then
Begin
HoverOverNecklace;
if(i=9)Then
Begin
HoverOverCape;
if(i=10)Then
begin
HoverOverHat;
if(i=11)Then
Begin
HoverOverWeapon;
End;
End;
End;
End;
End;
End;
End;
End;
End;
End;
End;
End;
End;

{****************************************************************************
RandomTab
By:The Prince of Randomness
Description:Uses Tabs Randomly, for Less chance of ban.
*****************************************************************************}

Procedure RandomTab;
Begin
Writeln('You are Now Randomly using tabs');
DeclareRandomTabs;
If(Tab=1)Then Begin
DeclareRandomFight;
If(Tab=2)Then Begin
DeclareRandomSkill
If(Tab=3)Then Begin
Writeln('No Quest Random has been made yet');
If(Tab=4)Then Begin
Writeln('No Item Random has been made yet');
If(Tab=5)Then Begin
DeclareRandomWear;
If(Tab=6)Then Begin
Writeln('no Random Prayer Searching has Been Made yet');
If(Tab=7)Then Begin
WriteLn('No Random Mage has been made yet expect in next release');
If(Tab=8)Then Begin
Writeln('This tab searcher hasnt been made yet');
End;
End;
End;
End;
End;
End;
End;
End;
End;

Sdcit

2006-02-28 22:54:02

hover mouse is already made, the newer version of SRL isnt realeased yet

XxKanexX

2006-02-28 23:12:22

And for range of width, just do:


Tol:= RangeOfWidth*10;
:)

Sdcit

2006-02-28 23:54:53

he means just have them put a 1 digit number like 1 and it multiplies it by ten to make tol:=10

Flyboy

2006-03-01 02:42:31

From: The Prince of Randomness
Heres Some Procedures…
Procedures So far 1
Functions So far 0


Hovermouse…


Pretty Nooby but UseFul..

EDIT: Kinda Deads nxt Version of SRL will include hovernouse but not mine =P..
Kane i dont get you..?


Good job noticing this was missing from SRL. Great job scripting it too. other version is alread in so… nm, but hey it still means you rock! Keep the suggestions coming, it's community effort like this that makes SRL so great!!!!

XxKanexX

2006-03-01 03:50:31

*Sighs*


Case RangeOfWidth of
1 : Tol:=10;
2 : Tol:=20;
3 : Tol:=30;
4 : Tol:=40;
5 : Tol:=50;
6 : Tol:=60;
7 : Tol:=70
8 : Tol:=80;
9 : Tol:=90;
10 : Tol:=100;
end;
Can just be:

Tol:= Rangeofwidth*10;
Since every 1 go's up by 10's.. Get it?..

The Prince of Randomness?

2006-03-01 21:32:24

yes i get it but..
Do i put in where The Case of? is.

Sdcit

2006-03-01 21:38:39

well you can do

tol:=tol*10

case tol of…


or

case tol*10 of


iguess

XxKanexX

2006-03-01 22:51:45

Here you go:


Procedure HoverMouse(X,Y,WaitTime,RangeOfWidth:integer);
Var
a,b,TimeVar,Tol:integer;
Begin
Tol:= 10*RangeOfWidth;
Repeat
MarkTime(TimeVar);
MMouse(X,Y,20,0);
MMouse(X,Y,0,20)
GetMousePos(a,b);
MMouse(x,Y,Tol,Tol);
GetMousePos(a,b);
MMouse(a,b,Tol,Tol);
MMouse(x,Y,Tol,Tol);
MMouse(x,Y,Tol,Tol);
MMouse(a,Y,Tol,Tol);
MMouse(x,Y,Tol,Tol);
MMouse(x,Y,Tol,Tol);
MMouse(x,Y,Tol,Tol);
Until(TimeFromMark(TimeVar)>WaitTime);
End;

Sdcit

2006-03-02 00:04:38

 
procedure HoverMouse(X, Y, WaitTime, RangeOfWidth:Integer);

var
a, b, TimeVar, Tol:Integer;
begin
Tol:= 10*RangeOfWidth;
repeat
MarkTime(TimeVar);
MMouse(X, Y, 20, 0);
MMouse(X, Y, 0, 20)
GetMousePos(a, b);
MMouse(x, Y, Tol, Tol);
GetMousePos(a, b);
MMouse(a, b, Tol, Tol);
MMouse(x, Y, Tol, Tol);
MMouse(x, Y, Tol, Tol);
MMouse(a, Y, Tol, Tol);
MMouse(x, Y, Tol, Tol);
MMouse(x, Y, Tol, Tol);
MMouse(x, Y, Tol, Tol);
until(TimeFromMark(TimeVar)>WaitTime);
end;

Flyboy

2006-03-02 01:41:13

Since we all are flogging this one to death, I thought I would do my little bit of flogging…

Procedure HoverMouse(X,Y,WaitTime,RangeOfWidth:integer);
Var
TimeVar,Tol:integer;

Begin
Tol:= 10*RangeOfWidth;
TimeVar := GetSystemTime + WaitTime; //Sorry Fakawi I hate your MarkTime...

While GetSystemTime < TimeVar do
begin
MMouse(X, Y, Tol, Tol); //why say in 10 lines what you can say in one
wait(5); //wait eliminate lag in the game
end;
end;

The Prince of Randomness?

2006-03-02 01:57:20

=P im still Learning. we All are Constantly learning..

HISTORY

2006-03-03 14:27:46

wow you decreased the legth of the code by about 70lines:o

The Prince of Randomness?

2006-03-04 18:18:32

Grrr =P, Nvm.. My next Procedure Will be cool =P..
Im working on it now :p

The Prince of Randomness?

2006-03-05 21:46:48

Updated!— Random Tab! =P Beta stage

Sdcit

2006-03-05 21:55:03

pretty good, i recommend case instead of all those procedures?

The Prince of Randomness?

2006-03-05 22:27:51

Hmmm Where? the HoverWield?

Dankness

2006-03-06 05:49:13

From: The Prince of Randomness
Hmmm Where? the HoverWield?


Anytime you use If and the same varable more then twice is a good time to use case. Notice how i used case in my procedure instead of 22 if statements?

The Prince of Randomness?

2006-03-06 14:00:27

Ok when i get home from school.. See yah..

Cheesehunk

2006-03-06 18:43:19

Hmm, I haven't looked here in while, did you just update them?
I like some of the new Procedures, i never knew you could script well?

Good job Prince!!

The Prince of Randomness?

2006-03-06 21:14:32

Thanks Random cheesy hunk.

I decided to put my knowledge to use =P… ill update it soon or another day.

XxKanexX

2006-03-07 00:20:23


Case random(11)+1 of
1: ..
2: ..
end;
Etc.

Instead of:

if(i=1)then
begin
dosomething
if(i=2)then
begin
dosomething
Also, lots of ends look bad ;)