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!

NPC Tutorials

the sound's resound echo
Loyal Member
Joined
Jun 14, 2009
Messages
932
Reaction score
156
What do you need for this guide?
-Notepad
-RESEditor (Search it)
-Human brain (Just a little)
-Time

What does this guide tell you?
-How to change name of NPC
-How to add a Trade option a NPC
-How to add a Buff-Option to a NPC
-How to change the name of a Trade-Tab

This guide is really simple and easy to follow!
-How to change name of NPC
First you are going to do, is open up character.inc
This file is located in your server files (Resource)
Open it with Notepad (Or Notepad ++, idc)
For the sake of this guide we will change name of
Novelist Gergantes wich is located at Flaris
Inside character.inc press CTRL+F and typ in Gergantes
This is the tab of Novelist Gergantes:
Code:
{
	setting
	{
		AddMenu( MMI_DIALOG );
		
		SetImage
		(
		IDS_CHARACTER_INC_000493
		);
		m_szDialog= "MaFl_Gergantes.txt";
	}

	SetName
	(
	IDS_CHARACTER_INC_000494
	);
}
IDS_CHARACTER_INC_000494 This is the name of the NPC
So what we now do is open character.txt.txt with Notepad
Scroll all the way down and make a new IDS_CHARACTER_INC
Make it something like this:
IDS_CHARACTER_INC_001000 OurNPC
OurNPC is the name we change Gergantes in. This can be changed to everything you want.
Now inside the character.inc
Change
Code:
	IDS_CHARACTER_INC_000494
to
Code:
	IDS_CHARACTER_INC_001000

Save it, and you are done in the server files.
Open your RESEditor and open the Datasub1.res (located in your client) delete the character.inc and the character.txt.txt inside it. Now add the new character.inc and character.txt.txt wich are inside the server files.
Save it, replace it with your previous DataSub1.res
And you are done!

