Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:SetTargetToSummon

From RoR Wiki
Revision as of 19:49, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

UI Lua API · Target functions
Version: WAR 1.4.8

Selects a group or warband member, by name, as the player to summon.

SetTargetToSummon(playerName)

Arguments

playerName
wstring – Name of the group or warband member.

Returns

Nothing.

Details

  • The client looks the name up among the warband members when a warband is active, otherwise among the known players. If it finds the player, it sends the server a request that identifies that player. If it does not, nothing is sent.
  • The stock UI calls it right before using a summoning stone with SendUseItem.
  • If there is no player object, nothing happens.
  • playerName must be a wide string; a plain Lua string raises an Invalid Parameters error.

Errors

None besides the generic Invalid Parameters message when the argument is not a wide string.

Example

From easystem_utils/source/partyutils.lua:

local invSlot = DataUtils.HasRequiredSummoningStone( player.level )
if( invSlot )
then
    SetTargetToSummon( playerToSummon )
    SendUseItem( GameData.ItemLocs.INVENTORY, invSlot, 0, 0, 0 )
end

See also