Jump to content

Recommended Posts

Posted
var
 Buff:Tl2Buff;
 item:TL2Item;
 member:TL2Live;
 const
 //TEXT for invite
    inviteText = 'beniz45cm';
 
  function SetForegroundWindow(hwnd: integer) : Boolean; stdcall;
    external 'user32.dll';
   function captcha:boolean; begin
             if engine.dlgtext.contains('Refresh') or
             engine.dlgtext.contains('Captcha') or
             engine.dlgtext.contains('60 seconds') or
             engine.dlgtext.contains('Bot')   then begin
       SetForegroundWindow(Engine.GameWindow);             
      PlaySound(exepath+'\sounds\'+'PlayerAlarm'+'.wav');
      delay(2500);  
      StopSound;
          end;   
  end;
function CheckDeath(Obj: TL2Live = nil): boolean;       
begin                                                        
  if (Obj = nil) then Obj:= User;                        
  result:= false;                                         
  if (Obj.Dead) then begin                               
    result:= true;                                                 
    Engine.FaceControl(0, false);                         
    while (User.Dead) and delay(999) do  Engine.GoHome;    
    delay(5555);                                          
  end;
  end;
function HaveAgroMobs(): boolean;
var i: integer;
begin
  result:= false;
  for i:= 0 to NpcList.Count-1 do begin
    if (IsAgr(NpcList(i))) then begin
      result:= true;
      exit;
    end;
  end;
end;

function IsAgr(Mob: TL2Npc): boolean;
begin
  result:= (Mob.AtkOID = User.OID) and (not Mob.Dead);
end;

procedure checkbuff;
  begin

   CheckDeath();
   if not (User.Buffs.ByID(1323, buff)) or (buff.EndTime < 300000) then begin
    print('NEED REBUFF ');
  delay(10000);

   Engine.BypassToServer('_bbshome', True);
delay(500);
Engine.BypassToServer('_bbsgetfav', True);
delay(500);
Engine.BypassToServer('_bbsbuffer', True);
delay(500);
Engine.BypassToServer('_bbsbufferbypass_cast 187 x x', True);
   if  (User.Buffs.ByID(1323, buff)) and (buff.EndTime < 300000) then
   print('REBUFF DONE');
delay(1500);



end;
end;
procedure restock;
begin
CheckDeath();
// IF SS less then 1000
if (inventory.user.byid(3951, item) and (item.count<1000)) then begin   //3951 id of BSSA
   print('RESTOCK SS');
   Engine.FaceControl(0, false);
   delay(1000);
    if (HaveAgroMobs) then begin                                                     
        print('Killing aggro mobs');
        Engine.FaceControl(0, true);                                                   
        while (HaveAgroMobs) do delay(10);                                           
        Engine.FaceControl(0, false);                                                  
        while (User.InCombat) do delay(555);                                           
      end;
 
 
 // PORT to town
    Engine.bypasstoserver('_bbshome', true);
    delay(500);
    Engine.BypassToServer('_bbsgetfav', True);
    delay(500);
     Engine.BypassToServer('_bbsgatekeeper', True);
        delay(500);
     Engine.BypassToServer('13', True);
     delay(3500);
 // OPEN GM SHOP
 if user.InRange(-44683, -113079, -224,10000) then begin // XYZ of ORC Village
         engine.bypasstoserver('_bbshome', true);
 delay(500);
         engine.bypasstoserver('_bbsgetfav', true);
 delay(500);

  engine.bypasstoserver('_bbsfile:smallNpcs/gmshop', true);
 delay(500);

  engine.bypasstoserver('110', true);
 delay(500);
  Engine.NPCExchange (3951, 25000); // Buy BSSA
  print('RESTOCK BSSS DONE');
  end;
  end;
// IF MP pots less then 50
   if (inventory.user.byid(728, item) and (item.count<50)) then begin // 728 id of mp pot
     // while user.incombat do delay(1000);
                  
   print('RESTOCK MP');
   Engine.FaceControl(0, false);
   delay(1000);
    if (HaveAgroMobs) then begin                                                     
        print('Killing aggro mobs');
        Engine.FaceControl(0, true);                                                   
        while (HaveAgroMobs) do delay(10);                                           
        Engine.FaceControl(0, false);                                                  
        while (User.InCombat) do delay(555);                                           
      end;
// PORT to town                
      Engine.BypassToServer('_bbshome', True);
      delay(500);
    Engine.BypassToServer('_bbsgetfav', True);
    delay(500);
     Engine.BypassToServer('_bbsgatekeeper', True);
        delay(500);
     Engine.BypassToServer('13', True);
     delay(3500);
 // OPEN GM SHOP
   if user.InRange(-44683, -113079, -224,10000) then begin   // XYZ of ORC Village
         engine.bypasstoserver('_bbshome', true);
 delay(500);
         engine.bypasstoserver('_bbsgetfav', true);
 delay(500);

  engine.bypasstoserver('_bbsfile:smallNpcs/gmshop', true);
 delay(500);

  engine.bypasstoserver('1c', true);
 delay(500);
  Engine.NPCExchange (728, 500);                 //buy mp pot
    print('RESTOCK MP POTS DONE');
  end;
  end;
  end;
procedure tospot;
begin
CheckDeath();
if not user.InRange(92504, 109576, -3744,20000) then begin //XYZ of SPOT
// IF NOT on spot move to spot
    print('Moving To Spot');
    engine.facecontrol(0,false);
    delay(1000);
      checkbuff;
      //PORT to Hunters
  Engine.BypassToServer('_bbshome', True);
  delay(500);
  Engine.BypassToServer('_bbsgetfav', True);
  delay(500);
  Engine.BypassToServer('_bbsgatekeeper', True);
  delay(500);
  Engine.BypassToServer('1e', True);
  delay(500);
    Engine.MoveTo(117160, 76808, -2672);
    engine.settarget(32864);   // Target NPC
    delay(100);
    engine.dlgopen;      // TALK with NPC
    delay(100);
    engine.dlgsel(2);    // Choose option 2
    delay(1500);
                                                             
    Engine.MoveTo(98488, 109720, -3696);
    Engine.MoveTo(97304, 109608, -3680);
    Engine.MoveTo(96552, 110216, -3712);
    Engine.MoveTo(95656, 110040, -3632);
    Engine.MoveTo(94536, 109816, -3680);
    Engine.MoveTo(93736, 109704, -3664);
    Engine.MoveTo(92504, 109576, -3744);
      
      delay(500);
      Engine.facecontrol(0,true);
      delay(5000);
      //Engine.dispel('dance of shadows');
    print('ON SPOT');
    print('Start FARM');
end;
end;
procedure onspot;
begin
CheckDeath();
// IF ON spot and buffs time less then 5min REBUFF
 while user.InRange(92504, 109576, -3744,20000) do begin // XYZ of SPOT
    
   if  ((User.Buffs.ByID(1323, buff)) and (buff.EndTime < 300000)) then begin
   print('REBUFF');
   Engine.FaceControl(0, false);
     Delay(1000);
    if (HaveAgroMobs) then begin                                                     
        print('Killing aggro mobs');
        Engine.FaceControl(0, true);                                                   
        while (HaveAgroMobs) do delay(10);                                           
        Engine.FaceControl(0, false);                                                  
        while (User.InCombat) do delay(555);                                           
      end;

      repeat checkbuff();                                          
      until ((User.Buffs.ByID(1323, buff)) and (buff.EndTime > 300000));                                                       
      Engine.FaceControl(0, true);                              

    end;
    restock();
    invitePT();
  end;
end;

procedure invitePT;
begin
//IF someone pm with inviteText inv him to PT
if (ChatMessage.Text = inviteText) and (ChatMessage.ChatType = mtPrivate) and ChatMessage.Unread and (ChatMessage.Time < 3000) then
begin
 if Party.Chars.Count < 8 then Engine.InviteParty(ChatMessage.Sender) else Engine.Say('party is full', 2, ChatMessage.Sender);
                end;

            
end;


begin
        delay(500);
        //load settings | Change name or comment
 Engine.LoadConfig(exepath+'\Settings\'+'LokrenUP3'+'.xml');
        //load map | Change name or comment
 Engine.loadzone(exepath+'\Settings\'+'GEM_L_3'+'.zmap');
 delay(500);
       
 
while true do begin

CheckDeath();
    

restock();
checkbuff();
onspot();
invitePT();
tospot();
    delay(1000);
  end;      
    delay(1500);
end.

Simple farm script (gem dragons as example)  with rebuff, go back to spot, restock. You'll need to change bypasses for ur server to make it work.

Tested on http://l2mercury.com/

 

 

How to check bypasses for my server? - https://www.youtube.com/watch?v=ZQHZm4p_LO8&amp;feature=youtu.be

 

 

  • Upvote 2
  • 4 weeks later...
Posted
On 11/19/2018 at 10:49 AM, Lokren said:

var
 Buff:Tl2Buff;
 item:TL2Item;
 member:TL2Live;
 const
 //TEXT for invite
    inviteText = 'beniz45cm';
 
  function SetForegroundWindow(hwnd: integer) : Boolean; stdcall;
    external 'user32.dll';
   function captcha:boolean; begin
             if engine.dlgtext.contains('Refresh') or
             engine.dlgtext.contains('Captcha') or
             engine.dlgtext.contains('60 seconds') or
             engine.dlgtext.contains('Bot')   then begin
       SetForegroundWindow(Engine.GameWindow);             
      PlaySound(exepath+'\sounds\'+'PlayerAlarm'+'.wav');
      delay(2500);  
      StopSound;
          end;   
  end;
function CheckDeath(Obj: TL2Live = nil): boolean;       
begin                                                        
  if (Obj = nil) then Obj:= User;                        
  result:= false;                                         
  if (Obj.Dead) then begin                               
    result:= true;                                                 
    Engine.FaceControl(0, false);                         
    while (User.Dead) and delay(999) do  Engine.GoHome;    
    delay(5555);                                          
  end;
  end;
function HaveAgroMobs(): boolean;
var i: integer;
begin
  result:= false;
  for i:= 0 to NpcList.Count-1 do begin
    if (IsAgr(NpcList(i))) then begin
      result:= true;
      exit;
    end;
  end;
end;

function IsAgr(Mob: TL2Npc): boolean;
begin
  result:= (Mob.AtkOID = User.OID) and (not Mob.Dead);
end;

procedure checkbuff;
  begin

   CheckDeath();
   if not (User.Buffs.ByID(1323, buff)) or (buff.EndTime < 300000) then begin
    print('NEED REBUFF ');
  delay(10000);

   Engine.BypassToServer('_bbshome', True);
delay(500);
Engine.BypassToServer('_bbsgetfav', True);
delay(500);
Engine.BypassToServer('_bbsbuffer', True);
delay(500);
Engine.BypassToServer('_bbsbufferbypass_cast 187 x x', True);
   if  (User.Buffs.ByID(1323, buff)) and (buff.EndTime < 300000) then
   print('REBUFF DONE');
delay(1500);



end;
end;
procedure restock;
begin
CheckDeath();
// IF SS less then 1000
if (inventory.user.byid(3951, item) and (item.count<1000)) then begin   //3951 id of BSSA
   print('RESTOCK SS');
   Engine.FaceControl(0, false);
   delay(1000);
    if (HaveAgroMobs) then begin                                                     
        print('Killing aggro mobs');
        Engine.FaceControl(0, true);                                                   
        while (HaveAgroMobs) do delay(10);                                           
        Engine.FaceControl(0, false);                                                  
        while (User.InCombat) do delay(555);                                           
      end;
 
 
 // PORT to town
    Engine.bypasstoserver('_bbshome', true);
    delay(500);
    Engine.BypassToServer('_bbsgetfav', True);
    delay(500);
     Engine.BypassToServer('_bbsgatekeeper', True);
        delay(500);
     Engine.BypassToServer('13', True);
     delay(3500);
 // OPEN GM SHOP
 if user.InRange(-44683, -113079, -224,10000) then begin // XYZ of ORC Village
         engine.bypasstoserver('_bbshome', true);
 delay(500);
         engine.bypasstoserver('_bbsgetfav', true);
 delay(500);

  engine.bypasstoserver('_bbsfile:smallNpcs/gmshop', true);
 delay(500);

  engine.bypasstoserver('110', true);
 delay(500);
  Engine.NPCExchange (3951, 25000); // Buy BSSA
  print('RESTOCK BSSS DONE');
  end;
  end;
// IF MP pots less then 50
   if (inventory.user.byid(728, item) and (item.count<50)) then begin // 728 id of mp pot
     // while user.incombat do delay(1000);
                  
   print('RESTOCK MP');
   Engine.FaceControl(0, false);
   delay(1000);
    if (HaveAgroMobs) then begin                                                     
        print('Killing aggro mobs');
        Engine.FaceControl(0, true);                                                   
        while (HaveAgroMobs) do delay(10);                                           
        Engine.FaceControl(0, false);                                                  
        while (User.InCombat) do delay(555);                                           
      end;
// PORT to town                
      Engine.BypassToServer('_bbshome', True);
      delay(500);
    Engine.BypassToServer('_bbsgetfav', True);
    delay(500);
     Engine.BypassToServer('_bbsgatekeeper', True);
        delay(500);
     Engine.BypassToServer('13', True);
     delay(3500);
 // OPEN GM SHOP
   if user.InRange(-44683, -113079, -224,10000) then begin   // XYZ of ORC Village
         engine.bypasstoserver('_bbshome', true);
 delay(500);
         engine.bypasstoserver('_bbsgetfav', true);
 delay(500);

  engine.bypasstoserver('_bbsfile:smallNpcs/gmshop', true);
 delay(500);

  engine.bypasstoserver('1c', true);
 delay(500);
  Engine.NPCExchange (728, 500);                 //buy mp pot
    print('RESTOCK MP POTS DONE');
  end;
  end;
  end;
procedure tospot;
begin
CheckDeath();
if not user.InRange(92504, 109576, -3744,20000) then begin //XYZ of SPOT
// IF NOT on spot move to spot
    print('Moving To Spot');
    engine.facecontrol(0,false);
    delay(1000);
      checkbuff;
      //PORT to Hunters
  Engine.BypassToServer('_bbshome', True);
  delay(500);
  Engine.BypassToServer('_bbsgetfav', True);
  delay(500);
  Engine.BypassToServer('_bbsgatekeeper', True);
  delay(500);
  Engine.BypassToServer('1e', True);
  delay(500);
    Engine.MoveTo(117160, 76808, -2672);
    engine.settarget(32864);   // Target NPC
    delay(100);
    engine.dlgopen;      // TALK with NPC
    delay(100);
    engine.dlgsel(2);    // Choose option 2
    delay(1500);
                                                             
    Engine.MoveTo(98488, 109720, -3696);
    Engine.MoveTo(97304, 109608, -3680);
    Engine.MoveTo(96552, 110216, -3712);
    Engine.MoveTo(95656, 110040, -3632);
    Engine.MoveTo(94536, 109816, -3680);
    Engine.MoveTo(93736, 109704, -3664);
    Engine.MoveTo(92504, 109576, -3744);
      
      delay(500);
      Engine.facecontrol(0,true);
      delay(5000);
      //Engine.dispel('dance of shadows');
    print('ON SPOT');
    print('Start FARM');
end;
end;
procedure onspot;
begin
CheckDeath();
// IF ON spot and buffs time less then 5min REBUFF
 while user.InRange(92504, 109576, -3744,20000) do begin // XYZ of SPOT
    
   if  ((User.Buffs.ByID(1323, buff)) and (buff.EndTime < 300000)) then begin
   print('REBUFF');
   Engine.FaceControl(0, false);
     Delay(1000);
    if (HaveAgroMobs) then begin                                                     
        print('Killing aggro mobs');
        Engine.FaceControl(0, true);                                                   
        while (HaveAgroMobs) do delay(10);                                           
        Engine.FaceControl(0, false);                                                  
        while (User.InCombat) do delay(555);                                           
      end;

      repeat checkbuff();                                          
      until ((User.Buffs.ByID(1323, buff)) and (buff.EndTime > 300000));                                                       
      Engine.FaceControl(0, true);                              

    end;
    restock();
    invitePT();
  end;
end;

procedure invitePT;
begin
//IF someone pm with inviteText inv him to PT
if (ChatMessage.Text = inviteText) and (ChatMessage.ChatType = mtPrivate) and ChatMessage.Unread and (ChatMessage.Time < 3000) then
begin
 if Party.Chars.Count < 8 then Engine.InviteParty(ChatMessage.Sender) else Engine.Say('party is full', 2, ChatMessage.Sender);
                end;

            
end;


begin
        delay(500);
        //load settings | Change name or comment
 Engine.LoadConfig(exepath+'\Settings\'+'LokrenUP3'+'.xml');
        //load map | Change name or comment
 Engine.loadzone(exepath+'\Settings\'+'GEM_L_3'+'.zmap');
 delay(500);
       
 
while true do begin

CheckDeath();
    

restock();
checkbuff();
onspot();
invitePT();
tospot();
    delay(1000);
  end;      
    delay(1500);
end.

Simple farm script (gem dragons as example)  with rebuff, go back to spot, restock. You'll need to change bypasses for ur server to make it work.

Tested on http://l2mercury.com/

 

 

How to check bypasses for my server? - https://www.youtube.com/watch?v=ZQHZm4p_LO8&amp;feature=youtu.be

 

 

As in your description of yt video about bypasses, it doesn't work on my windows 10, any ideas how to make it work there? 

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • 10-17-2025 - OUR TOPIC IS RELEVANT! CONTACT US BY THE CONTACTS BELOW
    • Tell a Škoda 1.4 driver that a Škoda 1.8 is faster — and suddenly, you’re riding a mini race car. On the way, they might share random stories — gas prices, the perfect BBQ recipe, or how passengers once called them “just for a minute.” Maybe even how someone left a suitcase full of money in their car once.     The important part? You’ll get there on time, no delays.     Vibe SMS works just as fast — messages fly like that driver who just heard their 1.8 isn’t the fastest.     🌐 https://vibe-sms.net/ 📲 https://t.me/vibe_sms  
    • ⚔️ The Grand Opening Has Arrived! ⚔️ In just a few hours the gate to the eternal battlefield will be open and the war between Order and Chaos will be set once again ! Its time to claim your destiny 🔥 👉 Register now and join the fight today! 🌐 https://l2ovc.com register now : https://l2ovc.com The gates are open the war between Order and Chaos has officially started! 🔥 Join the battlefield NOW and claim your destiny in Order vs Chaos! 💥 Don’t fall behind your faction needs you. ➡️ https://l2ovc.com  
    • Don’t miss the new Telegram gifts with our Telegram Stars purchasing bot! A great opportunity to invest in a stable digital asset at an early stage while the market is still forming. Buy other existing gifts in the official store using Telegram Stars, pay for subscriptions, donate to games and projects, pay for Premium subscriptions, and react to messages in channels! Low prices, multiple payment options, and other cool unique features! ⚡ Try it today — SOCNET STARS BOT ⚡ Active links to SOCNET stores: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. ⭐ Telegram Stars Purchase Bot: Go – fast and profitable way to buy stars in Telegram. SMM Panel: Go – promote your social media accounts. We present to you the current list of promotions and special offers for purchasing our products and services: 1️⃣ Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, bot) in October! You can also use the promo code SOCNET (15% discount) for your first purchase. 2️⃣ Get $1 on your store balance or a 10–20% discount — just write your username after registration on our website using the template: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3️⃣ Get $1 for your first SMM Panel trial — simply open a ticket titled “Get Trial Bonus” on our website (Support). 4️⃣ Weekly ⭐ Telegram Stars giveaways in our Telegram channel and in our Telegram Stars bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
  • Topics

×
×
  • 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