
on *:load:{
  set %enterchan on
  echo -a 14AutoJoin 15caricato con successo!!
}

alias AutoJoin { /dialog -m stre.join stre.join }

dialog stre.join {
  title " Angel_Red_Script - AutoJoin"
  size -1 -1 490 420
  box "AutoJoin", 2, 10 10 470 400
  text "Imposta canali dove vuoi entrare alla connessione", 3, 42 30 300 20
  text "a = Abilita", 4, 410 30 90 20
  edit "", 38, 380 25 20 20
  text "1.", 5, 15 58 15 20
  edit "", 6, 42 55 190 20, autohs
  text "2.", 7, 15 78 15 20
  edit "", 8, 42 75 190 20, autohs
  text "3.", 9, 15 98 15 20
  edit "", 10, 42 95 190 20, autohs
  text "4.", 11, 15 118 15 20
  edit "", 12, 42 115 190 20, autohs
  text "5.", 13, 15 138 20 20
  edit "", 14, 42 135 190 20, autohs
  text "6.", 15, 15 158 15 20
  edit "", 16, 42 155 190 20, autohs
  text "7.", 17, 15 178 15 20
  edit "", 18, 42 175 190 20, autohs
  text "8.", 19, 15 198 15 20
  edit "", 20, 42 195 190 20, autohs
  text "9.", 21, 15 218 15 20
  edit "", 22, 42 215 190 20, autohs
  text "10.", 23, 15 238 15 25
  edit "", 24, 42 235 190 20, autohs
  text "11.", 25, 15 258 15 25
  edit "", 26, 42 255 190 20, autohs
  text "12.", 27, 15 278 15 25
  edit "", 28, 42 275 190 20, autohs
  text "13.", 29, 15 298 15 25
  edit "", 30, 42 295 190 20, autohs
  text "14.", 31, 15 318 15 25
  edit "", 32, 42 315 190 20, autohs
  text "15.", 33, 15 338 15 25
  edit "", 34, 42 335 190 20, autohs
  button "OK", 40, 40 370 60 30, ok default
  button "Cancella", 41, 220 370 65 30, cancel
  button "Applica", 42, 400 370 60 30
  text "16.", 43, 240 58 15 20
  text "17.", 44, 240 78 15 20
  text "18.", 45, 240 98 15 20
  text "19.", 46, 240 118 15 20
  text "20.", 47, 240 138 15 20
  text "21.", 48, 240 158 15 20
  text "22.", 49, 240 178 15 20
  text "23.", 50, 240 198 15 20
  text "24.", 51, 240 218 15 20
  text "25.", 52, 240 238 15 20
  text "26.", 53, 240 258 15 20
  text "27.", 54, 240 278 15 20
  text "28.", 55, 240 298 15 20
  text "29.", 56, 240 318 15 20
  text "30.", 57, 240 338 15 20
  edit "", 58, 270 55 190 20, autohs
  edit "", 59, 270 75 190 20, autohs
  edit "", 60, 270 95 190 20, autohs
  edit "", 61, 270 115 190 20, autohs
  edit "", 62, 270 135 190 20, autohs
  edit "", 63, 270 155 190 20, autohs
  edit "", 64, 270 175 190 20, autohs
  edit "", 65, 270 195 190 20, autohs
  edit "", 66, 270 215 190 20, autohs
  edit "", 67, 270 235 190 20, autohs
  edit "", 68, 270 255 190 20, autohs
  edit "", 69, 270 275 190 20, autohs
  edit "", 70, 270 295 190 20, autohs
  edit "", 71, 270 315 190 20, autohs
  edit "", 72, 270 335 190 20, autohs
}

on *:dialog:stre.join:init:0: {
  did -a stre.join 6 %chan1 
  did -a stre.join 8 %chan2
  did -a stre.join 10 %chan3
  did -a stre.join 12 %chan4
  did -a stre.join 14 %chan5
  did -a stre.join 16 %chan6
  did -a stre.join 18 %chan7
  did -a stre.join 20 %chan8
  did -a stre.join 22 %chan9
  did -a stre.join 24 %chan10 
  did -a stre.join 26 %chan11
  did -a stre.join 28 %chan12
  did -a stre.join 30 %chan13
  did -a stre.join 32 %chan14
  did -a stre.join 34 %chan15
  did -a stre.join 58 %chan16 
  did -a stre.join 59 %chan17
  did -a stre.join 60 %chan18
  did -a stre.join 61 %chan19
  did -a stre.join 62 %chan20
  did -a stre.join 63 %chan21
  did -a stre.join 64 %chan22
  did -a stre.join 65 %chan23
  did -a stre.join 66 %chan24
  did -a stre.join 67 %chan25 
  did -a stre.join 68 %chan26
  did -a stre.join 69 %chan27
  did -a stre.join 70 %chan28
  did -a stre.join 71 %chan29
  did -a stre.join 72 %chan30
  did -a stre.join 38 %attivo 
}

