i found this script from forum search and DaveC wrote it, I think it doesn't work well with numbers. For example the %answer is $50,000. Can you help me?
<triviabot> hint 1/5: $**,***
<triviabot> hint 2/5: $******
<triviabot> hint 3/5: $**,***
<triviabot> hint 4/5: $**,0**
<triviabot> hint 5/5: $*0,0**
hint.method2 {
var %answer = $gettok($1,1-,32)
var %hint = $gettok($2,1-,32)
if (!%hint) {
!.echo -q $regsub(%answer,/[^ ]/g,*,%hint)
}
elseif ($regex(%hint,/^[* ]+$/iS)) {
var %i = $numtok(%hint,32)
while (%i) {
var %hint = $puttok(%hint,$+($left($gettok(%answer,%i,32),1),$mid($gettok(%hint,%i,32),2)),%i,32)
dec %i
}
}
elseif ($pos(%hint,*,0)) {
var %i = $numtok(%hint,32)
while (%i) {
var %hword = $gettok(%hint,%i,32)
if ($pos(%hword,*,0) > 1) {
var %pos = $pos(%hword,*,$rand(1,$v1))
var %hint = $puttok(%hint,$+($left(%hword,$calc(%pos - 1)),$mid($gettok(%answer,%i,32),%pos,1),$mid(%hword,$calc(%pos + 1))),%i,32)
}
dec %i
}
}
return %hint
}