How does Ragnarok RO create a hello word for NPC rAthena scripting language

How does Ragnarok RO create a hello word for NPC rAthena scripting language 

Hi everyone, I'm Essie. In the previous article, we taught you how to compile Ragnarok RO server and client. When we can build and erect the game ourselves, then this game is what we say in a sense. For example, adding some special functions, etc., today Aixi will teach you how to create an NPC (saleable equipment, medicine, etc.).

Start getting into the topic:

First open the Panads directory with VScode and right-click to grant access

 

 

After opening VS, first install an Athena Language Support plug-in (for syntax highlighting), search and install directly in VS and click install (remember to restart VS)

 

After installation, first open the RO server and use the runserver.bat script, then open the client and register an account to enter the game account password, we just fill in 1111

Open HeidiSQL, find the login in the table, and click the data to see the game account we just registered. Through this table, we will change the account we just registered to the GM number (give higher authority to enter GM commands in the game)

Find the group_id in the table and fill in the value 99 (represents the highest authority of the super GM number)

 

Re-enter the game and we will have GM authority. Enter @go in the game and press Enter to go to any map. If you have not entered a map, it will display all maps for you to choose

 

Enter @go 0 to send to Prontera, and then we use the command to view the coordinates where we are now (need to know the name and coordinates of the map) Enter the command: @where 1111 (your own account)

Prontera appeared (prontera 155 180)

 

We now create the NPC at this coordinate

Open vs and find npc in the Pandas directory --- custom --- right-click new filel --- enter the script name hello_world.ras --- name it ra script (the meaning of ra script (ra is the abbreviation of rathena)) It is recommended that everyone use it This name, because the suffix of the plug-in file we started to install is .rascript (Athena Language Support)

Everyone can pay attention, if it is because of the format problem that the environment cannot run, it will be a headache. …

 

 

Note: If the format you created cannot be recognized in the end, click on athena in the lower right corner of vs, and the content shown in the figure below will appear. Select Configure File Association for `.ras`...

 

Enter the coordinates we got in the hello_world.ras file we created

border ,155, 180,6 script Helloworld 909,{

mes”Hello,world!!;

close;

}

 

(Format: map name, X, Y, orientation + tab (a tab) script Helloworld (NPC name) + elf ID (model id) The elf ID can be directly selected from the official model ID healer.txt or other tables {} curly braces, the content in the brackets is the code that will be executed when we click the mouse, here we use the output command to fill in mes "" (short for message) and fill in the npc name (it must be there, otherwise there is no place to close it after clicking it) In the end, you can only restart the client); add close (that is, add a close button) )

After we create it, we need to put it into the list in the loading directory of the system (otherwise the server does not know how to load it), open the script_custom.conf form and enter npc: npc/custom/hell.o_world.ras and press Enter, this add After the completion, there are actually two files

 

Then go back to the client and enter the command: @reloadscript (reload means reloading the script)

 

Here you can see that the script is being reloaded. After loading, an NPC named Holle world will appear at prontera, 155, 180,6 where we just stood. Because the model ID we use is 909, it will appear. It's Polly, you guys can create other ones too

 

Click it and there will be a pop-up window hello world Click to close to try if the script is running normally

 

If you feel that npc says hello world too little, we can change the script to let him say a few more words, in VS---PANDAS----npc----custom change----hello_world.ras (we created NPC form)

border ,155, 180,6 script Helloworld 909,{

mes”[Helloworld]”;

mes”[Hello,world]”;

nest;

mes”[Helloworld]”;

mes”hello,hello!”;

nest;

mes”[Helloworld]“;

mes”how are you?”;

nest;

mes”[Helloworld]“;

mes”i’am fina”;

close;

}

 

Then reload the script we wrote and enter on the client: @reloadscript Enter the new script and it will be reloaded, then click Polly to see if it is the script we filled in

 

 

 

 You can see if it is finally corresponding, so here we are in Ragnarok RO How to create a hello word tutorial of NPC rAthena scripting language is here. I hope it will be helpful to friends in need. I am Chiwangai see you next time

There are a lot of interesting things you can do with a server

Guess you like

Origin blog.csdn.net/V13807970340/article/details/131006026