📄 common.pas
字号:
DTrigger :integer;
GuardStatus :array [0..7] of integer;
end;
//------------------------------------------------------------------------------
TEmp = class
Map :string;
EID :cardinal;
end;
//------------------------------------------------------------------------------
// 揦攧傝傾僀僥儉
TShopItem = class
ID :word;
Price :cardinal;
Data :TItemDB;//reference
end;
//------------------------------------------------------------------------------
// NPC僗僋儕僾僩
rScript = record
ID :word; //僐儅儞僪ID
Data1 :array of string;
Data2 :array of string;
Data3 :array of integer;
DataCnt :cardinal;
end;
//------------------------------------------------------------------------------
// NPC僨乕僞
(*=============================================================================*
TNPC
--
Overview:
--
Derived from TLiving (this change made by Colus, for the common attributes
for NPC, Mob, and Chara objects.
ChrstphrR - question for other devs -- What does an NPC represent?
Just the Kafra babes, and townsfolk? Can it represent NPC associated monsters,
like the one in Prontera? My description here bites, so someone feel free to
expand on what the class -represents-
*=============================================================================*)
TNPC = class(TLiving)
public
Reg :string;
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; //桳岠僗僀僢僠
{傾僕僩婡擻捛壛}
Agit :string; //僄儞僽儗儉昞帵梡
{傾僕僩婡擻捛壛僐僐傑偱}
{NPC僀儀儞僩捛壛僐僐傑偱}
//item
Item :TItem; //owned.
SubX :byte;
SubY :byte;
Tick :cardinal;
//skill
Count :word;
CData :TChara; //ref
MData :TMob; //ref
{捛壛}
MSkill :Word;
{捛壛僐僐傑偱}
MUseLV :word;
{僉儏乕儁僢僩}
//pet
HungryTick :cardinal;
NextPoint :TPoint;
MoveTick :cardinal;
Constructor Create;
Destructor Destroy; OverRide;
End;(* TNPC
*=============================================================================*)
//------------------------------------------------------------------------------
{NPC僀儀儞僩捛壛}
// 僞僀儅乕僨乕僞
NTimer = class
ID :cardinal;//僞僀儅乕ID
Tick :cardinal;//僞僀儅乕
Cnt :word;//僞僀儅乕僀儞僨僢僋僗悢
Idx :array of integer;//僀儞僨僢僋僗
Step :array of integer;//暘婒愭
Done :array of byte;//幚峴嵪傒僼儔僌
public
Constructor Create;
Destructor Destroy; OverRide;
end;
//儅僢僾愝掕僨乕僞
MapTbl = class
noMemo :Boolean;
noSave :Boolean;
{傾僕僩婡擻捛壛}
noPortal :Boolean;
noFly :Boolean;
noBfly :Boolean;
noBranch :Boolean;
noSkill :Boolean;
noItem :Boolean;
Agit :Boolean;
{傾僕僩婡擻捛壛僐僐傑偱}
noTele :Boolean;
PvP :Boolean;
PvPG :Boolean;
noDay :Boolean;
//Capture the flag w00t, heh
CTF :Boolean;
end;
{NPC僀儀儞僩捛壛僐僐傑偱}
//------------------------------------------------------------------------------
// 儅僢僾僽儘僢僋僨乕僞
TBlock = class
NPC :TIntList32;//Reference list
Mob :TIntList32;//Reference list
CList :TIntList32;//Reference list
//MobProcess :boolean;
MobProcTick :cardinal;
Constructor Create;
Destructor Destroy; OverRide;
end;//TBlock
//------------------------------------------------------------------------------
// 儅僢僾僨乕僞
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 = not loaded, 1 = loading, 2 = load complete
{NPC僀儀儞僩捛壛}
TimerAct :TIntList32; //摦嶌拞僞僀儅乕
TimerDef :TIntList32; //掕媊嵪僞僀儅乕
{NPC僀儀儞僩捛壛僐僐傑偱}
constructor Create;
destructor Destroy; override;
end;//TMap
//------------------------------------------------------------------------------
// 儅僢僾儕僗僩僨乕僞
type TMapList = class
Name :string;
Ext :string;
Size :TPoint;
Mode :byte; // 0 = not loaded, 1 = loading, 2 = load complete
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 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;//TGuild
//------------------------------------------------------------------------------
type TGBan = class
// 僊儖僪捛曻幰僨乕僞
Name :string;//僉儍儔柤
AccName :string;//傾僇僂儞僩柤
Reason :string;//捛曻帠桼
end;
//------------------------------------------------------------------------------
type TGRel = class
// 摨柨丒揋懳僊儖僪僨乕僞
ID :Cardinal;//僊儖僪ID
GuildName :string;//摨柨丒揋懳僊儖僪柤
end;
{僊儖僪婡擻捛壛僐僐傑偱}
//------------------------------------------------------------------------------
// 掕悢
const
CodeVersion = 'Nweiss Pro V3.0';
PacketLength:array[0..MAX_PACKET_NUMBER] 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, 54, 53, 58, 60, 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, 9, 4, 8, 4, 14, 10, 4, 6, 2, 6, // 0x0190
3, 3, 35, 5, 11, 26, -1, 4, 4, 6, 10, 12, 6, -1, 4, 4, // 0x01a0
11, 7, -1, 67, 12, 18, 114, 6, 3, 6, 26, 26, 26, 26, 2, 3, // 0x01b0
2, 14, 10, -1, 22, 22, 4, 2, 13, 97, 0, 9, 9, 29, 6, 28, // 0x01c0
8, 14, 10, 35, 6, 8, 4, 11, 54, 53, 60, 2, -1, 47, 33, 6, // 0x01d0
30, 8, 34, 14, 2, 6, 26, 2, 28, 81, 6, 10, 26, 2, -1, -1, // 0x01e0
-1, -1, 20, 10, 32, 9, 34, 14, 2, 6, 48, 56, -1, 4, 5, 10, // 0x01f0
26, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 19 // 0x0200
);
//------------------------------------------------------------------------------
// 曄悢
var
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;
autoip :boolean;
WelcomeMsg :String;
Wmsg :string;
BlueFont :boolean;
PassMD5 :boolean;
DefaultZeny :cardinal;
DefaultMap :string;
DefaultPoint_X :cardinal;
DefaultPoint_Y :cardinal;
DefaultItem1 :cardinal;
DefaultItem2 :cardinal;
EnableMonsterKnockBack :boolean;
DisableEquipLimit :boolean;
ItemDropType :boolean;
ItemDropDenominator :integer;
ItemDropMultiplier :integer;
ItemDropPer :integer;
StealMultiplier :integer;
EnablePetSkills :boolean;
EnableMonsterSkills :boolean;
EnableLowerClassDyes :boolean;
DisableFleeDown :boolean;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -