... | @@ -112,7 +112,8 @@ EXAMPLE_MOB: |
... | @@ -112,7 +112,8 @@ EXAMPLE_MOB: |
|
```
|
|
```
|
|
|
|
|
|
#### ~onDeath
|
|
#### ~onDeath
|
|
Executes the skill when the mob dies. The entity that killed the mob is the `@trigger`.
|
|
Executes the skill when the mob dies. The entity that killed the mob is the `@trigger`.<br>
|
|
|
|
If the server is a Paper one, it is possible to cancel the death event as long as the cancelevent mechanic is synched. The health that the mob has after this is based on what is specified in the `ReviveHealth` Option.
|
|
```yml
|
|
```yml
|
|
EXAMPLE_MOB:
|
|
EXAMPLE_MOB:
|
|
Type: CHICKEN
|
|
Type: CHICKEN
|
... | @@ -121,7 +122,20 @@ EXAMPLE_MOB: |
... | @@ -121,7 +122,20 @@ EXAMPLE_MOB: |
|
# when the mob dies
|
|
# when the mob dies
|
|
- message{m=DEATH} @World ~onDeath
|
|
- message{m=DEATH} @World ~onDeath
|
|
```
|
|
```
|
|
|
|
```yaml
|
|
|
|
ImmortalCow:
|
|
|
|
Type: COW
|
|
|
|
Display: '&eImmortal Cow'
|
|
|
|
Health: 20
|
|
|
|
Options:
|
|
|
|
ReviveHealth: -1
|
|
|
|
Skills:
|
|
|
|
- skill{s=[
|
|
|
|
- cancelevent
|
|
|
|
- e:p{p=HEART;hs=0.5;vs=0.5;y=1.5}
|
|
|
|
- speak{m=Call an ambulance, but not for me!}
|
|
|
|
];sync=true} @self ~onDeath
|
|
|
|
```
|
|
#### ~onAttack
|
|
#### ~onAttack
|
|
Executes the skill when the mob attacks an entity.
|
|
Executes the skill when the mob attacks an entity.
|
|
The `@trigger` is the entity that took damage from the attack.
|
|
The `@trigger` is the entity that took damage from the attack.
|
... | @@ -389,14 +403,13 @@ WorldJumper: |
... | @@ -389,14 +403,13 @@ WorldJumper: |
|
|
|
|
|
#### ~onMilk
|
|
#### ~onMilk
|
|
Executes the skill when the cow is milked.
|
|
Executes the skill when the cow is milked.
|
|
```
|
|
```yaml
|
|
ANormalCow:
|
|
ANormalCow:
|
|
Type: Cow
|
|
Type: Cow
|
|
Skills:
|
|
Skills:
|
|
- skill{cd=2;s=[
|
|
- skill{s=[
|
|
- message{m="HOW DARE YOU?!?"} @trigger
|
|
- message{m="HOW DARE YOU?!?"} @trigger
|
|
- sound{s=entity.creeper.primed} @self
|
|
- sound{s=entity.creeper.primed}
|
|
- delay 30
|
|
- explosion{yield=5;delay=30}
|
|
- explosion{yield=5} @self
|
|
];cd=2} @self ~onMilk
|
|
]} @self ~onMilk
|
|
|
|
``` |
|
``` |
|
|
|
\ No newline at end of file |