View Single Post
  #5  
Old 06-12-2006, 05:42 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by xXziroXx
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.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] @ "!";
  }



HOWEVER, good job with the tutorial!
I'd prefer my version of it.
  1. You are limiting what types of colors they can change to. In Graal you can also change your color to a number instead of the color name.
  2. Those annoying spaces between the opening parenthesis and the first parameter. Why the HELL do you and contiga do that? It is the stupidest thing I've ever seen, and is beyond annoying to read.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote