The thing is. I made a wallet that displays using /tellraw the currency of a person if he holds the item. how it works is when the player holds the item.
then the it finds @a[score_WALLET_min=1] and if it finds it displays it.
Problem if lets say someone goes afk holding that item. another person that wants to check the currency can't cause the command blocks are triggered.
I can't think of a way to make it so multiple people can use it simultaneously
/scoreboard players tag @a add openWallet {SelectedItem:{id:"minecraft:<name of item>",tag:{display:{Name:"Wallet"}}}}
/tellraw @a[tag=openWallet] {}
(put the tellraw you want to display the wallet and stuff. With this setup, it will update the wallet ballance and everything in real time. You can also add buttons to the tellraw like: [Deposit] [Withdraw]. However this isnt very reliable for servers since tellraw needs permissions to activate commands in it. For the text, make it have like TONS of spaces before it so when they open the chat bar it only displays 1 set of info)
/scoreboard players tag @a[tag=openWallet] remove openWallet
Does not work. at first It showed everyone my currency so I added the score_WALLET_min=1
so it will show not only openwallet, but people that hold the wallet.
I placed 4 command blocks. 1 - 4 in a horizontal position.
1 first 4 last.
1.
/scoreboard players tag @a add openWallet {SelectedItem:{id:"minecraft:book",tag:{display:{Name:"Wallet",Lore:["Its a wallet,definitely not a book"]}}}}
/scoreboard players tag @a add openWallet {SelectedItem:{id:"minecraft:book",tag:{display:{Name:"Wallet",Lore:["Its a wallet,definitely not a book"]}}}}
it spams it on purpose, you need more commands to not spam it. If you want, add a bunch of spaces before it with tellraw so it looks like its static.
Tags are the same as scoreboard objectives but without numbers, they make it less laggy. They can be used to determine who is who. I suggest only using scoreboard if you need to count something
Do these commands instead (you also need a scoreboard)
/scoreboard players set @a[score_openWallet_min=0,score_openWallet=0] openWallet 2 {SelectedItem:{id:"minecraft:book",tag:{display:{Name:"Wallet",Lore:["Its a wallet,definitely not a book"]}}}}
Sorry to bother you any longer. yet it does not work. I went over the command block to see where is the problem and it is somewhere in the first line. It does not set the objective openWallet to 2.
I did create an objective named openWallet as a dummy.
Edit:
I just made all players have the score of 0 on the openWallet. thing is now
Due to my whole area being in the 251 region I can't make it vertical. so I made it horizontal from the left to the right. 6 command blocks
1 - Repeat:
/scoreboard players set @a[score_openWallet_min=0,score_openWallet=0] openWallet 2 {SelectedItem:{id:"minecraft:book",tag:{display:{Name:"Wallet",Lore:["Its a wallet,definitely not a book"]}}}}
Rather than having the command tellraw stuff into your chat, why don't you just use JSON Creator for Minecraft to create a book that displays whatever your currency scoreboard objective is to @p (which will always be the player reading the book)?
Because the thing is the score of the player remains the same untill the book is destroyed and readded.
I tried to do this but for some reason I couldn't clear the book in the first place with the name and lore. no matter what I tried.
EDIT:
I did what you told me to do.and It works once the player has the score of 3.
What I did(hopefully it is compatible with multiple player,which I think is not) everytime a player does not hold the wallet
it adds 1 every 1 second. then it caps in 3. once it caps in 3 and it detects the player is holding the wallet using the WALLET method + the openWallet method then it shows the score and it sets it back to 0. then all over again.
SECOND EDIT:
On second thought if an AFK player holds the wallet and the rest of the players have the score of 3 then it will do the thing.
I'd like some help by you thanks. If you have the time to make a video sure. I have a lot on me. I am making a big rpg world and we are 14 builders and 1 command block coder.. thats me.
And my knowledge isn't good enough to be doing this quickly.
I added another command just because it would not reset once the command ends. What I did is added a 1 second circuit to a command block and inside it checks.
1.If the player is not holding the wallet
2.If the player has the score of openwallet set to 2(means the whole wallet display ended)
then it sets it to 0.
Thanks for helping. its gonna make it hell a lot easier when I need multiple players to use spells at the same time.
The thing is. I made a wallet that displays using /tellraw the currency of a person if he holds the item. how it works is when the player holds the item.
then the it finds @a[score_WALLET_min=1] and if it finds it displays it.
Problem if lets say someone goes afk holding that item. another person that wants to check the currency can't cause the command blocks are triggered.
I can't think of a way to make it so multiple people can use it simultaneously
Use on repeating Command:
/scoreboard players tag @a add openWallet {SelectedItem:{id:"minecraft:<name of item>",tag:{display:{Name:"Wallet"}}}}
/tellraw @a[tag=openWallet] {}
(put the tellraw you want to display the wallet and stuff. With this setup, it will update the wallet ballance and everything in real time. You can also add buttons to the tellraw like: [Deposit] [Withdraw]. However this isnt very reliable for servers since tellraw needs permissions to activate commands in it. For the text, make it have like TONS of spaces before it so when they open the chat bar it only displays 1 set of info)
/scoreboard players tag @a[tag=openWallet] remove openWallet
Does not work. at first It showed everyone my currency so I added the score_WALLET_min=1
so it will show not only openwallet, but people that hold the wallet.
I placed 4 command blocks. 1 - 4 in a horizontal position.
1 first 4 last.
1.
2.
3.
4.
There is a fill clock that the top sets the score of wallet to 1 if someone holds a book named wallet with the certain lore.
and under that vertical line there is the one that sets it back to 0
so
sets 1
redstone_block
sets 0
Does not work me and my friend can't seen to make it work simultaneously
1) are you on 1.10 or 1.9?
2) are you using a repeater command block with chain command blocks?
3) I tested it out myself, here are some screenshots. I placed your commands in order from bottom to top, but deleted the score_WALLET_min=1 part
http://prntscr.com/bld8h7
http://prntscr.com/bld8j8
1.
2.
3.
4.
Edit:
It like spams it. and can you give me some background on TAG thingy.
I am making an mmorpg server and I do need to make skills and such be compatible with multiple people.
it spams it on purpose, you need more commands to not spam it. If you want, add a bunch of spaces before it with tellraw so it looks like its static.
Tags are the same as scoreboard objectives but without numbers, they make it less laggy. They can be used to determine who is who. I suggest only using scoreboard if you need to count something
What kind of command I need to do to make it one time.
I dont need it spamming the player
Sorry to bother you any longer. yet it does not work. I went over the command block to see where is the problem and it is somewhere in the first line. It does not set the objective openWallet to 2.
I did create an objective named openWallet as a dummy.
Edit:
I just made all players have the score of 0 on the openWallet. thing is now
it sets on 1. and it can't be used again.
Did you have these commands on the chain?
/scoreboard players add @a openWallet 2 {Blah Blah Blah...}
/scoreboard players remove @a[score_openWallet_min=1] openWallet 1
/scoreboard players remove @a[score_openWallet_min=6] openWallet 1
/tellraw @a[score_openWallet_min=3,score_openWallet=3] [{"text":"Gold coins : ","color":"gold"},{"score":{"name":"*","objective":"Coins"}}]
These commands don't need an order, I think.
All you need is 2 scoreboards : Coins and openWallet
Both are dummy.
I haven't test it yet. So you have to expect it may not work.
with those commands it would repeat the line once when you open and again when you close
Due to my whole area being in the 251 region I can't make it vertical. so I made it horizontal from the left to the right. 6 command blocks
1 - Repeat:
2.Chain to the right conditional
3.Chain to the right conditional
4.Chain to the right conditional
5.Chain to the right conditional
6.Chain to the right conditional
Because you use a vertical chain. when you said top I though the last one in the chain.
It does not work. it spams the lines.
There is the repeat that sets everybody that holds it to 2. then during the proccess it goes down to 1. then 0
so of course it would spam cause now it would be 2 and so on.
try changing the first command to 3, then the tellraws min to 3 then adding another command at the very end of the chain with:
/scoreboard players set @a[score_openWallet_min=1] openWallet 2 {code stuff}
Hey, OP, may I offer an alternative solution?
Rather than having the command tellraw stuff into your chat, why don't you just use JSON Creator for Minecraft to create a book that displays whatever your currency scoreboard objective is to @p (which will always be the player reading the book)?
Because the thing is the score of the player remains the same untill the book is destroyed and readded.
I tried to do this but for some reason I couldn't clear the book in the first place with the name and lore. no matter what I tried.
EDIT:
I did what you told me to do.and It works once the player has the score of 3.
What I did(hopefully it is compatible with multiple player,which I think is not) everytime a player does not hold the wallet
it adds 1 every 1 second. then it caps in 3. once it caps in 3 and it detects the player is holding the wallet using the WALLET method + the openWallet method then it shows the score and it sets it back to 0. then all over again.
SECOND EDIT:
On second thought if an AFK player holds the wallet and the rest of the players have the score of 3 then it will do the thing.
I dont know what to do anymore :/
Ok, i will make a structure file of it when I can ;D If you need a video, that can be made too
I'd like some help by you thanks. If you have the time to make a video sure. I have a lot on me. I am making a big rpg world and we are 14 builders and 1 command block coder.. thats me.
And my knowledge isn't good enough to be doing this quickly.
Sure no problem, I am currently helping out with a Dungeons rpg world and I used to have an rpg server XD
Ok, I was able to finalize it and actually test it. You just needed 1 more command bloc, but destroy what you have already just to be sure.
From first to last commands:
/scoreboard players set @a[score_openWallet_min=0,score_openWallet=0] openWallet 3 {SelectedItem:{id:"minecraft:book",tag:{display:{Name:"Wallet"}}}}
/tellraw @a[score_openWallet_min=3] {"text":"Gold Coins:","color":"gold"}
/tellraw @a[score_openWallet_min=3] {"score":{"name":"*","objective":"Coins"}}
/scoreboard players remove @a[score_openWallet_min=1] openWallet 1
/scoreboard players set @a[score_openWallet_min=1] openWallet 2 {SelectedItem:{id:"minecraft:book",tag:{display:{Name:"Wallet"}}}}
/scoreboard players add @a openWallet 0
The key command was the second to last, it makes sure that the players score never hits 0 or 3 until they are no longer holding the wallet!
Thanks dude :D.
I added another command just because it would not reset once the command ends. What I did is added a 1 second circuit to a command block and inside it checks.
1.If the player is not holding the wallet
2.If the player has the score of openwallet set to 2(means the whole wallet display ended)
then it sets it to 0.
Thanks for helping. its gonna make it hell a lot easier when I need multiple players to use spells at the same time.