Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
MythicMobs MythicMobs
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 146
    • Issues 146
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • MythicCraft
  • MythicMobsMythicMobs
  • Wiki
    • Guides
  • Limited Use Skills

Limited Use Skills · Changes

Page history
Update Limited Use Skills authored Apr 28, 2024 by Lxlp's avatar Lxlp
Show whitespace changes
Inline Side-by-side
Showing with 3 additions and 6 deletions
+3 -6
  • Guides/Limited-Use-Skills.md Guides/Limited-Use-Skills.md +3 -6
  • No files found.
Guides/Limited-Use-Skills.md
View page @ ac7dc9a1
......@@ -4,20 +4,17 @@ There may be times when you want your skills to only be used a certain ammount o
We will be using variables to keep track of how many times a skill has been used, and once it reaches the total amount we want to use, the skill will stop working.
To keep things neat and compact we will be using [in-line conditions](/Skills/conditions/in-linetargetconditions), so if you don't know about those, go read up on them!
# Specific Uses
This example will add to a variable, but once it reaches 7 the skill will stop working.
```yaml
FireballSkill:
Conditions:
- variableequals{var=caster.fireballs;val="7"} false
- variableequals{var=caster.fireballs;val=7} false
Skills:
- setvariable{var=caster.fireballs;val="0"} ?!variableisset{var=caster.fireballs}
- setvariable{var=caster.fireballs;val=<caster.var.fireballs|0>+1}
- <Your skills mechanics go here>
- variableadd{var=caster.fireballs;a=1}
```
In this example, we are setting the variable when the skill first runs, and using an in-line condition to make sure the variable isn't already set, then we run our skills mechanics as we normally would, and once we get to the end of the skill, we increase the variable by 1.
In this example, we are adding a value of "1" to the variable each time the skill is run, setting it to 1 if the variable did not exist at all via [variable fallbacks](/Skills/Variables#variable-fallback), then we run our mechanics as we normally would
Our skill has the [VariableEquals](/skills/conditions/variableequals) condition set which means that once the variable reaches 7, the condition will prevent the skill from running.
......
Clone repository
Home
Changelogs
Premium Features
Commands and Permissions
FAQ / Common Issues
Guides
Troubleshooting
Mythic Add-ons
Compatible Plugins
API Information
Packs
  • Pins
Mobs
  • Mob Options
    • Display Options
  • Mob Levels
  • Mob Factions
  • Power Scaling
  • Damage Modifiers
  • Equipment
  • BossBar
  • Custom AI
  • Custom Kill Messages
  • Threat Tables
  • Immunity Tables
  • Templates
  • Vanilla Overrides
  • Extra: Disguises
  • Extra: ModelEngine
Skills
  • Mechanics
  • Targeters
    • Filters
  • Triggers
  • Conditions
    • In-line conditions
  • Metaskills
  • Placeholders
  • Variables
Items
  • Options
  • Attributes
  • Enchantments
  • Potions
  • Banner Layers
  • Firework
Drops & DropTables
  • Drops
  • DropTables
  • FancyDrops
Spawning
  • Spawners
  • Random Spawns
Stats
  • Custom Stat Options
  • Modifiers
  • Built in Stats
Technical
  • Math
  • Operations
    • Attribute Operations
    • Stats Modifiers
  • Particles Types
  • Audience
  • Equipment Slots
Examples
Useful Tips