Skip to main content
Corvus Connection

RPG: Respec

Rpg
Action
Portent preview
Pro
rpg.respecRespecs a joined viewer: debits the respec cost, refunds every spent point, and resets stats to the default block. Defaults to the triggering viewer; set userId to target a specific viewer. Safely no-ops when the viewer cannot afford the cost, is on cooldown, or has not joined.Respecs a viewer, debiting the cost and refunding points; binds ok / costCopper / newBalance / unspentPoints.
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
ok
Data
System.Boolean
multiplexed
costCopper
Data
System.Int64
multiplexed
newBalance
Data
System.Int64
multiplexed
unspentPoints
Data
System.Int32
multiplexed
  • Name
    out
    Kind
    Exec
    Type
    exec
    Flags
    None
  • Name
    ok
    Kind
    Data
    Type
    System.Boolean
    Flags
    multiplexed
  • Name
    costCopper
    Kind
    Data
    Type
    System.Int64
    Flags
    multiplexed
  • Name
    newBalance
    Kind
    Data
    Type
    System.Int64
    Flags
    multiplexed
  • Name
    unspentPoints
    Kind
    Data
    Type
    System.Int32
    Flags
    multiplexed

Parameters

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

Lowers to C#

var respec = await ctx.Rpg.Characters.RespecAsync(userId);