| **TAttatckMode(枚举类型)** | | | --- | --- | | **属性名称** | **功能** | | amAll | 全体攻击 | | amPeaceful | 和平攻击 | | amDear | 夫妻攻击 | | amMaster | 师徒攻击 | | amGroup | 编组攻击 | | amGuild | 行会攻击 | | amRed | 善恶攻击 | | amNation | 国家攻击 | | amCamp | 阵营攻击 | 范例: ``` Unit Q28; Interface Uses Classes, SysUtils; Procedure Main(Npc: TNormNpc; Player: TPlayObject; Args: TArgs); Implementation Procedure Main(Npc: TNormNPC; Player: TPlayObject; Args: TArgs); Const S=[[ 欢迎测试\ <更改成全体模式/@Changemode(0)>\ <更改成和平模式/@Changemode(1)>\ <更改成编组模式/@Changemode(2)>\ ]]; Begin Npc.Say(Player,S); End; Procedure Changemode(Npc: TNormNPC; Player: TPlayObject; Args: TArgs); Begin Case Args.Int[0] Of 0:Begin Player.AttackMode := amAll; Player.Sendcentermessage(&apos;攻击模式由改为了{S=全体模式;C=250}。。。&apos;, 0); End; 1:Begin Player.AttackMode := amPeaceful; Player.Sendcentermessage(&apos;攻击模式由改为了{S=和平模式;C=250}。。。&apos;, 0); End; 2:Begin Player.AttackMode := amGroup; Player.Sendcentermessage(&apos;攻击模式由改为了{S=编组模式;C=250}。。。&apos;, 0); End; End; End; End. ```