dialog awayscript { title "Away Script" size -1 -1 160 175 option dbu edit "", 1, 3 17 50 10 text "Back Nick", 2, 13 8 29 8 edit "", 3, 93 17 50 10 text "Away Nick", 4, 106 8 30 8 button "Away", 5, 8 45 37 12 button "Back", 6, 105 45 37 12 button "OK", 7, 58 102 37 12, ok box "Nicks", 8, 1 0 156 31 box "Away Controls", 9, 2 30 156 86 button "Help", 10, 118 102 37 12 edit "", 11, 6 69 146 10 text "Away Message", 12, 58 62 37 8 text "Away Script", 13, 60 42 32 8 box "", 14, 53 37 47 15 edit "", 15, 6 90 146 10 text "Back Message", 16, 58 81 37 8 check "Use Anti-Idler", 17, 4 124 50 10 edit "", 18, 1 136 154 31 box "Anti-Idler", 19, 0 117 160 54 text "Delay (in secs)", 20, 55 124 40 8 edit "", 21, 100 123 22 10 } dialog awayhelp { title "Help" size -1 -1 160 120 option dbu text "Away Script - Written by josh1billion - This script is a simple way to let the world know Hey, I'm not at my computer right now. It sports a few extra features such as calculating how long you've been away, as well as allows you to input your own away nick and regular nick. You can put in a reason for being away as well. Click the Away and Back buttons to change from away mode to back mode.", 1, 0 2 158 51 text "CHANGES: Now you can use the 'anti-idler', which will automatically message all channels you are in with a message you can set. You can set the delay as well.", 2, 2 58 156 30 text "Away Script v1.2 by josh1billion", 3, 60 92 53 18 button "OK", 4, 120 101 37 12, ok } dialog awayloadpopup { title "Away Script loaded!" size -1 -1 160 120 option dbu text "Away Script v1.2 has successfully been loaded!", 1, 24 10 117 10 text "To access this script, simply right click in a channel, nick, etc, and choose Josh Software. Another way of accessing would be to type /awayscript. Once the script has been accessed, you can easily change your away message, back message, away nick, and back nick, as well as change from away mode to back mode. Enjoy!", 2, 2 30 155 42 text "by josh1billion", 3, 33 76 93 16 button "OK", 4, 56 101 37 12, ok } on *:dialog:awayscript:init:0: { /did -a awayscript 1 %backnick | /did -a awayscript 15 %backmessage | /did -a awayscript 3 %awaynick | /did -a awayscript 11 %awayreason | /did -a awayscript 18 %idlermessage | /did -a awayscript 21 %idlerdelay if (%antiidler == 1) { /did -c awayscript 17 } if (%antiidler == 0) { /did -u awayscript 17 } } on *:LOAD: { /set %away 0 | /set %awaytime 0 | /set %idlerdelay 300 | /set %idlermessage [AWAY - Anti-Idler] | /set %backmessage [BACK] | /set %awaynick Nick|Away | /set %backnick Nick | /set %awayreason [BRB] I must take a short break from my computer. [BRB] | /set %awaystatus 0 | /dialog -mr awayloadpopup awayloadpopup } on *:dialog:awayscript:sclick:5: { set %awaymode menu | set %backmessage $did(awayscript,15) | set %awaynick $did(awayscript,3) | set %backnick $did(awayscript,1) | set %awayreason $did(awayscript,11) | awayupdateidler | away } on *:dialog:awayscript:sclick:6: { back } on *:dialog:awayscript:sclick:10: { dialog -mr awayhelp awayhelp } on *:dialog:awayscript:sclick:7: { set %awaynick $did(awayscript,3) | set %backmessage $did(awayscript,15) | set %backnick $did(awayscript,1) | set %awayreason $did(awayscript,11) | awayupdateidler } alias awayupdateidler { set %antiidler $did(awayscript,17).state set %idlermessage $did(awayscript,18) set %idlerdelay $did(awayscript,21) } alias away { if %away = 0 { set %awaytime 0 set %gonesince $time(hh:nn:ss) if (%awayreason = $null) { %awayreason General away. } set %away 1 amsg %awayreason timerawaytime 0 1 //inc %awaytime 1 %awaymode = 0 nick %awaynick if (%antiidler == 1) { timerawayantiidler 0 %idlerdelay amsg %idlermessage } } } alias back { if %away = 1 { nick %backnick set %gonetime $calc($time - %awaytime) set %away 0 timerawaytime off amsg %backmessage [Gone since: %gonesince $+ ] [Gone time: $duration(%awaytime) $+ ] timerawayantiidler off } } menu query,nicklist,menubar,channel { Josh Software .Away Script v1.2: { dialog -mr awayscript awayscript } } alias awayscript { /dialog -mr awayscript awayscript }