"bullmount":
type: world
debug: false
events:
on player chats:
- if <context.message.contains[summon_bull]> == true && <player.flag[bullmount]> == true {
- execute as_server "npc create bullwinkle --type cow --trait controllable --at '<player.location.add[3,70,0].formatted.citizens>'"
- execute as_server "npc assign --set bullwinkle"
- execute as_server "npc owner <player.name>"
- determine cancelled
"bullwinkle":
type: assignment
debug: false
interact scripts:
- 1 bullwinkle_despawn
actions:
on assignment:
- flag npc rider:->:<player>
- flag npc mobprox_range:5
- flag npc mobprox_timer:1
- trait mobprox
- flag player mount:->:<npc.id>
- trigger name:click state:true
- trigger name:chat state:true
- trigger name:proximity state:true
on mob move proximity:
- define found <npc.location.find.living_entities.within[2].exclude[<npc.flag[rider]>].exclude[<npc>].get[1]>
- if <npc.location.facing[%found%].degrees[40]> && <npc.velocity.vector_length> > 0.1 && <%found%.size> > 0 {
- shoot %found% destination:<npc.location.add[<npc.location.direction.vector.mul[200]>]> height:35
}
"bullwinkle_despawn":
type: interact
debug: false
steps:
"1":
proximity trigger:
exit:
script:
- ^if <player> == <npc.owner> {
- ^flag player mount:<-:<npc.id>
- flag npc rider:<-:<player>
- fly <npc> origin:<npc.location> destination:<player.location.add[3,300,0]> speed:1.0
- wait 10
- remove <npc>
}