Jump to content
  • 0

Afk pool reward system


refraction

Question

2 answers to this question

Recommended Posts

  • 0
8 minutes ago, refraction said:

Im thinking of adding one of those afk rooms in my minecraft server that gives players a special item after 10 minutes or so. Anyone know an easy way I can do this?

you could use Skript and WorldGuard to achieve this

 

every 10 minutes:
	loop all players:
		if "%region at loop-player%" contains "AFKZone":
			give loop-player 1 golden apple

 

 

 

image.png.bc433d6489d70ad831075fe76809b993.png
 

Owner of Lifestealed, Labs, Encore, UNOfficially and Observed
 

OG [VIP] 12/26/20 - 10/27/2021
OG [PRO] 12/27/21 - 11/18/2022
OG [LEGEND] 11/18/2022 - 3/14/2023
[DEFAULT] 3/14/2023 - 5/8/2024

[MOD] 5/8/2024 - Present

 

Link to comment
Share on other sites

  • 0

THIS SKRIPT HAS A BUG

People just logged on can get golden apples, use variables instead

 

Spoiler
 
on region enter:
    if region is "afk" parsed as region:
        set {time::%uuid of player%} to 10 minutes
        send title "&A&lAFK MODE" with subtitle "&fYou have &A&nentered&R the &A&nafk&r &a&narea&R" to player for 3 seconds
       
on region exit:
    if region is "afk" parsed as region:
        set {time::%uuid of player%} to 10 minutes
        send title "&5&lLEFT AFK MODE" with subtitle "&fYou have &5&nleft&R &5&nafk&r &5&nmode&R" to player for 3 seconds


 
every second:
    loop all players:
        if "%region at loop-player%" contains "afk" parsed as region:
            if {time::%uuid of loop-player%} is not 0 seconds:
                subtract 1 second from {time::%uuid of loop-player%}
                send actionbar "&a&lAFK MODE &8| &A%{time::%uuid of loop-player%}%" to loop-player
            else:
                send title "&A&LAFK REWARDS" with subtitle "&fYou have &A&nrecieved&r an &8(your item&8)"
                give player (your item)
                set {time::%uuid of loop-player%} TO 10 minutes

 

 

Edited by ilyLuna
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...