if good understand, with this u can see when someone join to party
procedure OnAction(Action: TL2Action; P1, P2: Pointer);
begin
if action = laCharJoin then
begin
// code
end;
end;
begin
delay(-1);
end.
var
i : integer;
mob : tl2npc;
begin
for i:= 0 to npclist.count -1 do
begin
mob := npclist(i);
if (mob.atkoid = user.oid) and (not mob.dead) then
begin
print(mob.name);
end;
end;
end.
seems you can check by "atkOID"
bullshit, it doesnt matter if key in use or not, when u run bot with key(even it be in use), it gonna ask for bind on new hwid, then bot closes, run second time, and good to go, in this case key gave error because it was expired/wrong key
function isHaveBuff(BuffArray : array of cardinal) : boolean;
var
i:integer;
buff : tl2buff;
begin
result := true;
for i := 0 to high(BuffArray) do
begin
if not user.buffs.byid(BuffArray[i], buff) then
begin
result := false;
exit;
end;
end;
end;
function getItem(id : cardinal) : tl2item;
var
item : tl2item;
begin
inventory.user.byid(id, item);
result := item;
end;
var
item : tl2item;
ItemID_1, ItemID_2 : cardinal;
begin
ItemID_1 := 7577;
ItemID_2 := 6608;
while delay(555) do
begin
if not isHaveBuff([1040, 1068]) then
begin
if (getItem(ItemID_1) <> nil) and (not getItem(ItemID_1).equipped) then
begin
engine.useItem(ItemID_1);
end;
end else
begin
if (getItem(ItemID_2) <> nil) and (not getItem(ItemID_2).equipped) then
begin
engine.useItem(ItemID_2);
end;
end;
end;
end.
should do job
function keybd_event(bVk, bScan: byte; dwFlags, dwExtraInfo: integer): integer; stdcall;
external 'user32.dll';
this is blocked by smart guard, try use
engine.entertext('text');