Guest User

Untitled

a guest
Jul 17th, 2017
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.96 KB | None | 0 0
  1. //(Pictionary)
  2. /// C:\Users\Austin\Documents\Austin\powder game code\eGO\CCU Events\PC - Pictionary\Pictionary.ccu
  3.  
  4. //<General Definitions
  5. DEF $SA$ x=110,y=3,z=148,dx=64,dy=15,dz=64
  6. DEF $SPid$ 34
  7. DEF $SPpvp$ 1
  8. DEF $SPsat$ 1
  9.  
  10. DEF $CMDName$ PC
  11. DEF $CMDSizeX$ 16
  12. DEF $CMDSizeY$ 16
  13. DEF $CMDSizeZ$ 5
  14.  
  15. DEF $StyleDirection$ -X
  16. DEF COORDS $CoordsOption$ 79 9 175
  17.  
  18. DEF $TextStart$ {"text":"","extra":[{"text":"[","color":"gray"},{"text":"PC","color":"dark_aqua","bold":"true","hoverEvent":{"action":"show_text","value":{"text":"Pictionary","color":"dark_aqua"}}},{"text":"]","color":"gray"},{"text":": "},
  19.  
  20. /// Filling the board
  21. DEF COORDS $FillBoard$ 130 6 168 130 18 192
  22.  
  23. /// Teleport player to drawing board
  24. DEF TELE $DrawingTP$ 132 4 180 90 0
  25.  
  26. /// Teleport player back to the arena
  27. DEF TELE $AudienceTP$ 137 4 180 90 -30
  28.  
  29. /// Detect block to fill with
  30. DEF COORDS $DetectBlock$ 129 6 165
  31.  
  32. /// Redstone block to open the door with
  33. DEF COORDS $OpenDoorBlock$ 158 1 180
  34.  
  35. /// Item list
  36. /*
  37. DEF CCItem_Shears shears 1 0
  38. {display:{Name:"Special Shears!",Lore:["Destroys wool... Destroy ALL THE WOOL MUAHAHAHA"]},
  39. Unbreakable:1,CanDestroy:["minecraft:wool"],ench:[{id:32,lvl:32767}],HideFlags:127}
  40.  
  41. -/-
  42.  
  43. DEF CCItem_Wool wool 64 |0|
  44. {display:{Name:"Pictionary Wool!",Lore:["Wool for Pictionary.. Fear the Shears!!"]},
  45. CanPlaceOn:["minecraft:quartz_block"],CanDestroy:["minecraft:wool"],ench:[{id:32,lvl:32767}],HideFlags:127}
  46.  
  47. */
  48.  
  49. /// Arr_Test[asdf]
  50.  
  51. /// Actual guess list
  52. ARRAY {Arr_GuessList}:
  53. Mary Poppins
  54. Little Women
  55. Snow White and the Seven Dwarves
  56. Free Willy
  57. The Jungle Book
  58. The Sound of Music
  59. Back to the Future
  60. Annie
  61. The Little Mermaid
  62. WALL-E
  63. Ice Age
  64. Pirates of the Caribbean
  65. James Bond
  66. The Lion King
  67. Dumbo
  68. Spider-Man
  69. High School Musical
  70. 101 Dalmations
  71. Up
  72. Hercules
  73. Willy Wonka and the Chocolate Factory
  74. Harry Potter
  75. Shrek
  76. Cars
  77. The Santa Clause
  78. Finding Nemo
  79. Toy Story
  80. Charlotte's Web
  81. Where the Red Fern Grows
  82.  
  83. ARRAY {Arr_WoolIDs}:
  84. 14
  85. 1
  86. 4
  87. 5
  88. 3
  89. 10
  90. 0
  91. 12
  92. 15
  93.  
  94. IMPORT {LIBRARY GETDIR General}
  95. //>
  96.  
  97.  
  98. //<Options
  99. OPTIONS:
  100. blockOption stonebrick 0
  101. coordsOption $CoordsOption$
  102. styleOption $StyleDirection$ 16
  103. parseOption true
  104. commandOption true
  105. combinerOption true
  106. /// filePathFuncOption
  107. keepCoordsOption false
  108.  
  109. //>
  110.  
  111. //<General Scoreboard Start
  112. FUNC {Func_GeneralScoreboardStart}:
  113. USE {ScOA}:
  114. CCU_NumberObjAdd
  115.  
  116. ARRAY {GLOBAL ACTIVATE CCU.objectiveAdd(Obj_GeneralScoreboardStart) Obj_GeneralScoreboardStart}:
  117. PC dummy Pictionary!
  118. PCti dummy Pictionary Timer (ticks)
  119. PCti2 dummy Pictionary Timer (seconds)
  120. PCpl dummy Pictionary Player List
  121. PCss dummy Pictionary Stop Selection
  122. PCcl dummy Pictionary Stop Selection
  123. PCaf dummy Pictionary Affected Items
  124.  
  125.  
  126. ARRAY {GLOBAL ACTIVATE CCU.teamAdd(Team_GeneralScoreboardStart) Team_GeneralScoreboardStart}:
  127. PC Pictionary
  128. OPT color green
  129. OPT friendlyfire false
  130. OPT collisionRule never
  131.  
  132. PCd_y PC display yellow
  133. OPT color yellow
  134.  
  135. CCU_ExecuteSpawnStand summon ArmorStand ~ ~ ~ {Tags:["PCEntity","PCStand"],Invulnerable:1,PersistenceRequired:1,Invisible:1,Marker:1,NoGravity:1}
  136. CCU_ExecuteSpawnStand ScSS PC
  137.  
  138. LOOP {Arr_GuessList[S]}:
  139. CCU_ExecuteSpawnStand summon AreaEffectCloud ~ ~ ~ {$Duration$,CustomName:"|0|",Tags:["PCEntity","PCGuess"]}
  140.  
  141. /// Joins the PTJ team
  142. CCU_ExecuteSpawnStand PC J> @e[type=AreaEffectCloud,PCGuess]
  143. CCU_ExecuteSpawnStand PCd_y J> Time_Elapsed
  144.  
  145. /// Initialize area effect clouds
  146. CCU_ExecuteSpawnStand @e[type=AreaEffectCloud,PCGuess] PCpl + 0
  147. CCU_ExecuteSpawnStand @e[type=ArmorStand,PCStand] PCti = -1
  148.  
  149. /// Removes redstone block at iron door
  150. setblock $OpenDoorBlock$ air 0
  151. //>
  152.  
  153. //<Fills Board Pulse
  154. FUNC {Func_FillBoardPulse}:
  155. LOOP {Arr_WoolIDs[S]}:
  156. @e[type=ArmorStand,PCStand] wool |0| $DetectBlock$ fill $FillBoard$ wool |0|
  157. @e[type=ArmorStand,PCStand] air 0 $DetectBlock$ fill $FillBoard$ air 0
  158.  
  159. //>
  160.  
  161. //<Selects Player Testfor Clock
  162. FUNC {Func_SelectsPlayerTFClock}:
  163. testfor @a[$SA$,m=2,PCpl=2]
  164. CCU_SetblockTestfor
  165.  
  166. /// checks number of players --> 0 if there's no one previously active before the current one
  167. @e[type=ArmorStand,PCStand] PCcl = 0
  168. @a[$SA$,m=2,PCpl=3] @e[type=ArmorStand,PCStand] PCcl + 1
  169.  
  170. /// Fills board
  171. @e[type=ArmorStand,PCStand,PCcl=0] @a[$SA$,m=2,PCpl=2] fill $FillBoard$ air 0
  172.  
  173. /// Prevents the player from going again for the next 3 guesses
  174. @e[type=ArmorStand,PCStand,PCcl=0] @a[$SA$,m=2,PCpl=2] @a[$SA$,m=2,PCss>=1] PCss - 1
  175. @e[type=ArmorStand,PCStand,PCcl=0] @a[$SA$,m=2,PCpl=2] PCss = 3
  176.  
  177. /// Activates the timer
  178. @e[type=ArmorStand,PCStand,PCcl=0] @a[$SA$,m=2,PCpl=2] @e[type=ArmorStand,PCStand] PCti2 = 120
  179. @e[type=ArmorStand,PCStand,PCcl=0] @a[$SA$,m=2,PCpl=2] @e[type=ArmorStand,PCStand] PCti = 0
  180.  
  181. /// Selects a random area effect cloud
  182. @e[type=ArmorStand,PCStand,PCcl=0] @a[$SA$,m=2,PCpl=2] @r[type=AreaEffectCloud,PCGuess,PCpl=0] PCpl = 1
  183.  
  184.  
  185.  
  186.  
  187. /// Gives wool
  188. clear @a[$SA$,m=2,PCpl=2]
  189.  
  190. replaceitem entity @a[$SA$,m=2,PCpl=2] slot.weapon.offhand CCItem_Shears
  191. LOOP {0 8 + 1} {Arr_WoolIDs[S]}:
  192. replaceitem entity @a[$SA$,m=2,PCpl=2] slot.hotbar.|0| CCItem_Wool(|1|)
  193.  
  194. @a[$SA$,m=2,EC=0,PCpl=2] SPbk = $SPid$
  195.  
  196. /// Teleports
  197. tp @a[$SA$,m=2,PCpl=2] $DrawingTP$
  198.  
  199. /// Says who's the artist
  200. @e[type=ArmorStand,PCStand,PCcl=0] @p[$SA$,m=2,PCpl=2] tellraw @a[$SA$] $TextStart${"selector":"@a[$SA$,m=2,PCpl=2]"},{"text":" is the artist.","color":"gray"}]}
  201. @e[type=ArmorStand,PCStand,PCcl>=1] @p[$SA$,m=2,PCpl=2] tellraw @a[$SA$] $TextStart${"selector":"@a[$SA$,m=2,PCpl=2]"},{"text":" are the artists.","color":"gray"}]}
  202.  
  203. /// Says what the topic name is
  204. tellraw @a[$SA$,m=2,PCpl=2] $TextStart${"selector":"@e[type=AreaEffectCloud,PCGuess,PCpl=1]","bold":"true"},{"text":" is your topic.","color":"gray"}]}
  205. tellraw @a[PCss>=95] $TextStart${"selector":"@e[type=AreaEffectCloud,PCGuess,PCpl=1]","bold":"true"},{"text":" is your topic.","color":"gray"}]}
  206. @a[PCss>=95] PCss = 0
  207.  
  208. /// General reset
  209. @a[$SA$,m=2,PCpl=2] PCpl = 3
  210. @e[type=ArmorStand,PCStand,PCcl>=1] PCcl = 0
  211.  
  212. //>
  213. ///Plugin-Zane's edit
  214. FUNC {Func_PluginTest}:
  215. pictionary status
  216. COND:
  217. @e[type=ArmorStand,tag=PCStand] PCti2 = 0
  218.  
  219.  
  220. //<General Scoreboard Clock
  221. FUNC {Func_GeneralScoreboardClock}:
  222. /// Initialize: PCpl = 0
  223. @a[$SA$,m=2] PCpl + 0
  224.  
  225. clear @a[$SA$,m=2,PCpl=0]
  226. @a[$SA$,m=2,PCpl=0,EC=0] SPbk = $SPid$
  227. effect @a[$SA$,m=2,PCpl=0] clear
  228. PC J> @a[$SA$,m=2,PCpl=0]
  229. @a[$SA$,m=2,PCpl=0] stats entity @a[r=0,c=1,m=2,PCpl=0] set AffectedItems @a[r=0,c=1] PCaf
  230. @a[$SA$,m=2,PCpl=0] PCss = 0
  231. @a[$SA$,m=2,PCpl=0] PCaf = 0
  232.  
  233. /// Normal: PCpl = 1
  234. @a[$SA$,m=2,PCpl=0] PCpl = 1
  235.  
  236. /// Replaces any items dropped
  237. kill @e[$SA$,type=Item]
  238.  
  239. /// Stats entity to detect missing items
  240. /// baby i'm ballin
  241. LOOP {Arr_WoolIDs[S]}:
  242. @a[$SA$,m=2,PCpl=3] clear @a[c=1,r=1,PCpl=3] wool |0| 0
  243. give @a[$SA$,m=2,PCpl=3,PCaf=0] CCItem_Wool(|0|)
  244.  
  245. @a[$SA$,m=2,PCpl=3] clear @a[c=1,r=1,PCpl=3] shears -1 0
  246. give @a[$SA$,m=2,PCpl=3,PCaf=0] CCItem_Shears
  247.  
  248.  
  249. /// If PCss of a player is set to 100, activates guess
  250. /// It's an option in the book to select anyone EXCEPT themself
  251. @a[PCss=100] @r[$SA$,m=2,PCpl=1,PCss=0] PCpl = 2
  252. @a[PCss=100] PCss - 1
  253. @e[type=ArmorStand,PCStand,PCss=100] @r[$SA$,m=2,PCpl=1,PCss=0] PCpl = 2
  254. @e[type=ArmorStand,PCStand,PCss=100] PCss = 0
  255. //>
  256.  
  257. //<Timer Testfor Clock
  258. FUNC {Func_TimerTFClock}:
  259. testfor @e[type=ArmorStand,PCStand,PCti>=0]
  260. CCU_SetblockTestfor
  261.  
  262. @e[type=ArmorStand,PCStand,PCti>=0] PCti + 1
  263. @e[type=ArmorStand,PCStand,PCti=20] PCti2 - 1
  264. @e[type=ArmorStand,PCStand,PCti=20] PCti = 0
  265. @e[type=ArmorStand,PCStand,PCti2<=0] PCti2 = 0
  266.  
  267. @e[type=ArmorStand,PCStand,PCti>=0] ScOP Time_Elapsed PC = @e[type=ArmorStand,PCStand,PCti>=0] PCti2
  268.  
  269. /// Display message
  270. @e[type=ArmorStand,PCStand,PCti2=0,PCti>=0] title @a[$SA$] title {"text":"Time's up!","color":"dark_aqua","underlined":true}
  271. @e[type=ArmorStand,PCStand,PCti2=0,PCti>=0] tellraw @a[$SA$] {"text":"","extra":[{"selector":"@e[type=AreaEffectCloud,PCGuess,PCpl=1]","bold":"true"},{"text":" is the answer!","color":"gray"}]}
  272.  
  273. /// General reset: clear, reset score, etc.
  274. @e[type=ArmorStand,PCStand,PCti2=0,PCti>=0] clear @a[$SA$,m=2,PCpl=3]
  275. @e[type=ArmorStand,PCStand,PCti2=0,PCti>=0] @a[$SA$,m=2,PCpl=3,EC=0] SPbk = $SPid$
  276. @e[type=ArmorStand,PCStand,PCti2=0,PCti>=0] tp @a[$SA$,m=2,PCpl=3] $AudienceTP$
  277. @e[type=ArmorStand,PCStand,PCti2=0,PCti>=0] @a[$SA$,m=2,PCpl=3] reset PCaf
  278. @e[type=ArmorStand,PCStand,PCti2=0,PCti>=0] @a[$SA$,m=2,PCpl=3] PCpl = 1
  279.  
  280. /// Resets all
  281. @e[type=ArmorStand,PCStand,PCti2=0,PCti>=0] @e[type=AreaEffectCloud,PCGuess,PCpl=1] PCpl = 2
  282. @e[type=ArmorStand,PCStand,PCti2=0,PCti>=0] PCti = -1
  283. //>
  284.  
  285. //<General Scoreboard End
  286. FUNC {Func_GeneralScoreboardEnd}:
  287. CCU.objectiveRemove(Obj_GeneralScoreboardStart)
  288. CCU.teamRemove(Team_GeneralScoreboardStart)
  289.  
  290. effect @a[$SA$,m=2] clear
  291. clear @a[$SA$,m=2]
  292. @a[$SA$,m=2,EC=0] SPbk = $SPid$
  293. effect @a[$SA$] 6 1 100 true
  294. @a[$SA$,m=2] SPtp = $SPid$
  295. kill @e[PCEntity]
  296. fill $FillBoard$ air 0
  297.  
  298. /// Adds redstone block at iron door
  299. setblock $OpenDoorBlock$ redstone_block 0
  300. //>
  301.  
  302. //<Groups
  303. GROUP {Grp_MainStart}:
  304. CCU.spawnStandStart()
  305. CCU_Deactivate(GSELF)
  306. Func_GeneralScoreboardStart()
  307. CCU_Activate(Grp_MainClock)
  308. CCU_Activate(Grp_TimerTFClock)
  309. CCU_Activate(Grp_SelectsPlayerTFClock)
  310. CCU_FinalSpawnStand
  311.  
  312. GROUP {Grp_FillBoardPulse}:
  313. CCU_Deactivate(GSELF)
  314. Func_FillBoardPulse()
  315.  
  316. GROUP {Grp_SelectsPlayerTFClock}:
  317. Func_SelectsPlayerTFClock()
  318.  
  319. GROUP {Grp_TimerTFClock}:
  320. Func_TimerTFClock()
  321.  
  322. GROUP {Grp_MainClock}:
  323. CCU.spawnIDSetting()
  324. Func_GeneralScoreboardClock()
  325. Func_GeneralEndClock()
  326.  
  327. GROUP {Grp_MainEnd}:
  328. CCU.spawnStandEnd()
  329. CCU_Deactivate(GSELF)
  330. Func_GeneralScoreboardEnd()
  331. CCU_Deactivate(Grp_MainClock)
  332. CCU_Deactivate(Grp_TimerTFClock)
  333. CCU_Deactivate(Grp_SelectsPlayerTFClock)
  334.  
  335. GROUP C{CLOCK:Grp_PluginStatus}:
  336. Func_PluginTest()
  337. CCU_Deactivate(GSELF)
  338.  
  339.  
  340. CCU.cmdSave()
  341. //>
Advertisement
Add Comment
Please, Sign In to add comment