
09-27-2001, 02:40 AM
|
|
Banned
|
 |
Join Date: Jul 2001
Location: Merlin - U S A Malak - United Kingdom
Posts: 2,543
|
|
|
i was typing this up last night but i had to go so ill do it again
tokenize is used to break what the player says up into peaces word for word also known as "tokens"
so if the player says
hi i am merlin
the tokens would be:
hi = 0
i = 1
am = 2
merlin = 3
so to script it..
if (playerchats) {
tokenize #c;
if (tokenscount==3) { //checking if the amount of words = 3 (actualy four since it starts at 0)
setstring client.one,#t(0); //setting the string "client.one=" to = the first word said in the phrase (first token) so it would be client.one=hi if i were to say "hi i am merlin"
}
}
that's basicly it. |
|
|
|