SRL Archive - First Scripts

SRL-5 functions [Beginners]


fatmess

2012-06-01 23:24:19

This is a function list for pretty much everything SRL-5 has built in.

If this is in the wrong section then move it please

To find something quickly press Ctrl +F and search for it.

(please don't post until everything is added, might need a few posts/pages)


Categories (click a link to be taken to the catagory)







AntiBan

——————————————————————————————————-

LeaveDangerZone

info:Handles the &#8216;danger zone&#8217; message users get when their total level is < 60

function LeaveDangerZone: Boolean;

example: if LeaveDangerZone then
ContinueWalking;

——————————————————————————————————-

RandomRClick

info:Performs random right click to stay active.

procedure RandomRClick

example:RandomRClick;

——————————————————————————————————-

HoverSkill

info:Hovers mouse over selected skill to &#8220;check exp&#8221; Click = True will Click Skill and Click = False will &#8216;Hover&#8217;. Won&#8217;t &#8220;check&#8221; skills where your level is 1.

procedure HoverSkill(Skill: variant; Click: Boolean);

example:HoverSkill(skill_Atack, False);

——————————————————————————————————-

PickUpMouse

info:Acts just like you picked your mouse off the pad… then sets it back down.

procedure PickUpMouse;

example:PickUpMouse;

——————————————————————————————————-

SetScreenMouse

info:Aligns RS to specified direction and camera angle using the middle mouse button.
Direction: &#8216;n&#8217;, &#8216;s&#8217;, &#8216;e&#8217;, &#8216;w&#8217; or any degree angle. Accepts &#8216;random&#8217; and &#8216;rand&#8217;, or &#8216;&#8217; for no movement.
CamerAngle: any number from 1 to 10 (1 = lowest angle), or &#8216;1&#8217;, &#8216;10&#8217;. Accepts &#8216;&#8217; for no movement.

example:function SetScreenMouse(Direction, CameraAngle: Variant): Boolean;

SetScreenMouse(Direction, CameraAngle: Variant);

——————————————————————————————————-

MissMouse

info:Human-like miss-and-correct mouse movement.

procedure MissMouse(eX, eY: Integer);

example: MissMouse(eX, eY: Integer);

——————————————————————————————————-

MultiMouse

info:Will simulate &#8220;spam&#8221; clicking on the point x, y. Will do it a random amount between 1 and &#8216;maxClicks&#8217;. Will click once no matter what, then has a percent &#8216;chance&#8217; of clicking again after that. Will not exceed &#8216;maxClicks&#8217;. if &#8216;red&#8217; then will return true if the red X appears after clicking an object, else will return true after clicking.

function MultiMouse(x, y, chance, maxClicks: integer; red: boolean): boolean;

example:if (waitUptext('ree', 200)) then
MSI_MultiMouse(x, y, 35, 5, true);

——————————————————————————————————-

RandomMovement

info:makes a random movement

procedure RandomMovement;

Example:RandomMovement;

——————————————————————————————————-

CompassMovement

info:Rotates the compass somewhere between MinMovement and MaxMovement. Will return to original angle if Return is set to true.

function CompassMovement(MinMovement, MaxMovement: Integer; Return: Boolean): Boolean;

Example:CompassMovement(10, 30, true);

——————————————————————————————————-

BoredHuman

info:Performs 5-15 times:
Rotates the cam,
Moves the mouse around MainScreen,
If it finds IsUpText(&#8216;option&#8217;), it will Chooseoption(&#8216;Examine&#8217;);

procedure BoredHuman;

example:BoredHuman;

——————————————————————————————————-

ExamineInv

info:Chooses a random item in the inventory to examine.

procedure ExamineInv;

example:ExamineInv;

——————————————————————————————————-

RandomAngle

info:Randomly changes the angle of the compass. Finishes depending on

procedure RandomAngle(HowToEnd: Variant);

HowToEnd:
1, &#8216;up&#8217;, True = Highest angle 2, &#8216;down&#8217;, False = Lowest angle
Put &#8216;&#8217; to leave it as it is.


example:RandomAngle(1);

——————————————————————————————————-

LevelUpEx

info:Returns true if the player has gained a level. If ClickCont is set to true it will click the continue button in the chat box. If ClickSkill is set to true, it will click the skill and exit the window.

function LevelUpEx(ClickCont, ClickSkill: Boolean): Boolean;

example:if (LevelUpEx(false, true)) then
inc(Players[CurrentPlayer].Integers[10]);

——————————————————————————————————-

LevelUp

info:Returns true if the player has gained a level. Will click the &#8220;click to continue&#8221; button in the chat box.

function LevelUp: Boolean;

Example:if (LevelUp) then
inc(Players[CurrentPlayer].Integers[10]);

——————————————————————————————————-

FindMod

info:Results true if a mod is found talking in the chat box. Will logout and wait if LogoutOnMod (global boolean) is set to true.

function FindMod: Boolean;

example:FindMod();

——————————————————————————————————-

FindDead

info:Logs out and sets the current player to false if they are found dead. Will not logout if Reincarnate (global boolean) is set to true.

function FindDead: Boolean;

FindDead();

——————————————————————————————————-

FindDwarvenPopup

info:closes the interface asking you to buy members when you reach level 10 in a skill

function FindDwarvenPopup: Boolean;

FindDwarvenPopup();

——————————————————————————————————-

ExitSquealOfFortune

info:exits the squeal of fortune interface

function ExitSquealOfFortune(): boolean;

ExitSquealOfFortune();

——————————————————————————————————-

FindSpinTicket

info:Finds spin tickets in your inventory.

function FindSpinTicket(): boolean;

FindSpinTicket();

——————————————————————————————————-

fatmess

2012-06-01 23:25:23

reserved###########

fatmess

2012-06-01 23:26:26

reserved#########

fatmess

2012-06-01 23:27:26

reserved for next post/credits

fatmess

2012-06-01 23:28:27

reserved for banking;

fatmess

2012-06-01 23:29:28

reserved###

Frement

2012-06-01 23:30:32

I don't really see the need for this.

fatmess

2012-06-01 23:31:45

From: Frement
I don't really see the need for this.


for beginners…

sorry for trying to help the community.

CephaXz

2012-06-01 23:32:34

I don't think this is necessary. But maybe good job on trying to help people, although these are all can be found in simba.

Frement

2012-06-01 23:33:02

From: fatmess
for beginners…

sorry for trying to help the community.


Are you aware that there is this:
http://docs.villavu.com/srl-5/

I'm sure the link to the documentation is found somewhere in FAQ.

fatmess

2012-06-01 23:34:31

From: Frement
Are you aware that there is this:
http://docs.villavu.com/srl-5/

I'm sure the link to the documentation is found somewhere in FAQ.




yes im aware there is that but its obliviously not very easy to find just by looking at some peoples code.


got nothing nice to say then gtfo

Frement

2012-06-01 23:37:42

From: fatmess
got nothing nice to say then gtfo


I should "gtfo"? You have just joined and have 20 posts, and 5-7 of them are from this thread, and you feel like you can say that?

From the bottom of my heart, fuck you.

CephaXz

2012-06-01 23:39:50

From: Frement
I should "gtfo"? You have just joined and have 20 posts, and 5-7 of them are from this thread, and you feel like you can say that?

From the bottom of my heart, fuck you.


+repped.

riwu

2012-06-01 23:42:41

I think what Frement and others are saying that a record of all these functions already exist, and therefore there is no need to make a thread just copy pasting everything again. (UNLESS u are planning to explain each of these functions in extreme detail, even though i think the documentation explains them pretty well and sufficient).

Maybe u can just zoom in at some useful/commonly used function and explain in detail how they are used? ;)

fatmess

2012-06-01 23:42:45

whatever, going back to epicbot >_> no wonder everybody says this community is shit.

:f:

riwu

2012-06-01 23:45:21

From: fatmess
whatever, going back to epicbot >_> no wonder everybody says this community is shit.

:f:

hmm okay, good luck in ur future endeavours :)

Turpinator

2012-06-02 01:10:13

From: fatmess
whatever, going back to epicbot >_> no wonder everybody says this community is shit.

:f:


I would presume everyone says the community is shit because when 'everyone' comes here they leech and expect everything to be handed to them. And since you know so much about this community, i would presume you would know that this is a learning community. come here. code. learn. – not come here. download. leech. leave. – there is a difference.

putonajonny

2012-06-04 12:13:36

Come on guys, when people try to help please be nice…

Abu

2012-06-04 12:20:15

I really appreciate what he's trying to do here.

Yes, this can be found by using the functions list in Simba and by searching the docs - but he's just trying to help out the community.

Fascinate

2012-06-04 12:27:20

From: abu_jwka
I really appreciate what he's trying to do here.

Yes, this can be found by using the functions list in Simba and by searching the docs - but he's just trying to help out the community.


Well if you read through the order of the posts you can clearly see that fatmess(which is probably a nice description of him) was extremely rude to Frement. Frement just said that the info was already around and fatmess was extremely rude to him.

Also he did post it in the completely wrong section, but he did say if it was in the wrong section then move it so…

Abu

2012-06-04 12:33:49

From: Fascinate
Well if you read through the order of the posts you can clearly see that fatmess(which is probably a nice description of him) was extremely rude to Frement. Frement just said that the info was already around and fatmess was extremely rude to him.


