I'm not familiar with the Wonderland adventure games at all, but typical susbstitution such as you described is achievable through manipulation of the ASCII values for the characters.
For example:
Function Substitute$(A_String$)
Local Length=Len(A_String)
If Not(Length) Then Return A_String
Local Char$
Local NewChar$
Local Count
Local Ascii
Local NewAscii
Local OutPut$=""
For Count=1 To Length
Char$=Mid(A_String,Count,1)
Ascii=Asc(Char)
NewAscii=SubstituteAscii(Ascii)
NewChar$=Chr(NewAscii)
OutPut=OutPut+NewChar$
Next
Return OutPut
End Function
Function SubstituteAscii(ascii)
Local Swap
If ((ascii>96) And (ascii<123))
;Lowercase letter
Swap=96
End If
If ((ascii>64) And (ascii<91))
;Uppercase letter
Swap=64
End If
If (Swap)
;Reverse alphabet, a=z by c=x etc.
ascii=27-(ascii-Swap)
End If
Return ascii+swap
End Function
|