Skip to main content
Corvus Connection

RPG: Sell Item

Rpg
Action
Portent preview
Pro
rpg.sellItemSells a held item back for currency at its rarity value, bounded by the per-stream sell cap. Defaults to the triggering viewer; set userId to target a specific viewer. Safely no-ops when the viewer does not hold enough or the cap is reached.Sells the held item back for a viewer; binds sold / itemName / credited / newBalance.
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
sold
Data
System.Boolean
multiplexed
itemName
Data
System.String
multiplexed
credited
Data
System.Int64
multiplexed
newBalance
Data
System.Int64
multiplexed
  • Name
    out
    Kind
    Exec
    Type
    exec
    Flags
    None
  • Name
    sold
    Kind
    Data
    Type
    System.Boolean
    Flags
    multiplexed
  • Name
    itemName
    Kind
    Data
    Type
    System.String
    Flags
    multiplexed
  • Name
    credited
    Kind
    Data
    Type
    System.Int64
    Flags
    multiplexed
  • Name
    newBalance
    Kind
    Data
    Type
    System.Int64
    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 sale = await ctx.Rpg.Economy.SellAsync(userId, itemSlug, quantity);