Jump to content

Recommended Posts

  • 3 weeks later...
Posted

hi ppl. how do I run it for the party. I can not run

 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  party.chars.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 :=6313;
  ItemID_2 :=11101;  
    
  while delay(555) do
  begin
    if not isHaveBuff([1397]) 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.

 

Posted (edited)

LF a script to get reward from npc.  i have 100k items and 1x Need 400 items. 

 

https://l2db.info/high-five/quests/290-Threat-Removal its the quest

 

 

Pinaps  

Quest

Threat Removal (In Progress)

Take the Reward 

 

repeat

 

greets 

 

Edited by Emi
Posted (edited)
On 11/13/2018 at 11:11 PM, Emi said:

LF a script to get reward from npc.  i have 100k items and 1x Need 400 items. 

 

https://l2db.info/high-five/quests/290-Threat-Removal its the quest

 

 

Pinaps  

Quest

Threat Removal (In Progress)

Take the Reward 

 

repeat

 

greets 

 

 

You need somthing like this:

 

begin

  while true do begin

       engine.settarget('name of npc');

       delay(200);

       engine.dlgopen;

       engine.dlgsel('Something_1');

       delay(200);

      engine.dlgsel('something_2');

      delay(1000);

  end;

end.

Edited by Software
  • Thanks 1
Posted (edited)

i want to make script for selling some item to shop on alt+B but this not work some one can help me

------------------------------------------------------------------------------------------------------------------------------------------------- 

 var
item: TL2Item;

begin
while true do begin
delay(500);

if inventory.user.byid(1373, item) then begin
if (user.target.dead) or (user.target = nil) then begin
engine.facecontrol(0,false);
while user.incombat do delay(1000);
engine.bypasstoserver('_bbshome');   //use alt and b change for your server
delay(1000);
engine.bypasstoserver('_bbsloc_CommunitySell');
delay(1000);
Engine.DlgOpen;
Engine.Dlgsel(2);  //(which npc window option to choose)
Delay(500);
Engine.NPCExchange(1373, 2);    // Magic Gem
delay(1000);
end;
end;
end;
end.

---------------------------------------------------------------------------------------------------------------------------------------------------------

Thank you

Edited by Black9981
Posted (edited)

i want to make script for selling some item to shop on alt+B but this not work some one can help me

------------------------------------------------------------------------------------------------------------------------------------------------- 

 var
item: TL2Item;

begin
while true do begin
delay(500);

if inventory.user.byid(1373, item) then begin
if (user.target.dead) or (user.target = nil) then begin
engine.facecontrol(0,false);
while user.incombat do delay(1000);
engine.bypasstoserver('_bbshome');   //use alt and b change for your server
delay(1000);
engine.bypasstoserver('_bbsloc_CommunitySell');
delay(1000);
Engine.DlgOpen;
Engine.Dlgsel(2);  //(which npc window option to choose)
Delay(500);
Engine.NPCExchange(1373, 2);    // Magic Gem
delay(1000);
end;
end;
end;
end.

---------------------------------------------------------------------------------------------------------------------------------------------------------

Thank you

Shot00001.gif

Edited by Black9981
Posted
9 hours ago, Black9981 said:

i want to make script for selling some item to shop on alt+B but this not work some one can help me

------------------------------------------------------------------------------------------------------------------------------------------------- 

 var
item: TL2Item;

begin
while true do begin
delay(500);

if inventory.user.byid(1373, item) then begin
if (user.target.dead) or (user.target = nil) then begin
engine.facecontrol(0,false);
while user.incombat do delay(1000);
engine.bypasstoserver('_bbshome');   //use alt and b change for your server
delay(1000);
engine.bypasstoserver('_bbsloc_CommunitySell');
delay(1000);
Engine.DlgOpen;
Engine.Dlgsel(2);  //(which npc window option to choose)
Delay(500);
Engine.NPCExchange(1373, 2);    // Magic Gem
delay(1000);
end;
end;
end;
end.

---------------------------------------------------------------------------------------------------------------------------------------------------------

Thank you

Shot00001.gif

https://adrenalinebot.com/en/api/adrenaline/Classes/TL2Control#NpcTrade

Posted (edited)

Hello everyone,

 

I would like to ask for a way to know when my pet/summon and pt members are attacked by mobs.

 

I have trying to figure this out for days but still not get it. I tried to use engine.findenemy() but its didnt work with my pet/summon:

 

uses SysUtils;
var npc: TL2Npc;
var pet: TL2Pet;
Begin
	while engine.status = lsOnline do
	begin
			REPEAT
				Engine.UseSkill('Servitor Recharge');
				if engine.findenemy(npc,pet,300) then Break;
			UNTIL User.MP > 95; 
	end;
end.

 

Please help me solve this, and I am looking for a way to make it work with pt members too.

Thank you so much!

Edited by zenko_218
Posted
25 minutes ago, zenko_218 said:

Hello everyone,

 

I would like to ask for a way to know when my pet/summon and pt members are attacked by mobs.

 

I have trying to figure this out for days but still not get it. I tried to use engine.findenemy() but its didnt work with my pet/summon:

 


uses SysUtils;
var npc: TL2Npc;
var pet: TL2Pet;
Begin
	while engine.status = lsOnline do
	begin
			REPEAT
				Engine.UseSkill('Servitor Recharge');
				if engine.findenemy(npc,pet,300) then Break;
			UNTIL User.MP > 95; 
	end;
end.

 

Please help me solve this, and I am looking for a way to make it work with pt members too.

Thank you so much!

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"

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock