~/paste/8584
~/paste/8584
~/paste/8584

  1. *:/item enchant [$enchant=''] [$level=''] = >>>
  2. @enchant = to_lower($enchant)
  3. @level = $level
  4. @array = array(
  5.             'Protection',
  6.             'FireProtection',
  7.             'BlastProtection',
  8.             'ProjectileProtection',
  9.             'FeatherFalling',
  10.             'AquaAffinity',
  11.             'Respiration',
  12.             'Sharpness',
  13.             'Smite',
  14.             'BaneOfArthropods',
  15.             'Knockback',
  16.             'FireAspect',
  17.             'Looting',
  18.             'Efficiency',
  19.             'SilkTouch',
  20.             'Unbreaking',
  21.             'Fortune',
  22.             'Power',
  23.             'Punch',
  24.             'Flame',
  25.             'Infinity',)
  26.     if($level == '' || $enchantment == '') {
  27.         die(colorize('&8[&9&oAltraux&8] &c&o/item enchant <enchant> <level>'))
  28.     }
  29.     if(pinfo()[6] == '0:-1') {
  30.         die(colorize('&8[&9&oAltraux&8] &c&oYou must be holding an item!'))
  31.     }
  32.     if(!array_contains_ic(@array, @enchant)) {
  33.         die(colorize('&8[&9&oAltraux&8] &c&oThat is not a valid enchant name!'))
  34.     }
  35.    
  36.     if(@enchant == 'protection' && $level == '1' && phas_item(player(), 122) >= 4) {
  37.         try(enchant_inv(pinfo()[15], 0, @level), die(colorize('&8[&9&oRelic&8] &c&oThat enchant doesn\'t belong on that!')))
  38.         ptake_item(player(), 122, 4)
  39.         die(colorize('&8[&9&oAltraux&8] &9&oSuccess! &c'.to_upper(@enchant).' &9&olevel &c'.@level))
  40.     } else {
  41.         die(colorize('&8[&9&oAltraux&8] &c&oYou do not have enough relics!'))
  42.     }
  43. <<<
Language: commandhelper
Posted by Anonymous at 01 Apr 2013, 03:13:42 UTC