Like napa182 said there are many ways of doing this, me i love dialogs always have lol old school I guesss...!! heres mine.
############################
### Chainz Autovoice ###
############################
dialog autovoice {
title Chainz AutoVoice - By Chain™
size -1 -1 270 230
list 2,10 30 250 180
edit "",3,53 190 100 15,autohs
button "Add",4,10 5 70 20,ok
button "Remove",5,190 5 70 20,ok
button "Close",6,190 190 70 20,ok
edit "", 7,10 190 44 15, read autohs center
edit "",9,53 210 100 15,autohs
edit "", 8,10 210 44 15, read autohs center
check "Activate",10,110 10 70 10
}
on *:dialog:autovoice:init:0:{
dll autovoice/dll/mdx.dll SetMircVersion $version
dll autovoice/dll/mdx.dll MarkDialog $dname
dll autovoice/dll/mdx.dll SetBorderStyle $dname 4,5,6 staticedge
dll autovoice/dll/mdx.dll SetFont $dname 2,3,4,5,6,8,7 +a 12 400 tahoma
dll autovoice/dll/mdx.dll SetBorderStyle 2,3,8,7,9 border
dll autovoice/dll/mdx.dll SetControlMDX 2 ListView report single rowselect > autovoice\dll\views.mdx
did -i $dname 2 1 headerdims 120 130
did -i $dname 2 1 headertext Rooms $chr(9) Server
did -a $dname 7 Rooms:
did -a $dname 8 Server:
did -i $dname 2 1 settxt color $rgb(0,0,0)
did -i $dname 2 1 settxt bgcolor $rgb(250,250,249)
did -i $dname 2 1 setbkg color $rgb(250,250,250)
if (%hur.autovoice == on) { did -c autovoice 10 }
autovoice.refresh
}
on *:dialog:autovoice:sclick:4:{
if !$did(9) { write autovoice/autovoice.txt $did(3) All-Servers | did -a $dname 2 0 2 $did(3) $chr(9) All-Servers | halt }
else { write autovoice/autovoice.txt $did(3) $did(9) | did -a $dname 2 0 2 $did(3) $chr(9) $did(9) | halt }
if (!$read(autovoice/autovoice.txt,w,$did(3))) { write autovoice/autovoice.txt $did(3) | autovoice.refresh }
}
on *:dialog:autovoice:sclick:5:{
write -dl $calc(%ligne - 2) autovoice/autovoice.txt
did -d $dname 2 $did(2).sel
}
on *:dialog:autovoice:sclick:10:{
$iif($did(10).state == 0, unset %hur.autovoice, set %hur.autovoice on)
}
alias autovoice.refresh {
var %i 1
while %i <= $lines(autovoice/autovoice.txt) {
did -a $dname 2 0 2 $gettok($read(autovoice/autovoice.txt,%i),1,32) $chr(9) $gettok($read(autovoice/autovoice.txt,%i),2,32)
inc %i
}
}
on *:join:#:{
if ($me isop #) && (%hur.autovoice == on) {
var %i = 0
while (%i <= $lines(autovoice/autovoice.txt)) {
inc %i
if $gettok($read(autovoice/autovoice.txt,%i),2,32) = all-servers { mode # +vvv $nick }
if $server = $gettok($read(autovoice/autovoice.txt,%i),2-,32) { mode # +vvv $nick }
}
}
}
menu menubar,channel {
-
Autovoice: dialog -m autovoice autovoice
}
on *:load:{
echo -s 2L'Auto voice Addon has been Loaded
echo -s 4By Chain˜
}
####### Chain™ ########