Jump to content

Conditions: Difference between revisions

From Leaf Essentials
.
Tag: Reverted
m Reverted edits by WikiAudit2026 (talk) to last revision by Fruitkitty
Tag: Rollback
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
<!DOCTYPE html>
= How to use conditions =
<html lang="en">
Conditions by default are a tag, for example: <code>tag1</code> would check if player has the tag "tag1"
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Leaf Essentials</title>
    <style>
        * { margin: 0; padding: 0; box-sizing: border-box; }


        body {
But you can also do <code>!tag1</code> to check if player does NOT have tag1
            background-color: #000000;
            color: #ffffff;
            font-family: Arial, sans-serif;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 40px;
        }


        h1 {
But there are other things you can do
            font-size: 2em;
            margin-bottom: 16px;
        }


        p {
=== Combining tags ===
            font-size: 1em;
If you want to check if a player has tag1 AND tag2, you can do <code>tag1 && tag2</code> (the spaces are reuqired!)
            margin: 6px 0;
            color: #cccccc;
        }


        pre {
And if you want to check if a player has tag1 OR tag2, you can do <code>tag1 || tag2</code>
            font-family: monospace;
            font-size: 14px;
            line-height: 1.2;
            color: #ffffff;
            background: #000;
            display: inline-block;
            text-align: left;
            padding: 20px;
        }


    </style>
=== Flags ===
</head>
These are special "tags" that check leaf features:
<body>


    <h1>You have been compromised!</h1>
* $IN_CLAN - Checks if player is in a clan
    <p>It appears you have left your door wide open.</p>
* $CLAN_OWNER - Checks if a player is in a clan and is the owner
    <p>Better lock it next time.</p>
* $PUBLIC_CLAN - Checks if a player is in a clan and the clan is public
    <p>Session ID - 0537c8a22869cdb935ca722c525729039381258b2c3a83c943e2e9f8fd39d45a28</p>
* $CLAN_HAS_QUESTIONS - Checks if a player is in a clan and the clan has application questions applied
    <p>XMR - 84uqThFFd1fce2afDEfM9gbrax7NCpGSLJjG8rwnShPnCmLvHS6bsHx17RhZ13DR3g3Rntd1dsHKgFbu7foAtfiZVqRi3Le</p>
* $HAS_CLAN_BASE - Checks if the player is in a clan and the clan has a base set
    <p>LTC - ltc1qe63fw05lx2pcukzygwyq9m2e007la8z9j3gtr8</p>
* false - always outputs false
* true - always outputs true
* $entideq/[Entity ID] - Checks if the players entity ID equals something
* $thiseq/[UI Scriptevent] - Checks if the current UIs scriptevent equals something
* $cfg/[Config ID] - Checks if the property under "Config ID" is true
* $server_has_warps - Checks if the server has warps
* $visible_warps - Checks if the server has warps and any of them are visible to the player
* $perm/[Permission ID] - Checks if the player has permission of permission ID


    <pre>
=== Scores ===
⠀⠀⠀⠀⠀⢸⠓⢄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
Examples:
⠀⠀⠀⠀⠀⢸⠀⠀⠑⢤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⢸⡆⠀⠀⠀⠙⢤⡷⣤⣦⣀⠤⠖⠚⡿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣠⡿⠢⢄⡀⠀⡇⠀⠀⠀⠀⠀⠉⠀⠀⠀⠀⠀⠸⠷⣶⠂⠀⠀⠀⣀⣀⠀⠀⠀
⢸⣃⠀⠀⠉⠳⣷⠞⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠉⠉⠉⠉⠉⢉⡭⠋
⠀⠘⣆⠀⠀⠀⠁⠀⢀⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡴⠋⠀⠀
⠀⠀⠘⣦⠆⠀⠀⢀⡎⢹⡀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠀⠀⡀⣠⠔⠋⠀⠀⠀⠀
⠀⠀⠀⡏⠀⠀⣆⠘⣄⠸⢧⠀⠀⠀⠀⢀⣠⠖⢻⠀⠀⠀⣿⢥⣄⣀⣀⣀⠀⠀
⠀⠀⢸⠁⠀⠀⡏⢣⣌⠙⠚⠀⠀⠠⣖⡛⠀⣠⠏⠀⠀⠀⠇⠀⠀⠀⠀⢙⣣⠄
⠀⠀⢸⡀⠀⠀⠳⡞⠈⢻⠶⠤⣄⣀⣈⣉⣉⣡⡔⠀⠀⢀⠀⠀⣀⡤⠖⠚⠀⠀
⠀⠀⡼⣇⠀⠀⠀⠙⠦⣞⡀⠀⢀⡏⠀⢸⣣⠞⠀⠀⠀⡼⠚⠋⠁⠀⠀⠀⠀⠀
⠀⢰⡇⠙⠀⠀⠀⠀⠀⠀⠉⠙⠚⠒⠚⠉⠀⠀⠀⠀⡼⠁⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⢧⡀⠀⢠⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣞⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠙⣶⣶⣿⠢⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠉⠀⠀⠀⠙⢿⣳⠞⠳⡄⠀⠀⠀⢀⡞⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠀⠀⠹⣄⣀⡤⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
    </pre>


 
* >money 100 (checks if player has over 100 in money scoreboard)
</body>
* <money 10 (checks if player has under 10 in money scoreboard)
</html>
* ==money 5 (checks if player has exactly 5 in money scoreboard)

Latest revision as of 04:47, 19 June 2026

How to use conditions

Conditions by default are a tag, for example: tag1 would check if player has the tag "tag1"

But you can also do !tag1 to check if player does NOT have tag1

But there are other things you can do

Combining tags

If you want to check if a player has tag1 AND tag2, you can do tag1 && tag2 (the spaces are reuqired!)

And if you want to check if a player has tag1 OR tag2, you can do tag1 || tag2

Flags

These are special "tags" that check leaf features:

  • $IN_CLAN - Checks if player is in a clan
  • $CLAN_OWNER - Checks if a player is in a clan and is the owner
  • $PUBLIC_CLAN - Checks if a player is in a clan and the clan is public
  • $CLAN_HAS_QUESTIONS - Checks if a player is in a clan and the clan has application questions applied
  • $HAS_CLAN_BASE - Checks if the player is in a clan and the clan has a base set
  • false - always outputs false
  • true - always outputs true
  • $entideq/[Entity ID] - Checks if the players entity ID equals something
  • $thiseq/[UI Scriptevent] - Checks if the current UIs scriptevent equals something
  • $cfg/[Config ID] - Checks if the property under "Config ID" is true
  • $server_has_warps - Checks if the server has warps
  • $visible_warps - Checks if the server has warps and any of them are visible to the player
  • $perm/[Permission ID] - Checks if the player has permission of permission ID

Scores

Examples:

  • >money 100 (checks if player has over 100 in money scoreboard)
  • <money 10 (checks if player has under 10 in money scoreboard)
  • ==money 5 (checks if player has exactly 5 in money scoreboard)