m31317015

Untitled title

Jan 1st, 2016
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.34 KB | None | 0 0
  1. Variables:
  2. #Block Type
  3. {_block.A} = iron block
  4. {_block.B} = gold block
  5. {_block.C} = diamond block
  6. {_block.D} = emerald block
  7. #Numbers of Blocks
  8. {_number.block.Base} = 83
  9. {_number.block.Coil} = 32
  10. {_number.block.Total} = 115
  11. {_number.block.CoilAir} = 311
  12. #Generation Rate (MT/s)
  13. {_generate.iron} = 10
  14. {_generate.gold} = 15
  15. {_generate.diamond} = 25
  16. {_generate.emerald} = 40
  17.  
  18. #Loop both base and coil
  19. On left click on beacon with nether star:
  20. set {_center.Coil} to the block above block above the block above the block above the block above event-block
  21. loop blocks in radius 6 around event-block:
  22. if loop-block is iron block:
  23. add 1 to {_count.block.A.Total}
  24. if loop-block is gold block:
  25. add 1 to {_count.block.B.Total}
  26. if loop-block is diamond block:
  27. add 1 to {_count.block.C.Total}
  28. if loop-block is emerald block:
  29. add 1 to {_count.block.D.Total}
  30. if loop-block is a lever:
  31. set {_switch} to location of loop-block
  32.  
  33. #Loop coil
  34. loop blocks in radius 6 around {_center.Coil}:
  35. if loop-block is air:
  36. add 1 to {_count.block.air.Coil}
  37. if loop-block is {_block.A}:
  38. add 1 to {_count.block.A.Coil}
  39. if loop-block is {_block.B}:
  40. add 1 to {_count.block.B.Coil}
  41. if loop-block is {_block.C}:
  42. add 1 to {_count.block.C.Coil}
  43. if loop-block is {_block.D}:
  44. add 1 to {_count.block.D.Coil}
  45.  
  46. #Debug only
  47. send "&c&lDebug: &fYou have %{_count.block.A.Total}% iron blocks, %{_count.block.B.Total}% gold blocks,
  48.  
  49. %{_count.block.C.Total}% diamond blocks, %{_count.block.D.Total}% emerald blocks" to player
  50. # Checking Multiblock
  51. if {_switch} is set:
  52. if {_count.block.A.Total} >= {_number.block.Total}:
  53. set {_type.Base} to iron block
  54. set {_type.Coil} to iron block
  55. else if {_count.block.B.Total} >= {_number.block.Total}:
  56. set {_type.Base} to gold block
  57. set {_type.Coil} to gold block
  58. else if {_count.block.C.Total} >= {_number.block.Total}:
  59. set {_type.Base} to diamond block
  60. set {_type.Coil} to diamond block
  61. else if {_count.block.D.Total} >= {_number.block.Total}:
  62. set {_type.Base} to emerald block
  63. set {_type.Coil} to emerald block
  64. else:
  65. if {_count.block.air.Coil} >= {_number.block.CoilAir}:
  66. if {_count.block.A.Coil} >= {_number.block.Coil}:
  67. set {_type.Coil} to iron block
  68. else if {_count.block.B.Coil} >= {_number.block.Coil}:
  69. set {_type.Coil} to gold block
  70. else if {_count.block.C.Coil} >= {_number.block.Coil}:
  71. set {_type.Coil} to diamond block
  72. else if {_count.block.D.Coil} >= {_number.block.Coil}:
  73. set {_type.Coil} to emerald block
  74. else:
  75. send "&9System> &eInvalid setup!" to player
  76. stop trigger
  77. if {_count.block.A.Total} >= {_number.block.Base}:
  78. set {_type.Base} to iron block
  79. else if {_count.block.B.Total} >= {_number.block.Base}:
  80. set {_type.Base} to gold block
  81. else if {_count.block.C.Total} >= {_number.block.Base}:
  82. set {_type.Base} to diamond block
  83. else if {_count.block.D.Total} >= {_number.block.Base}:
  84. set {_type.Base} to emerald block
  85. else:
  86. send "&9System>&eInvalid setup!" to player
  87. stop trigger
  88. else:
  89. send "&9System> &eInvalid setup!" to player
  90. stop trigger
  91. else:
  92. send "&9System> &eInvalid setup!" to player
  93. stop trigger
  94. #Calculating output
  95. if {_type.Base} is iron block:
  96. set {_output} to "%{_generate.iron}%^3"
  97. else if {_type.Base} is gold block:
  98. if {_type.Coil} is iron block:
  99. set {_output} to "(%{_generate.gold}% ^ 2) * %{_generate.iron}%"
  100. else if {_type.Coil} is gold block:
  101. set {_output} to "%{_generate.gold}% ^ 3"
  102. else if {_type.Base} is diamond block:
  103. if {_type.Coil} is iron block:
  104. set {_output} to "(%{_generate.diamond}% ^ 2) * %{_generate.iron}%"
  105. else if {_type.Coil} is gold block:
  106. set {_output} to "(%{_generate.diamond}% ^ 2) * %{_generate.gold}%"
  107. else if {_type.Coil} is diamond block:
  108. set {_output} to "%{_generate.diamond}% ^ 3"
  109. else if {_type.Base} is emerald block:
  110. if {_type.Coil} is iron block:
  111. set {_output} to "(%{_generate.emerald}% ^ 2) * %{_generate.iron}%"
  112. else if {_type.Coil} is gold block:
  113. set {_output} to "(%{_generate.emerald}% ^ 2) * %{_generate.gold}%"
  114. else if {_type.Coil} is diamond block:
  115. set {_output} to "(%{_generate.emerald}% ^ 2) * %{_generate.diamond}%"
  116. else if {_type.Coil} is emerald block:
  117. set {_output} to "%{_generate.emerald}% ^ 3"
  118. send "&9System> &eSetup success! Current output is &b%{_output}%&e!" to player
Advertisement
Add Comment
Please, Sign In to add comment