Blue_Tec

Untitled

Jun 14th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.21 KB | None | 0 0
  1. options:
  2. message: &6&l%player%'s Tomb
  3. sound: ORB_PICKUP
  4.  
  5. on death of player:
  6. play "{@sound}" to attacker
  7. set the block at location of victim to chest
  8. set {_dchest} to block at location of victim
  9. add inventory of victim to {_dchest}
  10. add helmet of victim to {_dchest}
  11. add chestplate of victim to {_dchest}
  12. add leggings of victim to {_dchest}
  13. add boots of victim to {_dchest}
  14. clear drops
  15. set {_holo} to block above {_dchest}
  16. set {_x} to x-coordinate of {_dchest}
  17. add 0.5 to {_x}
  18. set {_y} to y-coordinate of {_dchest}
  19. add 0.5 to {_y}
  20. set {_z} to z-coordinate of {_dchest}
  21. add 0.5 to {_z}
  22. if {_x} is less than 0:
  23. set {_xs} to 1
  24. set {_x} to -1*{_x}
  25. else:
  26. set {_xs} to 0
  27. if {_z} is less than 0:
  28. set {_zs} to 1
  29. set {_z} to -1*{_z}
  30. else:
  31. set {_zs} to 0
  32. set {_loc} to (10000000000*{_xs} + 1000000000*{_zs} + 1000000*{_x} + 1000*{_y} + {_z})
  33. create interactive holo object "{@message}" with id "%{_loc}%" at location of {_holo}
  34.  
  35. on break of chest:
  36. set {_x} to x-coordinate of block
  37. add 0.5 to {_x}
  38. set {_y} to y-coordinate of block
  39. add 0.5 to {_y}
  40. set {_z} to z-coordinate of block
  41. add 0.5 to {_z}
  42. if {_x} is less than 0:
  43. set {_xs} to 1
  44. set {_x} to -1*{_x}
  45. else:
  46. set {_xs} to 0
  47. if {_z} is less than 0:
  48. set {_zs} to 1
  49. set {_z} to -1*{_z}
  50. else:
  51. set {_zs} to 0
  52. set {_loc} to (10000000000*{_xs} + 1000000000*{_zs} + 1000000*{_x} + 1000*{_y} + {_z})
  53. delete holo object "%{_loc}%"
  54.  
  55. on hologram touch:
  56. set {_id} to "%event-string%" parsed as number
  57. set {_xs} to floor({_id}/10000000000)
  58. set {_zs} to floor(({_id} - {_xs}*10000000000)/1000000000)
  59. set {_id} to ({_id} - ({_xs}*10000000000 + {_zs}*1000000000))
  60. set {_x} to floor({_id}/1000000)
  61. set {_id} to ({_id} - {_x}*1000000)
  62. set {_y} to floor({_id}/1000)
  63. set {_id} to ({_id} - {_y}*1000)
  64. set {_z} to floor({_id})
  65. if {_xs} is equal to 1:
  66. set {_x} to -1*{_x}
  67. if {_zs} is equal to 1:
  68. set {_z} to -1*{_z}
  69. set {_location} to location
  70. subtract 0.5 from {_x}
  71. subtract 0.5 from {_y}
  72. subtract 0.5 from {_z}
  73. set x-coordinate of {_location} to {_x}
  74. set y-coordinate of {_location} to {_y}
  75. set z-coordinate of {_location} to {_z}
  76. open the inventory of the block at {_location} to player
Add Comment
Please, Sign In to add comment