User Tools

Site Tools


bots:triggers

🎯 Bot Triggers

Triggers are events that start your bot’s logic. When a trigger occurs, the bot checks conditions (if any) and then performs actions.


πŸ‘† Player Clicks

- Triggered when a player clicks on the bot.
- Commonly used for dialogue, trading, or interaction.
- Example: β€œWhen player clicks me β†’ Show dialogue β€˜Hello!’”


⏰ Timer

- Triggered after a set amount of time passes.
- Can repeat at intervals or run once.
- Example: β€œEvery 30 seconds β†’ Broadcast β€˜The shop is open!’”


πŸ“ Player Nearby

- Triggered when a player comes within a defined radius of the bot.
- Radius can be set in tiles.
- Example: β€œWhen player within 2 tiles β†’ Say β€˜Welcome traveler!’”


πŸ’­ Chat Message

- Triggered when a player types a specific chat message.
- Useful for keyword responses or commands.
- Example: β€œWhen chat message = β€˜help’ β†’ Show dialogue β€˜Here’s what I can do…’”


πŸšͺ World Enter

- Triggered when a player enters the world containing the bot.
- Great for greeter bots or tutorials.
- Example: β€œOn world enter β†’ Show dialogue β€˜Welcome to my world!’”


πŸ• Time

- Triggered at a specific in‑game time.
- Can be used for scheduled events or timed interactions.
- Example: β€œAt 12:00 game time β†’ Broadcast β€˜It’s noon!’”


Summary

Triggers are the starting point of bot logic. You can:

  • React to player clicks
  • Run timed events
  • Detect nearby players
  • Respond to chat messages
  • Greet players entering your world
  • Schedule actions at specific times

Next: learn how to refine logic with Conditions or perform results with Actions.

bots/triggers.txt Β· Last modified: by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki