[GUIDE] Adding Clan To NPC

Results 1 to 1 of 1
  1. #1
    KilroyPT Head + Dev Phatkone is offline
    True MemberRank
    Aug 2007 Join Date
    SydneyLocation
    773Posts

    [GUIDE] Adding Clan To NPC

    Making a new guide since SheenBR hasn't responded on his to update it.


    Adding clan to NPC is nice and easy,
    Server side open the ".SPC" file for the field (NPC list/positions)

    Each NPC is in 0x1F8 blocks starting with "F8 01".

    Spoiler:

    Hex:
    Code:
    F8 01 00 00 70 00 47 48 B4 EB C0 E5 C0 E5 C0 CC
    20 B0 C5 BD BA 00 00 00 00 00 00 00 00 00 00 00 
    00 00 00 00 00 00 00 00 63 68 61 72 5C 6E 70 63 
    5C 54 4E 2D 30 30 34 5C 54 4E 2D 30 30 34 2E 69 
    6E 69 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    00 00 00 00 00 00 00 00 47 61 6D 65 53 65 72 76 
    65 72 5C 6E 70 63 5C 72 69 63 61 72 64 65 6E 2D 
    65 71 75 69 70 32 2E 4E 50 43 00 00 00 00 00 00 
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    00 00 00 00 00 00 00 00 58 21 00 00 00 00 00 00 
    00 00 00 00 01 00 00 00 00 00 00 00 03 00 00 00 
    5F 00 00 00 57 00 00 00 50 00 00 00 50 00 00 00 
    BE 00 00 00 84 00 00 00 00 00 00 00 6A 04 00 00 
    65 00 00 00 9F 00 00 00 08 00 00 00 04 01 00 00 
    17 00 00 00 C1 02 00 00 00 00 00 00 25 00 00 00 
    06 00 00 00 B4 00 00 00 84 02 CD 02 0E 00 00 00 
    10 00 0A 00 0B 00 0E 00 00 00 00 00 00 00 00 00 
    00 00 00 00 00 00 00 00 00 00 00 00 64 00 64 00 
    64 00 19 01 91 02 91 02 34 33 B3 3F 7B 14 EE 3F 
    00 00 00 00 98 EE 96 00 96 D4 C3 58 B2 6F 0A 00 
    00 00 00 00 00 00 00 00 00 00 00 00 00 03 00 00 
    00 00 00 00 32 00 00 00 03 00 00 00 03 00 00 00 
    02 00 00 00 00 00 00 00 95 98 FE FF 02 00 00 00 
    08 00 00 00 00 00 00 00 00 00 00 00 DB DB 7D 95 
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    00 00 00 00 01 00 00 00 05 20 00 00 00 1E FC FF 
    00 B3 00 00 00 3C BC FF 00 00 00 00 49 14 00 00 
    00 00 00 00 00 00 00 00

    Spoiler:

    ASCII:
    Code:
    ø...p.GH´ëÀåÀåÀÌ
     °Å½º...........
    ........char\npc
    \TN-004\TN-004.i
    ni..............
    ................
    ........GameServ
    er\npc\ricarden-
    equip2.NPC......
    ................
    ........X!......
    ................
    _...W...P...P...
    ¾...„.......j...
    e...Ÿ...........
    ....Á.......%...
    ....´...„.Í.....
    ...............
    .............d.d.
    d...‘.‘.43³?{.î?
    ....˜î–.–ÔÃX²o..
    ................
    ....2............
    .......•˜þÿ....
    ............ÛÛ}•
    ................
    ................
    ................
    ................
    ......... ....üÿ
    .³...<¼ÿ....I...
    ........


    The Clan number is a Little Endian DWORD at 0xAC.

    MOST **not all** NPC's have a "X!" at 0xA8 which makes for easy identification of the location, some do not though, but the Clan number is still at 0xAC.

    to set the clan:


    Create the clan for the NPC's.
    (Just push it into the database with a false Clan leader and userid so it's not tied to an account)
    get the clan number. In this case I'm using 1000000001.

    Convert it to hex:
    Code:
    1000000001 -> 3B 9A CA 01
    Convert to Little Endian (Reverse the byte order):
    Code:
    3B 9A CA 01 -> 01 CA 9A 3B

    Save the file and restart the server.
    If the clan system is not working, the NPC will have empty square brackets over their head and you will be able to see the clan number through the GM client.

    If the clan system works it should display the clan name and logo.

    Enjoy.

    At some point i'll create a small tool to be able to do them en masse. but cbf for now.
    Attached Thumbnails Attached Thumbnails NPC_Clan_1.JPG   NPC_Clan_Complete.JPG   NPC_Clan_2.JPG  




Advertisement