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

📄 common.pas

📁 RO模拟器!!适合玩仙境传说的玩家们呦~
💻 PAS
📖 第 1 页 / 共 5 页
字号:
	STR           :byte;
	AGI           :byte;
	VIT           :byte;
	INT           :byte;
	DEX           :byte;
	LUK           :byte;
	}
	CharaNumber   :byte;
	_4            :word;

	//Map           :string;
	//Point         :TPoint;
	SaveMap       :string;
	SavePoint     :TPoint;
	MemoMap       :array[0..2] of string;
	MemoPoint     :array[0..2] of TPoint;

	// Line 2: Skills
	Skill         :array[0..MAX_SKILL_NUMBER] of TSkill;

	// Line 3: Items
	Item          :array[1..100] of TItem;
	// Line 4: Cart
	Cart          :TItemList;
	// Line 5: Variables
	Flag          :TStringList;

	//
	DefaultSpeed  :word;
	EquipJob      :Int64;
	BaseNextEXP   :cardinal;
	JobNextEXP    :cardinal;
	Weight        :cardinal;
	MaxWeight     :cardinal;
	// Changed bonus to smallint (signed words) to prevent negative stat crashes
	Bonus         :array[0..5] of SmallInt;
	Param         :array[0..5] of word;
	ParamUp       :array[0..5] of word;
	WeaponType    :array[0..1] of word; // Right(0), left(1) hand weapon types
	WeaponSprite  :array[0..1] of word; // Item IDs for wpn sprites. 0=rt., 1=lt.
{捛壛 - Weapon Levels}
	WeaponLv      :array[0..1] of word; // Weapon levels for right/left
{捛壛僐僐傑偱 - Attackpower and Weapon Fixes}
	ArmsFix       :array[0..1] of word; // Right/left training (mastery?)
	ATK           :array[0..1] of array[0..5] of word; // Displayed ATK power
	ATKFix        :array[0..1] of array[0..2] of integer; // Weapon correction based on enemy size
{曄峏 - Damage Modifiers and Fixes}
	AttPower      :Word; // Attack power additions from cards, etc.
	DamageFixR    :array[0..1] of array[0..9] of Integer; //Race correction %: 0=weapon, 1=armor
	DamageFixE    :array[0..1] of array[0..9] of Integer; //Element correction %: 0=weapon, 1=armor
	DamageFixS    :array[0..2] of Integer;                //Size correction %: 0=S, 1=M, 2=L
{曄峏僐僐傑偱 - Battle Stats?}
	DAPer         :integer; //DA敪摦妋棪
	DAFix         :integer; //DA敪摦帪偺2敪崌寁峌寕椡%
	Arrow         :word; //憰旛拞偺栴偺ID
	MATK1         :integer;
	MATK2         :integer;
	MATKFix       :integer;
	DEF1          :integer; // Defense Power %
	DEF2          :integer; // Defense Power - (VIT soak)
	DEF3          :integer; // Divine Protection
	MDEF1         :integer;
	MDEF2         :integer;
	HIT           :integer;
	FLEE1         :integer;
	FLEE2         :integer;
	FLEE3         :integer;
	Critical      :word;
	Lucky         :word;
	ASpeed        :word;
	Delay         :integer;
	ADelay        :word;
	aMotion       :word;
	dMotion       :word;
	MCastTimeFix  :byte; //塺彞帪娫曗惓%
	HPDelay       :array[0..3] of cardinal;
	SPDelay       :array[0..3] of cardinal;
{捛壛}
	HPDelayFix    :Integer;
	SPDelayFix    :Integer;
{捛壛僐僐傑偱}
	Range         :word;
	WElement      :array[0..1] of byte; // Weapon elements
	ArmorElement  :byte; // Armor element (from card or armor type)
	HPR           :word; //HP Recovery Rate
	SPR           :word; //SP Recovery Rate
{曄峏}
	DrainFix      :array[0..1] of Integer; //媧廂検   0:HP 1:SP
	DrainPer      :array[0..1] of Integer; //媧廂妋棪 0:HP 1:SP
	SplashAttack  :boolean;                //Causes an Area Attack
	SpecialAttack :integer;
	{
	1 = Knockback
	2 = Fatal Blow, .1% chance of instantly killing monster
	}
	KnockBackSuccess  : boolean;
	WeaponSkill       : integer;
	WeaponSkillLv :integer;
	WeaponID      :integer;
	NoJamstone    :boolean;
	NoTrap        :boolean;
	LessSP        :boolean;
	FastWalk      :boolean;
	NoTarget          : Boolean;
	FullRecover       : Boolean;
	OrcReflect        : Boolean;
	AnolianReflect    : Boolean;
	UnlimitedEndure   : Boolean;
	DoppelgagnerASPD  : Boolean;
	GhostArmor        : Boolean;
	NoCastInterrupt   : Boolean;
	MagicReflect      : Boolean;
	SkillWeapon       : Boolean;
	GungnirEquipped   : Boolean;
	LVL4WeaponASPD    : Boolean;
	PerfectDamage     : Boolean;
	PerfectHide       : Boolean;

	{Sage Effects}
	SageElementEffect : Boolean;

	//# 僗僥曄梡
	SFixPer1       :array[0..1] of array[0..4] of Integer; //曄壔妋棪%
	SFixPer2       :array[0..1] of array[0..4] of Integer;
	BodyTick       :Integer;                  //忬懺侾梡Tick
	HealthTick     :array[0..4] of Integer;   //忬懺俀梡Tick
{曄峏僐僐傑偱}
	//張棟梡曄悢
	ver2          :word;

	tmpMap        :string;
	tgtPoint      :TPoint; //堏摦愭

	HPTick        :cardinal;
	SPTick        :cardinal;
	HPRTick       :cardinal;
	SPRTick       :cardinal;
	SkillTick     :cardinal; //師偵僗僉儖偑愗傟傞偲偒偺Tick
	SkillTickID   :word; //師偵偳偺僗僉儖偑愗傟傞偐

//	MData         :Pointer;
	MData         :TMap;//ref ChrstphrR - typed pointer, req. forward declaration
	NextFlag      :boolean;
	NextPoint     :TPoint;
	MoveTick      :cardinal;

	PartyName     :string; //偙傟傜偼偦偺偆偪僨乕僞僼傽僀儖偐傜撉傓傛偆偵偡傞偙偲
	GuildName     :string;
	GuildID       :word;
	ClassName     :string;
{惛楤NPC婡擻捛壛}
	EqLock        :Boolean; //惛楤梡憰旛儘僢僋
{惛楤NPC婡擻捛壛僐僐傑偱}
{僠儍僢僩儖乕儉婡擻捛壛}
	ChatRoomID    :cardinal; //僠儍僢僩儖乕儉ID
{僠儍僢僩儖乕儉婡擻捛壛僐僐傑偱}
{業揦僗僉儖捛壛}
	VenderID      :cardinal; //業揦奐愝ID
{業揦僗僉儖捛壛僐僐傑偱}
{庢堷婡擻捛壛}
	DealingID     :cardinal; //庢堷拞ID
	PreDealID     :cardinal; //庢堷婓朷ID
{庢堷婡擻捛壛僐僐傑偱}
{僊儖僪婡擻捛壛}
	GuildInv      :cardinal; //僊儖僪姪桿懳徾僉儍儔
	GuildPos      :byte; //僊儖僪怑埵僀儞僨僢僋僗
{僊儖僪婡擻捛壛僐僐傑偱}

	HeadDir       :word;
	Sit           :byte; // 0: moving 1: dead 2: sitting 3: standing
	AMode         :byte;
	//0: Not attacking  1: single attack  2: continuous attack  3: NPC dialog
	//4: Open Vending shop  5: Trade window
	ATarget       :cardinal; // ID of attacked target
	AData         :Pointer; // TNPC/TChara Data of attacked target
	ATick         :cardinal; // tick of next attack
	ScriptStep    :integer; // Step of NPC talk (script)
	DmgTick       :cardinal; // Knockback
	TargetedTick  :cardinal; //壗旵偵埻傑傟偰傞偐偺僠僃僢僋偺嵟廔妋擣帪偺Tick
	TargetedFix   :integer;  //揋偵埻傑傟偰偺夞旔棪尭彮(1/10%)

	MMode         :byte;
	MSkill        :word;
	MUseLV        :word;
	MTarget       :cardinal;
	MTargetType   :byte; // Category of AData. 0 = mob, 1 = player.
	MPoint        :rPoint;
	MTick         :cardinal;
	SPAmount      :integer;         {Total amount of SP used by a skill}

	spiritSpheres :word;  // Spirit spheres per character.  Moved from global scope.

	TalkNPCID     :cardinal;
	UseItemID     :word;

{捛壛}
	ItemSkill     :Boolean;
	Auto          :Word; // 0:柍偟 1:峌寕 2:僗僉儖 4:儖乕僩 8:堏摦 16:捛愓
	A_Skill       :Word;
	A_Lv          :Word;
	ActTick       :Cardinal;
{捛壛僐僐傑偱}
{僉儏乕儁僢僩}
//	PetData       :Pointer;
//	PetNPC        :Pointer;
	PetData       : TPet; //ChrstphrR 2004/04/21
	PetNPC        : TNPC; //typed pointers, requires forward declare

	PetMoveTick   :cardinal;
//	Crusader      :Pointer;
	Crusader      :TChara; //Reference ONLY to a Crusader for certain skills.
        Autocastactive :Boolean;
        noday         :Boolean;

        GraceTick     :Cardinal;  {Characters Grace period for not getting hit}

        AnkleSnareTick :cardinal; {How long a character is trapped in ankle snare}

        PassiveAttack :Boolean;   {Used for Skills like Grand Cross and Combo's}

        isCloaked     :Boolean;   {Says if Cloaking is Active}
        CloakTick     :Cardinal;  {Tracks For SP Usage on Cloak AND Hide}

        // Darkhelmet, I used this method so you can theoretically be poisoned
        // and cursed at the same time, even though graphics will only show one.
        PoisonTick    :Cardinal;  {Tracks how long a player is Poisoned}
        isPoisoned    :Boolean;   {Says if player is Poisoned}

        FreezeTick    :Cardinal;  {Tracks how long a player is Frozen for}
        isFrozen      :Boolean;   {Says if player is Frozen}

        isStoned      :boolean;   {Says if a player is Stoned}
        StoneTick     :Cardinal;   {Tracks the length of the curse}

        isBlind       :Boolean;   {Says if a player is blind}
        BlindTick     :Cardinal;  {Tracks how long a player is Blind}

        isSilenced    :Boolean;   {Says if a player is silenced}
        SilencedTick  :Cardinal;  {Tracks how long a player is silenced}

        intimidateActive:Boolean; {Sets intimidate Active}
        intimidateTick:cardinal;  {Used so you can delay before you intimidate}

        noHPRecovery  :Boolean;   {Player Cannot Recover HP}
        noSPRecovery  :Boolean;   {Player Cannot Recover SP}

        SPRedAmount   :integer;   {Amount SP Usage is Reduced by}

        SpellBroken   :boolean;   {Used For Spellbreaker}

        LastSong      :integer;   {Last Song a Bard Cast}
        LastSongLV    :integer;   {Level of last song a Bard Cast}
        InField       :boolean;   {Determine if a player is in a skill field}
        SongTick      :cardinal;   {Determines if Bard is Casting a Song}
        SPSongTick    :cardinal;  {For Decreasing SP when using Songs}
        StatRecalc    :boolean; {Used for the Sage skill free cast}
        //SkillOnBool         :Boolean; //boolean indicate skill duration for skills according to system time.

	constructor Create;
	destructor  Destroy; override;
  //procedures to get skilonbool and set skillonbool
  //procedure setSkillOnBool(temp:Boolean);
  //function getSkillOnBool:Boolean;
    property FireWallCount : Byte
    read   fFireWallCount

    write  SetFireWallCount;
end;
//------------------------------------------------------------------------------
// 僾儗僀儎乕僨乕僞
{ChrstphrR 2004/04/20 - no type before, in the same "type" block as the forward
declaration and TChara which points back to ... TPlayer here}
TPlayer = class
	Login         :byte; //0=僆僼儔僀儞 1=儘僌僀儞拞
	ID	          :cardinal;
	IP            :string;
	Name          :string;
	Pass          :string;
	Gender        :byte;
	Mail          :string;
	Banned        :byte;
	CID           :array[0..8] of cardinal;
	CName         :array[0..8] of string;
	CData         :array[0..8] of TChara; //Reference pointers
	Kafra         :TItemList;//Owned

	LoginID1      :cardinal;
	LoginID2      :cardinal;
	ver2          :word;
	Saved         :byte;

	constructor Create;
	destructor  Destroy; override;
end;//TPlayer
//------------------------------------------------------------------------------


(*=============================================================================*
TParty

--
Overview:
--
Defines the basic data and function of a Party of Characters in the game.

No Constructor/Destructor Pair needed, because the fields/properties are
simple types.

--
Revisions:
--
2004/05/23 [ChrstphrR] - initial commenting of the class's purpose
2004/05/23 [ChrstphrR] - changing fields into properties, in preparation for
	SQL awareness in this object.

2004/05/31 [ChrstphrR] - Grouping fields into state information during gameplay
	and data that persists between sessions -- the latter become properties.
*=============================================================================*)
TParty = class
private
	fName        : String[24]; //24 characters max.
	fExpShare    : WordBool;
	fItemShare   : WordBool;

protected
	function  GetName : string;
	procedure SetName(Value : string);

public

//	EXPShare    : Word;//Experience sharing (0 = Not shared, 1 = Shared)
//	ITEMShare   : Word;//Item sharing       (0 = Not Shared, 1 = Shared)
	MemberID    : array[0..MAX_PARTY_SIZE-1] of Cardinal;//Character IDs
	Member      : array[0..MAX_PARTY_SIZE-1] of TChara;  //References

	{State Info that's only persistant while the server is running.}
	MinLV       : Word;//Lowest level in party (of whom are online)
	MaxLV       : Word;//Highest level in party (of whom are online)

	EXP         : Cardinal; //Used for EXP distribution to members after a kill
	JEXP        : Cardinal; // ditto, for JEXP
	PartyBard   : array[0..2] of TChara; {Tracks Who the Party's Bard is}
	PartyDancer : array[0..2] of TChara; {Tracks Who the Party's Dancer is}

	property Name : string //Party Name - must be unique
		read  GetName
		write SetName;

	//Semi-converted, need methods to work with SQL code.
	property ExpShare : WordBool
		read  fExpShare
		write fExpShare;
	property ItemShare : WordBool
		read  fItemShare
		write fItemShare;
End;(* <TClassName> ==========================================================*)


//------------------------------------------------------------------------------
TCastle = class
	Name        :string;
	GID         :word;
	GName       :string;
	GMName      :string;
	GKafra      :integer;
	EDegree     :cardinal;
	ETrigger    :integer;
	DDegree     :cardinal;

⌨️ 快捷键说明

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