Thread: Tokenize
View Single Post
  #7  
Old 06-17-2002, 08:14 PM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
if (playerchats&&startswith(setred,#c)){
tokenize #c;
this.red = strtofloat(#t(1));
}

NPC Code:


setstring list,Hello how are you today;
tokenize #s(list); // don't forget the #s() here;

// #t(0) will = Hello , #t(1) will = how , and so on.

tokenize Hello how are you today; // don't need the #s() doing it this way
// #t(0) will = Hello lik ebefore

setstring list, ab.c.defg.hi.jklmnop;
tokenize2 . , #s(list); // don'tforget teh #s() here

// #t(0) will = ab ; #t(1) will = c ; #t(2) will = defg ;

tokenize2 #, hello#how#are#you; // don't need #s() here;

// #t(0) will = hello ; #t(1) will = how ; #t(2) will = are ; and so on



That should be enough examples.....
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
Reply With Quote