Jump to content

Recommended Posts

Posted

 

The easy way without checking for any message from the system, try to join every minute:

while  Engine.Status = lsOnline  then begin
  Engine.EnterText ('.jointvt');
  Delay (60 * 1000);
end;

ty, will try.

  • 2 weeks later...
Posted (edited)

Guys, i do a frankstein script, its not perfect, but "works".

 Works 95%, in the end my script dont repeat both functions, it repeat only "tobuff" or "aceitaress".
If i to delete "tobuff", the summon accept ress but my char dont comeback to village to rebuff.
if i to delete "aceitaress" the summon dont accept resurection when died. (its only way i fond to res and him accept).

Anys sugestions?

obs: sorry about english, i'm working that :<

Ty

uses sysutils,classes;

var Figth_Flag:boolean;
     Item: TL2Item;
     Npc: TL2Npc;
     Obj: TL2Buff;
     IdBuff: integer;
     Buffs:TL2Buff;
var L2Skill: TL2Skill;
var  p1,p2:pointer;
    action:tl2action;

function boolToStr(var b:boolean):string;
    begin
      result:= string(b);
    end;

procedure toVillage;
begin
Print('To Village');
  Delay(100);
    if (User.HP=0) then
      begin
       Delay(2000);
       Engine.GoHome;
       Engine.Facecontrol(0,False);
       Buff;
      end;
end;


procedure buff;
begin
	if User.inrange(80054, 53209, -1552, 250, 150) then begin  //1 res
                Engine.MoveTo(80683, 53879, -1586);
                Engine.MoveTo(81174, 53500, -1586);
                Engine.MoveTo(82419, 53264, -1522);
		Engine.MoveTo(82484, 53280, -1488);
	
    end;

	if User.inrange(80267, 55497, -1552, 250, 150) then begin  //2 res
                Engine.MoveTo(80548, 53988, -1586);
                Engine.MoveTo(81178, 53496, -1586);
		Engine.MoveTo(82484, 53280, -1488);
    end;
	
	
	if User.inrange(82638, 53885, -1488, 250, 150) then begin  //3 res
		Engine.MoveTo(82484, 53280, -1488);
    end;	

	if User.inrange(80334, 5440, -1552, 250, 150) then begin  //4 res
                Engine.MoveTo(81086, 53506, -1586);
                Engine.MoveTo(82210, 53429, -1522);
		Engine.MoveTo(82484, 53280, -1488);
    end;	
	
	
	if User.inrange(79933, 55752, -1552, 250, 150) then begin  //5 res
                Engine.MoveTo(80475, 54936, -1586);
                Engine.MoveTo(80485, 53895, -1586);
                Engine.MoveTo(81174, 53504, -1586);
                Engine.MoveTo(82051, 53442, -1522);
		Engine.MoveTo(82484, 53280, -1488);
    end;
	
	
	if User.inrange(82123, 53535, -1488, 250, 150) then begin  //6 res
		Engine.MoveTo(82484, 53280, -1488);
    end;	

	if User.inrange(80304, 56241, -1552, 250, 150) then begin  //7 res
                Engine.MoveTo(80494, 54146, -1586);
                Engine.MoveTo(81164, 53481, -1586);
                Engine.MoveTo(82071, 53473, -1522);
		Engine.MoveTo(82484, 53280, -1488);
    end;

	if User.inrange(79706, 52986, -1552, 250, 150) then begin  //8 res
                Engine.MoveTo(80650, 53861, -1586);
                Engine.MoveTo(81172, 53468, -1586);
                Engine.MoveTo(81876, 53475, -1522);
		Engine.MoveTo(82484, 53280, -1488);
    end;	

	
	if User.inrange(82880, 55390, -1520, 250, 150) then begin  //9 res
                Engine.MoveTo(82854, 55509, -1551);
                Engine.MoveTo(82304, 55442, -1551);
                Engine.MoveTo(82362, 53964, -1522);
		Engine.MoveTo(82484, 53280, -1488);
    end;

	if User.inrange(82552, 53447, -1488, 250, 150) then begin  //10 res
		Engine.MoveTo(82484, 53280, -1488);
    end;
	
	
 	if User.inrange(80594, 55837, -1552, 250, 150) then begin  //11 res
                Engine.MoveTo(80401, 54735, -1586);
                Engine.MoveTo(80614, 53921, -1586);
                Engine.MoveTo(81151, 53475, -1586);
                Engine.MoveTo(82065, 53454, -1522);
		Engine.MoveTo(82484, 53280, -1488);
    end;

    
if User.inrange(82484, 53280, -1488, 250, 150) then begin

     Print('Go Buffer');
      Delay(2000);
     Engine.Settarget(35716); 
     Delay(2000);
     Engine.Settarget(35716);
     Delay(3000);
     Engine.DlgOpen;
     Delay(2500);
     Engine.DlgSel(2);    //buff list
     Delay(800);
     Engine.DlgSel(10);   //buff summon
     Delay(500);
     Engine.DlgSel(6);   //hp
     Delay(500);
     end;
     RunTo;
end;


procedure RunTo;
begin
     Print('Go Teleporte');
     Engine.SetTarget(30177);  //Target do NCP GK
     Delay(1500);
     Engine.DlgOpen; // abre chat combat npc
     Delay(1500);
     Engine.DlgSel(1);
     Delay(1500);
     Engine.DlgSel(9);
     Delay(1500);
     Fight;
end;


procedure toBuff;
  begin
  IdBuff:=1268 ;  //Check BUFF
   while not User.Buffs.ById(IdBuff,obj) do begin
        Print('Check Buff');
        Engine.UseItem(736);  //Scroll Escape
        Delay(30000);
        buff;
   end;
end;
                                    


procedure Fight;
   begin
   Print('Fight zone');
    Delay(1000);
    Engine.Facecontrol(0,False);
    Engine.MoveTo(85391, 16228, -3672);
    Engine.MoveTo(85357, 17267, -3571);
    Engine.MoveTo(85348, 20027, -3813);
    Engine.MoveTo(85348, 20027, -3813);
    Engine.MoveTo(85348, 20027, -3813);
    Engine.MoveTo(85348, 20027, -3813);
    Delay(500);
    Engine.MoveTo(85340, 21881, -3571);
    Delay(500);
    Engine.MoveTo(85350, 23218, -3544);
    Delay(500);
    Engine.MoveTo(85427, 24058, -3662);
    Delay(500);
    Engine.MoveTo(86253, 24565, -3621);
    Delay(500);
    Engine.MoveTo(87632, 24033, -3530);
    Delay(500);
    Engine.MoveTo(90071, 23495, -3629);
    Delay(500);
    Engine.MoveTo(92184, 21149, -3645);
    Delay(500);
    Engine.MoveTo(93909, 18609, -3654);
    Delay(500);
    Engine.MoveTo(94998, 16834, -3654);
    Delay(500);
    Engine.MoveTo(94716, 15174, -3616);
    Delay(500);
    Engine.LoadConfig('1');    //
    Engine.LoadZone('Farm ewc2.zmap');   //zona de combat
    Print('funfou');
    Engine.Facecontrol(0,True);
end;


procedure aceitaRess;
    begin
        action := engine.waitaction([laConfirmDlg], p1,p2);
        if action = laConfirmDlg then begin
            print(engine.confirmdlg.msgid);
            if (engine.confirmdlg.msgid = 1510) and (engine.confirmdlg.valid) then begin
                engine.confirmdialog(true);
            end;
        end; 
    end;

   
begin    //repete novamente o script
Print('repete novamente');
    repeat
        toBuff;
        AceitaRess;
               
        until Engine.Status = lsOffline;
    Delay(5000);
    
end.
Edited by ndxxx666
Posted (edited)

You have to create two threads

Script.NewThread (@toBuff);
Script.NewThread (@AceitaRess);

Just out of curiosity which room is the 'ews2.zmap'? I guess you have to be noble to use this script?

Edited by darknesscrysis
Posted

You have to create two threads

Script.NewThread (@toBuff);
Script.NewThread (@AceitaRess);

Just out of curiosity which room is the 'ews2.zmap'? I guess you have to be noble to use this script?

 

 

i do this and apparently it's working.

but the procedure "aceitaress" repeat every 14 seconds and procedure "tobuff" repeat only buffs desapear. Well, its working, more important. xD

 

And ewC2.zmap, outlands of ivory, dont need noobles teleport.

Thank you ^^

 
   
begin    //repete novamente o script
Print('repete novamente');
    repeat
        toBuff;
        Delay(14000);
        Script.NewThread (@AceitaRess);
               
        until Engine.Status = lsOffline;
    Delay(5000);
    
end.
Posted

 

i do this and apparently it's working.

but the procedure "aceitaress" repeat every 14 seconds and procedure "tobuff" repeat only buffs desapear. Well, its working, more important. xD

 

And ewC2.zmap, outlands of ivory, dont need noobles teleport.

Thank you ^^

 
   
begin    //repete novamente o script
Print('repete novamente');
    repeat
        toBuff;
        Delay(14000);
        Script.NewThread (@AceitaRess);
               
        until Engine.Status = lsOffline;
    Delay(5000);
    
end.

bad idea to loop script.newthread, this should be correct 

begin    //repete novamente o script
Script.NewThread (@AceitaRess);
Print('repete novamente');
    repeat
        toBuff;
        Delay(14000);   
        until Engine.Status = lsOffline;
    Delay(5000);
    
end. 
Posted

 

bad idea to loop script.newthread, this should be correct 

begin    //repete novamente o script
Script.NewThread (@AceitaRess);
Print('repete novamente');
    repeat
        toBuff;
        Delay(14000);   
        until Engine.Status = lsOffline;
    Delay(5000);
    
end. 

Perfect!!

 

Thank you guys

  • 2 weeks later...
Posted

 

what i do in the "OK" delay teleport? i config the script for teleport, but when the boss press teleport appear a custom delay teleport bar, and press OK, teleport do'nt work.

12.jpg

 

if im not wrong

engine.confirmdialog(true);
Posted

Hello Guys!

I need a simple script, just for the auto-accept party and make buffs. Any help me?

Hey, thanks man.

I tried this, but he only accepts a party the first time, when I invite him back, he does not accept, I have to restart.

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

    • Inventory restock: Premium business accounts are now available.   ✔ Wallester Business EU 🇪🇺|💳 Unlimited virtual cards, physical cards, 🏦 multi-currency IBAN, ₿ crypto & stablecoin deposits. ✔ Stripe Business UK 🇬🇧|💳 Instant virtual cards (Visa/Mastercard), high-conversion checkout, multi-currency payouts, ₿ crypto payments, no-code payment links. ✔ Mercury Business US 🇺🇸|🏦 US checking & savings, 💳 unlimited virtual cards, domestic & International wires, native stablecoin settlement. ✔ Payset Business EU 🇪🇺|🏦 Multiple IBANs, UK sort code, SEPA Instant, 💳 unlimited virtual cards, multi-currency accounts. ✔ Novo Business US 🇺🇸|🏦 Business checking account, ACH payments & invoicing, 💳 virtual & physical cards, novo boost.
    • Let me see if I understand correctly, older gentlemen, when a newcomer shows up to create modern things with the help of AI, doing what you charge them to do, you point the finger and laugh. I believe that's why everything is stagnant. The product isn't for programming experts, it's for newcomers. Don't buy from you if they can do it themselves using this base. You're going to deliver a similar product, maybe even worse than this one, so why are you complaining? PowerShell, as you well know, started with it, then came new platforms and new apps, new creation models, all with different languages; I chose the simplest one for my taste. This is about being organized and knowing how to choose the right words for each situation. It's not 100%, but it already gives a good impression. Nothing is 100%, so a topic written by AI, and all the code that you charge an absurd amount for to prohibit and sell hacks, could be open source so that everyone can create new practices, new models, new information for passing packets, prohibiting the use of cheats that cause server owners to break so much. Let's remember that the Admin doesn't always shut down the server; it's the players who find problems and take advantage by buying and reselling items, and they say that the GM shuts down the server every week, but that's a lie. What they do is duplicate items with packages and sell them, but perhaps this could give some future developers a starting point to create their own protection following the model in the initial documentation. Because none of you answer a question from a newbie, you think you're superior because you have knowledge, but with AI, people like that can have the same knowledge as you, but with less practice. And if they practice a lot, 10,000 hours, they can be as good as all of you older developers in the L2J field.
    • ✨ Exclusive Offer for Marketplace Growth 🔥 Elevate your performance with a premium bonus. 💲 Top up your balance with $100 or more and receive an additional $5 credit — seamlessly added to your account. ⭐️ Designed for those who value efficiency, scale, and results. ⚡️ Effortless. Refined. Effective. 💥 Enhance your strategy today 💥
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..