Звук при смерти таргета.
procedure sound;
var
P1, P2 : pointer;
Action: TL2Action;
Actor, :TL2Live;
begin
while Engine.Status = lsOnline do
begin
Action := Engine.WaitAction([laDie], P1, P2);
if (Action = laDie) then begin
Actor := TL2Live(P1);
If user.target=actor
then
PlaySound(exepath + '\sounds\' + 'Chicken' + '.wav', False);
delay(1000);
StopSound;
end;
end;
end;
Reskill
procedure reskill;
var
P1, P2 : pointer;
Action: TL2Action;
Actor,char3: TL2Live;
begin
while Engine.Status = lsOnline do
begin
Action := Engine.WaitAction([laRevive], P1, P2);
if (Action = laRevive) then begin
Actor := TL2Live(P1);
begin
If (Actor.pvp) and (user.distto(actor)<1000) and (not Actor.Ismember)
then
engine.settarget(Actor);
end;
end;
end;
end;
Cleanse
procedure sound;
var
P1, P2 : pointer;
Action: TL2Action;
Actor, :TL2Live;
begin
while Engine.Status = lsOnline do
begin
Action := Engine.WaitAction([laDie], P1, P2);
if (Action = laDie) then begin
Actor := TL2Live(P1);
If user.target=actor
then
PlaySound(exepath + '\sounds\' + 'Chicken' + '.wav', False);
delay(1000);
StopSound;
end;
end;
end;
Reskill
procedure reskill;
var
P1, P2 : pointer;
Action: TL2Action;
Actor,char3: TL2Live;
begin
while Engine.Status = lsOnline do
begin
Action := Engine.WaitAction([laRevive], P1, P2);
if (Action = laRevive) then begin
Actor := TL2Live(P1);
begin
If (Actor.pvp) and (user.distto(actor)<1000) and (not Actor.Ismember)
then
engine.settarget(Actor);
end;
end;
end;
end;
Cleanse
Код:
procedure cleanse;
const
range=600;
var
skill: TL2Skill;
j: Integer;
i:integer;
bp,n1,n2,n3:string;
Buffs: TL2Buff;
targ:TL2Live;
BuffList: array of integer;
begin
bufflist:= []; // вставить ID дебафов.
while Engine.Status = lsOnline do
begin
for j:=0 to Party.Chars.Count -1 do
begin
targ := Party.Chars.Items(j);
bp:='nick1'; //ники пати мемберов, которых нужно клинсить
n1:='nick2';
n2:='nick3';
n3:='nick4';
for i:=0 to high(Bufflist) do
If (targ.Buffs.ById(BuffList[i], buffs)) and
((targ.name=bp) or (targ.name=n1) or (targ.name=n2) or (targ.name=n3)) and
((Engine.GetSkillList.byid(1409, skill)) and (Skill.EndTime < 950)) and
(not user.buffs.byid(1248,buffs))
then
if (User.DistTo(targ)<range) and not (targ.Dead) then
begin
Engine.SetTarget(targ);
delay(10);
Engine.Usekey(); // код клавиши, на которой стоит клинс
end;
end;
end;
end;
begin
script.newthread(@cleanse);
delay(100);
end.