Skip to main content
Corvus Connection

RPG: Debit Wallet

Rpg
Action
Portent preview
Pro
rpg.debitWalletDebits copper from a joined viewer's wallet, never overdrawing (ok is false when they cannot afford it). Wire the amount into amountCopper. Defaults to the triggering viewer; set userId to target a specific viewer. Safely no-ops when the viewer has not joined.Debits the wired copper amount from a viewer when affordable; binds ok / newBalance.
Engagement

Inputs

Name
Kind
Type
Flags
in
Exec
exec
multiplexed
amountCopper
Data
System.Int64
None
  • Name
    in
    Kind
    Exec
    Type
    exec
    Flags
    multiplexed
  • Name
    amountCopper
    Kind
    Data
    Type
    System.Int64
    Flags
    None

Outputs

Name
Kind
Type
Flags
out
Exec
exec
None
ok
Data
System.Boolean
multiplexed
newBalance
Data
System.Int64
multiplexed
  • Name
    out
    Kind
    Exec
    Type
    exec
    Flags
    None
  • Name
    ok
    Kind
    Data
    Type
    System.Boolean
    Flags
    multiplexed
  • Name
    newBalance
    Kind
    Data
    Type
    System.Int64
    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 debit = await ctx.Rpg.Economy.DebitAsync(userId, amountCopper);