Here you can change website language:

Autor Wątek: Attack player Script! Help! pls  (Przeczytany 1155 razy)

0 użytkowników i 1 Gość przegląda ten wątek.

Soda

  • Przybysz
  • *
  • Wiadomości: 2
  • Reputacja: 0
    • Zobacz profil
Attack player Script! Help! pls
« dnia: 25 Lipiec 2022, 03:22:46 »
Hello to everyone on here 8)
Thanks for "Mrozu" and everyone such a good website and everything looks like new and works mostly,
i got so many problems solves by just reading, so curious if someone create script for attacking players by name or target name ? like i want to put a player on target if appears i attack directly by it's name ?
Thanks to everyone :-*
like i target player "PlayerName"
I got hold Target but i need to targetby player_name
local oldTarget
macro(200, "hold target",  function()
    if g_game.isAttacking() then
        oldTarget = g_game.getAttackingCreature()
    end
    if (oldTarget and not g_game.isAttacking() and getDistanceBetween(pos(), oldTarget:getPosition()) <= 8) then
        g_game.attack(oldTarget)
    end
end)
« Ostatnia zmiana: 25 Lipiec 2022, 04:52:04 wysłana przez Soda »
 

Soda

  • Przybysz
  • *
  • Wiadomości: 2
  • Reputacja: 0
    • Zobacz profil
Odp: Attack player Script! Help! pls
« Odpowiedź #1 dnia: 25 Lipiec 2022, 04:53:31 »
local oldTarget
macro(200, "hold target",  function()
    if g_game.isAttacking() then
        oldTarget = g_game.getAttackingCreature()
    end
    if (oldTarget and not g_game.isAttacking() and getDistanceBetween(pos(), oldTarget:getPosition()) <= 8) then
        g_game.attack(oldTarget)
    end
end)

I want to change this Script to Attack by name