Ssomar Plugins
🛒 Purchase📢 Discord❤️ Donate
  • Tools for all Plugins [Score]
    • 📚Custom Commands
      • Player & Target Commands
      • Mixed Commands (Player & Entity)
      • Entity Commands
      • Block Commands
      • Item Commands
      • Utility Commands
    • 📚Custom Conditions
      • Player & Target Conditions
      • Entity Conditions
      • Block Conditions
      • World Conditions
      • Item Conditions
      • Placeholder Conditions
      • Custom EI Conditions
    • 🏹Custom Projectiles
    • 📚Placeholders
    • ✨ SCore particles
    • 🧮 SCore Variables
    • ✔️Compatible Plugins
    • 🤖General Questions | Guides
      • Technical-Level Info
      • SCore
      • Math Formulas
      • Utilities
        • Code Bin/Stock
    • 📰 SCore
      • General config
      • Commands
    • 🔘 Custom triggers
  • ExecutableItems
    • 📌Information EI
    • 📃Configurations
      • General Configuration
      • Item Configuration
        • Item Features
        • Item Restrictions/Resistances
      • Activator Configuration
        • List of the Activators
        • Activators features
    • ⌨️Commands & Permissions
    • 🤖Questions | Guides
      • Frequently Asked Questions
        • Free vs Premium
        • Install/update/errors
          • How to install correctly
          • How to update correctly
          • Installation errors [logs]
          • Plugin doesn't work 😡😡
          • command /ei doesn't work
          • Just installed the plugin and have errors on my logs
        • Players can't use the items
        • Basic tutorials
        • Item disappears | Limit
        • EI COMMANDS doesn't work
        • How to use vanilla commands
        • Server chat spamming
        • Custom crafting
        • Folders on /ei show
        • Item as player head
        • Armor trims
        • Attributes not working
        • How to duplicate an EI Item
        • How to change particle vanilla command color
        • Edit plugin messages
        • Item Textures
        • I want to give an item on join
        • Issue with written book
        • How to add custom NBTTag
        • HEX COLORS doesn't work
        • HUGE delay | cooldown | command time
        • Trident duplication
        • Custom name feature is not working
        • Score database large
        • PROJECTILE_HIT_... activators not working
        • Not so frequentlly asked questions
      • Items explanations
        • Item ideas - How to create...?
        • Hight-Powered Grappling Hook
        • Morph Tools
        • Delayed Teleport Towards Saved Location
        • Box of ender pearls
        • Swap position
        • Magnet
        • Item frame visibility toggler
        • Hermes boots
        • EI |WorldEdit -> SET COMMAND
        • Bag of items
        • Infinite rockets
        • Trident that works when not raining
        • [Complex] Moving Particle Projectile
      • Methods | Template
        • Multiple projectiles on one item
        • Custom drops
        • Deal % of entity HP
        • Variable conditions
        • Armor Set Bonus
        • Custom durability
          • Custom durability bar
        • Action Counter
        • On / Off Switch
        • Custom food
        • Raycast
        • Random activators selector
        • Break blocks not depending on item
        • Infinite | finite blocks
        • Damage | Hit features
        • Backstab
        • Item date on lore
        • Entity health condition
        • Dashes | Commands & usage
        • Guns
        • RNG Chance activator
        • Only usable on mainhand
        • Transform Vanilla Items into ExecutableItems
        • Insta pickup
        • Epic particles
        • Custom totems
        • One Time Loop
        • OneTime action
        • MINEINCUBE command whitelist or blacklist blocks
        • Cancel a delayed command
        • Worldedit schematic
        • Condition 1 between 5 different armor pieces
        • Creating Items with multiple activators with varying conditions while having only one error message
        • [Free version] Mana Requirement
        • Setting Up a System that runs the auto update feature once per update
        • [Outdated] Global Cooldown
      • Custom projectiles implementation
        • Projectile ideas - How to create...?
        • Creating a basic projectile
        • Launch Arrows in cone
        • Launch Diamond Axe
        • Custom Actions / Damages per projectiles
      • Custom textures
        • Custom textures [1.21 --]
          • General items
          • Per states texture
          • Custom armor (using armor trims)
          • Animated textures
          • 3D Models
          • Uploading texture pack
          • Fixing Invalid PNG Files
        • Custom texture [1.21+]
      • Custom sounds
      • Informal Guides
      • Plugin performances optimization
    • 🔦MC Versions Compatibility
    • ⚙️Developer API
  • ExecutableBlocks
    • 📌Information EB
    • 📃Configurations
      • General Configuration
      • Block Configuration
        • Block Features
        • Blocks Examples
      • Activator Configuration
        • List of the Activators
        • Activators features
        • Activator Examples
    • ⌨️Commands & Permissions
    • 🤖Question | Guides
      • Frequently Asked Questions
        • Free vs Premium
        • Install/update/errors
          • How to install correctly
          • How to update correctly
          • Installation errors [logs]
          • Plugin doesn't work 😡😡
        • Players can't use the blocks
        • Block disappears | Limit
        • How to use vanilla commands
        • Server chat spamming
        • Custom crafting
        • Block as player head
        • Tutorial
        • Block states
        • Block Textures
        • My condition is checking the owner
        • SETEXECUTABLEBLOCK does not work
        • Holograms won't vanish
      • Tutorials
        • Boss summoner
        • Item generator
        • Custom crops
        • Custom TNT
        • Block that generate a structure
      • Methods
        • Timed actions
        • Worldedit schematic
    • ⚙️Developer API
  • ExecutableEvents
    • 📌Information EE
    • 📃Configurations
      • General Configuration
      • Activator Configuration
        • List of the Activators
        • Activators features
    • 🤖Question | Guides
      • Informal Guides
      • Frequently Asked Questions
        • Install/update/errors
          • How to install correctly
          • How to update correctly
          • Installation errors [logs]
          • Plugin doesn't work 😡😡
        • How to use vanilla commands
        • Server chat spamming
      • Tutorials
        • Toggle System/Command with Godmode
        • Custom enchants by lore
        • Give new/old players an item once
        • Run commands after killing x amount of mobs
        • Detect player entry/leave from a worldguard region
    • ⌨️Commands & Permissions
  • MyFurniture
    • 📌Information MF
    • 📃Configurations
      • General Configuration
      • Furniture Configuration
        • Furniture Features
        • Furntiture Examples
      • Activator Configuration
        • List of the Activators
        • Activators features
    • 🤖Question | Guides
      • Frequently Asked Questions
        • Install/update/errors
          • How to install correctly
          • How to update correctly
          • Installation errors [logs]
          • Plugin doesn't work 😡😡
        • Import your own Furniture
        • How to use vanilla commands
        • Server chat spamming
        • Free vs Premium
    • ⌨️Commands & Permissions
  • ExecutableCrafting
    • 📌Information EC
    • 📃Configurations
      • General Configuration
      • Recipe Configuration
        • Recipe Features
        • Crafting Recipe Examples
      • Recipe groups
      • Recipe Book
    • 🤖Questions | Guides
      • Free vs Premium
      • Install/update/errors
        • How to install correctly
        • How to update correctly
    • ⌨️Commands & Permissions
  • AI Chat Moderation
    • 📌Information ACM
    • 📃Configurations
    • ⌨️Commands & Permissions
  • CustomPiglinsTrades
    • 📌Information CPT
    • ⌨️Commands & Permissions
    • ✔️Compatible Plugins
  • ScreenShop
    • 📌Information ScreenShop
  • TEAM AND DONATIONS
    • 🎆Contact / Support us ?
