Paste #41757: Untitled Paste

Date: 2017/05/09 17:33:22 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


FurnaceBlock:
  type: world
  debug: true
  events:
    on player right clicks with i@lightninghilt:
    - inventory open d:in@ancientrapierrecipe
    on item recipe formed:
    - if <context.item.contains_any[iron|blaze]> {
      - foreach <context.recipe.as_list> {
        - if <def[value].contains_any[ancientingot|lightninghilt]> {
          - determine cancelled
          }
        }
      }



    on furnace burns item:
    - if <context.location.inventory.contains[i@quartz]> {
      - DETERMINE CANCELLED
      }
    on furnace smelts item:
    - if <context.source_item.contains[quartz]||false> && <context.result_item.contains_any[i@ancientingot|i@nextcustomitem]||false> {
      - DETERMINE CANCELLED
      }
    on player damages entity:
    - if <player.item_in_hand.contains[ancientrapier]> && <util.random.int[1].to[20]> == 1 {
      - strike no_damage <context.entity.location>
      - burn <context.entity>
      - determine <context.damage.add[1]>
      } 

ancientrapierrecipe:
    type: inventory
    inventory: WORKBENCH
    slots:
      - "[] [] [i@ancientingot]"
      - "[] [] [i@ancientingot]"
      - "[] [] [i@lightninghilt]"

ancientrapier:
  type: item
  material: i@DIAMOND_SWORD
  display name: '<&6>Ancient Rapier'
  lore:
  - Runes along the blade, the hilt embedded with gems and wrapped in what seems like little sparks.
  - Made by the craftmanship of an ancient forge spell.
  enchantments:
  - KNOCKBACK:1
  - LOOT_BONUS_MOBS:1
  - DAMAGE_ALL:1
  - DAMAGE_UNDEAD:2
  - DURABILITY:3
  recipe:
  - i@air|i@ancientingot|i@air
  - i@air|i@ancientingot|i@air
  - i@air|i@lightninghilt|i@air
  no_id: false
  bound: false

lightninghilt:
  type: item
  material: i@blaze_rod
  display name: 'Rusty Hilt'
  lore:
  - Are those tiny diamonds or sparks on this hilt?
  - Right click for the recipe.
  no_id: false
  bound: false

ancientshard:
  type: item
  material: i@quartz
  debug: false
  display name: 'Magic Shard'
  lore:
  - A magic, with runes embedded shard.
  - Need other parts like a hilt, string to create something new from.
  no_id: false
  bound: false


ancientingot:
  type: item
  material: i@iron_ingot
  debug: false
  display name: 'Magic Ingot'
  lore:
  - The ingot feels blazing hot, even when submerged in water yet as strong as diamond.
  - Need other parts like a hilt, string to create something new from.
  furnace_recipe: i@ancientshard 
  no_id: false
  bound: false