1
Trigger --> Summon without beeing OP
Hi there,
I tried to make a book that would summon a fireball.
/give @a written_book 1 0 {title:"Book of fireball",author:"Magicman",pages:["{text:'Fireball',color:dark_red,bold:true,clickEvent:{action:run_command,value:'/summon Fireball ~0 ~2 ~0 {ExplosionPower:5,direction:[0,0.0,0.0]}'}}"]}
And it went excelent with one exception... I had to be OP to use the book
What could be the workarrount to this?
Trigger is something one can do as player
Trigger --> A fireball point fireballpoint=1
then a commandblock somehow with testfor checks and deivers fireball to player
/summon Fireball ~0 ~2 ~0 {ExplosionPower:5,direction:[0,0.0,0.0]}
Any Ideas of how this could be done, Best would be if the book itself could be OP and any player holding it could use the added commands as OP.
An extra question:
If it is solveble I would love to create a book of kill alla creatures /kill xxx raduis xxx with the addition that the book destroyed itself and was removed from players inventory.
With that one could make powerfull books that serves as "one shot" books
I tried to make a book that would summon a fireball.
/give @a written_book 1 0 {title:"Book of fireball",author:"Magicman",pages:["{text:'Fireball',color:dark_red,bold:true,clickEvent:{action:run_command,value:'/summon Fireball ~0 ~2 ~0 {ExplosionPower:5,direction:[0,0.0,0.0]}'}}"]}
And it went excelent with one exception... I had to be OP to use the book
What could be the workarrount to this?
Trigger is something one can do as player
Trigger --> A fireball point fireballpoint=1
then a commandblock somehow with testfor checks and deivers fireball to player
/summon Fireball ~0 ~2 ~0 {ExplosionPower:5,direction:[0,0.0,0.0]}
Any Ideas of how this could be done, Best would be if the book itself could be OP and any player holding it could use the added commands as OP.
An extra question:
If it is solveble I would love to create a book of kill alla creatures /kill xxx raduis xxx with the addition that the book destroyed itself and was removed from players inventory.
With that one could make powerfull books that serves as "one shot" books
Create an account or sign in to comment.
3
1
Now to the extra-question
/scoreboard players enable @a killall
here is the book:
/give @a written_book 1 0 {pages:["[\"\",{\"text\":\"Kill all entities\",\"color\":\"dark_gray\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger killall set 1\"},\"hoverEvent\":{\"action\":\"show_text\",\"value\":{\"text\":\"\",\"extra\":[{\"text\":\"Kill all entities in a radius of 20\"}]}}}]"],title:"Kill All",author:UncleThaodan}
Constantly running commandblocks:
/execute @a[score_killall_min=1] ~ ~ ~ kill @e[type=!Player,r=20]
/execute @a[score_killall_min=1] ~ ~ ~ clear @p written_book -1 1 {display:{Name:"One Shot"}}
/scoreboard players set @a killall 0
*Haven't tried it yet, but it should work*
/scoreboard players enable @a killall
here is the book:
/give @a written_book 1 0 {pages:["[\"\",{\"text\":\"Kill all entities\",\"color\":\"dark_gray\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger killall set 1\"},\"hoverEvent\":{\"action\":\"show_text\",\"value\":{\"text\":\"\",\"extra\":[{\"text\":\"Kill all entities in a radius of 20\"}]}}}]"],title:"Kill All",author:UncleThaodan}
Constantly running commandblocks:
/execute @a[score_killall_min=1] ~ ~ ~ kill @e[type=!Player,r=20]
/execute @a[score_killall_min=1] ~ ~ ~ clear @p written_book -1 1 {display:{Name:"One Shot"}}
/scoreboard players set @a killall 0
*Haven't tried it yet, but it should work*
1
It will work, but remove the execute clear to only clear.
1
Here is one way to do it:
/scoreboard players enable @a somethingsomething
command triggered by the book:
/trigger somethingsomething set 1
*somethingsomething must be of the
Then a commandblock tests for somethingsomething:
/execute @a[score_somethingsomething_min=1] ~ ~ ~ /summon Fireball ~0 ~2 ~0 {ExplosionPower:5,direction:[0,0.0,0.0]}
Then reset somethingsomething:
/scoreboard players set @a somethingsomething 0
As far as i see it, you are trying to run this on a server. If i remember correctly the /op command can not be executed by commandblocks (at least in vanilla). Therefore it cant be given to a player automatically.
/scoreboard players enable @a somethingsomething
command triggered by the book:
/trigger somethingsomething set 1
*somethingsomething must be of the
Then a commandblock tests for somethingsomething:
/execute @a[score_somethingsomething_min=1] ~ ~ ~ /summon Fireball ~0 ~2 ~0 {ExplosionPower:5,direction:[0,0.0,0.0]}
Then reset somethingsomething:
/scoreboard players set @a somethingsomething 0
As far as i see it, you are trying to run this on a server. If i remember correctly the /op command can not be executed by commandblocks (at least in vanilla). Therefore it cant be given to a player automatically.