Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
962 B
0
Indexable
Never
var dur = 300
function interact(e) {
 e.player.message(dur);
 e.item.setLore("Осталось использований:" + dur);
 if (dur != 0) {
 dur--
 e.item.setTexture(4, "variedcommodities:clarinet");
 e.item.setItemDamage(4);
 e.player.world.spawnParticle(
  "smoke",
  e.player.getX() + 0.2,
  e.player.getY() + 2,
  e.player.getZ(),
  0,0,0,0,20
  ),
  e.player.world.spawnParticle(
  "smoke",
  e.player.getX() + 0.1,
  e.player.getY() + 2,
  e.player.getZ(),
  0,0,0,0,20
  ),
  e.player.world.spawnParticle(
  "smoke",
  e.player.getX() + 0.3,
  e.player.getY() + 2,
  e.player.getZ(),
  0,0,0,0,20
  ),
  e.player.world.spawnParticle(
  "smoke",
  e.player.getX() + 0.5,
  e.player.getY() + 1.5,
  e.player.getZ(),
  0,0,0,0,20
  ),
  e.player.world.spawnParticle(
  "smoke",
  e.player.getX() + 0,
  e.player.getY() + 2,
  e.player.getZ(),
  0,0,0,0,10
  )
  }
 else {
  e.setCanceled(true);
  }
  }