this is another useless snippet. it is a color talker that made. the reason i made it like this is because i have never seen it approached this way. this does work but it is stupid. when you enter the color you want to use please add the ctrl+k and whatever
dialog CT {
title "Color Talker"
size -1 -1 200 24
option dbu
edit "", 1, 1 13 198 10, autohs
button "Color Of Your Text", 2, 2 1 98 10, flat
button "", 3, 100 1 99 10, flat
}
menu * {
.Pwnisher3's Color Talker: dialog -m ct ct
}
on *:dialog:ct:*:*:{
if ($devent == init) {
set %ctroom $$?=" What Channel Do You Want To Talk In?"
did -a ct 3 Send Your Text To %ctroom
}
if ($devent == sclick) {
if ($did == 2) {
set %tc $+ $$?=" what color would you like? EX: 3,4"
}
if ($did == 3) {
if ($did(1)) {
msg %ctroom %tc $did(1)
did -ra ct 1
}
}
}
}
You can combine your on dialogs
on *:dialog:ct:*:*:{
if ($devent == init) { do this }
if ($devent == sclick) {
if ($did == 2) { do this }
if ($did == 3) { do that }
}
}
Some stuff you did wrong
on *:dialog:ct:sclick:2:{
set %tc $$?=" what color would you like? EX: 3,4"
}
You forgot a $+
on *:dialog:ct:sclick:*:{
if (did == 3) {
if (!$did(1).text || set %ct $did(1).text || say %ct)
}
Your if is screwed up and if it did work: First you'd check if there's no text in $did(1) and if there ISN'T you go on to set no text to %ct and then message it
I fixed it up a bit.
dialog CT {
title "Color Talker"
size -1 -1 200 24
option dbu
edit "", 1, 1 13 198 10, autohs
button "Color Of Your Text", 2, 2 1 98 10, flat
button "", 3, 100 1 99 10, flat
}
menu * {
.Pwnisher3's Color Talker: dialog -m ct ct
}
on *:dialog:ct:*:*:{
if ($devent == init) {
set %ctroom $$?=" What Channel Do You Want To Talk In?"
did -a ct 3 Send Your Text To %ctroom
}
if ($devent == sclick) {
if ($did == 2) {
set %tc $+ $$?=" what color would you like? EX: 3,4"
}
if ($did == 3) {
if ($did(1)) {
msg %ctroom %tc $did(1)
did -ra ct 1
}
}
}
}
Would be nice if it was all visible at once and if it had a dropdown for the channel select.