📄 common.pas
字号:
PetNPC :Pointer;{僉儏乕儁僢僩偙偙傑偱} constructor Create; destructor Destroy; override;end;//------------------------------------------------------------------------------// 僾儗僀儎乕僨乕僞type TPlayer = class Login :byte; //0=僆僼儔僀儞 1=儘僌僀儞拞 ID :cardinal; IP :string; Name :string; Pass :string; Gender :byte; Mail :string; GMMode :byte; CName :array[0..8] of string; CData :array[0..8] of TChara; //Kafra :TItemList; LoginID1 :cardinal; LoginID2 :cardinal; ver2 :word; constructor Create; destructor Destroy; override;end;//------------------------------------------------------------------------------{僷乕僥傿乕婡擻捛壛}// 僷乕僥傿乕僨乕僞type TParty = class Name :string;//僷乕僥傿乕偺柤慜 MinLV :word;//僷乕僥傿乕撪嵟掅儗儀儖 MaxLV :word;//僷乕僥傿乕撪嵟戝儗儀儖 EXPShare :word;//僷乕僥傿乕宱尡抣愝掕(0偑僶儔僶儔偱1偑岞暯) ITEMShare :word;//僷乕僥傿乕傾僀僥儉愝掕(0偑僶儔僶儔偱1偑嫟桳丠枹幚憰梫慺) MemberID :array[0..11] of cardinal;//儊儞僶乕偺ID Member :array[0..11] of TChara;//儊儞僶乕 EXP :Cardinal; //宱尡抣暘攝梡 JEXP :Cardinal; //宱尡抣暘攝梡end;{僷乕僥傿乕婡擻捛壛僐僐傑偱}//------------------------------------------------------------------------------type TCastle = class //added by The Harbinger -- darkWeiss version Name :string; GID :word; GName :string; GMName :string; GKafra :integer; EDegree :cardinal; ETrigger:integer; DDegree :cardinal; DTrigger:integer; GuardStatus:array [0..7] of integer;end;//------------------------------------------------------------------------------type TEmp = class //added by The Harbinger -- darkWeiss version Map :string; EID :cardinal;end;//------------------------------------------------------------------------------// 揦攧傝傾僀僥儉type TShopItem = class ID :word; Price :cardinal; Data :TItemDB;end;//------------------------------------------------------------------------------// NPC僗僋儕僾僩type rScript = record ID :word; //僐儅儞僪ID Data1 :array of string; Data2 :array of string; Data3 :array of integer; DataCnt :cardinal;end;//------------------------------------------------------------------------------// NPC僨乕僞type TNPC = class //edited by The Harbinger -- darkWeiss version ID :cardinal; Name :string;{NPC僀儀儞僩捛壛}// JID :word; JID :integer;{NPC僀儀儞僩捛壛僐僐傑偱} Map :string; Reg :string; Point :TPoint; Dir :byte; CType :byte; //0=warp 1=shop 2=script 3=item 4=skill //warp WarpSize :TPoint; WarpMap :string; WarpPoint :TPoint; //shop ShopItem :array of TShopItem; //script Script :array of rScript; ScriptCnt :integer; ScriptLabel :string;{NPC僀儀儞僩捛壛} ScriptInitS :integer; //OnInit僗僥僢僾 ScriptInitD :Boolean; //OnInit幚峴嵪僼儔僌 ScriptInitMS :integer; ChatRoomID :cardinal; //僠儍僢僩儖乕儉ID Enable :Boolean; //桳岠僗僀僢僠{NPC僀儀儞僩捛壛僐僐傑偱} //item Item :TItem; SubX :byte; SubY :byte; Tick :cardinal; //skill Count :word; CData :TChara;{捛壛} MSkill :Word;{捛壛僐僐傑偱} MUseLV :word;{僉儏乕儁僢僩} //pet HungryTick :cardinal; NextPoint :TPoint; MoveTick :cardinal; ppos :integer; pcnt :integer; path :array[0..999] of byte; //僉儍儔偺宱楬(岦偒偱婰榐偝傟偰傑偡){僉儏乕儁僢僩偙偙傑偱}end;//------------------------------------------------------------------------------{NPC僀儀儞僩捛壛}// 僞僀儅乕僨乕僞type NTimer = class ID :cardinal;//僞僀儅乕ID Tick :cardinal;//僞僀儅乕 Cnt :word;//僞僀儅乕僀儞僨僢僋僗悢 Idx :array of integer;//僀儞僨僢僋僗 Step :array of integer;//暘婒愭 Done :array of byte;//幚峴嵪傒僼儔僌end;//儅僢僾愝掕僨乕僞type MapTbl = class //edited by The Harbinger -- darkWeiss version noMemo :Boolean; noSave :Boolean; noTele :Boolean; PvP :Boolean; PvPG :Boolean;end;{NPC僀儀儞僩捛壛僐僐傑偱}//------------------------------------------------------------------------------// 儅僢僾僽儘僢僋僨乕僞type TBlock = class NPC :TIntList32; Mob :TIntList32; CList :TIntList32; //MobProcess :boolean; MobProcTick :cardinal; constructor Create; destructor Destroy; override;end;//------------------------------------------------------------------------------// 儅僢僾僨乕僞type TMap = class Name :string; Size :TPoint; gat :array of array of byte; //bit1=堏摦壜擻 bit2=悈偨傑傝 bit3=Warp BlockSize :TPoint; Block :array[-3..67] of array[-3..67] of TBlock; // 512/8=64 0-3~(64-1)+3 NPC :TIntList32; NPCLabel :TStringList; CList :TIntList32; Mob :TIntList32; Mode :byte; //0=枹儘乕僪 1=儘乕僪拞 2=儘乕僪嵪傒{NPC僀儀儞僩捛壛} TimerAct :TIntList32; //摦嶌拞僞僀儅乕 TimerDef :TIntList32; //掕媊嵪僞僀儅乕{NPC僀儀儞僩捛壛僐僐傑偱} constructor Create; destructor Destroy; override;end;//------------------------------------------------------------------------------// 儅僢僾儕僗僩僨乕僞type TMapList = class Name :string; Size :TPoint; Mode :byte; //0=枹儘乕僪 1=儘乕僪拞 2=儘乕僪嵪傒end;//------------------------------------------------------------------------------// 宱楬扵嶕梡峔憿懱type rPath = record x :Integer; y :Integer; dist :integer; dir :integer; before :integer; cost :integer;end;//------------------------------------------------------------------------------{僠儍僢僩儖乕儉婡擻捛壛}// 僠儍僢僩儖乕儉僨乕僞type TChatRoom = class ID :cardinal;//僠儍僢僩儖乕儉ID Title :string;//僠儍僢僩儖乕儉僞僀僩儖 Limit :word;//嵟戝恖悢 Users :word;//擖幒恖悢 Pub :Byte;//岞奐or旕岞奐 Pass :string;//僷僗儚乕僪 MemberID :array[0..20] of cardinal;//儊儞僶乕偺ID MemberCID :array[0..20] of cardinal;//儊儞僶乕偺CID MemberName :array[0..20] of string;//儊儞僶乕偺柤慜 KickList :TIntList32;//kick儐乕僓乕儕僗僩{NPC僀儀儞僩捛壛} NPCowner :Byte;{NPC僀儀儞僩捛壛僐僐傑偱} constructor Create; destructor Destroy; override;end;{僠儍僢僩儖乕儉婡擻捛壛僐僐傑偱}//------------------------------------------------------------------------------{業揦僗僉儖捛壛}// 業揦奐愝僨乕僞type TVender = class ID :cardinal;//僆乕僫乕ID CID :cardinal;//僆乕僫乕CID Title :string;//業揦僞僀僩儖 Cnt :word;//業揦巆傝傾僀僥儉悢 MaxCnt :word;//業揦嵟戝傾僀僥儉悢 Idx :array[0..12] of word;//傾僀僥儉僀儞僨僢僋僗 Price :array[0..12] of cardinal;//壙奿 Amount :array[0..12] of word;//悢検 Weight :array[0..12] of word;//廳検end;{業揦僗僉儖捛壛僐僐傑偱}//------------------------------------------------------------------------------{庢堷婡擻捛壛}type TDealings = class ID :cardinal;//庢堷ID UserID :array[0..2] of cardinal;//傾僇僂儞僩ID Cnt :array[0..2] of word;//傾僀僥儉悢 Zeny :array[0..2] of cardinal;//僛僯乕 ItemIdx :array[0..2] of array[0..10] of word;//傾僀僥儉僀儞僨僢僋僗 Amount :array[0..2] of array[0..10] of cardinal;//悢検 Mode :array[0..2] of Byte;//恑峴忬嫷end;{庢堷婡擻捛壛僐僐傑偱}//------------------------------------------------------------------------------{巵{敔捛壛}type TSummon = class Name :string;end;{巵{敔捛壛僐僐傑偱}//------------------------------------------------------------------------------{僊儖僪婡擻捛壛}// 僊儖僪僨乕僞type TGuild = class ID :Cardinal;//ID Name :string;//柤慜 LV :word;//儗儀儖 EXP :Cardinal;//宱尡抣 NextEXP :Cardinal;//儗儀儖傾僢僾宱尡抣 MasterName :string;//僊儖僪儅僗僞乕偺柤慜 RegUsers :word;//搊榐幰悢 MaxUsers :word;//掕堳 SLV :word;//儊儞僶乕偺儗儀儖偺崌寁 MemberID :array[0..36] of cardinal;//儊儞僶乕ID Member :array[0..36] of TChara;//儊儞僶乕 MemberPos :array[0..36] of Byte;//儊儞僶乕怑埵 MemberEXP :array[0..36] of cardinal;//忋擺宱尡抣 PosName :array[0..20] of string;//怑埵柤 PosInvite :array[0..20] of boolean;//壛擖尃尷 PosPunish :array[0..20] of boolean;//張敱尃尷 PosEXP :array[0..20] of byte;//EXP忋擺% Notice :array[0..2] of string;//崘抦 Agit :string;//娗棟椞抧 Emblem :Cardinal;//僄儞僽儗儉 GSkill :array[10000..10005] of TSkill; GSkillPoint :word;//僗僉儖億僀儞僩 Present :Cardinal;//忋擺億僀儞僩 DisposFV :integer;//惈岦F-V DisposRW :integer;//惈岦R-W GuildBanList :TStringList;//捛曻幰儕僗僩 RelAlliance :TStringList;//摨柨僊儖僪儕僗僩 RelHostility :TStringList;//揋懳僊儖僪儕僗僩 constructor Create; destructor Destroy; override;end;//------------------------------------------------------------------------------type TGBan = class// 僊儖僪捛曻幰僨乕僞 Name :string;//僉儍儔柤 AccName :string;//傾僇僂儞僩柤 Reason :string;//捛曻帠桼end;//------------------------------------------------------------------------------type TGRel = class// 摨柨丒揋懳僊儖僪僨乕僞 ID :Cardinal;//僊儖僪ID GuildName :string;//摨柨丒揋懳僊儖僪柤end;{僊儖僪婡擻捛壛僐僐傑偱}//------------------------------------------------------------------------------// 掕悢const CodeVersion = 'D-Weiss alpha.$0100-fix5'; PacketLength:array[0..$200] of integer = (// +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +a +b +c +d +e +f 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x0000 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x0010 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x0020 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x0030 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x0040 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x0050 0, 0, 0, 0, 55, 17, 3, 37, 46, -1, 23, -1, 3,108, 3, 2, // 0x0060 3, 28, 19, 11, 3, -1, 9, 5, 52, 51, 56, 58, 41, 2, 6, 6, // 0x0070 7, 3, 2, 2, 2, 5, 16, 12, 10, 7, 29, 23, -1, -1, -1, 0, // 0x0080 7, 22, 28, 2, 6, 30, -1, -1, 3, -1, -1, 5, 9, 17, 17, 6, // 0x0090 23, 6, 6, -1, -1, -1, -1, 8, 7, 6, 7, 4, 7, 0, -1, 6, // 0x00a0 8, 8, 3, 3, -1, 6, 6, -1, 7, 6, 2, 5, 6, 44, 5, 3, // 0x00b0 7, 2, 6, 8, 6, 7, -1, -1, -1, -1, 3, 3, 6, 3, 2, 27, // 0x00c0 3, 4, 4, 2, -1, -1, 3, -1, 6, 14, 3, -1, 28, 29, -1, -1, // 0x00d0 30, 30, 26, 2, 6, 26, 3, 3, 8, 19, 5, 2, 3, 2, 2, 2, // 0x00e0 3, 2, 6, 8, 21, 8, 8, 2, 2, 26, 3, -1, 6, 27, 30, 10, // 0x00f0 2, 6, 6, 30, 79, 31, 10, 10, -1, -1, 4, 6, 6, 2, 11, -1, // 0x0100 10, 39, 4, 10, 31, 35, 10, 18, 2, 13, 15, 20, 68, 2, 3, 16, // 0x0110 6, 14, -1, -1, 21, 8, 8, 8, 8, 8, 2, 2, 3, 4, 2, -1, // 0x0120 6, 86, 6, -1, -1, 7, -1, 6, 3, 16, 4, 4, 4, 6, 24, 26, // 0x0130 22, 14, 6, 10, 23, 19, 6, 39, 8, 9, 6, 27, -1, 2, 6, 6, // 0x0140 110, 6, -1, -1, -1, -1, -1, 6, -1, 54, 66, 54, 90, 42, 6, 42, // 0x0150 -1, -1, -1, -1, -1, 30, -1, 3, 14, 3, 30, 10, 43, 14,186,182, // 0x0160 14, 30, 10, 3, -1, 6,106, -1, 4, 5, 4, -1, 6, 7, -1, -1, // 0x0170 6, 3,106, 10, 10, 34, 0, 6, 8, 4, 4, 4, 29, -1, 10, 6, // 0x0180 90, 86, 24, 6, 30,102, 8, 4, 8, 4, 14, 10, -1, 6, 2, 6, // 0x0190 3, 3, 35, 5, 11, 26, -1, 4, 4, 6, 10, 12, 6, -1, 4, 4, // 0x01a0 0, 0, -1, 0, 0, 0,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x01b0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x01c0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x01d0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x01e0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x01f0 0);//------------------------------------------------------------------------------// 曄悢var //edited by The Harbinger -- darkWeiss version AppPath :string; ServerIP :cardinal; ServerName :string; DefaultNPCID :cardinal; sv1port :word; sv2port :word; sv3port :word; WarpDebugFlag :boolean; BaseExpMultiplier :cardinal; JobExpMultiplier :cardinal; DisableMonsterActive :boolean; AutoStart :boolean; DisableLevelLimit :boolean;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -