Paste #43886: spacebulls... the ramming machines from space

Date: 2017/08/28 21:35:06 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


"bullmount":
  type: world
  debug: false
  events:
    on player chats:
    - if <context.message.contains[summon_bull]> == true && <player.flag[bullmount]||false> == true {
      - execute as_op "npc create bullwinkle --type cow --trait controllable --at '<player.location.add[3,70,0].formatted.citizens>'"
      - execute as_op "npc assign --set bullwinkle"
      }
"bullwinkle":
  type: assignment
  debug: false
  interact scripts:
  - 1 bullwinkle_despawn
  actions:
    on assignment:
    - flag npc rider:->:<player>
    - flag npc mobprox_range:2
    - 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
    - wait 1t
    - adjust <npc> speed:100
    on mob move proximity:
    - if <npc.location.facing[<context.entity>].degrees[180]> && <npc.velocity.vector_length> > 0.1 {
      - shoot <context.entity> destination:<npc.location.add[<npc.location.direction.vector.mul[200]>]||false> 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>
            }