rendered paste bodydialog count {
title "Counter"
size -1 -1 96 40
option dbu
edit "", 1, 4 9 53 10, autohs
box "Total", 2, 2 1 58 22
box "Count By", 3, 62 1 32 22
edit "", 4, 65 9 26 10, autohs
button "+", 5, 23 25 11 12
button "-", 6, 34 25 11 12
button "Reset", 7, 48 25 22 12
}
on *:DIALOG:count:init:*:{
did -a count 1 $iif(%bsal,$ifmatch,0)
did -a count 4 1
}
on *:DIALOG:count:sclick:5:{ did -ra count 1 $bytes($calc( $did(count,1) + $did(count,4) ),db) }
on *:DIALOG:count:sclick:6:{ did -ra count 1 $bytes($calc( $did(count,1) - $did(count,4) ),db) }
on *:DIALOG:count:sclick:7:{ did -ra count 1 0 }
on *:DIALOG:count:close:*:{ set %bsal $did(count,1) }
on *:TEXT:!sallycheck*:#:{
if (%bsal) { msg $chan I have $ifmatch Black Salamander }
}
alias /sally {
/dialog -md count count
}