-How to add a Trade option to a NPC
We will give Novelist Gergantes a trade option right now!
Open up character.inc (Located in your server files) with Notepad
Press ctrl+f and typ in Gergantes and hit enter
This is what you will get (if you followed previous guide, the CHARACTER_INC's might be a little different)
Code:
MaFl_Gergantes
{
	setting
	{
		AddMenu( MMI_DIALOG );
		
		SetImage
		(
		IDS_CHARACTER_INC_000493
		);
		m_szDialog= "MaFl_Gergantes.txt";
	}

	SetName
	(
	IDS_CHARACTER_INC_000494
	);
}
Now add
AddMenu( MMI_TRADE );
Below
AddMenu( MMI_DIALOG );
So it will look like
Code:
		AddMenu( MMI_DIALOG );
		AddMenu( MMI_TRADE  );
Now we have to add a trade-tab. I will make the NPC sell some armor.
Beneath AddMenu, add:
Code:
		AddVendorItem( 0, IK3_SUIT, 1, 15, 27, 25 );
		AddVendorItem( 0, IK3_HELMET, 1, 15, 27, 25 );
		AddVendorItem( 0, IK3_GAUNTLET, 1, 15, 27, 25 );
		AddVendorItem( 0, IK3_BOOTS, 1, 15, 27, 25 );
		AddVendorItem( 1, IK3_SUIT, 3, 15, 27, 25 );
		AddVendorItem( 1, IK3_HELMET, 3, 15, 27, 25 );
		AddVendorItem( 1, IK3_GAUNTLET, 3, 15, 27, 25 );
		AddVendorItem( 1, IK3_BOOTS, 3, 15, 27, 25 );
		AddVendorItem( 2, IK3_SUIT, 2, 15, 27, 25 );
		AddVendorItem( 2, IK3_HELMET, 2, 15, 27, 25 );
		AddVendorItem( 2, IK3_GAUNTLET, 2, 15, 27, 25 );
		AddVendorItem( 2, IK3_BOOTS, 2, 15, 27, 25 );
		m_nStructure= SRT_SHIELD;
Now Gergantes will look like this:
Code:
{
	setting
	{
		AddMenu( MMI_DIALOG );
                AddMenu( MMI_TRADE );
		AddVendorItem( 0, IK3_SUIT, 1, 15, 27, 25 );
		AddVendorItem( 0, IK3_HELMET, 1, 15, 27, 25 );
		AddVendorItem( 0, IK3_GAUNTLET, 1, 15, 27, 25 );
		AddVendorItem( 0, IK3_BOOTS, 1, 15, 27, 25 );
		AddVendorItem( 0, IK3_SUIT, 3, 15, 27, 25 );
		AddVendorItem( 0, IK3_HELMET, 3, 15, 27, 25 );
		AddVendorItem( 0, IK3_GAUNTLET, 3, 15, 27, 25 );
		AddVendorItem( 0, IK3_BOOTS, 3, 15, 27, 25 );
		AddVendorItem( 0, IK3_SUIT, 2, 15, 27, 25 );
		AddVendorItem( 0, IK3_HELMET, 2, 15, 27, 25 );
		AddVendorItem( 0, IK3_GAUNTLET, 2, 15, 27, 25 );
		AddVendorItem( 0, IK3_BOOTS, 2, 15, 27, 25 );
		m_nStructure= SRT_SHIELD;
		
		SetImage
		(
		IDS_CHARACTER_INC_000493
		);
		m_szDialog= "MaFl_Gergantes.txt";
	}

	SetName
	(
	IDS_CHARACTER_INC_000494
	);
}
Last thing you need to do is add the name of the tab
So change it to this:
Code:
{
	setting
	{
		AddMenu( MMI_DIALOG );
                AddMenu( MMI_TRADE );
		AddVendorItem( 0, IK3_SUIT, 1, 15, 27, 25 );
		AddVendorItem( 0, IK3_HELMET, 1, 15, 27, 25 );
		AddVendorItem( 0, IK3_GAUNTLET, 1, 15, 27, 25 );
		AddVendorItem( 0, IK3_BOOTS, 1, 15, 27, 25 );
		AddVendorItem( 0, IK3_SUIT, 3, 15, 27, 25 );
		AddVendorItem( 0, IK3_HELMET, 3, 15, 27, 25 );
		AddVendorItem( 0, IK3_GAUNTLET, 3, 15, 27, 25 );
		AddVendorItem( 0, IK3_BOOTS, 3, 15, 27, 25 );
		AddVendorItem( 0, IK3_SUIT, 2, 15, 27, 25 );
		AddVendorItem( 0, IK3_HELMET, 2, 15, 27, 25 );
		AddVendorItem( 0, IK3_GAUNTLET, 2, 15, 27, 25 );
		AddVendorItem( 0, IK3_BOOTS, 2, 15, 27, 25 );
		m_nStructure= SRT_SHIELD;
		
		SetImage
		(
		IDS_CHARACTER_INC_000493
		);
		m_szDialog= "MaFl_Gergantes.txt";
	}

	SetName
	(
	IDS_CHARACTER_INC_000494
	);
	AddVendorSlot( 0,
	IDS_CHARACTER_INC_000028
	);
}
Now you added a trade-option + trade-tab + some basic items selling
Want to change name of the tab? Check the last guide in this thread
Its very easy ;)
Too get this all inside your client,
Open DataSub1.res with any RESEditor, replace the character.inc with the new one, save it, and you are done.

How to add buff function to a NPC
For the sake of this guide we will use Novelist Gergantes to be pimped with buffs
Open up the character.inc with Notepad
Ctrl+F and search for Gergantes
This is what gergantes should be like:
Code:
MaFl_Gergantes
{
	setting
	{
		AddMenu( MMI_DIALOG );
		
		SetImage
		(
		IDS_CHARACTER_INC_000493
		);
		m_szDialog= "MaFl_Gergantes.txt";
	}

	SetName
	(
	IDS_CHARACTER_INC_000494
	);
}
If you did my previous two guides, it might look different, doesnt matter, you can still add the buff function.
Beneath
Code:
		AddMenu( MMI_DIALOG );
ADD
Code:
		AddMenu( MMI_NPC_BUFF );
//		( SKILL ID, 스킬레벨, 가능한 플레이어 최소, 최대 레벨, 지속시간(ms) )
		SetBuffSkill( SI_ASS_CHEER_QUICKSTEP,	20, 1, 129, 86400000 );
		SetBuffSkill( SI_ASS_CHEER_HASTE, 	20, 1, 129, 86400000 );
		SetBuffSkill( SI_ASS_CHEER_CATSREFLEX,	20, 1, 129, 86400000 );
		SetBuffSkill( SI_ASS_CHEER_CANNONBALL,	20, 1, 129, 86400000 );
		SetBuffSkill( SI_ASS_CHEER_MENTALSIGN,	20, 1, 129, 86400000 );
		SetBuffSkill( SI_ASS_CHEER_HEAPUP, 	20, 1, 129, 86400000 );
		SetBuffSkill( SI_ASS_CHEER_BEEFUP,	20, 1, 129, 86400000 );
		SetBuffSkill( SI_ASS_CHEER_ACCURACY,	20, 1, 129, 86400000 );
		SetBuffSkill( SI_RIN_SUP_SPIRITUREFORTUNE,	10, 1, 129, 86400000 );
		SetBuffSkill( SI_RIN_SUP_PROTECT,	10, 1, 129, 86400000 );
		SetBuffSkill( SI_RIN_SUP_GEBURAHTIPHRETH,	10, 1, 129, 86400000 );
