AFK Checker

id: 518583

category: Help with Scripts

posts: 12

Niltoz Niltoz loading
How do I make an AFK checker for my game.

Project Link: Online test
Westech60 Westech60 loading
You could check to see if the x and y pos are the same after maybe 3 minutes.
JaCreatot JaCreatot loading
All you need is to check if nothing changes, make a timer variable, when it reaches a certain time in seconds have it activate the afk code. The check could check x&y, cursor position, clicks in a certain time, many things, they just have to be something common.
Niltoz Niltoz loading
Hmm thanks for the help
Niltoz Niltoz loading
I am having trouble with making it.. Any Help
forever
set [Old mouse x v] to (mouse x)
set [Old mouse y v] to (mouse y)
if <<key [any v] pressed?> or <mouse down?>> then
reset timer // the user did something
end
if <<not <(mouse x) = (Old mouse x)>> or <not <(mouse y) = (Old mouse y)>>> then
reset timer // the moused moved
end
if <(timer) > [10]> then // replace 10 with the time you want
afk :: #969696
end
end
Niltoz Niltoz loading

The_Imaginarium wrote:

forever
set [Old mouse x v] to (mouse x)
set [Old mouse y v] to (mouse y)
if <<key [any v] pressed?> or <mouse down?>> then
reset timer // the user did something
end
if <<not <(mouse x) = (Old mouse x)>> or <not <(mouse y) = (Old mouse y)>>> then
reset timer // the moused moved
end
if <(timer) > [10]> then // replace 10 with the time you want
afk :: #969696
end
end
ks

thanks
I made one here if you need it.
___lol__--- ___lol__--- loading
hey, idk how to make the afk button
satyasundar satyasundar loading

___lol__--- wrote:

hey, idk how to make the afk button

The AFK button? Well it's quite easy, click the “My Blocks” category (the last category), and then click “Make a Block” then, name the block AFK and add in the following functions as stated above, or add your own functions to it.

Hope this helps!
Unithlees3 Unithlees3 loading

___lol__--- wrote:

hey, idk how to make the afk button
why did you bring up a topic from 3 years ago
it was already resolved
___lol__--- ___lol__--- loading

The_Imaginarium wrote:

forever
set [Old mouse x v] to (mouse x)
set [Old mouse y v] to (mouse y)
if <<key [any v] pressed?> or <mouse down?>> then
reset timer // the user did something
end
if <<not <(mouse x) = (Old mouse x)>> or <not <(mouse y) = (Old mouse y)>>> then
reset timer // the moused moved
end
if <(timer) > [10]> then // replace 10 with the time you want
afk :: #969696
end
end
/scratchblocks][/quote]