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 138
    • Issues 138
    • 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

Last edited by Amy Apr 28, 2024
Page history

Limited Use Skills

Difficulty: Intermediate

There may be times when you want your skills to only be used a certain ammount of times, maybe you have a Zombie that can shoot 7 fireballs, in this guide we'll be doing just that!

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.

Specific Uses

This example will add to a variable, but once it reaches 7 the skill will stop working.

FireballSkill:
  Conditions:
  - variableequals{var=caster.fireballs;val=7} false
  Skills:
  - setvariable{var=caster.fireballs;val=<caster.var.fireballs|0>+1}
  - <Your skills mechanics go here>

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 does not exist at all via variable fallbacks, then we run our mechanics as we normally would.

Our skill has the VariableEquals condition set which means that once the variable reaches 7, the condition will prevent the skill from running.

If you would like to reset the counter you can simply using the VariableUnset mechanic.

Skills:
- variableunset{var=caster.fireballs}
Clone repository
Home
Changelogs
Premium Features
Commands and Permissions
Mythic Add-ons
Compatible Plugins
API Information
Config Files

Guides
  • Troubleshooting
  • FAQ / Common Issues
  • Examples
Packs

MythicScribe MythicScribe - VSCode Extension

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
    • Mechanics by Tag
  • 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

Other
  • Particles Types
  • Audience
  • Equipment Slots
  • Pins
Technical
  • Math
  • Item Matcher
  • Operations
    • Attribute Operations
    • Stats Modifiers
  • SkillTree
  • Advanced User Guides and Techniques