- fixed `displayname of activemob` expression
- added `set display of [activemob] %activemob% to %string%` - change the displayname of the activemob
- set java target back to 16 for compatibility
- fixed possible NPE's in MythicItem expressions
- new class:
- mythicplayer
- compiled with Skript 2.8.2
- new conditions:
- %itemstack% is a mythicitem
- new expressions:
- [create ]itemstack for mythicitem [named ]%string%
- [get ]mythicitem [for ]name %string%
- [get ]itemstack for %mythicitem%
- new event value for mythicmob lootdrop event:
- event-lootbag
Update 11.5.2021 V0.99e added mythicitem class. added new expression 'itemstack of mythicitem "name"'
Example (#itemstack of mythicitem %string%)
Update 6.3.2021 v0.99d added drop skriptfunction. new class dropdata, new effects and expressions for dropmeta
Update 28.2.2021 V0.99a updated readme. added not documented expressions and effects for lootbag class.
Update 28.2.2021 V0.99a updated readme. added not documented expressions for mythicmob mob-types and classes lootbag, mythicmob, skilldata
Added skriptspawncondition for MythicMobs RandomSpawners to work with MythicMobs SnapShot 2105 or greater.
** Update 26.3.2017 v0.82a
Conditions:
// activemob %activemob% has immunitytable // Test if activemob has immunitytable enabled
Effects:
// set display of [activemob] %activemob% to %string% // change the displayname
// set damage of activemob %activemob% to %number% // change the attackdamage
// set knockbackresist of activemob %activemob% to %number% // Change Knockback resist
// set armor of activemob %activemob% to %number% // Change armor stats (only >1.9)
// set attackspeed of activemob %activemob% to %number% // Change attackspeed (only >1.9)
// set followrange of activemob %activemob% to %number% // Change follow range
// set speed of activemob %activemob% to %number% // Change movement speed
// trigger %string% for activemob %activemob% // trigger %string% for activemob %activemob% with triggerentity %entity% // Trigger activemob for trigger defined in %string% // Valid triggers are: DEFAULT, ATTACK, BOW_HIT, BLOCK, COMBAT, CROUCH, UNCROUCH, DAMAGED, DROPCOMBAT, DEATH, ENTERCOMBAT, EXPLODE, INTERACT, KILL, KILLPLAYER, PLAYERDEATH, SHOOT, SIGNAL, SPAWN, SPLASH_POTION, SWING, TARGETCHANGE, TELEPORT, TIMER, USE, READY
skript part:
on damage of entity:
victim instanceof activemob
event-entity is arrow
set {_am} to activemob of victim
trigger "bow_hit" for activemob {_am} with triggerentity attacker
Mob.yml:
Monkey:
Type: zombie
Display: "MythicMobs Monkey"
Health: 40
Armor: 10
Skills:
- message{msg="Ouch! Stop shooting arrows at me!"} @trigger ~onBowHit 1
skript syntax: function skript_function_name(data: skilldata, [location: location], [entity: entity]) :: boolean:
Depending on the targeter of the skill there is either a location, an entity ore none of both. The skilldata is required. It represents the metadatas of the skill. Possible fields to get are: caster, cause, trigger,
entitytargets, locationtargets, origin, executeafterdeath and the power of the skill. The target lists holding the whole targets of the targeter used by the skill, while the location/entity field of the function itself,
holds the current target.
Return type is a boolean which indicates if the skript executed properly.
Example:
# MythicMob yml:
SpamMonkey:
Type: Zombie
Skills:
- skriptfunction{name=example_skill} @selflocation ~onSpawn
# Skript part:
function example_skill(skilldata: SKILLDATA, location: location, entity: entity) :: boolean:
broadcast "targetlocation: %{_location}%"
broadcast "targetentity: %{_entity}%"
set {_caster} to caster of {_skilldata}
set {_cause} to cause of {_skilldata}
set {_trigger} to trigger of {_skilldata}
set {_entities::*} to entitytargets of {_skilldata}
set {_locations::*} to locationtargets of {_skilldata}
set {_origin} to origin of {_skilldata}
set {_afterdeath} to executeafterdeath of {_skilldata}
set {_power} to power of {_skilldata}
broadcast "%{_caster}% :: %{_cause}% :: %{_trigger}% :: %{_entities::*}% :: %{_locations::*}% :: %{_origin}% :: %{_afterdeath}% :: %{_power}%"
return true
fucntion skript_function_name(caster: entity, target: location) :: boolean: to compare entity with a location
Depending on the function paramters, its an entity, location, entity/entity compare, location/location compare or entity/location compare condition. The return type is required to be a boolean.
Example:
# MythicMob yml:
SpamMonkey:
Type: zombie
Display: SkMonkey
Skills:
- skill{s=skript_skillcondition_example} @trigger ~onInteract
- skill{s=skript_skillcondition_example} @triggerlocation ~onDamaged
skript_skillcondition_example:
Conditions:
- skfunction{name=example_skill_condition}
TargetConditions:
- skfunction{name=example_skill_condition}
- skfunction{name=compare_skill_condition}
- skfunction{name=compare_location_condition}
Skills:
- message{msg="example_skill_condition is true"} @world
# Skript part:
function example_targeter(skilldata: skilldata) :: locations:
set {_location} to location of caster of {_skilldata}
set {_location} to location of caster of {_skilldata}
set {_location} to location of caster of {_skilldata}
set {_location} to location of caster of {_skilldata}
return {_t::*}
function example_skill(skilldata: SKILLDATA, location: location, entity: entity) :: boolean:
set {_caster} to caster of {_skilldata}
set {_cause} to cause of {_skilldata}
set {_trigger} to trigger of {_skilldata}
set {_entities::*} to entitytargets of {_skilldata}
set {_locations::*} to locationtargets of {_skilldata}
set {_origin} to origin of {_skilldata}
set {_afterdeath} to executeafterdeath of {_skilldata}
set {_power} to power of {_skilldata}
broadcast "%{_caster}% :: %{_cause}% :: %{_trigger}% :: %{_entities::*}% :: %{_locations::*}% :: %{_origin}% :: %{_afterdeath}% :: %{_power}%"
return true
function example_skill_condition(entity: entity) :: boolean:
broadcast "entity: %{_entity}%"
return true
function compare_skill_condition(caster: entity, target: entity) :: boolean:
broadcast "caster: %{_caster}% :: target: %{_target}%"
return true
function compare_location_condition(caster: location, target: location) :: boolean:
broadcast "caster's location: %{_caster}% :: target's location: %{_target}%"
return true
depending on the return type of the function its either a entity targeter or a location targeter. returns a list of targets
The skilldata parameter is required. See skilldata class and skilldata expressions for information how to get data out of the skilldata object. the return type has to be a list of entities or a list of locations, or an empty list if no targets found.
Example:
# MythicMobs part:
SpamMonkey:
Type: zombie
Display: SkMonkey
Skills:
- skill{s=skript_targeter_example_skill} @skfunction{name=example_targeter} ~onDamaged
skript_targeter_example_skill:
Skills:
- setblock{material=STONE}
# Skript part:
function example_targeter(skilldata: skilldata) :: locations:
set {_source} to block at location of caster of {_skilldata}
set {_trigger} to block at location of trigger of {_skilldata}
loop blocks between {_source} and {_trigger}:
add location of loop-block to {_t::*}
return {_t::*}
depending on the return type of the function its either an itemstack a string. returns a list of drops.
The dropdata parameter is required. See dropdata class and dropdata expressions for information how to get data out of the object. the return type has to be a list of itemstacks or a list of strings, or an empty list if nothing matches.
Example:
on mythicmob lootdrop event:
set physical loot for event-lootbag to {_items::*}
add "exp 1000" to {_items::*}
add "money 666" to {_items::*}
set other loot for event-lootbag to {_items::*}
The example above clears all physical drops, and change the other drops to receive xp 1000 and money 666. this depends on the supported drop types.
While this example would set the physical loot to the same itemstack list:
on mythicmob lootdrop event:
set {_items::*} to physical drops of event-lootbag
set {_others::*} to other drops of event-lootbag
# go ahead and change or modify both lists to your wish
# when you finishd change the lootbag
set physical loot for event-lootbag to {_items::*}
set other loot for event-lootbag to {_others::*}
Example:
on mythicmob deathevent:
send "You killed a MythicMob!" to event-killer
if displayname of activemob event-activemob is "Super Zombie":
loop all items of mobdrop event-mobdrop:
if "%loop-mobitem%" contains "<do_not_drop>":
remove mobitem loop-mobitem from mobdrop event-mobdrop
Example:
on mythicspawner spawnevent:
broadcast "a %displayname of activemob event-activemob% just spawned at %location of activemob event-activemob%"
Example:
MythicMob mob.yml:
skriptmonkey:
Type: pig
Display: 'a Skriptmonkey Pig'
Skills:
- skriptskill{skill=msg;args="Hallo wie gehts, <target.name>?"} @trigger ~onInteract 1
Skript part:
on mythicmobs skriptskillevent:
if skill-name is "msg":
if skill-targettype is "ENTITY":
skill-target is a player
send skill-args to skill-target
condition-meet = if the condition is meet or not (you must set this by yourself) standard = true (changed from false to true in update in 0.83a)
Example:
For Skill condition:
skskill:
Conditions:
- skriptcondition{c=weather;args=clear}
Coolddown: 1
Skills:
- message{msg="Nice weather today! Isnt it, <target.name>?"}
For TargetConditions:
skskill:
TargetConditions:
- skripttargetcondition{c=weather;args=clear}
Coolddown: 1
Skills:
- message{msg="Nice weather today! Isnt it, <target.name>?"}
For RandomSpawner condition:
RandomMonkey:
Mobname: Monkey1
Worlds: world
Chance: 1
Priority: 1
Action: replace
Conditions:
- skriptspawncondition{c=region;args=test}
!!!!SKRIPTSPAWNCONDITION ONLY WORK ON MYTHICMOBS SNAPSHOT 2105 OR LATER!!!!
Skript part:
on mythicmobs skriptconditionevent:
if condition-location is set:
if "%condition-name%" is "region":
set condition meet to false
set {_mobtypes::*} to condition-args split at ","
set {_regionname} to {_mobtypes::1}
delete {_mobtypes::1}
# make a list of all arguments
set {_region::*} to regions at condition-location
loop {_region::*}:
if "%loop-value%" contains {_regionname}:
set condition meet to true
stop
if condition-name is "weather":
if condition-args is "clear":
if weather in world of condition-entity is clear:
set condition meet to true
else:
set condition meet to false
Example:
on damage of player:
if attacker instanceof activemob:
set {_am} to activemob of attacker
Example:
on damage of player:
if attacker instanceof activemob:
set {_am} to activemob of attacker
if activemob {_am} has threattable:
dropcombat for activemob {_am}
Example:
on activemob spawnevent:
if activemob event-activemob has mythicspawner:
set {_mythicspawner} to mythicspawner of event-activemob
True if the ActiveMob is attached to the MythicSpawner
- for all living entities including players.
- if you use a player the mythicmobs type need to be persistent true! and you have to handle world changing and deaths otherwise mythicmobs will crash.
- Get a MythicMobs targeter to filter entities/locations for any entity.
- %string% is any valid mythicmmobs targeter used in the mythicmobs targeter format.
- set {_targeter} to mythicmobs targeter "@PIR{r=30}"
- will set the targeter to pir with radius 30
- set {_targeter} to mythicmobs targeter "@PIR{r=30}"
- set {_targets::*} to targetentities of event-entity for targeter {_targeter}
- first set the {_targeter} to @pir{r=30} and then filter all players for entity event-entitiy with targeter {_targeter}
- set {_targeter} to mythicmobs targeter "@Ring{radius=10;points=5}"
- set {locations::*} to targetlocations of event-entity for targeter {_targeter}
- first set the {_targeter} to @Ring{radius=10;points=5} and then create a ring of locations for entity event-entitiy with targeter {_targeter}
Skript Example:
on right click on entity:
if event-entity instanceof activemob:
set {_am} to activemob of event-entity
set {_targeter} to mythicmobs targeter "@Ring{radius=10;points=5}"
if "%{_targeter}%" is "EntitySelector":
set {_targets::*} to targetentities of event-entity for targeter {_targeter}
broadcast "%{_targets::*}%"
else if "%{_targeter}%" is "LocationSelector":
set {_targets::*} to targetlocations of event-entity for targeter {_targeter}
broadcast "%{_targets::*}%"
Get the activemob instance of the entity: set {_am} to activemob of event-entity
Returns the location of the activemob: set {_loc} to location of {_am}
Returns the world of the ActiveMob: set {_world} to world of event-activemob
Get the entity instance of the ActiveMob: set {_entity} to entity of event-activemob
Get the ActiveMob by UUID. Return NULL if the entitiy is no ActiveMob.
Get all ActiveMobs on the whole server or, if a world is present in the expression, of the world:
Example:
on right click on entity:
set {_count} to 0
loop all activemobs in world "world":
broadcast "%displayname of activemob loop-activemob%"
add 1 to {_count}
broadcast "%{_count}%"
Returns the displayname as string of the ActiveMob, if it has one.
Returns the MythicMob MobType of the ActiveMob as string.
Returns the owner of the ActiveMob as entity, if there is a owner present.
Returns the owner uuid of the ActiveMob as string, if there is a owner present. This is for compatibility to bukkit ver below 1.12.
Get the entity instance of the entity which caused the last trigger on the activemob: set {_lastaggro} to lastaggro of {_am}
Get the entity instance of the activemobs target, or the topthreatholder if the activemob has a threadtable: set {_target} to toptarget of {_am}
Returns a list with all entities of the activemobs threattable
Returns the threat value as number for entity out of activemobs threattable NOTE: entity have to be a threat of activemob
Returns a string with the uuid of the activemob: set {_uuid} to uuid of {_am}
Returns a number with the amount of health the activemob actually has left: set {_health} to health of {_am}
Returns a number with the max health of the activemob.
%string% can be every YAML node of the mobs yml config. Returns the string of the %string% yml node of the activemob: set {_mobtype} to mlc {_node} of {_am}
Returns the faction name the activemob is in: set {_faction} to faction of {_am}
Returns the stance of the activemob, if it has one: set {_stance} to stance of {_am}
Returns the level of the activemob: set {_lvl} to level of {_am}
Returns the playerkills of the activemob: set {_kills} to playerkills of {_am}
Returns the lastest signal of the activemob, if there is one: set {_signal} to lastsignal of {_am}
Returns the MythicSpawner instance of the activemob, if it have one: set {_ms} to mythicspawner of {_am}
Returns the Location of the MythicSpawner.
Returns the world of the MythicSpawner.
Returns all MythicSpawners in the world %string% or if if used without world condition returns all MythicSpawners on the Server.
Returns all the ActiveMobs of the MythicSpawner
Retruns the MythicMob mobtype name of the MythicSpawner as string.
Returns the Level of the Spawner as Number
Returns the cooldown or the cooldown timer of the MythicSpawner. Both values are numbers in seconds.
Returns the cooldown or the cooldown timer of the MythicSpawner. Both values are numbers in seconds.
number of activemobs from mythicspawner %mythicspawner% || number of maxmobs from mythicspawner %mythicspawner%
Returns the number of spawned mobs or the number of MaxMobs that can be spawned.
Gets you the MythicMob Drops from the MythicMobDeathEvent. Only works in the mythicmob deathevent!
Returns all physical items of the lootbag as a itemstack array.
Returns all other drops of the lootbag as a string array.
Creates and returns an itemstack for the mythicitem with the name string.
set {_item} to itemstack of mythicitem "mythicitem"
Returns a mythicitem object for the given name or null with not found.
Get the caster as entity.
Get the cause as string
Get a list of all entities if a multitarget targeter is used.
Get a list of all locations if a multitarget targeter is used.
returns a boolean if it should be executed after casters death. Not avail for all MythicMobs Versions.
Get the origin location.
Get power of the skill as float.
Get the trigger of the mechanic as entity.
Get the caster as entity.
Get the dropper as entity.
Get the cause as entity.
Get the trigger as entity.
Get the amount as number.
Get the generation amount as number.
make player %entity% cast skill %string% with trigger %entity% at entity %entity% with delay %number% and repeat %number%
make player %entity% cast skill %string% with trigger %entity% at location %location% with delay %number% and repeat %number%
make player %entity% cast skill %string% with trigger %entity% at self with delay %number% and repeat %number%
Example:
#Skriptpart:
on left click:
if player's tool is a sword:
target is set
cancel event
make player player cast skill "Damage" with trigger player at entity target with delay 0 and repeat 0
else if player's tool is dirt:
cancel event
make player player cast skill "Heal" with trigger player at self with delay 10 and repeat 20
#MythicMob skill part:
Heal:
Skills:
- effect:particles{particle=heart;amount=8;vSpread=0.5;hSpread=0.5;Spped=0.01;yoffset=1} @self
- heal{a=2;overheal=false} @self
Damage:
TargetConditions:
- lineofsight true
- distance{d=<10} true
- distance{d=>3} true
Skills:
- effect:particleline{particle=lava;amount=20;vSpread=0.10;hSpread=0.10;Speed=0.2;yoffset=1;ystartoffset=0;distancebetween=1} @target
- damage @target
- make every mythicmobs into a common bukkit entity. including players.
Spawns a MythicMob with mobtype %string% at the given location in the given world. World object can be string or world. Returns the ActiveMob instance of the spawned MythicMob. Mobtype string is case sensitive!
Example:
on right click:
event-block is dirt
set {_loc} to location of event-block
set {_world} to "%world of event-block%"
set {_mobtype} to "disguisedummy"
set {_am} to spawn mythicmob {_mobtype} at location {_loc} in world {_world}
if "%{_am}%" is "<none>":
send "Something went wrong! Maybe the Mobtype does not exist?" to player
else:
send "You just spawned a MythicMob named %displayname of activemob {_am}%!" to player
Set the health of the ActiveMob. Amount of 1 = 1/2 heart
Set the max possible health the ActiveMob can have. 1 = 1/2 heart
Set the LastAggroEntity to a new entity: set lastaggro of {_am} to event-entity
Clears the target, the threattable & calls the dropcombat trigger (if threattable is enabled) for the activemob: dropcombat for {_am}
Gives the ActiveMob a new valid target. Must be an entity: set attacker to new target of {_am}
Set the MythicMobs Faction Tag for the ActiveMob: set faction of event-activemob to "Orcs"
Change the stance of the ActiveMob: set stance of event-activemob to "fight"
Change the level of the ActiveMob: set level of {_am} to 10
Change the owner of the ActiveMob eighter by %entity% or by UUID in String format.
Set the playerkills of the activemob to a new amount:
Example:
if event-entity instanceof activemob:
set {_am} to activemob of event-entity
set {_pks} to playerkills of activemob {_am}
add 1 to {_pks}
set kills of activemob {_am} to {_pks}
Use this effect to send the signal %string% to the %activemob% with the trigger %entity%
Use this effect to remove the ActiveMob.
Use this effect to make an activemob cast a skill.
Returns a list with all entities of the activemobs threattable.
Returns the value as number of threat from entity out of activemobs threattable NOTE: entity have to be a threat of activemob
Increases (inc) or decreases (dec) the threat by amount of the entity from activemobs threattable.
Remove the entity from activemobs threattable.
This clear the complete threattable of the activemob.
Change the attackdamage
Change Knockback resist
Change armor stats (only >1.9)
Change attackspeed (only >1.9)
Change follow range
Change movement speed
Trigger activemob for trigger defined in %string% Valid triggers are: DEFAULT, ATTACK, BOW_HIT, BLOCK, COMBAT, CROUCH, UNCROUCH, DAMAGED, DROPCOMBAT, DEATH, ENTERCOMBAT, EXPLODE, INTERACT, KILL, KILLPLAYER, PLAYERDEATH, SHOOT, SIGNAL, SPAWN, SPLASH_POTION, SWING, TARGETCHANGE, TELEPORT, TIMER, USE, READY
skript part:
on damage of entity:
victim instanceof activemob
event-entity is arrow
set {_am} to activemob of victim
trigger "bow_hit" for activemob {_am} with triggerentity attacker
Mob.yml:
Monkey:
Type: zombie
Display: "MythicMobs Monkey"
Health: 40
Armor: 10
Skills:
- message{msg="Ouch! Stop shooting arrows at me!"} @trigger ~onBowHit 1
Activates or deaktivates a MythicSpawner.
set cooldown of mythicspawner %mythicspawner% to %number% || set remainingcooldown of mythicspawner %mythicspawner% to %number%
Set the cooldown or the remaining cooldown of the MythicMobSpawner in seconds.
set warmup of mythicspawner %mythicspawner% to %number% || set remainingwarmup of mythicspawner %mythicspawner% to %number%
Set the warumup or the remaining warmup of the MythicMobspawner in seconds.
Change the Mobtype of the MythicSpawner. Where %string% is a valid MythicMob.
Change to moblevel of the MythicSpawner.
Activates the MythicSpawner.
Register the given ActiveMob to the MythicSpawner.
Replace the itemstack of the defined lootbag. Valid input is an itemstack or an itemstack array. See other loot for examples.
Replace the none physical items of an lootbag. valid input is a string or a string array.
Example:
on mythicmob lootdrop event:
set physical loot for event-lootbag to {_items::*}
add "exp 1000" to {_items::*}
add "money 666" to {_items::*}
set other loot for event-lootbag to {_items::*}
The example above clears all physical drops, and change the other drops to receive xp 1000 and money 666. this depends on the supported drop types.
While this example would set the physical loot to the same itemstack list:
on mythicmob lootdrop event:
set {_items::*} to physical drops of event-lootbag
set {_others::*} to other drops of event-lootbag
# go ahead and change or modify both lists to your wish
# when you finishd change the lootbag
set physical loot for event-lootbag to {_items::*}
set other loot for event-lootbag to {_others::*}
Remove the given mobitem from the mobdrop or clears the mobdrop completely.
Change the materialtype of the given mobitem into a new Materialtype. %string% have to be a valid Bukkit Material.
Example:
on mythicmob deathevent:
loop all items of mobdrop event-mobdrop:
if "%loop-mobitem%" contains "STONE":
set material of mobitem loop-mobitem to "GRASS"
if "%loop-mobitem%" contains "DIRT":
remove mobitem loop-mobitem from mobdrop event-mobdrop
Add a new item to the mobdrop of the mythicmob deathevent.
Example:
on mythicmob deathevent:
clear mobdrop event-mobdrop
set {_item} to diamond sword named "Godsword"
add item {_item} to mobdrop event-mobdrop