Now the whole gergantes should look like this:
Code:
MaFl_Gergantes
{
	setting
	{
		AddMenu( MMI_DIALOG );
		AddMenu( MMI_NPC_BUFF );
//		( SKILL ID, 스킬레벨, 가능한 플레이어 최소, 최대 레벨, 지속시간(ms) )
		SetBuffSkill( SI_ASS_CHEER_QUICKSTEP,	20, 1, 129, 86400000 );
		SetBuffSkill( SI_ASS_CHEER_HASTE, 	20, 1, 129, 86400000 );
		SetBuffSkill( SI_ASS_CHEER_CATSREFLEX,	20, 1, 129, 86400000 );
		SetBuffSkill( SI_ASS_CHEER_CANNONBALL,	20, 1, 129, 86400000 );
		SetBuffSkill( SI_ASS_CHEER_MENTALSIGN,	20, 1, 129, 86400000 );
		SetBuffSkill( SI_ASS_CHEER_HEAPUP, 	20, 1, 129, 86400000 );
		SetBuffSkill( SI_ASS_CHEER_BEEFUP,	20, 1, 129, 86400000 );
		SetBuffSkill( SI_ASS_CHEER_ACCURACY,	20, 1, 129, 86400000 );
		SetBuffSkill( SI_RIN_SUP_SPIRITUREFORTUNE,	10, 1, 129, 86400000 );
		SetBuffSkill( SI_RIN_SUP_PROTECT,	10, 1, 129, 86400000 );
		SetBuffSkill( SI_RIN_SUP_GEBURAHTIPHRETH,	10, 1, 129, 86400000 );

		
		SetImage
		(
		IDS_CHARACTER_INC_000493
		);
		m_szDialog= "MaFl_Gergantes.txt";
	}

	SetName
	(
	IDS_CHARACTER_INC_000494
	);
}
20= Level of Skill
1= Minimum level to receive buffs
129= Maximum level to receive buffs (if you have V14 change it to 121)
86400000= Time duration of buffs (=24hours)
Save it.
Now open your client's datasub1.res with any RESEditor
Delete the character.inc
Replace it with the new one inside your server files
Save it, and you are done!

