character.inc says what npc's can do and can't do. U can controll the text, or the names from there. Like adding a shop to Mayor of Flarine. It would look like this:
// SetEquip( II_ARM_F_CHR_DRESS01HAT, II_ARM_F_CHR_DRESS01SUIT, II_ARM_F_CHR_DRESS01GLOVES, II_ARM_F_CHR_DRESS01SHOES );
// SetFigure( MI_FEMALE, 0, 0xffffaa88, 1);
AddMenu( MMI_DIALOG );
AddMenu( MMI_SECRET_TAXRATES_CHECK );
(That IDS_CHARACTER_TROZAY is edited, take a look character.txt.txt for that.)
So, now u will see: Mayor of Flarine, and what he can do. Checking tax, and dialog.
Add_Menu (MMI_Dialog) Is 1 of the options thats added to the mayor. It's Dialog ofcourse.
But now, for this tutorial, im going to make him trade things.
If you want to edit it easy, there is a program called: flyff npc editor (See: Downloads)
Open it up, and search for the mayor (MaFL_FlaMayor) (flyff npc editor opens character.inc)
Press under activity and choose MMI_TRADE.
Then press Add.
Then press AddVendorItem.
A new window will show up.
There u can change alot of things.
Number 1: Shows you what the result will be
Number 2: the vendor slot: 0 is first tab. 1 is second tab. etc
Number 3: A specific job (Normally just all jobs)
Number 4: Minimum level (i dunno what they mean with level, but u can see it as minimum rarity)
Number 5: Maximum rarity
Number 6: Just leave it 100 (or just look at other files, and shops to see what u need for the item ur adding)
Number 7: Choose Venderitem for like all in the above named numbers
Choose venderitem2 to just choose the vendorslot and the item ID
Number 8: Item group
Number 9: Item ID (only for venderitem2)
now press material and search your item.
when u found it, u can see the rarity, the group, the price etc
U can modify all, but i recom to leave the group as it is.
then when ur done, simply press Save and its added