Also, I realize this part doesn't quite make sense:> on :TEXT:!register:#:{
if (!$2) {
if (%coke. [ $+ [ $nick ] ] == 1) {
The $2 has nothing to do with the dynamic variable here. It should have been:
on *:TEXT:!register*:#:{
if (!%coke. [ $+ [ $nick ] ]) {
if (%coke. [ $+ [ $nick ] ] == 1) {
You're to check for the value, not compare them with $2 and the variable.