-How to change the name of a Trade-Tab
First thing you do is open character.inc with Notepad or Notepad +
Press Ctrl+F and typ in the name of the NPC.
For the sake of this guide I will change the tab name of Dior.
This is the character.inc of Dior
Code:
{
	setting
	{
		AddMenu( MMI_DIALOG );
		AddMenu( MMI_TRADE  );
		AddVendorItem( 0, IK3_STICK, -1, 1, 30, 100 );
		AddVendorItem( 1, IK3_BOARD, -1, 1, 30, 100 );
		AddVendorItem( 2, IK3_ACCEL, -1, 1, 1, 100 );
		m_nStructure= SRT_STATION;
		SetImage
		(
		IDS_CHARACTER_INC_000058
		);
		m_szDialog= "MaFl_Dior.txt";
	}

	SetName
	(
	IDS_CHARACTER_INC_000059
	);

	AddVendorSlot( 0,
	IDS_CHARACTER_INC_000060
	);

	AddVendorSlot( 1,
	IDS_CHARACTER_INC_000061
	);

	AddVendorSlot( 2,
	IDS_CHARACTER_INC_000062
	);

	AddVendorSlot( 3,
	IDS_CHARACTER_INC_000063
	);
}
AddVendorSlot( 0, = The first tab
AddVendorSlot( 1, = The second tab
AddVendorSlot( 2, = The third tab
AddVendorSlot( 3, = The fourth tab
A NPC can not have more then four tabs.
So if we look at AddVendorSlot( 0, the IDS_CHARACTER_INC of that = 000060
Open up character.txt.txt with Notepad or Notepad +
Scroll all the way down and typ in:
IDS_CHARACTER_INC_111111 TestTab
111111 Can be everything, as long as it is not in use already
TestTab is the name we give the tab. This can also be renamed to something else.
Now go back to your character.inc
Change
Code:
	AddVendorSlot( 0,
	IDS_CHARACTER_INC_000060
	);
to
Code:
	AddVendorSlot( 0,
	IDS_CHARACTER_INC_111111
	);
Save it.
You are now done.
Open DataSub1.res with any RESEditor, delete character.inc and character.txt.txt and replace it with the new ones located at your server files.
Save it, and enjoy!

I hope I did not make this guide for nothing, enjoy it!

CREDITS:
-Me for making these guides
-The maker of RESEditor
-Serusuriel for releasing V15 and V14 official file's at Ragezone.
-Trozay (Denichu)

-Jelle
 
Last edited:
the sound's resound echo
Loyal Member
Joined
Jun 14, 2009
Messages
932
Reaction score
156
All four guides added!
Enjoy ;)
 
Experienced Elementalist
Joined
Aug 3, 2009
Messages
253
Reaction score
30
Can you add how to add items?
Example. A Sprotect in boboku or something? D:

---------- Post added at 02:24 PM ---------- Previous post was at 02:24 PM ----------

Can you add how to add items?
Example: A Sprotect in boboku or something? D:
 
the sound's resound echo
Loyal Member
Joined
Jun 14, 2009
Messages
932
Reaction score
156
Can you add how to add items?
Example. A Sprotect in boboku or something? D:

---------- Post added at 02:24 PM ---------- Previous post was at 02:24 PM ----------

Can you add how to add items?
Example: A Sprotect in boboku or something? D:

Yeah sure I will make it.
 
We are Maverick!
Loyal Member
Joined
Feb 27, 2009
Messages
2,915
Reaction score
1,000
Finally an up-to-date guide on the first page, You can make it easier by using a FlyFF NPC editor to add items to an NPC you know. You can find the editor in the release section.
 
the sound's resound echo
Loyal Member
Joined
Jun 14, 2009
Messages
932
Reaction score
156
I know :)
But some people just want to learn what it all means
And how to do it yourself ;)
So I though.. lets learn them how the files work and what they do.
 
Experienced Elementalist
Joined
Aug 3, 2009
Messages
253
Reaction score
30
When comes the tutorial of adding items? :$
 
Mythic Archon
Joined
Mar 26, 2009
Messages
713
Reaction score
123
When comes the tutorial of adding items? :$
That's calld leeching :>
Try to find it out urself.
Imma give you 1 tip: defineItem.h, propItem.txt
Find the rest out urself
 
Experienced Elementalist
Joined
Aug 3, 2009
Messages
253
Reaction score
30
That's calld leeching :>
Try to find it out urself.
Imma give you 1 tip: defineItem.h, propItem.txt
Find the rest out urself

yeah ok, i know ho to do it, but, for a example, i have this:

AddVenderItem( 1, IK3_SCROLL, -1, 1, 1, 1);

And it is a re-skill, how do i change it to a Sprotect for example.
That is what i dont know :ehh:
 
Newbie Spellweaver
Joined
Dec 29, 2006
Messages
18
Reaction score
0
dude about your buffer... uhm.. i get the get buffed dialog but nothing happens... ?

by the way put it to gergantes for a test

any suggestions...?
 
Mythic Archon
Joined
Mar 26, 2009
Messages
713
Reaction score
123
yeah ok, i know ho to do it, but, for a example, i have this:

AddVenderItem( 1, IK3_SCROLL, -1, 1, 1, 1);

And it is a re-skill, how do i change it to a Sprotect for example.
That is what i dont know :ehh:

Go to propItem.txt and change the minimum level and maximum rarity to w/e u want it wont effect anything but the shop. So like if u set minimum level **** even a player thats level 1 could buy it. Then like this:

AddVenderItem( 1, IK3_SCROLL, -1, (minimum level), (maximum rarity), 100);


dude about your buffer... uhm.. i get the get buffed dialog but nothing happens... ? by the way put it to gergantes for a test any suggestions...?

Put it in ur Server Files AND in ur client's dataSub1.res
 
i sell platypus
Loyal Member
Joined
Jun 26, 2009
Messages
2,640
Reaction score
1,326
Thanks alot. Helped me while testing out the re-pack :3
 
Experienced Elementalist
Joined
Jun 28, 2010
Messages
288
Reaction score
47
Bump. I think this is a guide that should be at least near the front page.

Also, imma add this to my [Gi-Normous] Compile of Releases.

+1 :D Thanks for the guide.
 
Newbie Spellweaver
Joined
Aug 25, 2010
Messages
5
Reaction score
0
i did what your said but in game nothing changes what do i wrong
(srry for bad English dutch, and bad in English ad school)

done found the problem was changing in the wrong file
 
Last edited:
Back
Top