Powered by GitBook
On this page
  • Guides
  • Stamina System
Edit on GitHub
  1. ExecutableEvents
  2. Question | Guides

Informal Guides

Guides

Stamina System

Reference Idea: (by juliekun)

Stamina can be drained overtime from sprinting (1 stamina per 5 seconds). 
recover 2 stamina per second
default is 100
can be increased by 20% more from eating golden apple, can be stacked to 200 stamina (last for 3 min).
Enchanted golden apple will give temporary infinite stamina and set current stamina to 200 (1 min). 
Using a sword will decrease 1–4 stamina based on materials (wood, iron, and gold, diamonds, and netherite).
same for axe but slightly higher: 2 - 6 
boost recovering speed for stamina if player has full saturation bar (1 saturation bar = 10% faster)
If the hunger bar is lower than 50%, then decrease the recovery speed from 2 stamina/second to 1 stamina/second.
Blocking an attack will lose 1 stamina only, but if the shield breaks, then lose 10 stamina.
When stamina gets to 0, get stun, being stun until stamina recovers back to 20% current stamina.
Jumping and mining drain 1 stamina.
Swimming and climbing drain 1 stamina/second
whenever doing any action requires stamina Stop recovering stamina and start recovering 3 seconds, not doing anything related to drain stamina, but constantly recovering if you have eaten an enchanted or normal golden apple for the last 3 minutes.
below 20% current stamina, then give player weakness, mining fatigue, and slowness until stamina is above 30% (ye 30%).

Steps to recreate (NOT ALL ARE POSSIBLE AT THE MOMENT)

