Paste #46937: My script so far

Date: 2018/03/17 08:57:24 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


UncommonWoodSword:
    type: item
    material: i@wood_sword[nbt_attributes=li@generic.attackDamage/mainhand/0/1]
    display name: "<green>Uncommon Wooden Sword"
    lore:
    - "<gray> 1.6 Attack Speed"
    - "<gray> 4 Attack Damage"

RareWoodSword:
    type: item
    material: i@wood_sword[nbt_attributes=li@generic.attackDamage/mainhand/0/2|generic.maxHealth/mainhand/0/1]
    display name: "<blue>Rare Wooden Sword"
    lore:
    - "<gray> 1.6 Attack Speed"
    - "<gray> 4 Attack Damage"

EpicWoodSword:
    type: item
    material: i@wood_sword[nbt_attributes=li@generic.attackDamage/mainhand/0/3|generic.maxHealth/mainhand/0/2|generic.movementSpeed/mainhand/1/0.1]
    display name: "<purple>Epic Wooden Sword"
    lore:
    - "<gray> 1.6 Attack Speed"
    - "<gray> 4 Attack Damage"

UncommonStoneSword:
    type: item
    material: i@stone_sword[nbt_attributes=li@generic.attackDamage/mainhand/0/1]
    display name: "<green>Uncommon Stone Sword"
    lore:
    - "<gray> 1.6 Attack Speed"
    - "<gray> 5 Attack Damage"

RareStoneSword:
    type: item
    material: i@stone_sword[nbt_attributes=li@generic.attackDamage/mainhand/0/2|generic.maxHealth/mainhand/0/1]
    display name: "<blue>Rare Stone Sword"
    lore:
    - "<gray> 1.6 Attack Speed"
    - "<gray> 5 Attack Damage"

EpicStoneSword:
    type: item
    material: i@stone_sword[nbt_attributes=li@generic.attackDamage/mainhand/0/3|generic.maxHealth/mainhand/0/2|generic.movementSpeed/mainhand/1/0.1]
    display name: "<purple>Epic Stone Sword"
    lore:
    - "<gray> 1.6 Attack Speed"
    - "<gray> 5 Attack Damage"    

UncommonIronSword:
    type: item
    material: i@iron_sword[nbt_attributes=li@generic.attackDamage/mainhand/0/1]
    display name: "<green>Uncommon Iron Sword"
    lore:
    - "<gray> 1.6 Attack Speed"
    - "<gray> 6 Attack Damage"

RareIronSword:
    type: item
    material: i@iron_sword[nbt_attributes=li@generic.attackDamage/mainhand/0/2|generic.maxHealth/mainhand/0/1]
    display name: "<blue>Rare Iron Sword"
    lore:
    - "<gray> 1.6 Attack Speed"
    - "<gray> 6 Attack Damage"     

EpicIronSword:
    type: item
    material: i@iron_sword[nbt_attributes=li@generic.attackDamage/mainhand/0/3|generic.maxHealth/mainhand/0/2|generic.movementSpeed/mainhand/1/0.1]
    display name: "<purple>Epic Iron Sword"
    lore:
    - "<gray> 1.6 Attack Speed"
    - "<gray> 6 Attack Damage"

UncommonGoldenSword:
    type: item
    material: i@gold_sword[nbt_attributes=li@generic.attackDamage/mainhand/0/1]
    display name: "<green>Uncommon Golden Sword"
    lore:
    - "<gray> 1.6 Attack Speed"
    - "<gray> 4 Attack Damage"

RareGoldenSword:
    type: item
    material: i@gold_sword[nbt_attributes=li@generic.attackDamage/mainhand/0/2|generic.maxHealth/mainhand/0/1]
    display name: "<blue>Rare Golden Sword"
    lore:
    - "<gray> 1.6 Attack Speed"
    - "<gray> 4 Attack Damage"

EpicGoldenSword:
    type: item
    material: i@gold_sword[nbt_attributes=li@generic.attackDamage/mainhand/0/3|generic.maxHealth/mainhand/0/2|generic.movementSpeed/mainhand/1/0.1]
    display name: "<purple>Epic Golden Sword"
    lore:
    - "<gray> 1.6 Attack Speed"
    - "<gray> 4 Attack Damage"

UncommonDiamondSword:
    type: item
    material: i@diamond_sword[nbt_attributes=li@generic.attackDamage/mainhand/0/1]
    display name: "<green>Uncommon Diamond Sword"
    lore:
    - "<gray> 1.6 Attack Speed"
    - "<gray> 7 Attack Damage"

