onMissle

Description
Callback function getting triggered when the client received missile attack example: shooting arrow or rune
Prototypes
onMissle(callback) -- callback = function(missle)
Parameters
    • function(missle): callback function
      • getSource(): position object of source (contains x, y, z
      • getDestination(): position object of destination (contains x, y, z)
Usage
onMissle(function(missle)
  local src = missle:getSource()
  local shooterTile = g_map.getTile(src)
  if shooterTile then
    local creatures = shooterTile:getCreatures()
    local creatureName = creatures[1]:getName()
    info("Name: " .. creatureName) -- Show name as info label in macro window
  end
end)