|
如何操作Check状态检查
unit Q2;
inte**ce
uses Classes, SysUtils;
procedure Main(Npc: TNormNpc; Player: TPlayObject; Args: TArgs);
implementation
procedure Main(Npc: TNormNpc; Player: TPlayObject; Args: TArgs);
begin
//Player.Check状态的范围为1-1024,即Player.Check[1]到Player.Check[1024]都是被允许的
//小于1或大于1024返回为False,并且无法写入值
if Player.Check[100] then //判断Check[100]是否为真
begin
Player.SendMessage('Check[100]的值为True');
Player.Check[100] := False; //将Check[100]的值设置为False
end
else
begin
Player.SendMessage('Check[100]的值为False');
Player.Check[100] := True; //将Check[100]的值设置为True
end;
end;
end.
|
|