RareDiamondSword:
    type: item
    material: i@diamond_sword[nbt_attributes=li@generic.attackDamage/mainhand/0/2|generic.maxHealth/mainhand/0/1]
    display name: "<blue>Rare Diamond Sword"
    lore:
    - "<gray> 1.6 Attack Speed"
    - "<gray> 7 Attack Damage"    

EpicDiamondSword:
    type: item
    material: i@diamond_sword[nbt_attributes=li@generic.attackDamage/mainhand/0/3|generic.maxHealth/mainhand/0/2|generic.movementSpeed/mainhand/1/0.1]
    display name: "<purple>Epic Diamond Sword"
    lore:
    - "<gray> 1.6 Attack Speed"
    - "<gray> 7 Attack Damage"

CraftScripts:
    type: world
    events:
      on player crafts wood_sword:
      - define a '<util.random.int[1].to[1000]>'
      - if <def[a].is[less].than[900]>{
        - queue clear
      } 
      - if <def[a].is[less].than[950]>{
        - adjust <c.item> <i@UncommonWoodSword>
      } 

      else if <def[a]> >= 990 && <def[a]> < 1000 

      {
        - announce "<red>CRAFT: <white> <player.name> made <entry[i@EpicWoodSword].result.display_name>!"
        - determine i@EpicWoodSword
      }

      - define a!

      on player crafts stone_sword:
      - define a '<util.random.int[1].to[1000]>'
      - if <def[a]> >= 900 && <def[a]> < 950 

      {
        - announce "<red>CRAFT: <white> <player.name> made <entry[item].result.display_name>!"
        - determine i@UncommonStoneSword
      } 

      else if <def[a]> >= 950 && <def[a]> < 990 

      {
        - announce "<red>CRAFT: <white> <player.name> made <entry[item].result.display_name>!"
        - determine i@RareStoneSword
      } 

      else if <def[a]> >= 990 && <def[a]> < 1000 

      {
        - announce "<red>CRAFT: <white> <player.name> made <entry[item].result.display_name>!"
        - determine i@EpicStoneSword
      }

      - define a!

      on player crafts iron_sword:
      - define a '<util.random.int[1].to[1000]>'
      - if <def[a]> >= 900 && <def[a]> < 950 

      {
        - announce "<red>CRAFT: <white> <player.name> made <entry[item].result.display_name>!"
        - determine i@UncommonIronSword
      } 

      else if <def[a]> >= 950 && <def[a]> < 990 

      {
        - announce "<red>CRAFT: <white> <player.name> made <entry[item].result.display_name>!"
        - determine i@RareIronSword
      } 

      else if <def[a]> >= 990 && <def[a]> < 1000 

      {
        - announce "<red>CRAFT: <white> <player.name> made <entry[item].result.display_name>!"
        - determine i@EpicIronSword
      }

      - define a!

      on player crafts gold_sword:
      - define a '<util.random.int[1].to[1000]>'
      - if <def[a]> >= 900 && <def[a]> < 950 

      {
        - announce "<red>CRAFT: <white> <player.name> made <entry[item].result.display_name>!"
        - determine i@GoldenStoneSword
      } 

      else if <def[a]> >= 950 && <def[a]> < 990 

      {
        - announce "<red>CRAFT: <white> <player.name> made <entry[item].result.display_name>!"
        - determine i@GoldenStoneSword
      } 

      else if <def[a]> >= 990 && <def[a]> < 1000 

      {
        - announce "<red>CRAFT: <white> <player.name> made <entry[item].result.display_name>!"
        - determine i@GoldenStoneSword
      }

      - define a!

      on player crafts diamond_sword:
      - define a '<util.random.int[1].to[1000]>'
      - if <def[a]> >= 900 && <def[a]> < 950 

      {
        - announce "<red>CRAFT: <white> <player.name> made <entry[item].result.display_name>!"
        - determine i@UncommonDiamondSword
      } 

      else if <def[a]> >= 950 && <def[a]> < 990 

      {
        - announce "<red>CRAFT: <white> <player.name> made <entry[item].result.display_name>!"
        - determine i@RareDiamondSword
      } 

      else if <def[a]> >= 990 && <def[a]> < 1000 

      {
        - announce "<red>CRAFT: <white> <player.name> made <entry[item].result.display_name>!"
        - determine i@EpicDiamondSword
      }

      - define a!