Paste #7175: Untitled Paste

Date: 2014/07/19 19:38:28 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


copper_bullet:
    type: item
    material: arrow[quantity=8]
    display name: "<&f>Copper Bullets"
    recipe:
    - i@air|i@air|i@air
    - i@air|i@336|i@336|
    - i@air|i@air|i@air

bronze_bullet:
    type: item
    material: arrow[quantity=8]
    display name: "<&2>Bronze Bullets"
    lore:
    - <&e>Requires level X
    recipe:
    - i@air|i@air|i@air
    - i@air|i@266|i@266|
    - i@air|i@air|i@air

iron_bullet:
    type: item
    material: arrow[quantity=8]
    display name: "<&3>Iron Bullets"
    lore:
    - <&e>Requires level X
    recipe:
    - i@air|i@air|i@air
    - i@air|i@265|i@265
    - i@air|i@air|i@air

mithril_bullet:
    type: item
    material: arrow[quantity=8]
    display name: "<&d>Mithril Bullets"
    lore:
    - <&e>Requires level X
    recipe:
    - i@air|i@air|i@air
    - i@air|i@351:4|i@351:4
    - i@air|i@air|i@air

titanium_bullet:
    type: item
    material: arrow[quantity=8]
    display name: "<&6>Titanium Bullets"
    lore:
    - <&e>Requires level X
    recipe:
    - i@air|i@air|i@air
    - i@air|i@264|i@264
    - i@air|i@air|i@air

flameI_bullet:
    type: item
    material: arrow[quantity=8]
    display name: "<&4>Ruby Bullets"
    lore:
    - <&e>Requires level X
    - <&e>careful where you aim.
    recipe:
    - i@air|i@air|i@air
    - i@262|i@262|i@331
    - i@air|i@air|i@air

repeating_arrow:
    type: item
    material: arrow
    display name: "<&9>Repeating Arrow"
    lore:
    - <&a>careful where you aim.
    recipe:
    - i@air|i@air|i@arrow
    - i@arrow|i@arrow|i@arrow
    - i@air|i@air|i@arrow


