Can someone share k5 basedef.h file ?

Results 1 to 8 of 8
  1. #1
    Apprentice taichinwang is offline
    MemberRank
    Mar 2017 Join Date
    21Posts

    Can someone share k5 basedef.h file ?

    Hello everyone, I have basedef.h file for k3 but I need it for k5. Can anyone share it to me?

    best regards.


  2. #2
    Member Reaguee is offline
    MemberRank
    Jan 2011 Join Date
    84Posts

    Re: Can someone share k5 basedef.h file ?

    I think you are asking for some almost no one have, and if i'm not wrong you are looking for it for knowing how to read TAD files on k5 and up (as I read on your other post)

    so here is my help for you:
    Pet info have a total length of 192 bytes (which takes 12 records of Inven, from Inven[48] till Inven[59]
    Note: here is my Struct of Pets, the names of the fields are not from hanbit, are made by me
    public struct STRUCT_PET
    {
    public STRUCT_ITEM PetItem;//16
    public STRUCT_ITEM[7] Petskills;//16*7
    public int pranas;
    public int satia;
    public byte InUse;
    public byte level;
    public STRUCT_ITEM[3] dummy3;
    }

    Then the Inven[60] is for storing what GMTool calls Equip2
    public struct STRUCT_EQUIP2
    {
    public short Pin;
    public short Spectacle;
    public byte Mount;
    public byte PinColor;
    public byte SpectacleColor;
    public byte Dummy1;
    public int Dummy2;
    public int Dummy3;
    }

    Inven[61] and Inven[62] stores Titles Info
    public byte[32] Titles;

    Inven[63-65] stores Pranas and other things

    Inven[66] stores Inventory password and if is locked or not

    Inven[67-68-69] stores info for Scroll Quest this way:
    public struct STRUCT_SCROLLQUEST
    {
    public byte[32] Finished;
    public short sqId;
    public int KillCount;
    public short type;
    public short type1;
    public short type2;
    public short type3;
    public byte type4;
    public byte step;
    }

    Inven[70] QUEST_INITCASTING

    public int dwQuestInitTime;
    public int unknown;
    public int iPranaDec;
    public int unknown1;

    and Inven[71] MEMORIZE_POSITION
    public short snGoX;
    public short snMemY;
    public short snGoY;
    public short snMemX;
    public byte byZone;
    public byte[5] unknown;
    public byte byCloseType;
    public byte byCloseAndGoZone;


    You can (as I did) play with GMTool, adding things and reading what was change on the TAD, to figure out what is stored on the bytes.

    Regards
    Last edited by Reaguee; 11-11-19 at 03:04 AM.

  3. #3
    Apprentice taichinwang is offline
    MemberRank
    Mar 2017 Join Date
    21Posts

    Re: Can someone share k5 basedef.h file ?

    Quote Originally Posted by Reaguee View Post
    I think you are asking for some almost no one have, and if i'm not wrong you are looking for it for knowing how to read TAD files on k5 and up (as I read on your other post)
    so here is my help for you:
    Ready thanks for your help, it's very helpful for me to correct my structure.
    To read tad of k5 is one of what I am trying to do, but more then reading tad file If we have updated basedef.h, we will be able to rewrite almost all server files including dbsrv/zonesrv/itemsrv/sql ... etc. I think maybe some people has updated basedef.h because we can see some k4.2/k5 sql and client rebuilt. It depends on if anyone can share one file from their source. the file can either from server, tools or client, anyone is welcome and helpful.
    Also share my structure about Pet in Mob.
    /* The structure is different to STRUCT_ITEM if Pet item in Inven[0] ~ Inven[47] */
    struct STRUCT_ITEM_PET
    {
    short snIndex;
    short snDurability;
    WORD wSatia; /* 0 ~ 43200 (12hr: 12 * 60 * 60 ) */
    short snDummy;
    BYTE byLevel;
    BYTE byPrana[4];
    BYTE byDummy1; /* STRUCT_ITEM: bySubRefine[4] */
    BYTE byDummy2; /* STRUCT_ITEM: byDummy; */
    BYTE byDummy3; /* STRUCT_ITEM: byRefineLevel */
    };
    /* When
    Pet item is equipped, the data is in Inven[48] ~ Inven[59] */
    struct STRUCT_XXX_PET
    {
    struct STRUCT_ITEM PetItem; /* 48 */
    struct STRUCT_ITEM PetSkill[5]; /* 49 ~ 53 */
    struct STRUCT_ITEM Unknown1[2]; /* 54 ~ 55 => PetSkill ? */
    int iPrana;
    WORD wSatia; /* 0 ~ 43200 (12hr: 12 * 60 * 60 ) */
    short snDummy;
    BYTE byStatus; /* 0: disabled, 1: enabled */
    BYTE byUnknown[MAX_SUBMATERIALSIZE];
    BYTE byDummy;
    BYTE byLevel;
    struct STRUCT_ITEM Unknown2[3]; /* 57, 58, 59 */
    };
    Last edited by taichinwang; 11-11-19 at 08:35 AM.

  4. #4
    Apprentice garys175 is offline
    MemberRank
    Oct 2012 Join Date
    23Posts

    Re: Can someone share k5 basedef.h file ?

    Hi i know is too much ask but can you share you entire STRUCT_ACCOUNTFILE with the subs structs?

  5. #5
    Apprentice taichinwang is offline
    MemberRank
    Mar 2017 Join Date
    21Posts

    Re: Can someone share k5 basedef.h file ?

    Quote Originally Posted by garys175 View Post
    Hi i know is too much ask but can you share you entire STRUCT_ACCOUNTFILE with the subs structs?
    k5 STRUCT_ACCOUNTFILE is same as k3's, the difference between k5 and k3 is in STRUCT_MOB. Following is my STRUCT_MOB structure for your refernce.

    struct STRUCT_MOB
    {
    .
    .
    .
    //struct STRUCT_ITEM Inven[MAX_INVEN];
    struct STRUCT_ITEM Inven[48];

    struct STRUCT_XXX_PET Pet; /* 48 ~ 59 */
    struct STRUCT_XXX_EQUIP2 Equip2; /* 60 */
    struct STRUCT_XXX_TITLE Title; /* 61 ~ 62 */
    struct STRUCT_XXX_OTHER Other; /* 63 ~ 64 */
    struct STRUCT_XXX_INVENTLOCK Lock; /* 65 */
    struct STRUCT_XXX_PRODUCT Product; /* 66 */
    struct STRUCT_XXX_SCROLLQUEST ScrollQuest; /* 67 ~ 69 */
    struct STRUCT_XXX_QUEST_INITCASTING QuestInit; /* 70 */
    struct STRUCT_XXX_MEMORIZE_POSITION Position; /* 71 */
    struct STRUCT_ITEM Equip[MAX_EQUIP]; // 16 * 16
    };

  6. #6
    Apprentice garys175 is offline
    MemberRank
    Oct 2012 Join Date
    23Posts

    Re: Can someone share k5 basedef.h file ?

    Quote Originally Posted by taichinwang View Post
    k5 STRUCT_ACCOUNTFILE is same as k3's, the difference between k5 and k3 is in STRUCT_MOB. Following is my STRUCT_MOB structure for your refernce.

    struct STRUCT_MOB
    {
    .
    .
    .
    //struct STRUCT_ITEM Inven[MAX_INVEN];
    struct STRUCT_ITEM Inven[48];

    struct STRUCT_XXX_PET Pet; /* 48 ~ 59 */
    struct STRUCT_XXX_EQUIP2 Equip2; /* 60 */
    struct STRUCT_XXX_TITLE Title; /* 61 ~ 62 */
    struct STRUCT_XXX_OTHER Other; /* 63 ~ 64 */
    struct STRUCT_XXX_INVENTLOCK Lock; /* 65 */
    struct STRUCT_XXX_PRODUCT Product; /* 66 */
    struct STRUCT_XXX_SCROLLQUEST ScrollQuest; /* 67 ~ 69 */
    struct STRUCT_XXX_QUEST_INITCASTING QuestInit; /* 70 */
    struct STRUCT_XXX_MEMORIZE_POSITION Position; /* 71 */
    struct STRUCT_ITEM Equip[MAX_EQUIP]; // 16 * 16
    };
    thank you bro i appreciate

  7. #7
    Member heinz1 is offline
    MemberRank
    Oct 2015 Join Date
    53Posts
    Hell maam, may know how the Notification in GM tool work? is it possible to create another application to send message in game?

  8. #8
    Apprentice taichinwang is offline
    MemberRank
    Mar 2017 Join Date
    21Posts
    Quote Originally Posted by heinz1 View Post
    Hell maam, may know how the Notification in GM tool work? is it possible to create another application to send message in game?
    GM-Tools send MSG_NPNotice to DBSRV, then DBSRV inform zones, the packet between GM-Tools and DBSRV is encoded.
    Last edited by taichinwang; 30-10-22 at 04:53 PM.



Advertisement