Adventure mode mob possession and control
Adventure mode mob possession and control
Objectives:
/scoreboard objectives add posses dummy
/scoreboard objectives add poison dummy
/scoreboard objectives add health health
/scoreboard objectives add countdown dummy
/scoreboard objectives add mob dummy
/scoreboard objectives add direction trigger
Detecting Poison and health:
/scoreboard players set @a poison 2 {ActiveEffects:[{Id:19b}]}
/gamemode 3 @a[score_health_min=1,score_health=1,score_poison_min=1]
/effect @a[score_health_min=1,score_health=1,score_poison_min=1] clear
/scoreboard players set @a[score_health_min=1,score_health=1,score_poison_min=1] countdown 200
/kill @e[score_countdown_min=1,score_countdown=1]
/scoreboard players remove @a[score_countdown_min=1] countdown 1
/scoreboard players remove @a[score_poison_min=1] poison 1
/scoreboard players enable @a direction
Titles
/title @a[score_countdown_min=2] times 0 5 0
/title @a[score_countdown_min=2] title {text:""}
/title @a[score_countdown_min=2] subtitle {text:"You have: ",color:dark_purple,bold:true,underlined:false,italic:false,strikethrough:false,obfuscated:false,extra:[{score:{name:"*",objective:"countdown"},color:dark_aqua,bold:true,underlined:false,italic:false,strikethrough:false,obfuscated:false,extra:[{text:" to posses a mob.",color:dark_purple,bold:true,underlined:false,italic:false,strikethrough:false,obfuscated:false}]}]}
Detect Mob Possesion:
/execute @a[m=3] ~ ~ ~ execute @e[type=Creeper,r=0] ~ ~ ~ scoreboard players set @p[r=0,m=3] mob 2
/execute @a[m=3] ~ ~ ~ execute @e[type=!Player,r=1] ~ ~ ~ scoreboard players set @p[r=1,m=3] posses 2
/scoreboard players remove @a[score_posses_min=1] posses 1
/execute @a[m=3] ~ ~ ~ execute @e[type=Blaze,r=0] ~ ~ ~ scoreboard players set @p[r=0] countdown 0
/execute @a[m=3] ~ ~ ~ execute @e[type=Blaze,r=0] ~ ~ ~ scoreboard players set @p[r=0,m=3] mob 1
/gamemode 2 @a[m=3,score_mob_min=1,score_posses=0]
/scoreboard players set @a[score_mob_min=1,score_posses=0] mob 0
/execute @a[score_mob_min=1,score_posses=0] ~ ~ ~ /scoreboard players reset @e[score_direction_min=1,r=1] direction
EntityData:
/entitydata @e[score_direction_min=2,score_direction=2,type=!Player] {Motion:[0.0,0.0,0.1],Rotation:[0f]}
/entitydata @e[score_direction_min=3,score_direction=3,type=!Player] {Motion:[0.0,0.0,-0.1],Rotation:[180f]}
/entitydata @e[score_direction_min=4,score_direction=4,type=!Player] {Motion:[-0.1,0.0,0.0],Rotation:[90f]}
/entitydata @e[score_direction_min=5,score_direction=5,type=!Player] {Motion:[0.1,0.0,0.0],Rotation:[-90f]}
/entitydata @e[score_direction_min=1,score_direction=1,type=!Player] {Motion:[0.0,0.1,0.0]}
/entitydata @e[score_direction_min=6,score_direction=6,type=!Player] {Motion:[0.0,-0.1,0.0]}
Entity Control Tellraw:
Blaze- /tellraw @a[score_mob_min=1,score_mob=1,m=3] {"text":"","extra":[{"text":"Move ","bold":"true"},{"text":"STOP -","color":"aqua","bold":"true","clickEvent":{"action":"run_command","value":"/execute @p ~ ~ ~ scoreboard players set @e[type=!Player,r=0] direction 0"}},{"text":"North - ","color":"dark_green","bold":"true","clickEvent":{"action":"run_command","value":"/execute @p ~ ~ ~ scoreboard players set @e[type=!Player,r=0] direction 2"}},{"text":"South - ","color":"green","clickEvent":{"action":"run_command","value":"/execute @p ~ ~ ~ scoreboard players set @e[type=!Player,r=0] direction 3"}},{"text":"West - ","color":"light_purple","clickEvent":{"action":"run_command","value":"/execute @p ~ ~ ~ scoreboard players set @e[type=!Player,r=0] direction 4"}},{"text":"East - ","color":"dark_purple","clickEvent":{"action":"run_command","value":"/execute @p ~ ~ ~ scoreboard players set @e[type=!Player,r=0] direction 5"}},{"text":"Up - ","color":"yellow","bold":"true","clickEvent":{"action":"run_command","value":"/execute @p ~ ~ ~ scoreboard players set @e[type=!Player,r=0] direction 1"}},{"text":"Down","color":"gold","clickEvent":{"action":"run_command","value":"/execute @p ~ ~ ~ scoreboard players set @e[type=!Player,r=0] direction 6"}}]}
Creeper - /tellraw @a[score_mob_min=2,score_mob=2,m=3] {"text":"","extra":[{"text":"Move ","bold":"true"},{"text":"STOP -","color":"aqua","bold":"true","clickEvent":{"action":"run_command","value":"/execute @p ~ ~ ~ scoreboard players set @e[type=!Player,r=0] direction 0"}},{"text":"North - ","color":"dark_green","bold":"true","clickEvent":{"action":"run_command","value":"/execute @p ~ ~ ~ scoreboard players set @e[type=!Player,r=0] direction 2"}},{"text":"South - ","color":"green","clickEvent":{"action":"run_command","value":"/execute @p ~ ~ ~ scoreboard players set @e[type=!Player,r=0] direction 3"}},{"text":"West - ","color":"light_purple","clickEvent":{"action":"run_command","value":"/execute @p ~ ~ ~ scoreboard players set @e[type=!Player,r=0] direction 4"}},{"text":"East - ","color":"dark_purple","clickEvent":{"action":"run_command","value":"/execute @p ~ ~ ~ scoreboard players set @e[type=!Player,r=0] direction 5"}},{"text":"Explode ","color":"dark_red","bold":"true","clickEvent":{"action":"run_command","value":"/execute @e[r=0] ~ ~ ~ summon PrimedTnt ~ ~ ~"}}]}
Particles- execute @p[m=3] ~ ~ ~ execute @e[type=Blaze,r=20] ~ ~ ~ /particle happyVillager ~ ~1 ~ 0.5 0.5 0.5 0.001 1 force
No comments:
Post a Comment