SRL Archive - Help

Starting to script, need some tips n trix


M_Back

2013-01-23 13:35:51

Hello everyone!

I´v decided to give scripting a shot and try to make my very first script.
What would be a good script to start with? Not too hard or too easy. Would a flax spinner be a good challenge?

If you have a good tip on a script, then what would it involve, scripting wise? What would I have to learn to start with it?

I´m not asking someone to hold my hand and tell me exactly what to do. Just need some help getting started.
It would help a ton!

Elip007

2013-01-23 13:53:05

Remember Tutorials are your friend! Study them over and over till you know what you are doing. There are many good examples there that you can look over and try for yourself.
Also look at other peoples scripts. See what they did to achieve the end result. What did they implement and do that the script runs.

Coding a script can be a hassle at times and even frustrating! Be sure to take your time with it and look at Tutorials. When you get the basics done and improve, it will be loads of fun!

Mark

2013-01-23 14:18:40

From: Elip007
Remember Tutorials are your friend! Study them over and over till you know what you are doing. There are many good examples there that you can look over and try for yourself.
Also look at other peoples scripts. See what they did to achieve the end result. What did they implement and do that the script runs.

Coding a script can be a hassle at times and even frustrating! Be sure to take your time with it and look at Tutorials. When you get the basics done and improve, it will be loads of fun!


Well said.
you might also want to check out yohojo's video tutorials on phone now so ill link you when I'm on pc.

Ashaman88

2013-01-23 14:19:16

I would also suggest reading through other peoples scripts to get a feel for how they do it. Also tweaking them to see how it affects it

M_Back

2013-01-23 14:33:57

The thing with the tutorial section is it feels kind of overwhelming! :eek: I guess I just have to start reading in the beginners section then.
What is a good procedure(?) for walking? I saw this guide about SPS walking. Is that what´s commonly used for walking?

Elip007

2013-01-23 14:41:42

The Beginners Section is full of information! Start with the ones that teach you how to make a plain and simple script. When you know what should go in to a script, you can move on. I'd say the most important thing for now is to actually know Colors (How to get them and use them) and the basic Simba functions.

Like stated before, make sure to check out yohojo's videos. They will help out with using colors and if not mistaken, he has a walking video too. Here is the link to his channel

M_Back

2013-01-23 15:00:21

I will follow your advice Elip! Thanks for the link and your help. :)

Thanatos

2013-01-23 15:00:41

Ashaman's advice is very good. Use a script and while you're using it read through the functions that they are using. Try figuring out what makes your bot do what and if you have any questions don't be afraid to fire off a pm to the individual that made the script.

M_Back

2013-01-23 15:06:48

I really like Ashmans idea aswell. I have to get some basic scripting knowledge first tho, as it is now a script looks like a bunch of numbers, words, letters that makes no sence to me!

Thanatos

2013-01-23 16:59:11

for basic scripting knowledge watch yohojos scripting tutorial vids first. They make alot of other stuff make sense.

Wardancer

2013-01-23 22:08:50

I would say take it slow and easy. Do your best to understand procedures and functions while reading other people's scripts. Of course, you'll need a base so it makes a bit of sense to you so tutorials will come in handy. That being said, there will probably still be grey areas even after reading tutorials. To clear those, feel free to post procedures or functions, tell us what you understand out of them so we know that you made an actual effort and then ask whatever you'd like us to clear for you.

I'd like to add that knowledge is power and that a solid working ethic can help a great deal.

I hope I'll see you for a long time on this forum and that you'll become a great addition to this community.

M_Back

2013-02-09 15:59:19

I have run in to a small problem.


Const
TakeBreaks = True; // Take breaks if True
BreakIn = 60; // Minutes before break
BreakFor = 550; // Break time in minuter
HowManyPlayers = 1; // How many players to use THIS LINE
StartPlayer = 0; // Which player to start with
Version = 1.41421356; // Script version


Procedure DeclarePlayers;

Begin

NumberOfPlayers(HowManyPlayers);
CurrentPlayer := StartPlayer;

Players[0].Name := ''; // Username
Players[0].Pass := ''; // Password
Players[0].Pin := ''; // Bank Pin
Players[0].Active :=True; // Use this player? True/False

End;

At the line "HowManyPlayers = 1; // How many players to use" I get an error saying "Duplicate identifier 'HowManyPlayers' at line 10
Compiling failed.".
I think it's something simple but can't see what it could be!

The Killer

2013-02-09 18:00:20

From: billy opel
I have run in to a small problem.


Const
TakeBreaks = True; // Take breaks if True
BreakIn = 60; // Minutes before break
BreakFor = 550; // Break time in minuter
HowManyPlayers = 1; // How many players to use THIS LINE
StartPlayer = 0; // Which player to start with
Version = 1.41421356; // Script version


Procedure DeclarePlayers;

Begin

NumberOfPlayers(HowManyPlayers);
CurrentPlayer := StartPlayer;

Players[0].Name := ''; // Username
Players[0].Pass := ''; // Password
Players[0].Pin := ''; // Bank Pin
Players[0].Active :=True; // Use this player? True/False

End;

At the line "HowManyPlayers = 1; // How many players to use" I get an error saying "Duplicate identifier 'HowManyPlayers' at line 10
Compiling failed.".
I think it's something simple but can't see what it could be!

IT's because HowManyPlayers is a Var in the includes. Therefore you cannot put it as a Const aswell

M_Back

2013-02-10 10:36:27

Oh, that is more than I know haha. I'll move HowManyPlayers back to the DeclarePlayers procedure again then. I'd like to have it beside StartPlayer in the Const, oh well….
Thanks for your input.

Is it possible to do like this:
Edit; Seems to work. :)


Const
PlayersToUse = 1;

Procedure DeclarePlayers;

Begin

HowManyPlayers := PlayersToUse;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := StartPlayer;