This is my first script & just a simple script.
!afk
!back
on *:TEXT:*!afk*:#:{
if ($nick) {
/set %reason $2- | /amsg 9 $nick is away
/amsg 4Reason: 4 $+ %reason $+ 9,0 | set %away.time $ctime | enable #away | set %away on
}
on *:TEXT:*!back*:#:{
if ( $nick) {
/amsg 7 $nick Is back from 4Reason: $+ %reason $+ 9
/amsg 9 He was away for $duration($calc($ctime - %away.time)) $+ 6. | unset %reason | disable #away | unset %away.time | unset %away on
}
on *:TEXT:!afk*:#: {
if ( $nick isin %qq. [ $+ [ $nick ] ] ) {
/notice $nick $nick $+ ? Je staat al afgemeld. reden: 4 $+ %reason. [ $+ [ $nick ] ] $+
/notice $nick Voor een tijd van: 4 $duration($calc($ctime - %away.time. [ $+ [ $nick ] ] ) ) $+
/notice $nick Als je weer terug bent $nick $+ , Meld je dan weer aan met: 4 !back
}
else ( $nick ) {
/set %reason. [ $+ [ $nick ] ] $2- | /amsg 4 $nick is FF weg
/amsg reden: 4 $+ %reason. [ $+ [ $nick ] ] $+ 9,0 | set %away.time. [ $+ [ $nick ] ] $ctime | enable #away | set %away. [ $+ [ $nick ] ] on | set %qq. [ $+ [ $nick ] ] $nick
}
}
on *:TEXT:!back*:#: {
if ($nick isin %qq. [ $+ [ $nick ] ] ) {
/amsg $nick Is terug van, Reden: 4 $+ %reason. [ $+ [ $nick ] ] $+
/amsg Hij was weg voor een tijd van:4 $duration($calc($ctime - %away.time. [ $+ [ $nick ] ] ) ) $+ 6. | unset %reason. [ $+ [ $nick ] ] | disable #away | unset %away.time. [ $+ [ $nick ] ] | unset %away. [ $+ [ $nick ] ] | unset %qq. [ $+ [ $nick ] ] $nick
}
}
On *:TEXT:*:#: {
if ( $1 isin %qq. [ $+ [ $1 ] ] ) {
/msg # $1 is afwezig voor een tijd van:4 $duration($calc($ctime - %away.time. [ $+ [ $1 ] ] ) ) $+
/msg # Reden: 4 $+ %reason. [ $+ [ $1 ] ] $+
}
if ( $2 isin %qq. [ $+ [ $2 ] ] ) {
/msg # $2 is afwezig voor een tijd van:4 $duration($calc($ctime - %away.time. [ $+ [ $2 ] ] ) ) $+
/msg # Reden: 4 $+ %reason. [ $+ [ $2 ] ] $+
}
if ( $3 isin %qq. [ $+ [ $3 ] ] ) {
/msg # $3 is afwezig voor een tijd van:4 $duration($calc($ctime - %away.time. [ $+ [ $3 ] ] ) ) $+
/msg # Reden: 4 $+ %reason. [ $+ [ $3 ] ] $+
}
if ( $4 isin %qq. [ $+ [ $4 ] ] ) {
/msg # $4 is afwezig voor een tijd van:4 $duration($calc($ctime - %away.time. [ $+ [ $4 ] ] ) ) $+
/msg # Reden: 4 $+ %reason. [ $+ [ $4 ] ] $+
}
if ( $5 isin %qq. [ $+ [ $5 ] ] ) {
/msg # $5 is afwezig voor een tijd van:4 $duration($calc($ctime - %away.time. [ $+ [ $5 ] ] ) ) $+
/msg # Reden: 4 $+ %reason. [ $+ [ $5 ] ] $+
}
if ( $6 isin %qq. [ $+ [ $6 ] ] ) {
/msg # $6 is afwezig voor een tijd van:4 $duration($calc($ctime - %away.time. [ $+ [ $6 ] ] ) ) $+
/msg # Reden: 4 $+ %reason. [ $+ [ $6 ] ] $+
}
if ( $7 isin %qq. [ $+ [ $7 ] ] ) {
/msg # $7 is afwezig voor een tijd van:4 $duration($calc($ctime - %away.time. [ $+ [ $7 ] ] ) ) $+
/msg # Reden: 4 $+ %reason. [ $+ [ $7 ] ] $+
}
if ( $8 isin %qq. [ $+ [ $8 ] ] ) {
/msg # $8 is afwezig voor een tijd van:4 $duration($calc($ctime - %away.time. [ $+ [ $8 ] ] ) ) $+
/msg # Reden: 4 $+ %reason. [ $+ [ $8 ] ] $+
}
if ( $9 isin %qq. [ $+ [ $9 ] ] ) {
/msg # $9 is afwezig voor een tijd van:4 $duration($calc($ctime - %away.time. [ $+ [ $9 ] ] ) ) $+
/msg # Reden: 4 $+ %reason. [ $+ [ $9 ] ] $+
}
if ( $10 isin %qq. [ $+ [ $10 ] ] ) {
/msg # $10 is afwezig voor een tijd van:4 $duration($calc($ctime - %away.time. [ $+ [ $10 ] ] ) ) $+
/msg # Reden: 4 $+ %reason. [ $+ [ $10 ] ] $+
}
else goto ww
:ww
}
A adation to the code. This is my first try to adet a code. credit to the origenal code maker
on *:TEXT:!afk *:#:{
set %reason $2- | /amsg 9 $nick is away
/amsg 4Reason: 4 $+ %reason $+ 9,0 | set %away.time $ctime | enable #away | set %away on
}
on *:TEXT:!back *:#:{
if ( $nick) {
/amsg 7 $nick Is back from 4Reason: $+ %reason $+ 9
/amsg 9 He was away for $duration($calc($ctime - %away.time)) $+ 6. | unset %reason | disable #away | unset %away.time | unset %away on
}
}
work on your coding
This seems like it was ripped out of something larger. I am not saying you ripped this from someone it is just you have things missing. you have it enabling a group but you don't use it as well you are missing brackets. Just seems odd with the use of wildcards for the triggers.
the use of amsg can get you banned from some servers.
It would be better to place this under one text event instead of 2, but what ever to each their own.