shopActions

  • builtin
  • by Takaro
  • Takaro >=0.0.1
  • all
Version

Built-in modules ship with Takaro — no import needed.

View export JSON

Built-in shop actions for common use cases like granting roles, sending messages, giving items, and executing commands.

Configuration 4

Settings you fill in when installing the module on a server.

SettingTypeDefaultDescription
grantRole Grant Role object
sendMessage Send Message object
giveItem Give Item object
executeCommand Execute Command object
Raw config schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "grantRole": {
      "type": "object",
      "title": "Grant Role",
      "properties": {
        "roleId": {
          "type": "string",
          "x-component": "role",
          "title": "Role",
          "description": "The Takaro role to grant to the player."
        }
      }
    },
    "sendMessage": {
      "type": "object",
      "title": "Send Message",
      "properties": {
        "message": {
          "type": "string",
          "title": "Message",
          "description": "The message to send.",
          "default": "Thank you for your purchase!"
        },
        "broadcast": {
          "type": "boolean",
          "title": "Broadcast",
          "description": "If true, sends to all players. Otherwise, only to the buyer.",
          "default": false
        }
      }
    },
    "giveItem": {
      "type": "object",
      "title": "Give Item",
      "properties": {
        "items": {
          "x-component": "item",
          "type": "array",
          "title": "Bonus Items",
          "description": "Additional items to give the player on purchase.",
          "items": {
            "type": "object",
            "properties": {
              "item": {
                "type": "string",
                "title": "Item"
              },
              "amount": {
                "type": "number",
                "title": "Amount",
                "default": 1
              },
              "quality": {
                "type": "string",
                "title": "Quality"
              }
            }
          }
        }
      }
    },
    "executeCommand": {
      "type": "object",
      "title": "Execute Command",
      "properties": {
        "command": {
          "type": "string",
          "title": "Command",
          "description": "The console command to execute on the game server."
        }
      }
    }
  },
  "additionalProperties": false
}
Raw UI schema
{
  "grantRole": {
    "roleId": {
      "ui:widget": "role"
    }
  }
}