It seems more common to use I, J, K, L for loop counters than than I, II, III, IIII.
I don't know about realbasic, but VB is pretty nice with its Mid function, allowing it to be written to as well.
I tossed this together in about 10 minutes. Feel free to do whatever you want with it. Warning: The letters it hints are horribly off. =p
Option Explicit
Private Sub Form_Load()
MsgBox CreateHint("Ryan is weird.", 1)
MsgBox CreateHint("Ryan is weird.", 1)
MsgBox CreateHint("Ryan is weird.", 2)
MsgBox CreateHint("Ryan is weird.", 2)
MsgBox CreateHint("Ryan is weird.", 3)
MsgBox CreateHint("Ryan is weird.", 3)
MsgBox CreateHint("Ryan is weird.", 4)
MsgBox CreateHint("Ryan is weird.", 4)
MsgBox CreateHint("Ryan is weird.", 5)
End Sub
Public Function CreateHint(p_sMessage As String, p_iHintLevel As Integer)
Dim m_iLettersToHint As Integer, m_sRet As String, ary_m_bHinted(1 To 100) As Boolean
m_sRet = p_sMessage
Select Case p_iHintLevel
Case 1: m_iLettersToHint = Len(p_sMessage) / 5
Case 2: m_iLettersToHint = Len(p_sMessage) / 4
Case 3: m_iLettersToHint = Len(p_sMessage) / 3
Case 4: m_iLettersToHint = Len(p_sMessage) / 2
Case 5: m_iLettersToHint = Len(p_sMessage) 'The should have lost by now, but eh?
End Select
m_iLettersToHint = Len(p_sMessage) - m_iLettersToHint
Dim I As Long, m_iPositionToHint As Integer
For I = 1 To 100
ary_m_bHinted(I) = False
Next I
For I = 1 To m_iLettersToHint
m_iPositionToHint = Int(Rnd * Len(p_sMessage)) + 1
While ary_m_bHinted(m_iPositionToHint)
m_iPositionToHint = (m_iPositionToHint Mod Len(p_sMessage)) + 1
Wend
ary_m_bHinted(m_iPositionToHint) = True
Mid(m_sRet, m_iPositionToHint, 1) = "*"
Next I
CreateHint = m_sRet
End Function