User Tools

Site Tools


bots:conditions

This is an old revision of the document!


❓ Bot Conditions

Conditions act like “if statements” in your bot’s logic. They check whether something is true before deciding which actions to run.


📦 Has Item

- Checks if the player has a specific item.
- Often used for quests or trades.
- Example: “If player has apple → Say ‘Thanks for the apple!’”


👥 Player Count

- Checks how many players are in the world.
- Useful for multiplayer events or scaling difficulty.
- Example: “If player count > 5 → Broadcast ‘The arena is full!’”


⏱️ Cooldown

- Prevents actions from running too often.
- Sets a minimum time before the condition can be true again.
- Example: “If cooldown expired → Give item.”


🤖 Other Bot Variable

- Compares a variable from another bot.
- Enables bots to interact with each other.
- Example: “If Guard Bot variable = alert → Say ‘Intruder detected!’”


🏆 Leaderboard Rank

- Checks a player’s position on a leaderboard.
- Useful for competitive events or rewards.
- Example: “If rank = 1 → Give prize or ticket.”


💰 Payment Received

- Checks if the player has paid the required amount.
- Often used with vendor or ticket bots.
- Example: “If payment received → Give ticket.”


🎲 Random Chance

- Runs with a probability you set.
- Adds unpredictability to bot behavior.
- Example: “If random chance 50% → Say ‘Lucky day!’”


📊 Variable Checks

- Compares a bot variable against a value.
- Supported comparisons:

  • = (equals to)
  • > (greater than)
  • < (less than)
  • >= (greater than or equal to)
  • ⇐ (less than or equal to)

- Example: “If score >= 10 → Show dialogue ‘You win!’”


👤 Player Variable Checks

- Compares a player‑specific variable against a value.
- Supported comparisons:

  • > (greater than)
  • < (less than)
  • >= (greater than or equal to)
  • ⇐ (less than or equal to)

- Example: “If player health < 20 → Broadcast ‘Low health!’”


🎟️ Has Tickets

- Checks if the player has tickets in their inventory.
- Often used for entry systems or events.
- Example: “If player has ticket → Teleport to arena.”


✅ True / ✗ Else

- Each condition has two branches: IF TRUE and ELSE.
- Add actions under IF TRUE to run when the condition passes.
- Add actions under ELSE to run when the condition fails.
- Example: “If player has item → Give reward. Else → Say ‘Come back when you have it.’”


Summary

Conditions refine your bot’s logic by checking values before running actions. You can:

  • Test items, variables, payments, or player counts
  • Add randomness or cooldowns
  • Branch logic with IF TRUE and ELSE outcomes

Next: explore Actions to see what bots can do once conditions are met.

bots/conditions.1769438444.txt.gz · Last modified: by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki