Paste #37018: socket script

Date: 2016/10/18 09:05:31 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


socket:
  type: command
  name: socket
  description: Utilize the blacksmith's ability to add
  script:
    - if <player.heroes.secondary_class> != hclass@Blacksmith {
      - narrate "You must select the Blacksmith profession to use this skill."
      - queue clear
      }
    - if <player.heroes.level[Blacksmith]> < 50 {
      - narrate "You must be level 50 to use this skill."
      - queue clear
      }
    - if <player.item_in_hand.durability> == null {
      - narrate "You cannot add sockets to this item!"
      - queue clear
      }
    - if <player.item_in_hand.lore.contains[(Socket)] == true {
      - narrate "You can only use this skill on non-socketed items."
      - queue clear
      }
    - if <player.inventory.contains.material[381].quantity[1]> == false {
      - narrate "You require an Eye of Ender to add a socket to an item."
      - queue clear
      } else {
      - take 381 quantity:1 from:<player>
      - adjust <player.inventory.item_in_hand> lore:"(Socket)" save:socket
      - take item_in_hand
      - give <entry[socket].result>
      }