Advertisement
Guest User

Untitled

a guest
May 23rd, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 4.92 KB | None | 0 0
  1. ;###StartScript
  2. ;#### Configuration Son (`Sam-ourai`) - MAJ (tibo 22/02/2017)
  3. dialog config_son {
  4.   title $msgt(sound-config)
  5.   icon $mircdiricones\skyetoile.ico
  6.   size -1 -1 85 98
  7.   option dbu
  8.   button "", 10, 100 0 0 0, ok
  9.   check $msgt(sound-on), 20, 26 5 50 10
  10.   box $msgt(sound-events), 30, 1 20 83 78
  11.   check $msgt(connection), 01, 5 29 50 10, disable
  12.   check "Highlight", 02, 5 40 30 10
  13.   button -> $msgt(sound-hl-select), 07, 40 40 41 10
  14.   check $msgt(invite), 03, 5 51 50 10
  15.   check "Notice", 04, 5 62 50 10
  16.   check $msgt(query), 05, 5 73 50 10
  17.   check $msgt(telephone), 06, 5 84 50 10
  18. }
  19. on *:dialog:config_son:init:0:{
  20.   if ($readdb(son,pwr).On) { did -c $dname 20 }
  21.   else { did -b $dname 01,02,03,04,05,06 }
  22.   var %ev = con,hig,inv,not,pri,tel | var %cptr = 1
  23.   while (%cptr <= $numtok(%ev,44)) { $iif($readdb(son,$token(%ev,%cptr,44)).On,did -c $dname %cptr) | inc %cptr }
  24. }
  25. on *:dialog:config_son:sclick:20:{
  26.   if ($readdb(son,pwr).On) { did -u $dname 20 | did -b $dname 02,03,04,05,06 | writedb son pwr Off }
  27.   else { did -c $dname 20 | did -e $dname 02,03,04,05,06 | writedb son pwr On }
  28. }
  29. on *:dialog:config_son:sclick:01,02,03,04,05,06:{
  30.   var %ev = con,hig,inv,not,pri,tel
  31.   if ($readdb(son,$token(%ev,$did,44)).On) { did -u $dname $did | writedb son $token(%ev,$did,44) Off }
  32.   else { did -c $dname $did | writedb son $token(%ev,$did,44) On }
  33. }
  34. on *:dialog:config_son:sclick:07:{ dialog -om select_hl select_hl }
  35. alias son {
  36.   if ($readdb(son,$1).On && $readdb(son,pwr).On) { return $true }
  37.   else { return $false }
  38. }
  39.  
  40. ;#### Sélection de l'HL (tibo 15/03/2017)
  41. dialog select_hl {
  42.   title $msgt(hl-select)
  43.   icon $mircdiricones\skyetoile.ico
  44.   size -1 -1 100 101
  45.   option dbu
  46.   text $msgt(hl-events), 02, 13 3 75 80
  47.   box $msgt(hl-available), 03, 1 12 98 58
  48.   radio "Skyrock-1", 04, 3 19 50 9, group selection
  49.   radio "System", 05, 3 27 50 9, selection
  50.   radio "Starwars", 06, 3 35 50 9, selection
  51.   radio "Duck", 07, 3 43 50 9, selection
  52.   radio "Kiss", 08, 3 51 50 9, selection
  53.   radio "Foot", 09, 3 59 50 9, selection
  54.   radio "Skyrock-2", 10, 53 19 50 9, selection
  55.   radio "Gaga", 11, 53 27 50 9, selection
  56.   radio "Weeknd", 12, 53 35 50 9, selection
  57.   radio "Beyonce", 13, 53 43 50 9, selection
  58.   radio "Birdie", 14, 53 51 50 9, selection
  59.   radio $msgt(hl-coming), 15, 53 59 50 9, selection disable
  60.   button $msgt(hl-listen), 20, 0 87 50 13
  61.   button $msgt(confirm), 21, 50 87 50 13
  62.   radio $msgt(hl-high), 22, 8 77 25 10, group volume
  63.   radio $msgt(hl-middle), 23, 38 77 25 10, volume
  64.   radio $msgt(hl-low), 24, 68 77 25 10, volume
  65.   text $msgt(hl-volume),25, 33 70 50 6
  66. }
  67.  
  68. on *:dialog:select_hl:init:0:{
  69.   if ($vol(mp3) == 65535) { did -c $dname 22 }
  70.   if ($vol(mp3) == 32768) { did -c $dname 23 }
  71.   if ($vol(mp3) == 16000) { did -c $dname 24 }
  72.   if ($readdb(son,hl).Skyrock-1) { did -c $dname 04 }
  73.   elseif ($readdb(son,hl).System) { did -c $dname 05 }
  74.   elseif ($readdb(son,hl).Starwars) { did -c $dname 06 }
  75.   elseif ($readdb(son,hl).Duck) { did -c $dname 07 }
  76.   elseif ($readdb(son,hl).Kiss) { did -c $dname 08 }
  77.   elseif ($readdb(son,hl).Foot) { did -c $dname 09 }
  78.   elseif ($readdb(son,hl).Skyrock-2) { did -c $dname 10 }
  79.   elseif ($readdb(son,hl).Gaga) { did -c $dname 11 }
  80.   elseif ($readdb(son,hl).Weeknd) { did -c $dname 12 }
  81.   elseif ($readdb(son,hl).Beyonce) { did -c $dname 13 }
  82.   elseif ($readdb(son,hl).Birdie) { did -c $dname 14 }
  83. }
  84.  
  85. on *:dialog:select_hl:sclick:20:{
  86.   if ($did(select_hl,04).state == 1) { .splay -p $mircdirsounds\snd-hl-skyrock-1.mp3 }
  87.   elseif ($did(select_hl,05).state == 1) { .splay -p $mircdirsounds\snd-hl-system.mp3 }
  88.   elseif ($did(select_hl,06).state == 1) { .splay -p $mircdirsounds\snd-hl-starwars.mp3 }
  89.   elseif ($did(select_hl,07).state == 1) { .splay -p $mircdirsounds\snd-hl-duck.mp3 }
  90.   elseif ($did(select_hl,08).state == 1) { .splay -p $mircdirsounds\snd-hl-kiss.mp3 }
  91.   elseif ($did(select_hl,09).state == 1) { .splay -p $mircdirsounds\snd-hl-foot.mp3 }
  92.   elseif ($did(select_hl,10).state == 1) { .splay -p $mircdirsounds\snd-hl-skyrock-2.mp3 }
  93.   elseif ($did(select_hl,11).state == 1) { .splay -p $mircdirsounds\snd-hl-gaga.mp3 }
  94.   elseif ($did(select_hl,12).state == 1) { .splay -p $mircdirsounds\snd-hl-weeknd.mp3 }
  95.   elseif ($did(select_hl,13).state == 1) { .splay -p $mircdirsounds\snd-hl-beyonce.mp3 }
  96.   elseif ($did(select_hl,14).state == 1) { .splay -p $mircdirsounds\birdie.mp3 }
  97.   elseif ($did(select_hl,15).state == 1) { haltdef }
  98.   elseif ($did(select_hl,16).state == 1) { haltdef }
  99. }
  100.  
  101. on *:dialog:select_hl:sclick:21:{
  102.   var %cptr = 04
  103.   while (%cptr <= 15) {
  104.     if ($did(select_hl,%cptr).state == 1) { writedb son hl $did(select_hl,%cptr) | echo -eat $+(,$color(info2),*) $msgt(hl-new,$did(select_hl,%cptr),$hl_volume) }
  105.     inc %cptr
  106.   }
  107.   dialog -x select_hl
  108. }
  109.  
  110. on *:dialog:select_hl:sclick:22:{ .VOL -p 65536 }
  111. on *:dialog:select_hl:sclick:23:{ .VOL -p 32768 }
  112. on *:dialog:select_hl:sclick:24:{ .VOL -p 16000 }
  113. ;###EndScript
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement