rendered paste body;########################
;# Away Script By Def669#
;########################
menu * {
Def's Away System (/away.con): /away.con
}
alias brb {
if (%awaynick == $null) {
set %reasonaway $1-
/dialog -mo setname setname
halt
}
else {
set %awaystatus on
set %backnick $me
set %awayfrom $ctime
set %reasonaway $1-
/away $1-
/ame is away: $1- ~ Left At: $asctime(HH:nn:ss)
/nick %awaynick
write -il1 awaylog.txt -- ++ --
write -il2 awaylog.txt Away Session Started - $+ %reasonaway $+ - $asctime(HH:nn:ss) ~ $date
write -il3 awaylog.txt -- ++ --
}
}
alias back {
/ame is back from: %reasonaway ~ Gone For: $duration($calc($ctime - %awayfrom))
/nick %backnick
/away
write awaylog.txt -- ++ --
write awaylog.txt Away Session Ended - $+ %reasonaway $+ - $asctime(HH:nn:ss) ~ $date
write awaylog.txt -- ++ --
/unset %backnick
/unset %awaystatus
/unset %reasonaway
/unset %awayfrom
}
on *:text:*:#:{
if (%awaystatus == on) write awaylog.txt $asctime(HH:nn:ss) $nick >> $1-
}
dialog Away {
title "Def's Away System"
size -1 -1 184 89
option dbu
edit "", 1210, 2 72 67 10, read
text "You have been away for:", 1211, 2 64 67 8
text "Your Time:", 1212, 2 45 28 8
edit "", 1213, 2 53 67 10, read
button "Go Away", 1214, 90 43 76 12
button "Come Back", 1215, 90 56 76 12
button "View Log", 1216, 90 69 76 12
edit "", 1217, 3 12 175 10
text "Enter an away reason:", 1218, 4 2 57 8
text "Away Nick:", 1219, 3 23 34 8
edit "", 1220, 2 32 50 10
text "Current Nick:", 1221, 90 23 34 8
edit "", 1222, 90 32 50 10
}
dialog setname {
title "Please Set An Away Nick"
size -1 -1 122 37
option dbu
text "Nick:", 1210, 6 3 25 8
edit "", 1211, 6 11 106 10
button "Ok", 1212, 41 23 37 12, Ok
}
on *:dialog:Away:sclick:1216:{
/run $scriptdir $+ awaylog.txt
}
on *:dialog:Away:sclick:1215:{
if (%awaystatus == $null) {
echo -a 04Your Not Away!
}
else {
/back
}
}
on *:dialog:Away:sclick:1214:{
if ($did(1217) == $null) {
/echo -a 04Enter a reason first
}
elseif ($did(1220) == $null) {
dialog -x Away
dialog -mo setnick setnick
}
else {
/brb $did(1217)
}
}
alias Away.Con {
/dialog -mo away away
did -ra Away 1213 $time
if (%awayfrom == $null) did -ra Away 1210 You are not away!
else did -ra Away 1210 $duration($calc($ctime - %awayfrom))
/did -ra Away 1220 %awaynick
/did -ra Away 1222 $me
/did -ra Away 1217 %reasonaway
}
on *:dialog:setname:sclick:1212:{
if ($Did(1211) == $null) {
echo -a 04You Must choose a nick to use!
halt
}
else {
set %awaynick $did(1211)
/brb %reasonaway
}
}