Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //(Pictionary)
- /// C:\Users\Austin\Documents\Austin\powder game code\eGO\CCU Events\PC - Pictionary\Pictionary.ccu
- //<General Definitions
- DEF $SA$ x=110,y=3,z=148,dx=64,dy=15,dz=64
- DEF $SPid$ 34
- DEF $SPpvp$ 1
- DEF $SPsat$ 1
- DEF $CMDName$ PC
- DEF $CMDSizeX$ 16
- DEF $CMDSizeY$ 16
- DEF $CMDSizeZ$ 5
- DEF $StyleDirection$ -X
- DEF COORDS $CoordsOption$ 79 9 175
- 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":": "},
- /// Filling the board
- DEF COORDS $FillBoard$ 130 6 168 130 18 192
- /// Teleport player to drawing board
- DEF TELE $DrawingTP$ 132 4 180 90 0
- /// Teleport player back to the arena
- DEF TELE $AudienceTP$ 137 4 180 90 -30
- /// Detect block to fill with
- DEF COORDS $DetectBlock$ 129 6 165
- /// Redstone block to open the door with
- DEF COORDS $OpenDoorBlock$ 158 1 180
- /// Item list
- /*
- DEF CCItem_Shears shears 1 0
- {display:{Name:"Special Shears!",Lore:["Destroys wool... Destroy ALL THE WOOL MUAHAHAHA"]},
- Unbreakable:1,CanDestroy:["minecraft:wool"],ench:[{id:32,lvl:32767}],HideFlags:127}
- -/-
- DEF CCItem_Wool wool 64 |0|
- {display:{Name:"Pictionary Wool!",Lore:["Wool for Pictionary.. Fear the Shears!!"]},
- CanPlaceOn:["minecraft:quartz_block"],CanDestroy:["minecraft:wool"],ench:[{id:32,lvl:32767}],HideFlags:127}
- */
- /// Arr_Test[asdf]
- /// Actual guess list
- ARRAY {Arr_GuessList}:
- Mary Poppins
- Little Women
- Snow White and the Seven Dwarves
- Free Willy
- The Jungle Book
- The Sound of Music
- Back to the Future
- Annie
- The Little Mermaid
- WALL-E
- Ice Age
- Pirates of the Caribbean
- James Bond
- The Lion King
- Dumbo
- Spider-Man
- High School Musical
- 101 Dalmations
- Up
- Hercules
- Willy Wonka and the Chocolate Factory
- Harry Potter
- Shrek
- Cars
- The Santa Clause
- Finding Nemo
- Toy Story
- Charlotte's Web
- Where the Red Fern Grows
- ARRAY {Arr_WoolIDs}:
- 14
- 1
- 4
- 5
- 3
- 10
- 0
- 12
- 15
- IMPORT {LIBRARY GETDIR General}
- //>
- //<Options
- OPTIONS:
- blockOption stonebrick 0
- coordsOption $CoordsOption$
- styleOption $StyleDirection$ 16
- parseOption true
- commandOption true
- combinerOption true
- /// filePathFuncOption
- keepCoordsOption false
- //>
- //<General Scoreboard Start
- FUNC {Func_GeneralScoreboardStart}:
- USE {ScOA}:
- CCU_NumberObjAdd
- ARRAY {GLOBAL ACTIVATE CCU.objectiveAdd(Obj_GeneralScoreboardStart) Obj_GeneralScoreboardStart}:
- PC dummy Pictionary!
- PCti dummy Pictionary Timer (ticks)
- PCti2 dummy Pictionary Timer (seconds)
- PCpl dummy Pictionary Player List
- PCss dummy Pictionary Stop Selection
- PCcl dummy Pictionary Stop Selection
- PCaf dummy Pictionary Affected Items
- ARRAY {GLOBAL ACTIVATE CCU.teamAdd(Team_GeneralScoreboardStart) Team_GeneralScoreboardStart}:
- PC Pictionary
- OPT color green
- OPT friendlyfire false
- OPT collisionRule never
- PCd_y PC display yellow
- OPT color yellow
- CCU_ExecuteSpawnStand summon ArmorStand ~ ~ ~ {Tags:["PCEntity","PCStand"],Invulnerable:1,PersistenceRequired:1,Invisible:1,Marker:1,NoGravity:1}
- CCU_ExecuteSpawnStand ScSS PC
- LOOP {Arr_GuessList[S]}:
- CCU_ExecuteSpawnStand summon AreaEffectCloud ~ ~ ~ {$Duration$,CustomName:"|0|",Tags:["PCEntity","PCGuess"]}
- /// Joins the PTJ team
- CCU_ExecuteSpawnStand PC J> @e[type=AreaEffectCloud,PCGuess]
- CCU_ExecuteSpawnStand PCd_y J> Time_Elapsed
- /// Initialize area effect clouds
- CCU_ExecuteSpawnStand @e[type=AreaEffectCloud,PCGuess] PCpl + 0
- CCU_ExecuteSpawnStand @e[type=ArmorStand,PCStand] PCti = -1
- /// Removes redstone block at iron door
- setblock $OpenDoorBlock$ air 0
- //>
- //<Fills Board Pulse
- FUNC {Func_FillBoardPulse}:
- LOOP {Arr_WoolIDs[S]}:
- @e[type=ArmorStand,PCStand] wool |0| $DetectBlock$ fill $FillBoard$ wool |0|
- @e[type=ArmorStand,PCStand] air 0 $DetectBlock$ fill $FillBoard$ air 0
- //>
- //<Selects Player Testfor Clock
- FUNC {Func_SelectsPlayerTFClock}:
- testfor @a[$SA$,m=2,PCpl=2]
- CCU_SetblockTestfor
- /// checks number of players --> 0 if there's no one previously active before the current one
- @e[type=ArmorStand,PCStand] PCcl = 0
- @a[$SA$,m=2,PCpl=3] @e[type=ArmorStand,PCStand] PCcl + 1
- /// Fills board
- @e[type=ArmorStand,PCStand,PCcl=0] @a[$SA$,m=2,PCpl=2] fill $FillBoard$ air 0
- /// Prevents the player from going again for the next 3 guesses
- @e[type=ArmorStand,PCStand,PCcl=0] @a[$SA$,m=2,PCpl=2] @a[$SA$,m=2,PCss>=1] PCss - 1
- @e[type=ArmorStand,PCStand,PCcl=0] @a[$SA$,m=2,PCpl=2] PCss = 3
- /// Activates the timer
- @e[type=ArmorStand,PCStand,PCcl=0] @a[$SA$,m=2,PCpl=2] @e[type=ArmorStand,PCStand] PCti2 = 120
- @e[type=ArmorStand,PCStand,PCcl=0] @a[$SA$,m=2,PCpl=2] @e[type=ArmorStand,PCStand] PCti = 0
- /// Selects a random area effect cloud
- @e[type=ArmorStand,PCStand,PCcl=0] @a[$SA$,m=2,PCpl=2] @r[type=AreaEffectCloud,PCGuess,PCpl=0] PCpl = 1
- /// Gives wool
- clear @a[$SA$,m=2,PCpl=2]
- replaceitem entity @a[$SA$,m=2,PCpl=2] slot.weapon.offhand CCItem_Shears
- LOOP {0 8 + 1} {Arr_WoolIDs[S]}:
- replaceitem entity @a[$SA$,m=2,PCpl=2] slot.hotbar.|0| CCItem_Wool(|1|)
- @a[$SA$,m=2,EC=0,PCpl=2] SPbk = $SPid$
- /// Teleports
- tp @a[$SA$,m=2,PCpl=2] $DrawingTP$
- /// Says who's the artist
- @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"}]}
- @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"}]}
- /// Says what the topic name is
- tellraw @a[$SA$,m=2,PCpl=2] $TextStart${"selector":"@e[type=AreaEffectCloud,PCGuess,PCpl=1]","bold":"true"},{"text":" is your topic.","color":"gray"}]}
- tellraw @a[PCss>=95] $TextStart${"selector":"@e[type=AreaEffectCloud,PCGuess,PCpl=1]","bold":"true"},{"text":" is your topic.","color":"gray"}]}
- @a[PCss>=95] PCss = 0
- /// General reset
- @a[$SA$,m=2,PCpl=2] PCpl = 3
- @e[type=ArmorStand,PCStand,PCcl>=1] PCcl = 0
- //>
- ///Plugin-Zane's edit
- FUNC {Func_PluginTest}:
- pictionary status
- COND:
- @e[type=ArmorStand,tag=PCStand] PCti2 = 0
- //<General Scoreboard Clock
- FUNC {Func_GeneralScoreboardClock}:
- /// Initialize: PCpl = 0
- @a[$SA$,m=2] PCpl + 0
- clear @a[$SA$,m=2,PCpl=0]
- @a[$SA$,m=2,PCpl=0,EC=0] SPbk = $SPid$
- effect @a[$SA$,m=2,PCpl=0] clear
- PC J> @a[$SA$,m=2,PCpl=0]
- @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
- @a[$SA$,m=2,PCpl=0] PCss = 0
- @a[$SA$,m=2,PCpl=0] PCaf = 0
- /// Normal: PCpl = 1
- @a[$SA$,m=2,PCpl=0] PCpl = 1
- /// Replaces any items dropped
- kill @e[$SA$,type=Item]
- /// Stats entity to detect missing items
- /// baby i'm ballin
- LOOP {Arr_WoolIDs[S]}:
- @a[$SA$,m=2,PCpl=3] clear @a[c=1,r=1,PCpl=3] wool |0| 0
- give @a[$SA$,m=2,PCpl=3,PCaf=0] CCItem_Wool(|0|)
- @a[$SA$,m=2,PCpl=3] clear @a[c=1,r=1,PCpl=3] shears -1 0
- give @a[$SA$,m=2,PCpl=3,PCaf=0] CCItem_Shears
- /// If PCss of a player is set to 100, activates guess
- /// It's an option in the book to select anyone EXCEPT themself
- @a[PCss=100] @r[$SA$,m=2,PCpl=1,PCss=0] PCpl = 2
- @a[PCss=100] PCss - 1
- @e[type=ArmorStand,PCStand,PCss=100] @r[$SA$,m=2,PCpl=1,PCss=0] PCpl = 2
- @e[type=ArmorStand,PCStand,PCss=100] PCss = 0
- //>
- //<Timer Testfor Clock
- FUNC {Func_TimerTFClock}:
- testfor @e[type=ArmorStand,PCStand,PCti>=0]
- CCU_SetblockTestfor
- @e[type=ArmorStand,PCStand,PCti>=0] PCti + 1
- @e[type=ArmorStand,PCStand,PCti=20] PCti2 - 1
- @e[type=ArmorStand,PCStand,PCti=20] PCti = 0
- @e[type=ArmorStand,PCStand,PCti2<=0] PCti2 = 0
- @e[type=ArmorStand,PCStand,PCti>=0] ScOP Time_Elapsed PC = @e[type=ArmorStand,PCStand,PCti>=0] PCti2
- /// Display message
- @e[type=ArmorStand,PCStand,PCti2=0,PCti>=0] title @a[$SA$] title {"text":"Time's up!","color":"dark_aqua","underlined":true}
- @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"}]}
- /// General reset: clear, reset score, etc.
- @e[type=ArmorStand,PCStand,PCti2=0,PCti>=0] clear @a[$SA$,m=2,PCpl=3]
- @e[type=ArmorStand,PCStand,PCti2=0,PCti>=0] @a[$SA$,m=2,PCpl=3,EC=0] SPbk = $SPid$
- @e[type=ArmorStand,PCStand,PCti2=0,PCti>=0] tp @a[$SA$,m=2,PCpl=3] $AudienceTP$
- @e[type=ArmorStand,PCStand,PCti2=0,PCti>=0] @a[$SA$,m=2,PCpl=3] reset PCaf
- @e[type=ArmorStand,PCStand,PCti2=0,PCti>=0] @a[$SA$,m=2,PCpl=3] PCpl = 1
- /// Resets all
- @e[type=ArmorStand,PCStand,PCti2=0,PCti>=0] @e[type=AreaEffectCloud,PCGuess,PCpl=1] PCpl = 2
- @e[type=ArmorStand,PCStand,PCti2=0,PCti>=0] PCti = -1
- //>
- //<General Scoreboard End
- FUNC {Func_GeneralScoreboardEnd}:
- CCU.objectiveRemove(Obj_GeneralScoreboardStart)
- CCU.teamRemove(Team_GeneralScoreboardStart)
- effect @a[$SA$,m=2] clear
- clear @a[$SA$,m=2]
- @a[$SA$,m=2,EC=0] SPbk = $SPid$
- effect @a[$SA$] 6 1 100 true
- @a[$SA$,m=2] SPtp = $SPid$
- kill @e[PCEntity]
- fill $FillBoard$ air 0
- /// Adds redstone block at iron door
- setblock $OpenDoorBlock$ redstone_block 0
- //>
- //<Groups
- GROUP {Grp_MainStart}:
- CCU.spawnStandStart()
- CCU_Deactivate(GSELF)
- Func_GeneralScoreboardStart()
- CCU_Activate(Grp_MainClock)
- CCU_Activate(Grp_TimerTFClock)
- CCU_Activate(Grp_SelectsPlayerTFClock)
- CCU_FinalSpawnStand
- GROUP {Grp_FillBoardPulse}:
- CCU_Deactivate(GSELF)
- Func_FillBoardPulse()
- GROUP {Grp_SelectsPlayerTFClock}:
- Func_SelectsPlayerTFClock()
- GROUP {Grp_TimerTFClock}:
- Func_TimerTFClock()
- GROUP {Grp_MainClock}:
- CCU.spawnIDSetting()
- Func_GeneralScoreboardClock()
- Func_GeneralEndClock()
- GROUP {Grp_MainEnd}:
- CCU.spawnStandEnd()
- CCU_Deactivate(GSELF)
- Func_GeneralScoreboardEnd()
- CCU_Deactivate(Grp_MainClock)
- CCU_Deactivate(Grp_TimerTFClock)
- CCU_Deactivate(Grp_SelectsPlayerTFClock)
- GROUP C{CLOCK:Grp_PluginStatus}:
- Func_PluginTest()
- CCU_Deactivate(GSELF)
- CCU.cmdSave()
- //>
Advertisement
Add Comment
Please, Sign In to add comment