How to Created and Setting Your NPC’s In NexmuTK
Thursday, January 21, 2010 12:12This is another short tutorials on how to created and setting your own NPC’s in game. Please read tutorials carefully and follow all the step. Make sure to backup any important files before you doing this. If you have a question about scripting just leave comments on this article.
1. Get the NPC’s graphic information from BigDataBase files in documentation folders (Copyright to Adam)
2. Run NexmuTK then click on NPC.
3. Open “NexmuTK Scripting Configuration Files (*.conf)” find the files script_main.conf, This is an configuration master files. All files linked should be written on this script_main.conf first.
4. Take a look on a sample configuration and scripting files to learn how to make your own NPC.
5. Click on NPC Format to see the format how to created a new NPC. It’s should looks like this: npc:map number,graphic,color,mapx,mapy,description. Your NPC should be save as *.scp files.
6. After You linked between configuration files and scripting files you have to write a command for NPC. Click on scripting you will find some NPC function on there.
EXAMPLE:
// Karma NPC
npc:2,213,0,26,20,Karma ReaderDeclare money
Dialog “Apalah artinya kekuatan dan kekuasaanmu, semua itu diberikan oleh dewa. aku bisa membantu membacakan karmamu untuk melihat kekuatan jiwamu tetapi ada syaratnya kamu harus membayar aku sebesar 100 gold coin di muka.”, Next
Set money = getmoney()
if money<100
Dialog “maaf, untuk menggunakan jasaku kamu harus membayar 100 gold coin di muka, sepertinya uang kamu tidak mencukupi.”, None
endifif money==100
readkarma
endifif money>100
readkarma
endif
This sample has a little bug when your money more than 100 it will keep continue reading your karma until your money under 100, Don’t worry I will fix it next update by creating function readkarmaonce. You can edit and tested your script in game to make sure it follow what you need. When you meet problem please read guide from scripting.



























