Away system with dialog, ALT + R save in a NEW remote.
Click anywhere on mIRC or type /awaysystem
[size=8]Thanks to EL[/size]
menu * {
Away System:dialog -m Away_System Away_System
}
alias awaysystem {
dialog -m Away_System Away_System
}
dialog away_system {
title "Away System"
size -1 -1 95 115
option dbu
tab " Nicks", 1, 0 -2 95 139
tab "Reasons", 7
tab "Options", 13
box "Away Nick:", 16, 5 13 85 20, tab 1
box "Reasons:", 18, 5 34 55 60, tab 7
box "Away Nicks:", 15, 5 34 55 60, tab 1
box "Reason:", 17, 5 13 85 20, tab 7
button "Save", 4, 65 50 25 15, tab 1
button "Remove", 5, 65 75 25 15, tab 1
list 11, 7 44 50 48, tab 7 hsbar vsbar size
edit "", 12, 8 20 80 10, tab 7 autohs
list 6, 7 44 50 48, tab 1 hsbar vsbar size
edit "", 2, 8 20 80 10, tab 1 autohs
button "Away", 3, 5 98 25 15
button "Back", 8, 35 98 25 15
button "Done", 20, 65 98 25 15, cancel
button "Save", 10, 65 50 25 15, tab 7
button "Remove", 9, 65 75 25 15, tab 7
box "Page System", 14, 5 15 85 27, tab 13
box "Auto Away", 22, 5 45 85 50, tab 13
radio "60 Minutes Auto Away", 23, 15 63 68 8, tab 13
radio "90 Minutes Auto Away", 24, 15 73 68 8, tab 13
radio "120 Minutes Auto Away", 25, 15 83 68 8, tab 13
radio "Disable Auto Away", 26, 15 53 68 8, tab 13
check "Enable Page System", 19, 18 23 60 8, tab 13
check "Disable Page System", 21, 18 32 60 8, tab 13
}
on *:dialog:away_system:init:*: {
if (%page == on) { did -c $dname 19 | did -u $dname 21 }
if (%page == off) { did -c $dname 21 | did -u $dname 19 }
if (%autoawayoff == on) { did -c $dname 26 }
if (%autoaway60 == on) { did -c $dname 23 }
if (%autoaway90 == on) { did -c $dname 24 }
if (%autoaway120 == on) { did -c $dname 25 }
var %away.nick = 1
while (%away.nick <= $lines(awaynicks.txt)) {
did -a $dname 6 $read(awaynicks.txt,%away.nick))
inc %away.nick
}
var %away.reason = 1
while (%away.reason <= $lines(awayreasons.txt)) {
did -a $dname 11 $read(awayreasons.txt,%away.reason))
inc %away.reason
}
}
on *:DIALOG:away_system:sclick:3: {
if ($away) { noop $input(You are already away.,uwo,Error!) | halt }
set %away.cnick $me
set %away.time $ctime
set %away.reason $did(12).text
set %away.nick $did(2).text
if (%away.nick == $null) { noop $input(You must choose an Away Nick.,uwo,Error!) | halt }
if (%away.reason == $null) { noop $input(You must choose an Away Reason.,uwo,Error!) | halt }
if (%page == on) { amsg 15,1I 15,1A0,1m 15,1N0,1ow 15,1A0,1way - 15,1R0,1eason: %away.reason 15,1T0,1ime: $time 15,1P0,1ager: 15,1O0,1n.
nick %away.nick
away %away.reason | halt
else {
amsg 15,1I 15,1A0,1m 15,1N0,1ow 15,1A0,1way - 15,1R0,1eason: %away.reason 15,1T0,1ime: $time 15,1P0,1ager: 15,1O0,1ff.
nick %away.nick
away %away.reason
}
}
}
on *:DIALOG:away_system:sclick:8: {
if (%input.return == on) { noop $input(You are on Auto Away please must type to set yourself back.,uwo,Error!) | halt }
if (!$away) { noop $input(You are not currently away.,uwo,Error!) | halt }
nick %away.cnick
amsg 15,1I 15,1A0,1m 15,1N0,1ow 15,1B0,1ack 15,1F0,1rom: %away.reason 15,1I 15,1W0,1as 15,1G0,1one 15,1F0,1or: $duration($calc($ctime - %away.time))
.away
}
on *:dialog:away_system:sclick:4: {
if ($did(2).text == $null)) { noop $input(You did not choose a nick to add to the Nick List list.,uwo,Error!) | halt }
if (%away.nick == $null) { halt }
var %away.nick $did(2).text
if (%away.nick == $read(awaynicks.txt,w,%away.nick)) { noop $input(%away.nick is already in the Nick List.,uwo,Error!) | halt }
write awaynicks.txt %away.nick
did -a $dname 6 %away.nick
}
on *:dialog:away_system:sclick:10: {
if ($did(12).text == $null)) { noop $input(You did not choose a Reason to add to the Reason List.,uwo,Error!) | halt }
if (%away.reason == $null) { halt }
var %away.reason $did(12).text
if (%away.reason == $read(awayreasons.txt,w,%away.reason)) { noop $input(%away.reason is already in the Reason List.,uwo,Error!) | halt }
write awayreasons.txt %away.reason
did -a $dname 11 %away.reason
}
on *:DIALOG:away_system:Sclick:5: {
if (!$did(6).sel) { noop $input(You did not select a nick to remove.,uwo,Error!) | halt }
write -dl $+ $did(6).sel awaynicks.txt
did -d $dname 6 $did(6).sel
}
on *:DIALOG:away_system:Sclick:9: {
if (!$did(11).sel) { noop $input(You did not select a reason to remove.,uwo,Error!) | halt }
write -dl $+ $did(11).sel awayreasons.txt
did -d $dname 11 $did(11).sel
}
on *:Dialog:away_system:sclick:6: {
did -ra $dname 2 $did(6).seltext
set %away.nick $did(6).seltext
}
on *:Dialog:away_system:sclick:11: {
did -ra $dname 12 $did(11).seltext
set %away.nick $did(11).seltext
}
on *:Dialog:away_system:sclick:*: {
if ($did == 19) { set %page on | dialog -x away_system away_system | dialog -m away_system away_system | did -fu $dname 13 }
if ($did == 21) { set %page off | dialog -x away_system away_system | dialog -m away_system away_system | did -fu $dname 13 }
if ($did == 26) { set %autoawayoff on | unset %autoaway60 %autoaway90 %autoaway120 | .timerautoaway* off }
if ($did == 23) { set %autoaway60 on | unset %autoawayoff %autoaway90 %autoaway120 | .timerautoaway60 0 1 autoaway60 }
if ($did == 24) { set %autoaway90 on | unset %autoawayoff %autoaway60 %autoaway120 | .timerautoaway90 0 1 autoaway90 }
if ($did == 25) { set %autoaway120 on | unset %autoawayoff %autoaway60 %autoaway90 | .timerautoaway120 0 1 autoaway120 }
}
on *:TEXT:*:#: {
if ($($+(%,_Page_Lock,.,$nick),2) >= 2) { halt }
if (%page == on) && ($me isin $strip($1-)) && ($Away) {
.notice $nick 4,1 $nick 14,1I A15,1m 14,1C15,1urrently 14,1A15,1way4,1. 14,1T15,1o 14,1P15,1age 14,1M15,1e 14,1T15,1ype /notice $me @page [message here]
inc -u3600 $+(%,_Page_lock,.,$nick)) 1
}
}
on *:NOTICE:*:?: {
if ($($+(%,_Page_Lock,.,$nick),2) >= 2) { .notice $nick 0,1 $nick 15,1I A0,1m 15,1A0,1way, 15,1P0,1ease 15,1D0,1ont 15,1A0,1buse 15,1M0,1y 15,1P0,1age 15,1S0,1ystem! | halt )
if ($Away) && ($1 == @page) {
beep 10 2
inc %paged
window @Page
echo -t @Page 0,1 $nick 15,1P0,1aged 15,1Y0,1ou 15,1W0,1ith 15,1T0,1he %paged 15,1M0,1essage: " $strip($2-) 0,1"
write Page.txt 0,1 $nick 15,1P0,1aged 15,1Y0,1ou 15,1W0,1ith 15,1T0,1he %paged 15,1M0,1essage: " $strip($2-) 0,1"
.notice $nick 15,1T0,1hank 15,1Y0,1ou 0,1 $nick $+ , 15,1Y0,1our 15,1M0,1essage 15,1H0,1as 15,1B0,1een 15,1S0,1aved 15,1A0,1s 15,1N0,1umber %paged $+ .
inc -u86400 $+(%,_Page_lock,.,$nick)) 1
}
}
}
alias autoaway60 {
if (!$away && $nick($active,$me).idle >= 3600) {
set %away.time $ctime
amsg 15,1I 15,1A0,1m 15,1N0,1ow 15,1A0,1way - 15,1R0,1eason15,1: 60 15,1M0,1ins 15,1A0,1uto 15,1A0,1way.
.away 15,1A0,1uto 15,1A0,1way.
set %input.return on
}
}
alias autoaway90 {
if (!$away && $nick($active,$me).idle >= 5400) {
set %away.time $ctime
amsg 15,1I 15,1A0,1m 15,1N0,1ow 15,1A0,1way - 15,1R0,1eason15,1: 90 15,1M0,1ins 15,1A0,1uto 15,1A0,1way.
.away 15,1A0,1uto 15,1A0,1way.
set %input.return on
}
}
alias autoaway120 {
if (!$away && $nick($active,$me).idle >= 7200) {
set %away.time $ctime
amsg 14,1I 15,1A0,1m 15,1N0,1ow 15,1A0,1way15,1 - 15,1R0,1eason15,1: 120 15,1M0,1ins 15,1A0,1uto 15,1A0,1way15,1.
.away 15,1A0,1uto 15,1A0,1way.
set %input.return on
}
}
on *:input:*:{
if (%input.return == on) {
set %input.return off
.amsg 15,1I 15,1A0,1m 15,1N0,1ow 15,1B0,1ack 15,1F0,1rom15,1: 15,1A0,1uto 15,1A0,1way15,1. 15,1I 15,1W0,1as 15,1G0,1one 15,1F0,1or15,1: $duration($calc($ctime - %away.time))
echo -a $timestamp 15,1[0,1 $+ $me $+ 15,1] 15,1I 15,1A0,1m 15,1N0,1ow 15,1B0,1ack 15,1F0,1rom15,1: 15,1A0,1uto 15,1A0,1way15,1. 15,1I 15,1W0,1as 15,1G0,1one 15,1F0,1or15,1: $duration($calc($ctime - %away.time))
.away
if (%autoaway60 == on) { .timerautoaway60 0 1 autoaway60 }
if (%autoaway90 == on) { .timerautoaway90 0 1 autoaway 90 }
if (%autoaway120 == on) { .timerautoaway120 0 1 autoaway120 }
}
}
Ok looks good, works (to a point) but it is not reloading the away nicks. I have to keep typing mine in. This is frustrating for a system that is supposed to handle this internally.
Mirc 6.2 on Windows 7 Ultimate
This script requiers 2 text files:
awaynicks.txt and awayreasons.txt; make sure you create them in the mirc folder.
I actually totally understand not uncluding an autoaway. It seems like no matter what u set those bastards at it eventually sets you away when you didn\'t want it to. It has to be the only feature I left out of my away system (not released). Theres a couple ideas I put on mine that you may like to add to yours. Most the stuff I have you have either i ncluded or are planning too but theres a few things that have not been mentioned.
One, You should allow an optional password field for each added nickname. In mine I just had 3 names, the normal nick, the away nick and the BRB nick and mine assumes they all share the same password so you only set one but why not have yours let a pass for every one. Enyhow then u can watch for a notice from nickserv to identify and auto identify.
Two, allow the user to bind the away command and back command to F Keys that they can set.
Three, On mine when you can enable an option that will popup a little buttin that you press when you get back to set yourself as back. It was just a small input box with one button that said \"Back\" and you either pressed it, ignored it till you want to press it or close it with the little x without it bothering anything.
Four , I can\'t remember the fourth thing I had in mind cause I forgot it while typing the first three. Lol.
Anyhow man, great job so far, especially on the dialog. I just wanted to throw my ideas by you since I can see your trying to make this a very nice away system.
I will hold my rating until its done. So far its right around a 6/10.
hey Eugenio nice work .. well i wanna ask for more stuff to add >:P~~ u know me im a bugger i bug at all .. so lets start soldier >:P~~ wht abt putting some rooms to not send msg maybe like help room where they dont like to see msgs ... and to change back to real nick when u come back from away ... well as EL the bugger num too for u pager and tht stuff and if some 1 called ur nick to notice him ever certain time and if u put to add after how many time to responce again and say u r away ... and auto away after idle >:P~~~ and i know u will del my msg for all ask roflmao ... >:$ dont hate me