1) Create a SCore variable
- /score variables-create STAMINA
- set FOR to PLAYER
- set TYPE to NUMBER
- set DEFAULT VALUE to 0
2) Create a SCore variable
- /score variables-create MAX-STAMINA
- set FOR to PLAYER
- set TYPE to NUMBER
- set DEFAULT VALUE to 0
3) create an Event File
4) create a LOOP activator
- add "score variables modification player STAMINA %math_(2*({player_food_level}/20))% %player%"
- create a placeholder condition 
  - type: PLAYER_NUMBER
  - part1: %math_{score_variables_MAX-STAMINA}+{score_variables_BONUS-STAMINA}%
  - comparator: INFERIOR
  - part2: 100

===============================================================================
  
HOW TO IMPLEMENT "BONUS STAMINA WHEN EATING GOLDEN APPLE":
1) Create a SCore variable
- /score variables-create BONUS-STAMINA
- set FOR to PLAYER
- set TYPE to NUMBER
- set DEFAULT VALUE to 0
2) Create an EI ITEM
- create a PLAYER_CONSUME_THE_EI activator
- add the commands

(config format)
commands:
- score variables modification player BONUS-STAMINA 20 %player%
- DELAY 180
- score variables modification player BONUS-STAMINA -20 %player%

===============================================================================

HOW TO IMPLEMENT "STAMINA IS NOT CONSUMED WHEN EATING A SPECIAL ITEM"
1) Create a SCore variable
- /score variables-create INFINITE-STAMINA
- set FOR to PLAYER
- set TYPE to NUMBER
- set DEFAULT VALUE to 0
2) Create an EI ITEM
- create a PLAYER_CONSUME_THE_EI activator
- add the commands

(config format)
commands:
- score variables modification player INFINITE-STAMINA 1 %player%
- DELAY 60
- score variables modification player INFINITE-STAMINA -1 %player%

===============================================================================

HOW TO IMPLEMENT STAMINA-REDUCING SYSTEMS
1) Create an Event file
- Create several activators that deals with actions (PLAYER_BLOCK_BREAK,
PLAYER_HIT_PLAYER, PLAYER_HIT_ENTITY, PLAYER_JUMP etc)
- FOR EACH ACTIVATOR, ADD THE COMMAND: 
  - score variables modification player STAMINA (amount) %player%
- TO MAKE STAMINA CONSUMPTION VARY DEPENDING ON THE MATERIAL OF THE TOOL USED,
 CREATE MORE SIMILAR ACTIVATORS BUT THE MATEIRAL IN "if has item" PLAYER CONDITION 
 WILL BE DIFFERENT FOR EACH ITEM/MATERIAL/TOOL

- FOR EACH ACTIVATOR, ADD THIS PLACEHOLDER CONDITION SO THE "INFINITE STAMINA"
BUFF WOULD WORK:
- Create a placeholder condition
  - type: PLAYER_NUMBER
  - part1: %score_variables_INFINITE-STAMINA%
  - comparator: EQUALS
  - part2: 0

- FOR MOVEMENT-RELATED STAMINA-REDUCING ACTIONS SUCH AS SPRINTING AND SWIMMING:
- Create a LOOP activator
- Add this command:
  - score variables modification player STAMINA (amount) %player%
- Go to player conditions and enable the appropriate conditions that checks for
the correct action (Ex: To check for swimming, enable if swimmong player condition)

FINALLY, TO MAKE THE STAMINA REGENERATION STOP WHILE DOING ACTIONS, USE EECOOLDOWN
https://docs.ssomar.com/tools-for-all-plugins-score/custom-commands/player-and-target-commands#eecooldown
TO MAKE THE LOOP ACTIVATOR RESPONSIBLE FOR STAMINA REGEN TO NOT EXECUTE.

===============================================================================

HOW TO APPLY DEBUFFS IF THE PLAYER IS BELOW A SPECIFIC STAMINA BAR:
1) Create an Event File
2) Create a LOOP activator
3) Use placeholder conditions (Refer to how stamina is checked in the top part of the 
guide

[!] SAMPLE GUIDE ON HOW TO CREATE A PLACEHOLDER CONDITION THAT CHECKS IF THE 
PLAYER IS AT 30% STAMINA

  - type: PLAYER_PLAYER
  - part1: %math_({score_variables_MAX-STAMINA}+{score_variables_BONUS-STAMINA})*0.3%
  - comparator: INFERIOR_OR_EQUALS
  - part2: %math_({score_variables_MAX-STAMINA}+{score_variables_BONUS-STAMINA})%
  
4) Add effect give commands (minecraft:effect give %player% slowness 1 2 true)
PreviousQuestion | GuidesNextFrequently Asked Questions

Last updated 9 months ago

🤖