Advertisement
WraithRIOT

Away System

Apr 12th, 2011
422
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 2.17 KB | None | 0 0
  1. Alias Asys { Dialog -m Asys Asys }
  2. dialog Asys {
  3.   title "Away System"
  4.   size -1 -1 172 101
  5.   option dbu
  6.   text "Away Nick", 1, 3 6 50 10
  7.   text "Away Reason", 2, 3 23 50 10
  8.   edit "", 3, 58 6 95 10, autohs
  9.   edit "", 4, 58 23 95 10
  10.   check "Announce Away", 5, 4 37 67 8
  11.   check "Change Nick", 6, 4 48 50 8
  12.   check "Remove +o", 7, 4 60 50 8
  13.   check "Auto Away ", 8, 4 72 50 8
  14.   edit "Minutes", 9, 59 71 44 10
  15.   button "Go Away", 10, 32 85 32 12
  16.   button "Come Back", 11, 70 85 32 12
  17.   button "Done", 12, 108 85 32 12
  18. }
  19. On *:Dialog:Asys:*:*:{
  20.   If ($devent == Init) {
  21.     If (%Ann == True) { Did -c $dname 5 }
  22.     If (%NC == True) { Did -c $dname 6 }
  23.     If (%RemStat == True) { Did -c $dname 7 }
  24.     Did -a $dname 3 %Gone.Nick
  25.     Did -a $dname 4 %Gone.Res
  26.   }
  27.   If ($Devent == Sclick) {
  28.     If ($did = 5) {
  29.       If ($Did($Dname,$did).state == 1) { Set %Ann True }
  30.       Else { Set %Ann False }
  31.     }
  32.     If ($did = 6) {
  33.       if ($did($dname,$did).state == 1) { Set %NC True }
  34.       Else { Set %NC False }
  35.     }
  36.     If ($did = 7) {
  37.       If ($did($dname,$did).state == 1) { Set %RemStat True }
  38.       Else { Set %RemState False }
  39.     }
  40.     If ($did = 8) {
  41.       If ($did($dname,$did).state == 1) { Set %AA On | Set %Time.AA $calc($did(9)*60) }
  42.       Else { Set %AA Off | Unset %Time.AA }
  43.     }
  44.     If ($did = 10) {
  45.       Set %Asys.Bnick $Me
  46.       Set %Gone.Nick $did(3)
  47.       Set %Gone.Res $did(4)
  48.       If (%Ann == True) { Amsg 14,1X15-14E15cution i14R15C Away System 14-15 I Am Now Away For 14-15 %Gone.res  14-15 Leaving You All At $Time(hh:nn.ss TT) }
  49.       If (%NC == True) { Nick %Gone.Nick }
  50.       If (%RemState == True) {
  51.         If ($me Isop $Chan) { Mode $Active -o $me }
  52.       }
  53.       Set %Away True
  54.       Away %Gone.Res
  55.     }
  56.     If ($did = 11) {
  57.       If (%Ann == True) { Amsg 14,1X15-14E15cution i14R15C Away System 14-15 I Am Now Back From 14-15 %Gone.res 14-15 Coming Back To You All At $Time(hh:nn.ss TT) 14-15 I Was Gone For $Duration($AwayTime) }
  58.       If (%NC == True) { Nick %Asys.Bnick }
  59.       Set %Away False
  60.       Away
  61.       Unset %Asys.bnick
  62.     }
  63.     If ($did = 12) { Dialog -x $dname $dname }
  64.   }
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement