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.

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...