Jump to content

I need a AFK Skript!!! Please!!!


iiDeadKxnggg

Recommended Posts

3 hours ago, iiDeadKxnggg said:

Can't figure it out

Just Replace servername with your server name!!

 

options:
    afktime: 600 # how many seconds a player has to be afk before the skript runs.

command /afk:
    trigger:
        if {afk::%player%} is not set:
            set {afk::%player%} to true
            broadcast "&4&lServername>> &c%player% Is Now &4&lAFK"
            send title "&4&LYou are AFK!" with subtitle "&cMove in any direction." to player for {@afktime} seconds
            play sound "block.note_block.pling" to player
            set {_loc} to location of player
            while {afk::%player%} is set:
                wait 1 second
                if location of player != {_loc}:
                    delete {afk::%player%}
                    broadcast "&4&lServername>> &c%player% Is No Longer &4&lAFK"
                    send title "&4&LYou are no longer AFK!" to player for 2 seconds
                    play sound "block.note_block.pling" to player

on chat:
    if {afk::%player%} is not set:
        stop
    else if {afk::%player%} is set:
        delete {afk::%player%}
        broadcast "&4&lServerName>> &c%player% Is No Longer &4&lAFK"
        send title "&4&LYou are no longer AFK!" to player for 2 seconds
        play sound "block.note_block.pling" to player
            
on any move:
    if {afk::%player%} is set:
        delete {afk::%player%}

        send title "&4&LYou are no longer AFK!" to player for 2 seconds
        play sound "block.note_block.pling" to player
        
every second:
    set {_loc} to location of player
    if location of player != {_loc}:
        set {afktime::%player%} to 0
        delete {afk::%player%}
        broadcast "&4&lServername>> &c%player% Is No Longer &4&lAFK"
        send title "&4&LYou are no longer AFK!" to player for 2 seconds
        play sound "block.note_block.pling" to player
    if location of player = {_loc}:
        add 1 to {afktime::%player%}
    if {afktime::%player%} = {@afktime}:
        set {afk::%player%} to true
        broadcast "&4&lServername>> &c%player% Is Now &4&lAFK"
        send title "&4&LYou are AFK!" with subtitle "&cMove in any direction." to player for {@afktime} seconds
        play sound "block.note_block.pling" to player
        delete {afktime::%player%}
        

Link to comment
Share on other sites

On 8/21/2021 at 9:48 AM, nolando09 said:

Just Replace servername with your server name!!

 

options:
    afktime: 600 # how many seconds a player has to be afk before the skript runs.

command /afk:
    trigger:
        if {afk::%player%} is not set:
            set {afk::%player%} to true
            broadcast "&4&lServername>> &c%player% Is Now &4&lAFK"
            send title "&4&LYou are AFK!" with subtitle "&cMove in any direction." to player for {@afktime} seconds
            play sound "block.note_block.pling" to player
            set {_loc} to location of player
            while {afk::%player%} is set:
                wait 1 second
                if location of player != {_loc}:
                    delete {afk::%player%}
                    broadcast "&4&lServername>> &c%player% Is No Longer &4&lAFK"
                    send title "&4&LYou are no longer AFK!" to player for 2 seconds
                    play sound "block.note_block.pling" to player

on chat:
    if {afk::%player%} is not set:
        stop
    else if {afk::%player%} is set:
        delete {afk::%player%}
        broadcast "&4&lServerName>> &c%player% Is No Longer &4&lAFK"
        send title "&4&LYou are no longer AFK!" to player for 2 seconds
        play sound "block.note_block.pling" to player
            
on any move:
    if {afk::%player%} is set:
        delete {afk::%player%}

        send title "&4&LYou are no longer AFK!" to player for 2 seconds
        play sound "block.note_block.pling" to player
        
every second:
    set {_loc} to location of player
    if location of player != {_loc}:
        set {afktime::%player%} to 0
        delete {afk::%player%}
        broadcast "&4&lServername>> &c%player% Is No Longer &4&lAFK"
        send title "&4&LYou are no longer AFK!" to player for 2 seconds
        play sound "block.note_block.pling" to player
    if location of player = {_loc}:
        add 1 to {afktime::%player%}
    if {afktime::%player%} = {@afktime}:
        set {afk::%player%} to true
        broadcast "&4&lServername>> &c%player% Is Now &4&lAFK"
        send title "&4&LYou are AFK!" with subtitle "&cMove in any direction." to player for {@afktime} seconds
        play sound "block.note_block.pling" to player
        delete {afktime::%player%}
        

Looks awfully similar to an AFK skript I posted, just with some broadcasts...

Developer

 

Joined Minecraft in 2010 on PC

Joined Minehut in August 2016

1 year Skript experience

2 months Java experience

5 months Javascript experience

 

Link to comment
Share on other sites

16 minutes ago, emopediaMC said:

Looks awfully similar to an AFK skript I posted, just with some broadcasts...

I'm sure you made that code because it looks so familiar

I used to play Minehut I guess?
Yeah, I still watch the forums for some reason. (15/5/2023)
Link to comment
Share on other sites

18 minutes ago, emopediaMC said:

Looks awfully similar to an AFK skript I posted, just with some broadcasts...

Ye i found it

 

Just now, nolando09 said:

Im sorry ok.. I just  wanted to fit in and have people be proud of me

I like how you want to fit in but copying isn't the way to go. I recommend watching Minehut's skript tutorials

https://www.youtube.com/c/Minehut/playlists

I used to play Minehut I guess?
Yeah, I still watch the forums for some reason. (15/5/2023)
Link to comment
Share on other sites

  • 7 months later...
  • 4 weeks later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...