Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[how to][tutorial] adding new npcs

Junior Spellweaver
Joined
Apr 13, 2012
Messages
140
Reaction score
32
ok so i check in the tutorial and didnt find any tut on this so i decided to make one because some of the tuts i seen on other sites were missing very important details.

ok 1st u will need a dyo manager. you can DL these tools it has everything u would need including dyo manager


log into the game a find where u want to put the npc. then press 9, and the position will show up in the position.txt file of the client.

open the dyo file where u want the new npc to be i did mine in WdMadgrical.dyo

then add this:
Code:
----------
5
[COLOR="DarkGreen"]122.613[/COLOR]
0
0
0
[COLOR="Navy"]6945.22[/COLOR]
[COLOR="Yellow"]100[/COLOR]
[COLOR="Red"]3228.916[/COLOR]
1
1
1
5
[COLOR="Magenta"]982[/COLOR]
-1
0
2
[COLOR="Orange"]MaFl_RYNO[/COLOR]
1
0
----------
[COLOR="Sienna"]-1[/COLOR]
This is the direction the character looks. i think its in a 360 deg direction but im not 100%
This is the X coordinates
this is the Z coordinates in the position.txt file
this is the model Id number of the npc.
this is the name of the character thats also in character.inc
this is always at the very end of the dyo code. scroll all the way down in the dyo manager and u will see it. never delete or change this. you will not have to add a -1 to the npc your adding i just put it here so people would know.
i think this is the angle of the npc. 100 is upright. i have not messed with to know for sure.
change these to what ever you want then save the file inside the world folder where u found it. be sure to save it in both the client/world and the server/world files just to be safe.

now to make it a shop to where u can buy thing.

open up character.inc and find a place to put this code:
Code:
MaFl_RYNO
{
	setting
	{
		AddMenu( MMI_TRADE  );
		AddVendorItem( 0, IK3_SWD, -1,  190, 190, 50 );
		AddVendorItem( 0, IK3_AXE, -1,  190, 190, 50 );
		AddVendorItem( 0, IK3_CHEERSTICK, -1,  190, 190, 50 );
		AddVendorItem( 0, IK3_KNUCKLEHAMMER, -1,  190, 190, 50 );
		AddVendorItem( 0, IK3_BOW, -1,  190, 190, 50 );
		AddVendorItem( 0, IK3_YOYO, -1,  190, 190, 50 );
		AddVendorItem( 0, IK3_STAFF, -1, 190, 190, 50 );
		AddVendorItem( 0, IK3_WAND, -1, 190, 190, 50 );
		AddVendorItem( 0, IK3_SHIELD, -1, 300, 300, 50 );
		m_nStructure= SRT_WEAPON;
	}

	SetName
	(
	IDS_CHARACTER_INC_000883
	);

	AddVendorSlot( 0,
	IDS_CHARACTER_INC_000884
	);
}

you can add or change anything u want.
THIS IS VERY IMPORTANT. AND I HAD TO FIND OUT THE HARD WAY.
when making new npc's in the character.inc MAKE SURE there is a space before the { and after the }. if ther is not all the npc's will be messed up.

example of what i mean.
Code:
}// this is the end of the last npc shop
//SPACE
MaFl_RYNO
{
	setting
	{
		AddMenu( MMI_TRADE  );
		AddVendorItem( 0, IK3_SWD, -1,  190, 190, 50 );
		AddVendorItem( 0, IK3_AXE, -1,  190, 190, 50 );
		AddVendorItem( 0, IK3_CHEERSTICK, -1,  190, 190, 50 );
		AddVendorItem( 0, IK3_KNUCKLEHAMMER, -1,  190, 190, 50 );
		AddVendorItem( 0, IK3_BOW, -1,  190, 190, 50 );
		AddVendorItem( 0, IK3_YOYO, -1,  190, 190, 50 );
		AddVendorItem( 0, IK3_STAFF, -1, 190, 190, 50 );
		AddVendorItem( 0, IK3_WAND, -1, 190, 190, 50 );
		AddVendorItem( 0, IK3_SHIELD, -1, 300, 300, 50 );
		m_nStructure= SRT_WEAPON;
	}

	SetName
	(
	IDS_CHARACTER_INC_000883
	);

	AddVendorSlot( 0,
	IDS_CHARACTER_INC_000884
	);
}//end of new npc we added
//SPACE
MaFl_Jayson //npc below the one we added
 
Last edited:
Newbie Spellweaver
Joined
Oct 22, 2006
Messages
43
Reaction score
0
You can download dyo manager here :
 
Newbie Spellweaver
Joined
May 24, 2009
Messages
21
Reaction score
1
Ok so it means that if i want to remove an npc for example Is. Then I'll search for Is in the WdMadgrical.dyo and delete her code in there. Am I right?
 
Skilled Illusionist
Joined
Apr 21, 2010
Messages
378
Reaction score
96
Ok so it means that if i want to remove an npc for example Is. Then I'll search for Is in the WdMadgrical.dyo and delete her code in there. Am I right?

Yes, but keep in mind that alot of npc's are in the dyo more than once (Flaris, SM, Darkon, etc).
 
Newbie Spellweaver
Joined
May 24, 2009
Messages
21
Reaction score
1
Ok now i got this! Thanks for the Help! You have my like!
 
Newbie Spellweaver
Joined
Oct 22, 2006
Messages
43
Reaction score
0
Anyone happen to know what the numbers on each AddVendorItem line mean?

*edit*
Nevermind, found it :D
 
Last edited:
Newbie Spellweaver
Joined
Aug 20, 2014
Messages
6
Reaction score
0
When I save me an error and disappear all the NPC
 
Back
Top