- Go to https://rsps.app/host
- Go into Editor > MyServer.plugin.js
- Paste this code inside the register function:
api.onNpcInteraction("Your NPC", {
"Talk-to": ({ player }) => {
player.getPacketSender().sendInterface(123);
},
});
Replace "Your NPC", "Talk-to" and 123 with an interface ID. You can replace the
player.getPacketSender().sendInterface with anything like player.sendMessage("Hello world");
Restart world.
Enjoy