Overview
How RagnaScript works and the npc_message action
RagnaScript is how your Ragnarok server talks to Discord. You add ragnascript() calls to your NPC scripts, and RagnaSync turns them into Discord announcements.
Syntax
ragnascript("[action: npc_message][name: ...][message: ...][channel: ...]");Every call is an action plus a set of [key: value] fields. For scripts you write yourself, that action is npc_message — it posts a message to Discord on your server's behalf.
ragnascript("[action: npc_message][name: Event Manager][message: Daily Hunt is now active!][channel: YOUR_CHANNEL_ID]");Required fields
npc_message takes just three fields:
name
The author name shown in Discord — an NPC label like System or Event Manager (not a real player)
message
The text that appears in Discord
channel
The Discord channel ID to post to
What about chat, requests and logs?
Other Discord features aren't actions you hand-write — they're turned on in your configuration and run automatically:
Player chat bridging is configured, not scripted — see Message Sync.
Player
@requestsupport messages are handled for you — see Ticket Support Command.Logging (mob drops, deaths, vending, refine and more) is enabled in config — see the Event Logs section in the sidebar.
Next steps
NPC Examples — ready-to-use
npc_messagescripts and the mechanics behind them.Build with AI — have Claude or ChatGPT write scripts for you.
Last updated