Yes but he felt offended by the fact that his attempt to contribute was shut out by Frement (correctly), which meant he was rude when he shouldn't have been.

Think about it - you make a thread in which you hope to gain some respect from the community and someone (correctly) tells you it's pointless, you feel a bit… well… humiliated and so the way he reacted though not correct, I feel was justifiable.

Fascinate

2012-06-04 12:37:06

From: abu_jwka
Yes but he felt offended by the fact that his attempt to contribute was shut out by Frement (correctly), which meant he was rude when he shouldn't have been.

Think about it - you make a thread in which you hope to gain some respect from the community and someone (correctly) tells you it's pointless, you feel a bit… well… humiliated and so the way he reacted though not correct, I feel was justifiable.


Yeah he was just trying to help out the community by making something easier to find but I don't think that was the reaction he should have had to Frement's posts.

Kyle Undefined

2012-06-04 12:38:52

The code that's posted at the top can become outdated, where as the code here: http://docs.villavu.com/srl-5/ is updated when the library updates ;)

Fascinate

2012-06-04 12:41:12

From: Kyle Undefined
The code that's posted at the top can become outdated, where as the code here: http://docs.villavu.com/srl-5/ is updated when the library updates ;)


That's another good point. BTW why is there a "SRL complete tutorial" and a "SRL frequently asked question" if there is nothing in them? ;) Haha thought that was kinda funny.

Abu

2012-06-04 12:45:51

From: Fascinate
That's another good point. BTW why is there a "SRL complete tutorial" and a "SRL frequently asked question" if there is nothing in them? ;) Haha thought that was kinda funny.


Obviously something which was failed to be developed.

Will probably (hopefully) be worked on once SRL 6 is out.

Sirenia

2012-06-04 12:56:32

You are clipping the screen by alot when theres no need to

ne lg

2012-06-04 21:29:13

From the point of view of who the thread is aimed at, i find this extreamly useful, he explains the functions very well and this is basically exactly what i was looking for when trying to create my first script.


Thanks allot :D

Fascinate

2012-06-04 21:30:17

From: ne lg
From the point of view of who the thread is aimed at, i find this extreamly useful, he explains the functions very well and this is basically exactly what i was looking for when trying to create my first script.


Thanks allot :D


Glad someone found a use for it! This pretty much turned into a flame/fight thread…

Kyle Undefined

2012-06-04 23:15:15

He didn't explain anything, it was all ripped right out of the documentation.

Brandon

2012-06-04 23:20:30

Except.. The documentation looks like:

(*
MultiMouse
~~~~~~~~~~

.. code-block:: pascal

function MultiMouse(x, y, chance, maxClicks: integer; red: boolean): boolean;

Will simulate "spam" clicking on the point x, y. Will do it a random amount
between 1 and 'maxClicks'. Will click once no matter what, then has a percent
'chance' of clicking again after that. Will not exceed 'maxClicks'. if 'red'
then will return true if the red X appears after clicking an object, else will
return true after clicking.

.. note::

| Author: Coh3n
| Last Updated: 21 July 2011 by Coh3n

Example:

.. code-block:: pascal

if (waitUptext('ree', 200)) then
MSI_MultiMouse(x, y, 35, 5, true);
*)
and his looks like:

MultiMouse

info:Will simulate &#8220;spam&#8221; clicking on the point x, y. Will do it a random amount between 1 and &#8216;maxClicks&#8217;. Will click once no matter what, then has a percent &#8216;chance&#8217; of clicking again after that. Will not exceed &#8216;maxClicks&#8217;. if &#8216;red&#8217; then will return true if the red X appears after clicking an object, else will return true after clicking.

function MultiMouse(x, y, chance, maxClicks: integer; red: boolean): boolean;

example:if (waitUptext('ree', 200)) then
MSI_MultiMouse(x, y, 35, 5, true);

Also his is all in one place. In the documentation, you have to go to that specific .Simba file to find what you want. This thread can't be totally useless.

Kyle Undefined

2012-06-04 23:44:25

Again, see how it's ripped straight from the documentation. He didn't "explain" anything. I don't mind him trying to help out, but if he really wanted to, he could of linked to that method in the documentation and then gone into a deeper explanation of how it works.

All of the code he posted in the OP can become outdated ;)

Gu3st...

2012-06-05 08:01:47

From: Brandon
Except.. The documentation looks like:

(*
MultiMouse
~~~~~~~~~~

.. code-block:: pascal

function MultiMouse(x, y, chance, maxClicks: integer; red: boolean): boolean;

Will simulate "spam" clicking on the point x, y. Will do it a random amount
between 1 and 'maxClicks'. Will click once no matter what, then has a percent
'chance' of clicking again after that. Will not exceed 'maxClicks'. if 'red'
then will return true if the red X appears after clicking an object, else will
return true after clicking.

.. note::

| Author: Coh3n
| Last Updated: 21 July 2011 by Coh3n

Example:

.. code-block:: pascal

if (waitUptext('ree', 200)) then
MSI_MultiMouse(x, y, 35, 5, true);
*)
and his looks like:

Also his is all in one place. In the documentation, you have to go to that specific .Simba file to find what you want. This thread can't be totally useless.
You don't get the point; that "documentation" as you call it (the one inside the .simba), is not really documentation. The documentation can be found here: https://docs.villavu.com/srl-5/ . All you have to do to find the thing you want to is to go to https://docs.villavu.com/srl-5/srlref.html

This thread is basically a duplicate of that site, just more messy and un-organized.

Mufasa

2012-06-05 08:28:43

Well, I for one found this thread useful anyway x3 Without this thread it would of most likely been a long time before I found out about this place. So thank you, for the redirect =D

I imagine that link prove to be invaluable <3


Nava2

2012-06-05 08:47:59

I think that perhaps what we would all agree on is that there needs to be a better insight into where the documentation is. I've noticed that everyone who mentioned those pages were developers/staff.

Not exactly ideal.

Perhaps OP had the right idea, just went about it poorly. Hey, OP, want to, instead of where this is going, maybe write a guide on how to use the documentation? :)

Abu

2012-06-05 10:25:47

From: Nava2
I think that perhaps what we would all agree on is that there needs to be a better insight into where the documentation is. I've noticed that everyone who mentioned those pages were developers/staff.

Not exactly ideal.

Perhaps OP had the right idea, just went about it poorly. Hey, OP, want to, instead of where this is going, maybe write a guide on how to use the documentation? :)


In that case - the guide will look like this:

Hi there, go here!
The end.


I think it would be better if a link was placed in the FAQ


Also, In the latest Simba - the documentation is installed with your Simba - so it shouldn't be hard to find. It's like…right there



EDIT: Yeh it's a pdf version - but it's still almost as good as the html link

Nava2

2012-06-09 20:04:03

/thread, fixed the formatting. Everyone, please be more appropriate next time something like this happens as I already said.