Mw na frente do alvo

Descrição

Use Mw na frente do alvo quando precionado a tecla de atalho

Autor:

                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
local key = "F5" -- Hotkey para tacar mwall local mwallId = 7382 -- Mwall ID local squaresThreshold = 2 -- quantidade de sqm a tacar MW frente do char singlehotkey(key, "Mwall Frente Target", function() local target = g_game.getAttackingCreature() if target then local targetPos = target:getPosition() local targetDir = target:getDirection() local mwallTile if targetDir == 0 then -- north targetPos.y = targetPos.y - squaresThreshold mwallTile = g_map.getTile(targetPos) useWith(mwallId, mwallTile:getTopUseThing()) elseif targetDir == 1 then -- east targetPos.x = targetPos.x + squaresThreshold mwallTile = g_map.getTile(targetPos) useWith(mwallId, mwallTile:getTopUseThing()) elseif targetDir == 2 then -- south targetPos.y = targetPos.y + squaresThreshold mwallTile = g_map.getTile(targetPos) useWith(mwallId, mwallTile:getTopUseThing()) elseif targetDir == 3 then -- west targetPos.x = targetPos.x - squaresThreshold mwallTile = g_map.getTile(targetPos) useWith(mwallId, mwallTile:getTopUseThing()) end end end)