Player_Shoots_Gun:
    type: world
    debug: false
    events:
        on player shoots bow:
        - define item <player.inventory.slot[<player.inventory.find.material[arrow]>]>
        - adjust %item% quantity:1 save:myitem
        - if <entry[myitem].result> == i@copper_bullet {
          - flag player arrowtype:copper_bullet
          - shoot snowball| o:<player> gravity:0 speed:4 spread:0
          - take <entry[myitem].result> qty:1
          - playsound sound:explode <player.location>  volume:1.0 pitch:1.5
          - determine cancelled
          }
          else if <entry[myitem].result> == i@repeating_arrow {
          - flag player arrowtype:repeating_arrow
          - shoot snowball o:<player> gravity:0 speed:4 spread:0
          - take <entry[myitem].result> qty:0
          - playsound sound:explode <player.location>  volume:1.0 pitch:1.5
          - determine cancelled
          }
        on snowball damages entity:
        - if <context.damager> matches player {
          - if <context.damager.as_player.flag[arrowtype]> == copper_bullet {
            - foreach <context.entity.location.find.living_entities.within[0].exclude[<server.list_online_players>]> {
              - hurt <el@val[<util.random.int[<1>].to[<5>]>].sub[<%value%.location.distance[<context.location>]>]> %value%
              }
            }
          - if <context.damager.as_player.flag[arrowtype]> == bronze_bullet {
            - foreach <context.entity.location.find.living_entities.within[0].exclude[<server.list_online_players>]> {
              - hurt <el@val[<util.random.int[<3>].to[<7>]>].sub[<%value%.location.distance[<context.location>]>]> %value%
             }
            }
          - if <context.damager.as_player.flag[arrowtype]> == iron_bullet {
            - foreach <context.entity.location.find.living_entities.within[0].exclude[<server.list_online_players>]> {
              - hurt <el@val[<util.random.int[<5>].to[<10>]>].sub[<%value%.location.distance[<context.location>]>]> %value%
              }
            }
          - if <context.damager.as_player.flag[arrowtype]> == mithril_bullet {
            - foreach <context.entity.location.find.living_entities.within[0].exclude[<server.list_online_players>]> {
              - hurt <el@val[<util.random.int[<8>].to[<12>]>].sub[<%value%.location.distance[<context.location>]>]> %value%
              }
            }
          - if <context.damager.as_player.flag[arrowtype]> == titanium_bullet {
            - foreach <context.entity.location.find.living_entities.within[0].exclude[<server.list_online_players>]> {
              - hurt <el@val[<util.random.int[<12>].to[<25>]>].sub[<%value%.location.distance[<context.location>]>]> %value%
              }
            }

          - if <context.damager.as_player.flag[arrowtype]> == repeating_arrow {
            - cast slow duration:4s power:3 <context.entity.location.find.living_entities.within[0].exclude[<server.list_online_players>]>
            - playeffect def:<context.entity.location> flame visibility:100 qty:30 offset:2
            - explode %1% power:1
            - foreach <context.entity.location.find.living_entities.within[1].exclude[<server.list_online_players>]> {
              - hurt <el@val[<util.random.int[<1>].to[<5>]>].sub[<%value%.location.distance[<context.location>]>]> %value%
              } 
            }

          - if <context.damager.as_player.flag[arrowtype]> == copper_arrow_renamethis {
            - cast slow duration:4s power:3 <context.entity.location.find.living_entities.within[0].exclude[<server.list_online_players>]>
            - playeffect def:<context.entity.location> Lava visibility:100 qty:50 offset:2
            - foreach <context.entity.location.find.living_entities.within[1].exclude[<server.list_online_players>]> {
              - hurt <el@val[<util.random.int[<1>].to[<5>]>].sub[<%value%.location.distance[<context.location>]>]> %value%
              }
            - random 6
            - run tnt_handler_internal
            - playsound def:<context.entity.location> sound:explode  volume:1.0 pitch:0.5
            - playsound def:<context.entity.location> sound:explode  volume:1.0 pitch:1
            - playsound def:<context.entity.location> sound:explode  volume:1.0 pitch:1.5
            - playsound def:<context.entity.location> sound:explode  volume:1.0 pitch:2
            - playsound def:<context.entity.location> sound:explode  volume:1.0 pitch:2.5
            }

          - if <context.damager.as_player.flag[arrowtype]> == iunno2 {
            - cast slow duration:4s power:3 <context.entity.location.find.living_entities.within[0].exclude[<server.list_online_players>]>
            - playeffect def:<context.entity.location> Random visibility:100 qty:300 offset:1
            - playeffect def:<context.entity.location> Random visibility:100 qty:300 offset:2
            - playeffect def:<context.entity.location> Random visibility:100 qty:300 offset:4
            - foreach <context.entity.location.find.living_entities.within[0].exclude[<server.list_online_players>]> {
              - hurt <el@val[<util.random.int[<1>].to[<5>]>].sub[<%value%.location.distance[<context.location>]>]> %value%
              }
            - random 6
            - run Potion_handler_internal
            - playsound def:<context.entity.location> sound:explode  volume:1.0 pitch:0.5
            - playsound def:<context.entity.location> sound:explode  volume:1.0 pitch:1
            - playsound def:<context.entity.location> sound:explode  volume:1.0 pitch:1.5
            - playsound def:<context.entity.location> sound:explode  volume:1.0 pitch:2
            - playsound def:<context.entity.location> sound:explode  volume:1.0 pitch:2.5
            }
          - flag <context.damager> arrowtype:!
          }
tnt_handler_internal:
    type: task
    speed: 2t
    script:
    - playeffect def:<context.entity.location> ANGRY_VILLAGER visibility:100 qty:5 offset:2
    - playeffect def:<context.entity.location> Large_Explode visibility:100 qty:10 offset:2
    - foreach <context.entity.location.find.living_entities.within[0].exclude[<server.list_online_players>]> {
      - hurt <el@val[<util.random.int[<10>].to[<20>]>].sub[<%value%.location.distance[<context.location>]>]> %value%
      }
Potion_handler_internal:
    type: task
    speed: 2t
    script:
    - cast ABSORPTION duration:4s power:3
    - playsound <player> LEVEL_UP 
    - playeffect ENDER_SIGNAL visibility:100 qty:2 offset:2