Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;###StartScript
- ;#### Configuration Son (`Sam-ourai`) - MAJ (tibo 22/02/2017)
- dialog config_son {
- title $msgt(sound-config)
- icon $mircdiricones\skyetoile.ico
- size -1 -1 85 98
- option dbu
- button "", 10, 100 0 0 0, ok
- check $msgt(sound-on), 20, 26 5 50 10
- box $msgt(sound-events), 30, 1 20 83 78
- check $msgt(connection), 01, 5 29 50 10, disable
- check "Highlight", 02, 5 40 30 10
- button -> $msgt(sound-hl-select), 07, 40 40 41 10
- check $msgt(invite), 03, 5 51 50 10
- check "Notice", 04, 5 62 50 10
- check $msgt(query), 05, 5 73 50 10
- check $msgt(telephone), 06, 5 84 50 10
- }
- on *:dialog:config_son:init:0:{
- if ($readdb(son,pwr).On) { did -c $dname 20 }
- else { did -b $dname 01,02,03,04,05,06 }
- var %ev = con,hig,inv,not,pri,tel | var %cptr = 1
- while (%cptr <= $numtok(%ev,44)) { $iif($readdb(son,$token(%ev,%cptr,44)).On,did -c $dname %cptr) | inc %cptr }
- }
- on *:dialog:config_son:sclick:20:{
- if ($readdb(son,pwr).On) { did -u $dname 20 | did -b $dname 02,03,04,05,06 | writedb son pwr Off }
- else { did -c $dname 20 | did -e $dname 02,03,04,05,06 | writedb son pwr On }
- }
- on *:dialog:config_son:sclick:01,02,03,04,05,06:{
- var %ev = con,hig,inv,not,pri,tel
- if ($readdb(son,$token(%ev,$did,44)).On) { did -u $dname $did | writedb son $token(%ev,$did,44) Off }
- else { did -c $dname $did | writedb son $token(%ev,$did,44) On }
- }
- on *:dialog:config_son:sclick:07:{ dialog -om select_hl select_hl }
- alias son {
- if ($readdb(son,$1).On && $readdb(son,pwr).On) { return $true }
- else { return $false }
- }
- ;#### Sélection de l'HL (tibo 15/03/2017)
- dialog select_hl {
- title $msgt(hl-select)
- icon $mircdiricones\skyetoile.ico
- size -1 -1 100 101
- option dbu
- text $msgt(hl-events), 02, 13 3 75 80
- box $msgt(hl-available), 03, 1 12 98 58
- radio "Skyrock-1", 04, 3 19 50 9, group selection
- radio "System", 05, 3 27 50 9, selection
- radio "Starwars", 06, 3 35 50 9, selection
- radio "Duck", 07, 3 43 50 9, selection
- radio "Kiss", 08, 3 51 50 9, selection
- radio "Foot", 09, 3 59 50 9, selection
- radio "Skyrock-2", 10, 53 19 50 9, selection
- radio "Gaga", 11, 53 27 50 9, selection
- radio "Weeknd", 12, 53 35 50 9, selection
- radio "Beyonce", 13, 53 43 50 9, selection
- radio "Birdie", 14, 53 51 50 9, selection
- radio $msgt(hl-coming), 15, 53 59 50 9, selection disable
- button $msgt(hl-listen), 20, 0 87 50 13
- button $msgt(confirm), 21, 50 87 50 13
- radio $msgt(hl-high), 22, 8 77 25 10, group volume
- radio $msgt(hl-middle), 23, 38 77 25 10, volume
- radio $msgt(hl-low), 24, 68 77 25 10, volume
- text $msgt(hl-volume),25, 33 70 50 6
- }
- on *:dialog:select_hl:init:0:{
- if ($vol(mp3) == 65535) { did -c $dname 22 }
- if ($vol(mp3) == 32768) { did -c $dname 23 }
- if ($vol(mp3) == 16000) { did -c $dname 24 }
- if ($readdb(son,hl).Skyrock-1) { did -c $dname 04 }
- elseif ($readdb(son,hl).System) { did -c $dname 05 }
- elseif ($readdb(son,hl).Starwars) { did -c $dname 06 }
- elseif ($readdb(son,hl).Duck) { did -c $dname 07 }
- elseif ($readdb(son,hl).Kiss) { did -c $dname 08 }
- elseif ($readdb(son,hl).Foot) { did -c $dname 09 }
- elseif ($readdb(son,hl).Skyrock-2) { did -c $dname 10 }
- elseif ($readdb(son,hl).Gaga) { did -c $dname 11 }
- elseif ($readdb(son,hl).Weeknd) { did -c $dname 12 }
- elseif ($readdb(son,hl).Beyonce) { did -c $dname 13 }
- elseif ($readdb(son,hl).Birdie) { did -c $dname 14 }
- }
- on *:dialog:select_hl:sclick:20:{
- if ($did(select_hl,04).state == 1) { .splay -p $mircdirsounds\snd-hl-skyrock-1.mp3 }
- elseif ($did(select_hl,05).state == 1) { .splay -p $mircdirsounds\snd-hl-system.mp3 }
- elseif ($did(select_hl,06).state == 1) { .splay -p $mircdirsounds\snd-hl-starwars.mp3 }
- elseif ($did(select_hl,07).state == 1) { .splay -p $mircdirsounds\snd-hl-duck.mp3 }
- elseif ($did(select_hl,08).state == 1) { .splay -p $mircdirsounds\snd-hl-kiss.mp3 }
- elseif ($did(select_hl,09).state == 1) { .splay -p $mircdirsounds\snd-hl-foot.mp3 }
- elseif ($did(select_hl,10).state == 1) { .splay -p $mircdirsounds\snd-hl-skyrock-2.mp3 }
- elseif ($did(select_hl,11).state == 1) { .splay -p $mircdirsounds\snd-hl-gaga.mp3 }
- elseif ($did(select_hl,12).state == 1) { .splay -p $mircdirsounds\snd-hl-weeknd.mp3 }
- elseif ($did(select_hl,13).state == 1) { .splay -p $mircdirsounds\snd-hl-beyonce.mp3 }
- elseif ($did(select_hl,14).state == 1) { .splay -p $mircdirsounds\birdie.mp3 }
- elseif ($did(select_hl,15).state == 1) { haltdef }
- elseif ($did(select_hl,16).state == 1) { haltdef }
- }
- on *:dialog:select_hl:sclick:21:{
- var %cptr = 04
- while (%cptr <= 15) {
- 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) }
- inc %cptr
- }
- dialog -x select_hl
- }
- on *:dialog:select_hl:sclick:22:{ .VOL -p 65536 }
- on *:dialog:select_hl:sclick:23:{ .VOL -p 32768 }
- on *:dialog:select_hl:sclick:24:{ .VOL -p 16000 }
- ;###EndScript
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement