Mescaline Ff Posted January 16 Share Posted January 16 Можно использовать не на своего окно а на не активное Ставьте реакции буду еще выкладывать скрипты бессплатно !!! uses SysUtils, Classes; function GetForegroundWindow: cardinal; stdcall; external 'User32.dll' name 'GetForegroundWindow'; const CharName = 'ваш ник'; HOLD_DELAY = 150; // ms между проверками var C: TL2Control; HoldOID: Cardinal; // Активируем окно игры procedure SetWinA; begin if Assigned(C) and (C.GameWindow <> 0) and (GetForegroundWindow() <> C.GameWindow) then begin C.SetGameWindow(True); Delay(100); end; end; // Проверяем существует ли цель по OID function FindTargetByOID(OID: Cardinal): TL2Char; var i: Integer; L: TCharList; begin Result := nil; if OID = 0 then Exit; L := C.GetCharList; for i := 0 to L.Count - 1 do if (L.Items(i) <> nil) and (L.Items(i).OID = OID) and (not L.Items(i).Dead) then begin Result := L.Items(i); Exit; end; end; // Форсируем взятие таргета procedure ForceHoldTarget; var Target: TL2Char; i: Integer; begin Target := FindTargetByOID(HoldOID); if Target = nil then Exit; SetWinA; // Делаем 2–3 попытки взять в таргет for i := 1 to 3 do begin C.Action(HoldOID, True); // Берём в таргет Delay(100); end; end; // ---------------- MAIN ---------------- procedure Main; begin C := GetControl(CharName); if not Assigned(C) then begin Print(CharName + ' not loaded'); Exit; end; Print('PVP HoldTarget started'); HoldOID := 0; while Delay(HOLD_DELAY) do begin if C.GetUser.Dead then begin HoldOID := 0; Continue; end; // Если есть текущий таргет — сохраняем его if (C.GetUser.Target <> nil) and (not C.GetUser.Target.Dead) then begin HoldOID := C.GetUser.Target.OID; Continue; end; // Если таргет сброшен — форсим его обратно if (C.GetUser.Target = nil) and (HoldOID <> 0) then begin Print('HoldTarget -> Retarget OID: ' + IntToStr(HoldOID)); ForceHoldTarget; end; end; end; begin Main; end. 1 1 Quote Link to comment Share on other sites More sharing options...
Cazruxh Posted January 17 Share Posted January 17 Quote Link to comment Share on other sites More sharing options...
JeffreyPek Posted January 17 Share Posted January 17 Спасибо,пригодиться Quote Link to comment Share on other sites More sharing options...
Mescaline Ff Posted January 17 Author Share Posted January 17 Жду 3 реакции выложу еще скрипты !) Quote Link to comment Share on other sites More sharing options...
Kerierazy Posted January 17 Share Posted January 17 Выкладывай что нибудь поинтересней,будут лайки) Quote Link to comment Share on other sites More sharing options...
Mescaline Ff Posted January 17 Author Share Posted January 17 7 часов назад, Kerierazy сказал: Выкладывай что нибудь поинтересней,будут лайки) А что тебе нужно ?) Quote Link to comment Share on other sites More sharing options...
JamieEnawl Posted January 18 Share Posted January 18 Сборочку ла2) Quote Link to comment Share on other sites More sharing options...
AlpenGold Posted January 18 Share Posted January 18 Спасибо,ждем еще) Quote Link to comment Share on other sites More sharing options...
Mescaline Ff Posted January 18 Author Share Posted January 18 9 часов назад, JamieEnawl сказал: Сборочку ла2) Сборочку тебе не кто за бесплатно не скинет ) Quote Link to comment Share on other sites More sharing options...
DanaAlest Posted January 18 Share Posted January 18 Ну это ты зря так.Много хороших людей) Quote Link to comment Share on other sites More sharing options...
Laurentchilt Posted January 19 Share Posted January 19 Quote Link to comment Share on other sites More sharing options...
AryaAgono Posted January 19 Share Posted January 19 а мне даже очень понравились. Quote Link to comment Share on other sites More sharing options...
Foqrwhods Posted January 19 Share Posted January 19 Quote Link to comment Share on other sites More sharing options...
ThomasPhabs Posted January 29 Share Posted January 29 thx Quote Link to comment Share on other sites More sharing options...
Teresasinem Posted Tuesday at 07:15 AM Share Posted Tuesday at 07:15 AM Quote Link to comment Share on other sites More sharing options...
GabrielKer Posted Wednesday at 12:30 PM Share Posted Wednesday at 12:30 PM Quote Link to comment Share on other sites More sharing options...
Benfet Posted yesterday at 12:45 AM Share Posted yesterday at 12:45 AM Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.