lyra.txt 955 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. oak_fence_material = material.get("OAK_FENCE");
  2. world = world.get("creative");
  3. Norm_X = 2598;
  4. Norm_Y = 82;
  5. String_Sound = sound.get("BLOCK_NOTE_BLOCK_HARP");
  6. Master_Cat = sound.getCategory("MASTER");
  7. event.load("block_click");
  8. @wait
  9. wait();
  10. if(block == null){
  11. goto("wait");
  12. }
  13. if(action != "LEFT_CLICK_BLOCK" && action != "RIGHT_CLICK_BLOCK"){
  14. goto("wait");
  15. }
  16. block_loc = block.getLocation(block);
  17. if(loc.getWorld(block_loc) != world){
  18. goto("wait");
  19. }
  20. if(loc.getZ(block_loc) != 2630){
  21. goto("wait");
  22. }
  23. block_type = block.getType(block);
  24. if(block_type != oak_fence_material){
  25. goto("wait");
  26. }
  27. X = loc.getX(block_loc);
  28. X_Dif = X - Norm_X;
  29. if(math.abs(X_Dif) > 6){
  30. goto("wait");
  31. }
  32. Y = loc.getY(block_loc);
  33. Y_Dif = Y - Norm_Y;
  34. if(math.abs(Y_Dif) > 6){
  35. goto("wait");
  36. }
  37. pitch = math.pow(2, (X_Dif * 3.5 - Y_Dif)/ 12);
  38. cancel = true;
  39. sound.spawn(block_loc, String_Sound, Master_Cat, 1, pitch);
  40. goto("wait");