View Single Post
  #4  
Old 06-11-2006, 12:14 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Or even a better way to make a tailoring script..

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.index( tokens[0]) > -1 && BodyColors.index( tokens[1]) > -1) {
    if (
tokens[0] != "all") player.colors[ BodyParts.index( tokens[0])] = tokens[1];
    else {
      for (
i: BodyParts) player.colors[ BodyParts.index( i)] = tokens[1];
    }
    
player.chat = "Changed " @ tokens[0] @ " to " @ tokens[1] @ "!";
  }
} 


HOWEVER, good job with the tutorial!
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote