- Joined
- Dec 3, 2006
- Messages
- 54
- Reaction score
- 0
On this section you will be learning how to start off a script and how to make it talk. The guide will explain very specifically on how to start a basic script.
[
Location for your script is very important, and involves the first line of your script. This line has to be exactly right, or your map-server will give you trouble. Below is a screenshot on how it would look like
Outline
1 - Sets the starting town for the script, followed by .gat.
2 - Sets the starting coordinates for the script. X,Y
3 - Sets the direction the NPC will face:
[1][8][7]
[2][0][6]
[3][4][5]
4 - The type of script it is. Usually shop, or script, for the basics.
5 - The name that the NPC will have.
6 - The Sprite number, and the mark of the beginning of the script.
The full NPC Sprite table can be found by going to:
All NPC's have to talk at some point, or how else are you going to interact with them? The command to make an NPC talk is 'mes'. This command will popup a little message window, and words will appear. You always have to wrap a message in quotes (" "), or it will not talk, and the map server will usually error. Let's see an example
Outline
1 - This is the 'mes' command mentioned before. It starts the message in the box.
2 - This is the bulk of the message. Notice that it is wrapped in quotes!
3 - This is the semicolon we have been talking about. It is very important to end each line with it, or the map server will crash!
4 - The bulk of the second message. This will appear on the line right below the top message.
5 - Notice how there is no semicolon here? This will make the map server crash at boot, so make sure you put it in there
The spaces in there, to get the numbers in there, but you need to keep no spaces between the lines, or your script will take a bit longer to load. You will see the changes in the next example.
[
[
This is where the bulk of scripting confusion comes from. The next, close and menu commands. They are not that hard, actually, it's just people make them out to be more than they really are.
When you create a menu command, you need a message to choose, and the label in where it has to go next to. Let's see a small example of the menu command at work:
A couple of things are missing! Can you guess what they are?
Outline
1
[
To view the content, you need to sign in or register
] Location Location for your script is very important, and involves the first line of your script. This line has to be exactly right, or your map-server will give you trouble. Below is a screenshot on how it would look like
![figure - [GUIDE]Jman's Eathena Basic Scripting - RaGEZONE Forums figure - [GUIDE]Jman's Eathena Basic Scripting - RaGEZONE Forums](http://wiki.ro-enhance.net/images/d/d8/Location1.jpg)
Outline
1 - Sets the starting town for the script, followed by .gat.
2 - Sets the starting coordinates for the script. X,Y
3 - Sets the direction the NPC will face:
[1][8][7]
[2][0][6]
[3][4][5]
4 - The type of script it is. Usually shop, or script, for the basics.
5 - The name that the NPC will have.
6 - The Sprite number, and the mark of the beginning of the script.
The full NPC Sprite table can be found by going to:
-
To view the content, you need to sign in or register
-
To view the content, you need to sign in or register
To view the content, you need to sign in or register
] Making it Talk All NPC's have to talk at some point, or how else are you going to interact with them? The command to make an NPC talk is 'mes'. This command will popup a little message window, and words will appear. You always have to wrap a message in quotes (" "), or it will not talk, and the map server will usually error. Let's see an example
![figure - [GUIDE]Jman's Eathena Basic Scripting - RaGEZONE Forums figure - [GUIDE]Jman's Eathena Basic Scripting - RaGEZONE Forums](http://wiki.ro-enhance.net/images/9/9a/Talk.jpg)
Outline
1 - This is the 'mes' command mentioned before. It starts the message in the box.
2 - This is the bulk of the message. Notice that it is wrapped in quotes!
3 - This is the semicolon we have been talking about. It is very important to end each line with it, or the map server will crash!
4 - The bulk of the second message. This will appear on the line right below the top message.
5 - Notice how there is no semicolon here? This will make the map server crash at boot, so make sure you put it in there
The spaces in there, to get the numbers in there, but you need to keep no spaces between the lines, or your script will take a bit longer to load. You will see the changes in the next example.
[
To view the content, you need to sign in or register
] Section 2: Menus, Next, Close and Colors[
To view the content, you need to sign in or register
] Menus, Next, Close Commands This is where the bulk of scripting confusion comes from. The next, close and menu commands. They are not that hard, actually, it's just people make them out to be more than they really are.
When you create a menu command, you need a message to choose, and the label in where it has to go next to. Let's see a small example of the menu command at work:
![figure - [GUIDE]Jman's Eathena Basic Scripting - RaGEZONE Forums figure - [GUIDE]Jman's Eathena Basic Scripting - RaGEZONE Forums](http://wiki.ro-enhance.net/images/c/c4/Menu.jpg)
A couple of things are missing! Can you guess what they are?
Outline
1