[nas]peter afk script.
To install follow these instructions:
Go to the Tools menu and select "Scripts Editor" (press ALT + R at the same time will immediately go to "Scripts Editor")
Select the "Remote" tab
Select NEW in the FILE menu
Copy + Paste the entire script into the resulting file
Click the OK button
Right click on a channel
Go to "AFK script and Nickalert (or AFK script if you didn't get nickalert integrated in it)"
Click "AFK dialog" and a dialog will turn up
Click: "Install script" and fill out all prompts
P.s. I can't get autoafk to work (someone told me this would work:
; alias checkaway {
if($idle > %autoafk.time && %afk.status == off) {
Afk-on Auto afk after $duration(%autoafk.time)
}
;if($idle < %autoafk.time && %afk.status == on) {
afk-off
};
i saw it was wrong as you can't normally go afk.
on *:START: {
set %afk.status 0
; timer 0 60 checkaway ;
}
alias Afk-on {
set %afk.status 1
set %afk.reason $$1-
set %afk.time $time
set %afk.date $date
nick %afk.nick
timer 1 2 echo -a You are now afk || you went afk on %afk.time %afk.date with reason: %afk.reason
}
alias afk-off { set %afk.status 0
nick %nonafk.nick
timer 1 2 msg nickserv identify %password
timer 1 2 echo -a You are now back from afk || you went afk on %afk.time %afk.date with reason: %afk.reason
set %afk.reason Not afk
}
on :TEXT::#: {
if (%alertnick isin $1-) && ($me == %afk.nick) {
if ($readini(afk-script-no-notice.ini,Ignore,$nick) != $null) { halt }
notice $nick I am now AFK || Your message has been logged || I have been AFK since: %afk.time %afk.date || If you really need me pm me or just nickalert me a few more times
}
}
on :INPUT:: {
if ( %afk.status ) {
afk-off
}
}
menu channel,nicklist,query,status {
.AFK script
..Go AFK:/afk-on $$?="Why do you go afk?"
..Back:/Afk-off
..Dialog (use to install, change settings):/dialog -m Peter_afk_Dialog Peter_afk_Dialog
..AFK Ignore list
...Add:addnick-afk
...Del:delnick-afk
}
alias ingame.afk.set {
set %ingame.nick $$?="What do you want the nick to be when you join the game?"
set %ingame.afk.nick $$?="What is your ingame name?"
}
alias install_peter_afk {
set %nonafk.nick $$?="What will be the nickname you want to use when you return?"
set %afk.nick $$?="What will be your afk nick?"
set %password $$?="What is the password that is used with nickserv identification?"
set %alertnick $$?="What will be the alert nickname?"
set %ingame.nick $$?="What do you want the nick to be when you join the game?"
set %ingame.afk.nick $$?="What is your ingame name?"
var %Autoafk_enable = $iif($?!="Do you to enable Auto AFK?",1,0)
Autoafk_setup
}
alias Autoafk_setup {
if ( %autoafk_enable ) {
set %autoafk.time $$?="After how many SECONDS do you want to go Auto afk?"
echo -a auto-afk installed with parameters %autoafk seconds
}
}
; alias checkaway {
if($idle > %autoafk.time && %afk.status == off) {
Afk-on Auto afk after $duration(%autoafk.time)
}
;if($idle < %autoafk.time && %afk.status == on) {
afk-off
};
on :TEXT:(*) Has Joined Cops-Robbers-RPG v3.0: {
if ($1 == %ingame.afk.nick) { ingame.afk } }
alias ingame.afk {
nick %ingame.nick
set %afk.status 1
}
on :TEXT: Has left the server (*): { if ($1 == %ingame.afk.nick) { /ingame.back } }
alias ingame.back {
afk-off
}
on :TEXT::?: {
if ( %afk.status ) {
I am AFK at the moment. Reason for this is: %afk.reason I will check your message when i am back. I went afk on %afk.time %afk.date
}
}
dialog Peter_afk_Dialog {
title "Peter's AFK script dialog"
size -1 -1 160 120
option dbu
button "Install Script", 2, 6 0 37 12
box "Group Box", 3, -7 -8 92 128
button "Set Nickname (not AFK)", 4, -111 -99 59 15
button "Set Nickname (AFK)", 5, 6 29 49 12
button "Set Nickname (Alert Nick Name)", 6, 6 14 59 12
box "Group Box", 7, -21 -23 28 143
button "Set NickServ identify password", 8, 6 44 79 12
button "Auto afk", 9, 6 60 37 12
text "Make sure you use Install script if it is the first time you use this script. Don't remove the credits please. ", 11, 92 4 48 46
menu "Options", 1
item "Install Script", 10, 1
item "Set Nickname's", 12, 1
item "Set Auto AFK", 13, 1
item "Set NickServ Identification Password", 14, 1
}
on *:dialog:Peter_afk_Dialog:sclick:2,10: {
install_peter_afk
}
on *:dialog:Peter_afk_Dialog:sclick:4: {
set %nonafk.nick $$?="What will be the nickname you want to use when you return?"
}
on *:dialog:Peter_afk_Dialog:sclick:5: {
set %afk.nick $$?="What will be your afk nick?"
}
on *:dialog:Peter_afk_Dialog:sclick:6: {
set %alertnick $$?="What will be the alert nickname?"
}
on *:dialog:Peter_afk_Dialog:sclick:8: {
set %password $$?="What is the password that is used with nickserv identification?"
}
on *:dialog:Peter_afk_Dialog:sclick:9: {
var %Autoafk_enable = $iif($?!="Do you to enable Auto AFK?",1,0)
Autoafk_setup
}
on :dialog:Peter_afk_Dialog:sclick:12: {
nick_set_afk_script
}
on :dialog:Peter_afk_Dialog:sclick:15: {
dialog -m peter_alert_dialog peter_alert_dialog
dialog -x peter_afk_dialog peter_afk_dialog
}
alias nick_set_afk_script {
set %nonafk.nick $$?="What will be the nickname you want to use when you return?"
set %afk.nick $$?="What will be your afk nick?"
set %alertnick $$?="What will be the alert nickname?"
set %ingame.nick $$?="What do you want the nick to be when you join the game?"
set %ingame.afk.nick $$?="What is your ingame name?"
}
on *:DIALOG:Peter_afk_Dialog:menu:14: {
set %password $$?="What is the password that is used with nickserv identification?"
}
on *:DIALOG:Peter_afk_Dialog:menu:13: {
var %Autoafk_enable = $iif($?!="Do you to enable Auto AFK?",1,0)
Autoafk_setup
}
on *:DIALOG:Peter_afk_Dialog:menu:12: {
nick_set_afk_script
}
on *:DIALOG:Peter_afk_Dialog:menu:10: {
install_peter_afk
}
Alias addnick-afk {
var %nick $$?="who to ignore in the nick alert:"
writeini -n afk-script-no-notice.ini Ignore %nick 1
}
Alias delnick-afk {
var %nick $$?="who to unignore in the nickalert:"
remini afk-script-no-notice.ini Ignore %nick
}