WoW:API CanSummonFriend: Difference between revisions
Jump to navigation
Jump to search
m (stub for more context) |
m (Move page script moved page API CanSummonFriend to API CanSummonFriend without leaving a redirect) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{wowapi}} __NOTOC__ | {{wowapi}} __NOTOC__ | ||
Returns whether you can RaF summon a particular unit. | |||
summonable = CanSummonFriend("unit") | |||
CanSummonFriend("unit") | |||
== Arguments == | == Arguments == | ||
;unit : String ([[UnitId]]) - player to check whether you can summon. | |||
== Returns == | == Returns == | ||
;summonable : Flag - 1 if you can summon the unit using RaF, nil otherwise. | |||
== Example == | == Example == | ||
The snippet below checks whether you can summon the target, and, if so, whispers and summons her to you. | |||
local t = " | local t = "target"; | ||
if CanSummonFriend(t) then | if CanSummonFriend(t) then | ||
SendChatMessage("I am summoning you!","WHISPER",nil,t) | SendChatMessage("I am summoning you!","WHISPER",nil,t) | ||
SummonFriend(t) | SummonFriend(t) | ||
end | end | ||
Latest revision as of 04:45, 15 August 2023
Returns whether you can RaF summon a particular unit.
summonable = CanSummonFriend("unit")
Arguments[edit]
- unit
- String (UnitId) - player to check whether you can summon.
Returns[edit]
- summonable
- Flag - 1 if you can summon the unit using RaF, nil otherwise.
Example[edit]
The snippet below checks whether you can summon the target, and, if so, whispers and summons her to you.
local t = "target"; if CanSummonFriend(t) then SendChatMessage("I am summoning you!","WHISPER",nil,t) SummonFriend(t) end