Advertisement
xKevinn

Untitled

Jan 9th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. $${
  2. IF(@&randomchest = "true")
  3. UnSet(@&randomchest)
  4. ECHO(/particle largeexplode %@#rcx% %@#rcy% %@#rcz% 1 1 1 0.01 100)
  5. ECHO(/setblock %@#rcx% %@#rcy% %@#rcz% air 0)
  6. Log(&cDisabled random chest.)
  7. Stop("APOSTROPHE")
  8. ENDIF
  9.  
  10. Set(@&randomchest,"true")
  11. PROMPT(&location,$$?,"Location of the event?")
  12. IF(&location = "")
  13. Stop()
  14. ENDIF
  15. ECHO(/tellraw @a [""\,{"text":"> Random chest event happening at %&location%!"\,"color":"yellow"\,bold:true}])
  16. Log(&aEnabled random chest.)
  17. @#rcx1 = %XPOS%
  18. @#rcx2 = %XPOS%
  19. @#rcy1 = %YPOS%
  20. @#rcy2 = %YPOS%
  21. @#rcz1 = %ZPOS%
  22. @#rcz2 = %ZPOS%
  23. Inc(@#rcx1,5)
  24. Dec(@#rcx2,5)
  25. Inc(@#rcy1,5)
  26. Inc(@#rcz1,5)
  27. Dec(@#rcz2,5)
  28. UnSet(&on)
  29.  
  30. DO
  31. Wait(5)
  32. IF(&on = "yes")
  33. ECHO(/setblock %@#rcx% %@#rcy% %@#rcz% air 0)
  34. ECHO(/particle explode %@#rcx% %@#rcy% %@#rcz% 1 1 1 0.01 100)
  35. ENDIF
  36. RANDOM(@#rcx,%@#rcx1%,%@#rcx2%)
  37. RANDOM(@#rcy,%@#rcy1%,%@#rcy2%)
  38. RANDOM(@#rcz,%@#rcz1%,%@#rcz2%)
  39. RANDOM(#slot,0,26)
  40. RANDOM(#count,1,5)
  41. RANDOM(#id)
  42. DO
  43. RANDOM(#pick,1,2)
  44. IF(#pick = 1)
  45. RANDOM(#id,1,197)
  46. ELSE
  47. RANDOM(#id,256,431)
  48. ENDIF
  49.  
  50. IFMATCHES(%#id%,^7$|^8$|^9$|^10$|^11$|^19$|^31$|^32$|^34$|^43$|^51$|^52$|^55$|^59$|^62$|^63$|^68$|^75$|^83$|^90$|^94$|^97$|^104$|^105$|^119$|^120$|^122$|^124$|^132$|^137$|^138$|^141$|^142$|^150$|^166$|^175$|^177$|^373$|^383$|^399$|^401$|^403$|^422$|^426)
  51. Set(&allow,"false")
  52. ELSE
  53. Set(&allow,"true")
  54. ENDIF
  55. WHILE(&allow = "false")
  56.  
  57. Set(&on,"yes")
  58. ECHO(/setblock %@#rcx% %@#rcy% %@#rcz% chest 0 replace {Items:[{id:%#id%\,Slot:%#slot%\,Count:%#count%}]})
  59. WHILE(true)
  60. }$$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement