This is my first dialog took me a long time to get everything where it is.
This has a few setting for it:
Ops and higher
Halfops and higher
voiced and higher
Everyone
Off
What it does it adds a text file to your mIRC folder (in app data) with what every you typed, not sure if anyone would use it because it can spam your computer with files or mIRC with text.
I plan to put option like:
More checks
Flood protection
Delete/clear file
Please point out any mistakes or errors i made also post suggestion for new thing you think need or want to be added.
dialog Allows {
Title "Main"
Size -1 -1 80 60
option dbu
Radio "Ops And Higher", 1, 1 10 50 10
Radio "Half And Higher", 2, 1 20 50 10
Radio "Voice And Higher", 3, 1 30 50 10
Radio "Everyone", 4, 1 40 50 10
Radio "Off", 5, 1 50 50 10
Text "Check One of The Following", 11, 1 1 71 8
}
on *:DIALOG:Allows:*:*: {
var %a = $dname, %b = $devent, %c = $did
if (%b == sclick) {
if (%c == 1) { set %opl 1 }
if (%c == 2) { set %hol 2 }
if (%c == 3) { set %vol 3 }
if (%c == 4) { set %evl 4 }
if (%c == 5) { set %offl 5 }
}
}
on *:TEXT:*:#: {
if ($($+(%,flood,$nick),2) == 2) { ignore -u180 $nick | unset $+(%,flood,$nick) | halt }
if (!addtext == $strip($1)) && ($strip($2)) {
var %a = write $2 $3- | .notice $nick $+($2,.txt) has been added
if (%opl == 1) && ($nick isop $chan) { %a }
elseif (%hol == 2) && ($nick ishop $chan) { %a }
elseif (%vol == 3) && ($nick isvoice $chan) { %a }
elseif (%evl == 4) { %a }
elseif (%offl == 5) { .notice $nick Addtext is off }
$iif($($+(%,flood,$nick),2),inc $+(%,flood,$nick) 1,set -u10 $+(%,flood,$nick) 1)
}
elseif (!view == $strip($1)) && ($strip($2)) {
if ($exists($2)) { play $chan $2 }
else { .msg $chan I do not have that file $+($nick,$chr(46)) }
$iif($($+(%,flood,$nick),2),inc $+(%,flood,$nick) 1,set -u10 $+(%,flood,$nick) 1)
}
else { halt }
}
menu * {
Allow Editer: dialog $iif($dialog(Allows),-v,-m) Allows Allows | unset %opl %hol %vol %evl %offl
}
in your dialog you set
set %opl 1
set %hol 2
set %vol 3
set %evl 4
set %offl 5
but in the script you have
if (%aol == 1)
elseif (%ool == 2)
elseif (%hol == 3)
elseif (%evl == 4)
elseif (%offl == 5)
i dont see where these vars get set
if (%aol == 1)
elseif (%ool == 2)
elseif (%hol == 3)
i also dont see where these variables get used
set %opl 1
set %vol 3
i didnt test this, but you could check if the file exists before you try to play it
elseif (!view == $strip($1)) && ($strip($2)) {
if ($exists($2)) { play $chan $2 }
else { .msg $chan I do not have that file $+($nick,$chr(46)) }
}
also
menu "Check One of The Following", 11
would be better as
text "Check One of The Following", 11, 2 2 71 8
heres one thatll come in handy
var %a = $dname, %b = $devent, %c = $did
if (%b == sclick) {
if (%c == 2) {
and the dialogs $iif for incase you try to open the dialog once its already open
Allow Editer: dialog $iif($dialog(Allows),-v,-m) Allows Allows
u also dont need to check if $1 == !addtext so much
on *:TEXT:*:#: {
if (!addtext == $strip($1)) && ($strip($2)) {
var %a = write $2 $3- | .notice $nick $2.txt has been added
if (%aol == 1) && ($nick isaop $chan) { %a }
elseif (%ool == 2) && (%nick isop $chan) { %a }
elseif (%hol == 3) && ($nick ishop $chan) { %a }
elseif (%evl == 4) { %a }
elseif (%offl == 5) { .notice $nick Addtext is off }
}
elseif (!view == $strip($1)) && ($strip($2)) { play $chan $2 }
else { }
}