This is very simple, and I'm absolutely positive I did not make this first. But it could be useful for a vanilla server wanting to reward players for staying online for a certain amount of time.
What is happening is every second you are given 1 point. I don't know if the spam can be removed, but if not you might want to increase the timer and give points every minute or something.
(Ignore the stone in my inventory here, I dropped it before taking the next screenshot.)
So now what is happening is at 60 points (60 seconds online time) you are given an item, in this case stone. Also your points are set to 1 at 61 points (counter resets basically), the setup I had was resetting points before giving the item so I made the points reset a second later and set your points to 1 instead of 0.
That is pretty much it. You can use this idea and improve on it to make it a reward feature on your server or for whatever else you can think of.
Notes:
I wouldn't use timers to just give everyone items without giving players points inbetween. This would mean a new player could log in when the timer gives out items and receive the item without actually playing for however long you want them to play for. Unless you prefer it that way.
I used a pulsar and 15 redstone repeaters to make the timer. There are more compact ways to do this, but I just wanted to finish it quickly.
You can also use a daylight sensor. Not sure what the specs are for each incrementing redstone signal, but I'm sure it could be very useful, but it would have to have sunlight directly on it. Just a thought...
What is happening is every second you are given 1 point. I don't know if the spam can be removed, but if not you might want to increase the timer and give points every minute or something.
(Ignore the stone in my inventory here, I dropped it before taking the next screenshot.)
So now what is happening is at 60 points (60 seconds online time) you are given an item, in this case stone. Also your points are set to 1 at 61 points (counter resets basically), the setup I had was resetting points before giving the item so I made the points reset a second later and set your points to 1 instead of 0.
That is pretty much it. You can use this idea and improve on it to make it a reward feature on your server or for whatever else you can think of.
Command block codes:
Notes:
I wouldn't use timers to just give everyone items without giving players points inbetween. This would mean a new player could log in when the timer gives out items and receive the item without actually playing for however long you want them to play for. Unless you prefer it that way.
I used a pulsar and 15 redstone repeaters to make the timer. There are more compact ways to do this, but I just wanted to finish it quickly.