Skip to main content
Corvus Connection

RPG: Roll Loot Table

Rpg
Action
Portent preview
Pro
rpg.rollLootTableRolls one of your loot tables for a viewer and grants the result. Defaults to the triggering viewer; set userId to target a specific viewer. Safely no-ops when the viewer has not joined or the table is unknown.Rolls the named loot table for a viewer and grants it; binds gotItem / itemSlug / itemName / rarity / quantity.
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
gotItem
Data
System.Boolean
multiplexed
itemSlug
Data
System.String
multiplexed
itemName
Data
System.String
multiplexed
rarity
Data
System.String
multiplexed
quantity
Data
System.Int32
multiplexed
  • Name
    out
    Kind
    Exec
    Type
    exec
    Flags
    None
  • Name
    gotItem
    Kind
    Data
    Type
    System.Boolean
    Flags
    multiplexed
  • Name
    itemSlug
    Kind
    Data
    Type
    System.String
    Flags
    multiplexed
  • Name
    itemName
    Kind
    Data
    Type
    System.String
    Flags
    multiplexed
  • Name
    rarity
    Kind
    Data
    Type
    System.String
    Flags
    multiplexed
  • Name
    quantity
    Kind
    Data
    Type
    System.Int32
    Flags
    multiplexed

Parameters

Name
Type
Required
Default
Choices
tableSlug
System.String
yes
""
None
userId
System.String
no
""
None
  • Name
    tableSlug
    Type
    System.String
    Required
    yes
    Default
    ""
    Choices
    None
  • Name
    userId
    Type
    System.String
    Required
    no
    Default
    ""
    Choices
    None

Lowers to C#

var loot = await ctx.Rpg.Loot.RollAsync(userId, tableSlug);