on $*:TEXT:/(pink)/Si:#: { if (%awaymode == on) { notice $nick %awaymessage inc %namecounter } } on *:LOAD: { echo -a mIRC-Awayscript for PinkPaul V1.0 - By Gohon50 } alias afk { set %namecounter 0 %awaytime = $ctime if ($1 == $null) { if (%awaymessage2 != None Specefied) { away None Specefied } set %awaymessage $c1(PinkPaul is currently) $c2(away!) nick Pink-away if (%awaymode == off) { set %awaymessage2 None Specefied echo $time(hh:nn...) You are now away with no away message. amsg $c1(I am now) $c2(away!) $c1(I left at) $c2($time) $c1(Reson:) $c2(%awaymessage2) $+ $c1(.) } if (%awaymode == on) { echo $time(hh:nn...) Your away time has been reset and you have no away message set. if (%awaymessage2 != None Specefied) { amsg $c1(My) $c2(away) $c1(message is now) $c1(-) $c2(None Specefied) $c1(- at) $c2($time). echo $time(hh:nn...) Your away time has been reset and your away message changed to None Specefied. } } set %awaymessage2 None Specefied } if ($1 != $null) { if ($1- != %awaymessage2) { away $1- } if ($nick != Pink-away) { nick Pink-away } if (%awaymode == off) { set %awaymessage $c1(PinkPaul is currently) $c2(away!) $c1(-) $c2($1-) $c1(-) echo $time(hh:nn...) You are now away with the away message $c2(' $+ $1- $+ '). amsg $c1(I am now) $c2(away!) $c1(I left at) $c2($time) $c1(-) $c2($1-) $c1(-) } if (%awaymode == on) { set %awaymessage $c1(PinkPaul is currently) $c2(away!) $c1(-) $c2($1-) $c1(-) if ($1- != %awaymessage2) { amsg $c1(My) $c2(away) $c1(message is now) $c1(-) $c2($1-) $c1(- at) $c2($time). } echo $time(hh:nn...) Your away time has been reset and your away message changed to $c2(' $+ $1- $+ ') } set %awaymessage2 $1- } set %awaymode on } alias bck { if (%awaymode == on) { nick PinkPaul back echo $time(hh:nn...) Welcome back PinkPaul $+ , you we're away for $c2($duration($calc($ctime - %awaytime))) $c1(and your name was said) $c2(%namecounter) $c1(times while you were away.) if (%awaymessage) { amsg $c1(I am now) $c2(back!) $c1(I was away for) $c2($duration($calc($ctime - %awaytime))) $c1(reason:) $c2(%awaymessage2) $+ $c1(.) } if (!%awaymessage) { amsg $c1(I am now) $c2(back!) $c1(I was away for) $c2($duration($calc($ctime - %awaytime))) $c1(reason:) $c2(None Specefied) $+ $c1(.) } set %awaymode off set %namecounter 0 unset %awaytime unset %awaymessage2 } elseif (%awaymode != on) { echo $time(hh:nn...) Hey!, your already back! set %awaymode off set %namecounter 0 unset %awaytime } } alias uninstallawayscript { if ($?="Would you like to remove all of Gohons away script variables? (yes/no)" == yes) { unset %awaymode unset %awaytime unset %namecounter unset %awaymessage unset %awaymessage2 echo You can now delete Gohons away script from your scripts editor. } else { echo Gohon's away script uninstallation canceled. } } alias c1 { return 14 $+ $1- } alias c2 { return 07 $+ $1- }