on *:dialog:stre.join:sclick:40:{
  set %chan1 $did(stre.join,6)
  set %chan2 $did(stre.join,8)
  set %chan3 $did(stre.join,10)
  set %chan4 $did(stre.join,12)
  set %chan5 $did(stre.join,14)
  set %chan6 $did(stre.join,16)
  set %chan7 $did(stre.join,18)
  set %chan8 $did(stre.join,20)
  set %chan9 $did(stre.join,22)
  set %chan10 $did(stre.join,24)
  set %chan11 $did(stre.join,26)
  set %chan12 $did(stre.join,28)
  set %chan13 $did(stre.join,30)
  set %chan14 $did(stre.join,32)
  set %chan15 $did(stre.join,34)
  set %chan16 $did(stre.join,58)
  set %chan17 $did(stre.join,59)
  set %chan18 $did(stre.join,60)
  set %chan19 $did(stre.join,61)
  set %chan20 $did(stre.join,62)
  set %chan21 $did(stre.join,63)
  set %chan22 $did(stre.join,64)
  set %chan23 $did(stre.join,65)
  set %chan24 $did(stre.join,66)
  set %chan25 $did(stre.join,67)
  set %chan26 $did(stre.join,68)
  set %chan27 $did(stre.join,69)
  set %chan28 $did(stre.join,70)
  set %chan29 $did(stre.join,71)
  set %chan30 $did(stre.join,72)
  set %attivo $did(stre.join,38)
}

on *:dialog:stre.join:sclick:42:{
  set %chan1 $did(stre.join,6)
  set %chan2 $did(stre.join,8)
  set %chan3 $did(stre.join,10)
  set %chan4 $did(stre.join,12)
  set %chan5 $did(stre.join,14)
  set %chan6 $did(stre.join,16)
  set %chan7 $did(stre.join,18)
  set %chan8 $did(stre.join,20)
  set %chan9 $did(stre.join,22)
  set %chan10 $did(stre.join,24)
  set %chan11 $did(stre.join,26)
  set %chan12 $did(stre.join,28)
  set %chan13 $did(stre.join,30)
  set %chan14 $did(stre.join,32)
  set %chan15 $did(stre.join,34)
  set %chan16 $did(stre.join,58)
  set %chan17 $did(stre.join,59)
  set %chan18 $did(stre.join,60)
  set %chan19 $did(stre.join,61)
  set %chan20 $did(stre.join,62)
  set %chan21 $did(stre.join,63)
  set %chan22 $did(stre.join,64)
  set %chan23 $did(stre.join,65)
  set %chan24 $did(stre.join,66)
  set %chan25 $did(stre.join,67)
  set %chan26 $did(stre.join,68)
  set %chan27 $did(stre.join,69)
  set %chan28 $did(stre.join,70)
  set %chan29 $did(stre.join,71)
  set %chan30 $did(stre.join,72)
  set %attivo $did(stre.join,38)
}

on 1:connect: { 
  timerconnect 1 2 connecting 
} 


alias connecting {
  if (%Attivo == a) {
    if (%chan1 != $null) { join %chan1 }
    if (%chan2 != $null) { timer1 1 3 join %chan2 }
    if (%chan3 != $null) { timer2 1 6 join %chan3 }
    if (%chan4 != $null) { timer3 1 9 join %chan4 }
    if (%chan5 != $null) { timer4 1 12 join %chan5 }
    if (%chan6 != $null) { timer5 1 15 join %chan6 }
    if (%chan7 != $null) { timer6 1 18 join %chan7 }
    if (%chan8 != $null) { timer7 1 21 join %chan8 }
    if (%chan9 != $null) { timer8 1 24 join %chan9 }
    if (%chan10 != $null) { timer9 1 27 join %chan10 }
    if (%chan11 != $null) { timer10 1 30 join %chan11 }
    if (%chan12 != $null) { timer11 1 33 join %chan12 }
    if (%chan13 != $null) { timer12 1 36 join %chan13 }
    if (%chan14 != $null) { timer13 1 39 join %chan14 }
    if (%chan15 != $null) { timer14 1 42 join %chan15 }
    if (%chan16 != $null) { timer15 1 45 join %chan16 }
    if (%chan17 != $null) { timer16 1 48 join %chan17 }
    if (%chan18 != $null) { timer17 1 51 join %chan18 }
    if (%chan19 != $null) { timer18 1 54 join %chan19 }
    if (%chan20 != $null) { timer19 1 57 join %chan20 }
    if (%chan21 != $null) { timer20 1 60 join %chan21 }
    if (%chan22 != $null) { timer21 1 63 join %chan22 }
    if (%chan23 != $null) { timer22 1 66 join %chan23 }
    if (%chan24 != $null) { timer23 1 69 join %chan24 }
    if (%chan25 != $null) { timer24 1 72 join %chan25 }
    if (%chan26 != $null) { timer25 1 75 join %chan26 }
    if (%chan27 != $null) { timer26 1 78 join %chan27 }
    if (%chan28 != $null) { timer27 1 81 join %chan28 }
    if (%chan29 != $null) { timer28 1 84 join %chan29 }
    if (%chan30 != $null) { timer29 1 87 join %chan30 }

  }
}
