HyperScript
Docs

← All of the Docs HyperMobs

Items, signals and being hurt HyperMobs

effectgive mythic item <name> to <who>HyperMobs

Give one of the items MythicMobs has under that name. What does not fit is dropped at their feet. The console says so if there is no such item

give mythic item "KingsCrown" to arg.1
effectgive <n> of mythic item <name> to <who>HyperMobs

The same, that many

give 3 of mythic item "HealingDraught" to arg.1
effectdrop mythic item <name> at <location>HyperMobs

Put one on the ground there

drop mythic item "KingsCrown" at {_location}
expressionall mythic itemsHyperMobs

The names of every item MythicMobs has

send "&7MythicMobs has %size of all mythic items% items."
expressionmythic mobs within <n> blocks of <location>HyperMobs

The mythic mobs that near a place, as creatures, the nearest first: for signal mythic mob, mythic mob type of, or anything HyperScript does with a creature

for each {_mob} in mythic mobs within 30 blocks of player's location:
    signal mythic mob {_mob} with "rally"
expressionmythic item exists <name>HyperMobs

True if MythicMobs has an item of that name

if mythic item exists "KingsCrown":
    give mythic item "KingsCrown" to arg.1
    give 3 of mythic item "HealingDraught" to arg.1
expressionsignal mythic mob <entity> with <text>HyperMobs

Send a mythic mob a signal, which its own skills can wait for with ~onSignal:<text>

signal mythic mob {_mob} with "rally"
structureon mythic mob damage "<name>":HyperMobs

Runs when a mythic mob of that type is hurt. {_damage} is how much, {_cause} what did it, and {_mob}, {_type}, {_level} and {_location} are as in the other events. player is who hurt it, if a player did, also with an arrow. Without a name it runs for every mythic mob

on mythic mob damage "SkeletonKing":
    send action bar "&c-%{_damage}% &7to the king" to player
    if {_damage} > 10:
        signal mythic mob {_mob} with "enrage"
Guide and examples
command /crown <target:player>:
    permission: "mythic.give"
    trigger:
        if mythic item exists "KingsCrown":
            give mythic item "KingsCrown" to arg.1
            give 3 of mythic item "HealingDraught" to arg.1
        else:
            send "&cMythicMobs has no item called KingsCrown."

on mythic mob damage "SkeletonKing":
    send action bar "&c-%{_damage}% &7to the king" to player
    if {_damage} > 10:
        signal mythic mob {_mob} with "enrage"

on mythic mob damage:
    add {_damage} to {%player%.mythic_damage}

on mythic mob death "SkeletonKing":
    drop mythic item "KingsCrown" at {_location}

command /rally:
    permission: "mythic.give"
    trigger:
        for each {_mob} in mythic mobs within 30 blocks of player's location:
            signal mythic mob {_mob} with "rally"
        send "&7MythicMobs has %size of all mythic items% items."
SyntaxEffect
give mythic item <name> to <who>Give one of the items MythicMobs has under that name. What does not fit is dropped at their feet. The console says so if there is no such item
give <n> of mythic item <name> to <who>The same, that many
drop mythic item <name> at <location>Put one on the ground there
all mythic itemsThe names of every item MythicMobs has
mythic mobs within <n> blocks of <location>The mythic mobs that near a place, as creatures, the nearest first: for signal mythic mob, mythic mob type of, or anything HyperScript does with a creature
mythic item exists <name>True if MythicMobs has an item of that name
signal mythic mob <entity> with <text>Send a mythic mob a signal, which its own skills can wait for with ~onSignal:<text>
on mythic mob damage "<name>":Runs when a mythic mob of that type is hurt. {_damage} is how much, {_cause} what did it, and {_mob}, {_type}, {_level} and {_location} are as in the other events. player is who hurt it, if a player did, also with an arrow. Without a name it runs for every mythic mob
  • on mythic mob damage: runs for every hit on every mythic mob, so keep what is in it short.