Friendly


friends

This fakeunit retrieves a list of friendly units.

Returns TABLE

  • Returns a table indexed by GUID, containing the friendly units.

Examples:

-- DSL Mode
{ACTION, ACTION, "friends"},

-- Lua Mode
local friends = Object("friends") or {}
for _,Obj in pairs(friends) do
    -- Do something with the object
    print( Obj:Distance() )
end

friendlyName

This fakeunit finds a friendly unit with a specific name.

Parameters

  • STRING: The name of the friendly unit to search for.

Returns guid/key

  • Returns the friendly unit with the specified name.

Examples:

-- DSL Mode
{ACTION, ACTION, "friendlyName(unit_name)"},

-- Lua Mode
local friend = Object("friendlyName(unit_name)")
if friend then
    -- Do something with the friend unit
    print( friend.id )
end

friendlyID

This fakeunit finds a friendly unit with a specific id.

Parameters

  • NUMBER: The id of the friendly unit to search for.

Returns guid/key

  • Returns the friendly unit with the specified id.

Examples:

-- DSL Mode
{ACTION, ACTION, "friendlyID(12345)"},

-- Lua Mode
local friend = Object("friendlyID(12345)")
if friend then
    -- Do something with the friend unit
    print( friend.name )
end

totemID

This fakeunit finds a friendly totem with a specific id created by the player.

Parameters

  • NUMBER: The id of the player totem to search for.

Returns guid/key

  • Returns the friendly totem created by the player with the specified id.

Examples:

-- DSL Mode
{ACTION, ACTION, "totemID(8888)"},

-- Lua Mode
local totem = Object("totemID(8888)")
if totem then
    -- Do something with the totem object
    print( totem.name )
end

totemName

This fakeunit finds a friendly totem with a specific name created by the player.

Parameters

  • STRING: The name of the totem to search for.

Returns guid/key

  • Returns the friendly totem created by the player with the specified name.

Examples:

-- DSL Mode
{ACTION, ACTION, "totemName(totem_name)"},

-- Lua Mode
local totem = Object("totemName(totem_name)")
if totem then
    -- Do something with the totem object
    print( totem.name )
end