Thread: Some questions
View Single Post
  #1  
Old 04-30-2011, 11:26 PM
papajchris papajchris is offline
Zeus Condero
papajchris's Avatar
Join Date: Jan 2006
Location: Michigan
Posts: 1,600
papajchris is a splendid one to beholdpapajchris is a splendid one to beholdpapajchris is a splendid one to beholdpapajchris is a splendid one to behold
Some questions

So im looking at one of xXziroXx's old scripts and i had some questions

Quote:
Originally Posted by xXziroXx View Post
PHP Code:
function onPlayerChats()
{
  
tokens player.chat.tokenize();
  
BodyParts = { "skin""coat""sleeves""shoes""belt""all"};
  
BodyColors = { "white""yellow""orange""pink""red",
    
"darkred""lightgreen""green""darkgreen""lightblue",
      
"blue""darkblue""brown""cynober""purple",
        
"darkpurple""lightgray""gray""black"};
  if (
BodyParts.indextokens[0]) > -&& BodyColors.indextokens[1]) > -1) {
    if (
tokens[0] != "all"player.colorsBodyParts.indextokens[0])] = tokens[1];
    else {
      for (
iBodyPartsplayer.colorsBodyParts.indexi)] = tokens[1];
    }
    
player.chat "Changed " tokens[0] @ " to " tokens[1] @ "!";
  }

PHP Code:
 if (BodyParts.indextokens[0]) > -&& BodyColors.indextokens[1]) > -1
What does the -1 do? Assuming its the word number, how can words be less than first word (which is number 0).


PHP Code:
for (iBodyPartsplayer.colorsBodyParts.indexi)] = tokens[1]; 
What does the "i" do? My guess is its a variable?

Lastly can SPC be used instead of "@"?
__________________
Reply With Quote