pablicic Posted August 14, 2017 Share Posted August 14, 2017 I'm doing my script to get npc buffs and teleport with the gk. Everything goes perfectly less when you open the buffs dialog and do not catch the buffs, however if you do teleport. Can any tell me what I'm doing wrong? look image. uses sysutils; procedure buff; var Figth_Flag:boolean; Item: TL2Item; Npc: TL2Npc; Obj: TL2Buff; IdBuff: integer; Buffs:TL2Buff; var L2Skill: TL2Skill; function deadCheck: Boolean; begin Result := false; if User.Dead then begin Result := true; Print('Dead. Pressing to village.'); Delay(1000); Engine.GoHome; Delay(1000); end else begin Delay(1000); end; end; /////////////////////////////////////////////////////////// begin while true do begin deadcheck; if user.inrange(83919, 145686, -3431, 250, 150) then begin Engine.MoveTo(83900, 147584, -3431); Engine.MoveTo(83428, 147832, -3454); end; /////////////////////////////////////////////////////////// if user.inrange(83483, 147918, -3431, 700) then begin Engine.FaceControl(0,false); Print('Go Buffer'); Engine.Settarget('Albatross'); Engine.DlgOpen; delay(500); engine.dlgsel(6); delay(200); engine.dlgsel(2); Engine.CancelTarget; delay(500); Engine.SetTarget('Galaxy Express'); Engine.DlgOpen; delay(500); engine.dlgsel(6); delay(500); engine.dlgsel(5); Engine.CancelTarget; delay(500); if user.inrange(174232, -89196, -5122, 1000) then begin print('Moveing to spawn'); Engine.MoveTo(174249, -88028, -5140); if user.inrange(174249, -88028, -5140, 3000) then begin Delay(500); Engine.FaceControl(0, true); print('Arrived'); end; end; end; end; end; begin Script.NewThread(@buff); end. Link to comment Share on other sites More sharing options...
fAkeN Posted August 15, 2017 Share Posted August 15, 2017 (edited) Engine.Settarget('Albatross'); Engine.DlgOpen; delay(1000); engine.dlgsel(6); delay(1000); Engine.BypassToServer('paste bypass here'); to check bypass begin print(Engine.DlgText); end. If bypass is stable, it will work. If bypass changeable, you will need a bit difficult way (regular expression for example) Edited August 15, 2017 by fAkeN Link to comment Share on other sites More sharing options...
pablicic Posted August 15, 2017 Author Share Posted August 15, 2017 I dont know if I put fine the code, but dont work. :-[ uses sysutils; procedure buff; var buff1: TL2Effect; item: TL2Item; function deadCheck: Boolean; begin Result := false; if User.Dead then begin Result := true; Print('Dead. Pressing to village.'); Delay(1000); Engine.GoHome; Delay(1000); end else begin Delay(1000); end; end; /////////////////////////////////////////////////////////// begin while true do begin deadcheck; if user.inrange(83919, 145686, -3431, 250, 150) then begin Engine.MoveTo(83900, 147584, -3431); Engine.MoveTo(83428, 147832, -3454); end; ////////////////////////////// if user.inrange(81800, 149262, -3490, 250, 150) then begin Engine.MoveTo(83400, 147951, -3431); end; if user.inrange(85534, 147315, -3426, 250, 150) then begin Engine.MoveTo(83997, 147729, -3408); Engine.MoveTo(83465, 147935, -3431); end; if user.inrange(81237, 148658, -3464, 250, 150) then begin Engine.MoveTo(82026, 148139, -3493); Engine.MoveTo(83312, 148193, -3431); Engine.MoveTo(83450, 147939, -3431); end; if user.inrange(85613, 149637, -3413, 250, 150) then begin Engine.MoveTo(85611, 149584, -3418); Engine.MoveTo(83677, 149412, -3431); Engine.MoveTo(83455, 147979, -3431); end; if user.inrange(78688, 148638, -3618, 250, 150) then begin Engine.MoveTo(80517, 148614, -3508); Engine.MoveTo(81450, 148419, -3493); Engine.MoveTo(83018, 148038, -3495); Engine.MoveTo(83431, 148020, -3431); Engine.MoveTo(83450, 147929, -3431); end; if user.inrange(81509, 151069, -3533, 250, 150) then begin Engine.MoveTo(81428, 151050, -3533); Engine.MoveTo(81587, 149337, -3495); Engine.MoveTo(83423, 147922, -3406); end; if user.inrange(78688, 148638, -3618, 250, 150) then begin Engine.MoveTo(81514, 151060, -3554); Engine.MoveTo(81467, 151092, -3559); Engine.MoveTo(81554, 149572, -3495); Engine.MoveTo(83184, 148254, -3448); Engine.MoveTo(83425, 147959, -3431); end; /////////////////////////////////////////////////////////// if user.inrange(83483, 147918, -3431, 700) then begin Engine.FaceControl(0,false); Print('Go Buffer'); Engine.Settarget('Albatross'); Engine.DlgOpen; delay(1000); engine.dlgsel(6); delay(1000); Engine.BypassToServer('bypass'); Engine.SetTarget('Galaxy Express'); Engine.DlgOpen; delay(500); engine.dlgsel(6); delay(500); engine.dlgsel(5); Engine.CancelTarget; delay(500); if user.inrange(174232, -89196, -5122, 1000) then begin print('Moveing to spawn'); Engine.MoveTo(174249, -88028, -5140); if user.inrange(174249, -88028, -5140, 3000) then begin Delay(500); Engine.FaceControl(0, true); print('Arrived'); end; end; end; end; end; begin Script.NewThread(@buff); end. Link to comment Share on other sites More sharing options...
fAkeN Posted August 15, 2017 Share Posted August 15, 2017 (edited) firstly, you should find bypass and then insert him to 'bypass' place to check bypass begin print(Engine.DlgText); end. or in such way, open npc dialog and run the scriptin the Adrenalin folder, will be created file with name "DlgText" (you can upload it here, so we can help you faster) uses SysUtils, Classes; var A:TStringList; begin A:= TStringList.create; A.Text:= Engine.DlgText; A.SaveToFile(Script.Path + 'DlgText.txt'); A.Free; end. Edited August 15, 2017 by fAkeN Link to comment Share on other sites More sharing options...
pablicic Posted August 15, 2017 Author Share Posted August 15, 2017 Changing the code gives me error, I'm a little noob with script and I do not understand everything. You could put me as would be the complete script with the changes to get the "DlgText"Thank you very much for the help! Link to comment Share on other sites More sharing options...
pablicic Posted August 16, 2017 Author Share Posted August 16, 2017 faKeN can you say me bro? ty Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now