Hello, how are you? I need help editing this script for the char to get close to gk, but starting with all goddard respawns, can anyone help me? Just to go next to the GK, which is where the npc buffer is, the rest I've done.
The script is pretty basic, but all the "if" commands I tried to add made me have a runtime error! Thanks in advance!
__________________________________________________________________________________________
var Figth_Flag:boolean;
Item: TL2Item;
Npc: TL2Npc;
Obj: TL2Buff;
IdBuff: integer;
Buffs:TL2Buff;
var L2Skill: TL2Skill;
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
Print('Go Buffer');
Engine.Settarget(30361);
Delay(1500);
Engine.Settarget(30361);
Delay(1500);
Engine.DlgOpen;
Delay(1500);
Engine.DlgSel(1); // BUFFS
Delay(800);
Engine.DlgSel(1); //Wind Walk
Delay(400);
Engine.DlgSel(3); //Shield
Delay(400);
Engine.DlgSel(5); //Bless Body
Delay(400);
Engine.DlgSel(7); //Mag Barrier
Delay(400);
Engine.DlgSel(8); //Concentration
Delay(400);
Engine.DlgSel(9); //zerk
Delay(400);
Engine.DlgSel(11); //Acumen
Delay(400);
Engine.DlgSel(12); //Empower
Delay(400);
Engine.DlgSel(18); //G. Shield
Delay(400);
Engine.DlgSel(20); //W magic
Delay(400);
Engine.DlgOpen;
Delay(1500);
Engine.DlgSel(2); //SONGS
Delay(400);
Engine.DlgSel(1); //Song Earth
Delay(400);
Engine.DlgSel(4); //Song Warding
Delay(400);
Engine.DlgSel(5); //Song wind
Delay(400);
Engine.DlgSel(7); //Song Vitality
Delay(400);
Engine.DlgSel(9); //Song renewal
Delay(400);
Engine.DlgOpen;
Delay(1500);
Engine.DlgSel(3); //DANCES
Delay(400);
Engine.DlgSel(3); //Dance Mystic
Delay(400);
Engine.DlgSel(6); //Dance Concetration
Delay(400);
Engine.DlgSel(8); //Dance Siren
Delay(400);
Engine.DlgSel(16); //Malaria
Delay(400);
Engine.DlgOpen;
Delay(1500);
Engine.DlgSel(4); //PROFECY
Delay(400);
Engine.DlgSel(4); //Magnus
Delay(400);
Engine.DlgSel(19); //Seraphim
Delay(400);
RunTo;
end;
procedure RunTo;
begin
Print('Go Teleporte');
Engine.MoveTo(146952, -70120, -3664);
Delay(500);
Engine.SetTarget(31031); //Target do NCP GK
Delay(1500);
Engine.DlgOpen; // abre chat combat npc
Delay(1500);
Engine.DlgSel(4);
Delay(1500);
Engine.DlgSel(3);
Delay(1500);
Fight;
end;
procedure toBuff;
begin
IdBuff:=1204 ; //Check BUFF
while not User.Buffs.ById(IdBuff,obj) do begin
Print('Check Buff');
Engine.UseItem(736); //Scroll Escape
Delay(7000);
buff;
end;
end;
procedure Fight;
begin
Print('Fight zone');
Engine.MoveTo(146952, -70120, -3664);
Delay(500);
Engine.MoveTo(146872, -70424, -3560);
Delay(500);
Engine.MoveTo(145624, -73352, -4336);
Delay(500);
Engine.LoadConfig('1'); //Íàçâàíèå Âàøåãî êîíôèãà
Engine.LoadZone('zona2.zmap'); //zona de combat
Print('Ôàðì');
toVillage;
Engine.Facecontrol(0,True);
end;
//-----------------------------------------------------------------------------
begin //repete novamente o script
Print('repete novamente');
repeat
toBuff;
toVillage;
until Engine.Status = lsOffline;
Delay(5000);
end.