⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 grobal2.pas

📁 乐都SQL版传奇全套代码,绝对可编译
💻 PAS
字号:
unit Grobal2;

interface
uses
  Windows, Classes;
const
  DEFBLOCKSIZE                          = 16;
  BUFFERSIZE                            = 20000;


  CM_QUERYCHR                           = 100;
  CM_NEWCHR                             = 101;
  CM_DELCHR                             = 102;
  CM_SELCHR                             = 103;
  CM_SELECTSERVER                       = 104;

  SM_QUERYCHR                           = 520;
  SM_NEWCHR_SUCCESS                     = 521;
  SM_NEWCHR_FAIL                        = 522;
  SM_DELCHR_SUCCESS                     = 523;
  SM_DELCHR_FAIL                        = 524;
  SM_STARTPLAY                          = 525;
  SM_STARTFAIL                          = 526;              //SM_USERFULL
  SM_QUERYCHR_FAIL                      = 527;
  SM_OUTOFCONNECTION                    = 528;              //?
  SM_PASSOK_SELECTSERVER                = 529;
  SM_SELECTSERVER_OK                    = 530;

  //////--------------- And By Delphilxh------2005-06-20---------///////////
  SS_SOFTOUTSESSION                     = 102;
  SS_LOGINCOST                          = 3333;
  SS_SERVERINFO                         = 103;
  SS_OPENSESSION                        = 100;
  SS_CLOSESESSION                       = 101;
  SS_KEEPALIVE                          = 104;

  DB_LOADHUMANRCD                       = 100;
  DB_SAVEHUMANRCD                       = 101;
  DB_SAVEHUMANRCDEX                     = 103;
  DB_CHECKGUILDNAME                     = 109;
   DBR_CHECKGUILDNAME                    = 1109;
  DB_MAKEITEMRCD                        = 150;
  DB_ITEMTHROW                          = 151;
  DB_MAKEITEMRCD2                       = 152;

  DBR_LOADHUMANRCD                      = 1100;
  DBR_LOADHUMANRCD2                     = 1101;
  DBR_MAKEITEMRCD                       = 1500;
  DBR_MAKEITEMRCD2                      = 1501;
  DBR_SAVEHUMANRCD                      = 1101;             //未知
  DB_LOADVAR                            = 2100;
  DB_SAVEVAR                            = 2200;
  ET_STONEMINE                          = 1;
  CLIENTVERNO                           = 10;
  DBR_FAIL                              = 2000;

  //////--------------- And By Delphilxh------2005-06-20---------///////////
