dialog Ad { title "Away Dialog" size -1 -1 121 36 option dbu check "Change Nick?", 1, 77 13 50 10 edit "This is what your away message will look like.", 2, 1 25 119 10, result autohs multi edit "Away Reason", 3, 1 1 118 10, multi autohs button "Away", 4, 1 12 37 12 button "Back", 5, 39 12 37 12 } menu channel { Away Dialog: /dialog -dm ad ad } on *:DIALOG:ad:sclick:4:{ if ($did(1).state == 1) { if ($did(3) != $null) { nick $me $+ |Away amsg 7[A14way7]14 I am now 7away14. 7[R14eason7]:14 $did(3) 7[T14ime 7L14eft7]:14 $time set %ctime $ctime set %me $me set %reason $did(3) } else { nick $me $+ |Away amsg 7[A14way7]14 I am now 7away14. 7[R14eason7]:14 No Reason Specified 7[T14ime 7L14eft7]:14 $time set %ctime $ctime set %me $me } } elseif ($did(3) != $null) { amsg 7[A14way7]14 I am now 7away14. 7[R14eason7]:14 $did(3) 7[T14ime 7L14eft7]:14 $time set %ctime $ctime set %reason $did(3) } else { amsg 7[A14way7]14 I am now 7away14. 7[R14eason7]:14 No Reason Specified 7[T14ime 7L14eft7]:14 $time set %ctime $ctime } } on *:Dialog:ad:sclick:5:{ if (%ctime != $null) { if (%me != %null) { if (%reason != $null) { nick %me amsg 7[B14ack7]14 I am now 7back14. 7[F14rom7]:14 %reason 7[T14ime 7A14way7]:14 $duration($calc($ctime - %ctime)) | halt } else { nick %me amsg 7[B14ack7]14 I am now 7back14. 7[F14rom7]:14 No Reason Specified 7[T14ime 7A14way7]:14 $duration($calc($ctime - %ctime)) | halt } } if (%reason != $null) { amsg 7[B14ack7]14 I am now 7back14. 7[F14rom7]:14 %reason 7[T14ime 7A14way7]:14 $duration($calc($ctime - %ctime)) | halt } else { amsg 7[B14ack7]14 I am now 7back14. 7[F14rom7]:14 No Reason Specified 7[T14ime 7A14way7]:14 $duration($calc($ctime - %ctime)) | halt } } unset %ctime | unset %me | unset %reason } on *:DIALOG:ad:edit:3:{ /did -ra ad 2 [Away] I am now away. [Reason]: $did(3) [Time Left]: $time }