07-28-2021, 04:30 AM
Como faço para adicionar uma hotkey para o anti push? sempre que eu precisa ligar e desligar pressionar uma determinada tecla. Nesse caso o F9.
EX: setDefaultTab("Tools")
gpAntiPushDrop = macro(1000, "anti push", "F9", function() end)
local dropItems = { 3492, 3031 }
local maxStackedItems = 10
local dropDelay = 600
gpAntiPushDrop = macro(dropDelay , "anti push", "F9" function ()
antiPush()
end)
onPlayerPositionChange(function()
antiPush()
end)
function antiPush()
if gpAntiPushDrop:isOff() then
return
end
local tile = g_map.getTile(pos())
if tile and tile:getThingCount() < maxStackedItems then
local thing = tile:getTopThing()
if thing and not thing:isNotMoveable() then
for i, item in pairs(dropItems) do
if item ~= thing:getId() then
local dropItem = findItem(item)
if dropItem then
g_game.move(dropItem, pos(), 1)
end
end
end
end
end
end
EX: setDefaultTab("Tools")
gpAntiPushDrop = macro(1000, "anti push", "F9", function() end)
local dropItems = { 3492, 3031 }
local maxStackedItems = 10
local dropDelay = 600
gpAntiPushDrop = macro(dropDelay , "anti push", "F9" function ()
antiPush()
end)
onPlayerPositionChange(function()
antiPush()
end)
function antiPush()
if gpAntiPushDrop:isOff() then
return
end
local tile = g_map.getTile(pos())
if tile and tile:getThingCount() < maxStackedItems then
local thing = tile:getTopThing()
if thing and not thing:isNotMoveable() then
for i, item in pairs(dropItems) do
if item ~= thing:getId() then
local dropItem = findItem(item)
if dropItem then
g_game.move(dropItem, pos(), 1)
end
end
end
end
end
end