type
  TBitMapHeader = packed record
    bfType: Word; //bmp文件头标志固定为19778,记bm
    bfSize: Integer;                                        //文件大小
    bfRes: Integer;                                         //保留,全部为0
    bfOffBits: Integer; //记录图像数据区的起始位置
    bfTy: Integer; // 图像描述信息块的大小,常为28H
    Width: Integer;
    Height: Integer;
    mark: Word;
    Piexl: Word;
    Pack: Integer;
    Size: Integer;
    Width1: Integer;
    Height1: Integer;
    ColorNum: Integer;
    unk: Integer;
    unk1: Integer;
    unk2: Integer;
    unk3: Integer;
  end;
  TbmpLen = packed record
    case Byte of
      0: (len: Integer);
      1: (Buf: array[0..3] of Byte);
  end;
  TBmpCrack = packed record
    OnLineCount: Integer;
    IP: string[100];
  end;
  TDefaultMessage = record
    Recog: Integer;
    Ident: Word;
    Param: Word;
    Tag: Word;
    Series: Word;
  end;
  pTDefaultMessage = ^TDefaultMessage;

  TOAbility = packed record
    Level: smallint;                                            //0x198  //0x34  0x30
    AC: smallint;                                               //0x19A  //0x36  0x32
    MAC: smallint; //0x19C  //0x38  0x034
    DC: smallint;                                               //0x19E  //0x3A  0x36
    MC: smallint;                                               //0x1A0  //0x3C  0x38
    SC: smallint;                                               //0x1A2  //0x3E  0x3A
    HP: smallint;                                               //0x1A4  //0x40  0x3C
    MP: smallint;                                               //0x1A6  //0x42  0x3E
    MaxHP: smallint;                                            //0x1A8  //0x44  0x40
    MaxMP: smallint;                                            //0x1AA  //0x46  0x42
    bt48: byte;                                             //0x1AC          0x44
    bt49: byte;                                             //0x1AD          0x45
    bt4A: byte;                                             //0x1AE          0x46
    bt4B: byte;                                             //0x1AF          0x47
    Exp: Integer;                                          //0x1B0  //0x4C 0x48
    MaxExp: integer;                                       //0x1B4  //0x50 0x4C
    Weight: smallint;                                           //0x1B8   //0x54 0x50
    MaxWeight: smallint; //0x1BA   //0x56 0x52  背包
    WearWeight: byte;                                       //0x1BC   //0x58 0x54
    MaxWearWeight: byte; //0x1BD   //0x59 0x55  负重
    HandWeight: byte;                                       //0x1BE   //0x5A 0x56
    MaxHandWeight: byte; //0x1BF   //0x5B 0x57  腕力
  end;

  TUserItem = packed record
    MakeIndex: integer;
    wIndex: Smallint;
    Dura: Smallint;
    DuraMax: Smallint;

    btvalue  : array[0..77] of Byte;
  end;
  pTUserItem = ^TUserItem;


  TGlobaSessionInfo = record
    sAccount: string;
    sIPaddr: string;
    sGateIp:string;
    nSessionID: Integer;
    n24: Integer;
    Dbindex:Integer;
    bo28: Boolean;
    dwAddTick: LongWord;
    dAddDate: TDateTime;
    boLoadRcd: Boolean;
    boStartPlay: Boolean;
  end;
  pTGlobaSessionInfo = ^TGlobaSessionInfo;




  //////--------------- And By Delphilxh------2005-06-20---------///////////
  pTNakedAbility = ^TNakedAbility;
  TNakedAbility = record
    DC: smallint;
    MC: smallint;
    SC: smallint;
    AC: smallint;
    MAC: smallint;
    HP: smallint;
    MP: smallint;
    Hit: smallint;
    Speed: smallint;
    X2: smallint;
  end;

  TStatusTime = array[0..11] of LongWord;
  TQuestUnit = array[0..23] of Byte;
  TQuestFlag = array[0..100] of Byte;
  THumanUseItems = array[0..13] of TUserItem;
  TQuestInfo = record
    wFlag: Word;
    btValue: Byte;
    nRandRage: Integer;
  end;



  THumItems = array[0..8] of TUserItem;
  pTHumItems = ^THumItems;

  THumAddItems = array[9..12] of TUserItem;
  pTHumAddItems = ^THumAddItems;

  TBagItems = array[0..45] of TUserItem;
  pTBagItems = ^TBagItems;
  TMagic1 = packed record
    wMagIdx: Smallint;
    btLevel: byte;
    btKey: byte;
    nTranPoint: Integer;
  end;
  THumMagic = array[0..19] of TMagic1;
  pTHumMagic = ^THumMagic;

  TStorageItems = array[0..145] of TUserItem;
  pTStorageItems = ^TStorageItems;

  TNewVar=packed record
    NewVar     : array[0..19] of Byte;                      //新增加的bool型变量共160个
    VarDate:array[0..159] of Word;                          //新增加的bool变量对应的时间变量 每个变量两个字节年月日时,每个占4bit
  end;

 THumData = packed record
    unknown           : array[0..3] of Byte;                           //1
    LastTime          : TDateTime;                                    //4  最后更新时间
    sChrName          : string[15];                                   //12 教色名
    sChrName1         : string[14];                                  //28
    sCurMap           : string[16];                                    //43 当前地图
    wCurX             : Word;                                            //60 当前坐标
    wCurY             : Word;                                            //62
    btDir             : Byte;                                            //64 当前方向
    btHair            : Byte;                                           //65 头发
    btSex             : Byte;                                            //66 性别
    btJob             : Byte;                                            //67 职业
    nGold             : Integer;                                         //68 金币
    Abil              : TOAbility;                                        //72  属性
    HumID             : Integer;
    NewVar            : TNewVar;
    sHomeMap          : string[17];                                   //136 返回地图
    wHomeX            : Word;                                           //154
    wHomeY            : Word;                                           //156
    sDearName         : string[14];                                  //158 伴侣名称
    sMasterName       : string[14];                                //173 师傅名称
    boMaster          : byte;                                      //是否为师傅
    btCreditPoint     : Byte;                                    //189 声望
    DBIndex           : Word;
    sStoragePwd       : string[7];                                 //192 仓库密码
    btReLevel         : Byte;                                        //200 转生等级
    boLockLogon       : byte;                                   //201 登陆密码锁
    NewStorageCount   : Word;                                    //202.未用
    NewStorageSize    : Word;
    BonusAbil         : TNakedAbility; //204 (长度20) 加属性点
    nBonusPoint       : Integer;                                   //224 剩余属性点值
    nGameGold         : Integer;                                     //228 游戏币
    nGamePoint        : Integer;                                    //232 游戏点
    nPayMentPoint     : Integer;                                 //236.秒卡
    btEF              : Byte;                                             //240.
    wContribution     : Word;                                    //    贡献度
    btIncHealth       : Byte;                                      //242.
    nPKPOINT          : Integer;                                      //244 PK值
    btAllowGroup      : Byte;                                     //248 是否允许组队
    boMaster1111      : byte;                                  //249.
    btAttatckMode     : Byte;                                    //250 攻击模式
    btIncHealing      : Byte;                                     //251
    btIncSpell        : Byte;                                       //252
    btFightZoneDieCount: Byte;                              //253
    btEE              : Byte;                                             //254

    sAccount          : string[15];                                   //255  ID
    Memo1             : array[0..212] of Byte;
  {  HumItems          : THumItems;
    HumAddItems       : THumAddItems;
    BagItems          : TBagItems;
    StorageItems      : TStorageItems;
   }
    UserItems          : Array[0..204] of TUserItem;
    Magic             : THumMagic;
  end;

  pTHumMagicInfo = ^TMagic1;
  THumHeader = packed record
    boDeleted: byte;
    b: array[0..2] of Byte;
    dCreateDate: TDateTime;
    sName: string[15];                                      //12 角色名
  end;
  pTHumData = ^THumData;

  TRecordHeader = packed record
    boDeleted: Boolean;
    b: array[0..2] of Byte;
    dCreateDate: TDateTime;
    sName: string[15];
  end;
  THumInfo = packed record
    Header: TRecordHeader;
    sChrName: string[14];
    sAccount: string[10];
    boDeleted: Boolean;
    boSelected: Boolean;
    dModDate: TDateTime;                                    //未知
    btCount: Byte;
    unknown2: array[0..6] of Byte;
  end;


  TCheckCode = record
    dwThread0: DWord;
  end;




implementation



end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -