mob/verb/English_To_Blabber(T as text)
if(THERE IS AN A IN THE TEXT STRING "T")
CHANGE THE A INTO Z!
IF(THERE IS A B IN THE TEXT STRING "T")
CHANGE THE B INTO A X
Can someone change that to actual code? I'm getting back into coding and forgot alot of it.
Siientx
ID:147605
![]() Mar 10 2004, 11:03 pm
|
|
First, how to use findtext(). I'll let the reference speak for itself on that.
Second, how to use copytext(), again the reference speaks for itself.
Third, how to use length(), ditto.
Fourth, how to use them together.
Basically we want to store the value findtext() returns as a reference (shows us the position of "A"). Then we want to make two new vars to hold text strings (start and end).
We copytext() everything up until the start of "A" (what findtext() returned) and put it into the first of our string vars (start).
Now we copytext() everything from the start of the string we want to remove + length(that string) + 1 until the end of the string, and put it in the second of our string vars (end).
Now we just remerge them all together.
T = "[start]newtext[end]"