Ataque Ultimo Alvo

Descrição

Ataque o ultimo alvo que foi atacado.

Autor:

                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
macro(100, "Target [ESC Cancel]", nil, function() if g_game.isAttacking() then oldTarget = g_game.getAttackingCreature() end if (oldTarget and oldTarget:getPosition()) then if (not g_game.isAttacking() and getDistanceBetween(pos(), oldTarget:getPosition()) <= 8) then if (oldTarget:getPosition().z == posz()) then g_game.attack(oldTarget) end end end end) onKeyDown(function(keys) if keys == "Escape" then oldTarget = nil g_game.cancelAttack() end end)