Advertisement
Gamebuster

functionVolWarning

May 15th, 2016
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. # #'s are to preserve line numbers
  2. #
  3. #
  4. #
  5. #
  6. #
  7. #
  8. #
  9. #
  10. #
  11. #
  12. #
  13. #
  14. #
  15. #
  16. #
  17. #
  18. function volWarning(p:player , loc1:location , loc2:location):
  19. if {dwand.%{_p}'s uuid%::1} is set:
  20. if {dwand.%{_p}'s uuid%::2} is set:
  21. set {_x1} to {_loc1}'s x coordinate
  22. set {_y1} to {_loc1}'s y coordinate
  23. set {_z1} to {_loc1}'s z coordinate
  24. set {_x2} to {_loc2}'s x coordinate
  25. set {_y2} to {_loc2}'s y coordinate
  26. set {_z2} to {_loc2}'s z coordinate
  27. set {_x3} to {_x1} - {_x2}
  28. set {_y3} to {_y1} - {_y2}
  29. set {_z3} to {_z1} - {_z1}
  30. if {_x3} < 0:
  31. set {_x3} to {_x3} * -1
  32. if {_y3} < 0:
  33. set {_y3} to {_y3} * -1
  34. if {_z3} < 0:
  35. set {_z3} to {_z3} * -1
  36. if {_x3} * {_y3} * {_z3} > {@selectionWarnDistance}:
  37. message "<yellow><bold>Note: Selection contians %{_x3} * {_y3} * {_z3}% blocks" to {_p}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement