
К примеру, если чар отравлен, то выпить банку или если чар не в хайде, то спрятаться, ну и всякое подобное
Code: Select all
TEvBuff_DebuffSystemCallBack = procedure (ID:Cardinal; Attribute_ID : Word; IsEnabled : Boolean);stdcall;
Code: Select all
program new
var
protect : string;
procedure buff_debuffsystem(id : integer ; attribute_id : word ; isenabled : boolean);
begin
//addtosystemjournal('id = ' + inttostr(id) + ' attribute_id = ' + inttostr(attribute_id) + ' isenabled = ' + booltostr(isenabled));
//clientprint('buffchecker called');
if attribute_id = 1029 then
if isenabled then
protect := 'protected'
else
protect := 'none';
end;
begin
seteventproc(evbuff_debuffsystem,'buff_debuffsystem');
repeat
while protect <> 'protected' do
begin
cast('protection');
checklag(lagwait);
wait(1000);
end;
wait(50);
until false;
end.