API:SetTargetToSummon
From RoR Wiki
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.
playerNamemust 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
