#Afk Code

1 messages · Page 1 of 1 (latest)

sturdy bluff
#

import com.sk89q.worldedit.bukkit.BukkitAdapter
import com.sk89q.worldguard.bukkit.WorldGuardPlugin

on load:

Check if WorldGuard plugin is available

if not pluginExists("WorldGuard"):
stop("This script requires WorldGuard plugin to be installed.")

Check if a player is standing in the AFK pool region every second

every 1 second:
loop all players:
if player is standing in afk pool region:
if {player} afk token timer is set:
# Check if the player has been standing for 5 minutes
if {player} afk token timer is >= 300:
remove {player} afk token timer
give {player} 1 lime dye named "AfkToken"
else:
set {player} afk token timer to 1
else:
remove {player} afk token timer

Define the AFK pool region

region afk pool:
flags:
- interact allow
- build allow

Function to check if a player is standing in the AFK pool region

function player is standing in afk pool region:
if region "afk pool" is in WorldGuardPlugin:
set {_loc} to player's location
set {_region} to region "afk pool" in WorldGuardPlugin
return {_region} contains {_loc}
else:
stop("The AFK pool region is not defined.")

lavish geyser
#

wait what

#

this skript is so cursed

cold siren
#

wat

sturdy bluff
cold siren
sturdy bluff
#

no but yeah, i asked chatgpt (not a good idea since the ai cant skript) to make what you said in your request,

cold siren
#

i want to learn skript again so i'll try

#

do u want a global timer or a timer for every player

lavish geyser
#

{player} 💀

cold siren
#

ok

sturdy bluff
#

what did you expect?

#

lol

#

these two places are for those who want skript help

#

damn

lavish geyser
#
while player's regian = "hottub" {
  wait 1 second
  give event.getPlayer() 1 of Material.Diamond

}
sturdy bluff
#

dont think he has reflect installed

#

skript reflect

#

exactly

#

just learn skript, a "afk pool" is verry basic

#

you can make one with only like about 5 lines or less

lavish geyser
#

every 1 tick

sturdy bluff
#

its verry bad made, but i guess it could work

#

i never said anything about finding others skript,

lavish geyser
#

loop all players where [input's region = "region"]

sturdy bluff
#

bro this is a config from a plugin

#

this is badly made because i can go out and play and set a timer for every 15 minutes

cold siren
sturdy bluff
#

and go back to the afk pool to claim

#

you should always try before asking

#

bro i sent a link to a tutorial like 1 min ago

#

take some time learning

cold siren
#

this seems to work for me
keep in mind i havent used skript in a while

on region enter:
    if region is "afk" parsed as region:
        set {afk::%player%} to true
        
on region exit:
    if region is "afk" parsed as region:
        delete {afk::%player%}
        
every second:
    loop all players:
        if {afk::%loop-player%} is set:
            if {afktimer::%loop-player%} is set:
                subtract 1 from {afktimer::%loop-player%}
                if {afktimer::%loop-player%} is 0:
                    give nether star named "afk token" to loop-player
                    set {afktimer::%loop-player%} to 300
            else:
                set {afktimer::%loop-player%} to 300
sturdy bluff
#

instead of asking or searching for skripts

cold siren
#

you could definitely make that script better but

#

who cares

sturdy bluff
cold siren
#

did you read

#

i wanna help + i wanna learn

sturdy bluff
#

did you miss my point 1?

cold siren
#

is it an actual rule

#

or are u just annoying

sturdy bluff
cold siren
#

yeah true

sturdy bluff
# cold siren is it an actual rule

if you want every new kid that wants skripts to come here and mass spam open posts begging for skripts this place would be a sh*t show

cold siren
#

have u ever tried coding at all

sturdy bluff
#

if you actually want to learn skript you should take your time reading and trying to understand, not just fast reading thru

cold siren
#

you are 3 years too young to use discord

sturdy bluff
#

@brisk garden

cold siren
#

lol rip

sturdy bluff
#

you know that you need to be 13 to use discord

#

and will be banned from this discord for being underage

cold siren
#

ok

sturdy bluff
#

ok

cold siren
#

true honestly

sturdy bluff
#

well say good bye to your account

#

the one kicking you from this discord server whenever they get online

#

you got scared?

#

gone