Skip to main content
Corvus Connection

RPG: Grant Item

Rpg
Action
Portent preview
Pro
rpg.grantItemGrants an item (stacking) to a joined viewer. Defaults to the triggering viewer; set userId to target a specific viewer. Safely no-ops when the viewer has not joined or the item is unknown.Grants a quantity of an item to a viewer; binds granted.
Engagement

Inputs

Name
Kind
Type
Flags
in
Exec
exec
multiplexed
  • Name
    in
    Kind
    Exec
    Type
    exec
    Flags
    multiplexed

Outputs

Name
Kind
Type
Flags
out
Exec
exec
None
granted
Data
System.Boolean
multiplexed
  • Name
    out
    Kind
    Exec
    Type
    exec
    Flags
    None
  • Name
    granted
    Kind
    Data
    Type
    System.Boolean
    Flags
    multiplexed

Parameters

Name
Type
Required
Default
Choices
itemSlug
System.String
yes
""
None
quantity
System.Int32
no
1
None
userId
System.String
no
""
None
  • Name
    itemSlug
    Type
    System.String
    Required
    yes
    Default
    ""
    Choices
    None
  • Name
    quantity
    Type
    System.Int32
    Required
    no
    Default
    1
    Choices
    None
  • Name
    userId
    Type
    System.String
    Required
    no
    Default
    ""
    Choices
    None

Lowers to C#

var granted = await ctx.Rpg.Characters.GrantItemAsync(userId, itemSlug, quantity);