Untitled

 avatar
unknown
plain_text
a year ago
1.1 kB
4
Indexable
local dropItems = { 3492 }
local dropDelay = 600

gpAntiPushDrop = macro(dropDelay , "Anti Push", "Home", function ()
  antiPush()
end)

onPlayerPositionChange(function()
    antiPush()
end)

function antiPush()
  if gpAntiPushDrop:isOff() then
    return
  end

  local tile = g_map.getTile(pos())
  if tile then
    local thing = tile:getTopThing()
    if thing then
      for _, 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




hotkey("0", "Flower Cursor Mouse", function()
    local tile = getTileUnderCursor()
    if tile then
        local pos = tile:getPosition()
        local itemToMouse = 2983
        for _, container in pairs(g_game.getContainers()) do
            for __, item in ipairs(container:getItems()) do
                if item:getId() == itemToMouse then
                    return g_game.move(item, pos, 1)
                end
            end
        end
    end
end)
Editor is loading...
Leave a Comment