View Single Post
  #11  
Old 02-20-2008, 08:03 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
PHP Code:
function onPlayerEnters() {
  
doUpdateHolo();
}

function 
onPlayerChats() { 
  
temp.db = findNPC("TSAdmin_Functions");

  
temp.modes = {"head", "body", "shield", "hat", "chat", "skin", "coat", "sleeves", "shoes", "belt"}; 
  
temp.playerschat = player.chat.tokenize(); 

  if (
player.chat.starts(":halo")) {
    for (
temp.i: temp.modes) {
      if (
temp.playerschat[0].substring(5).starts(temp.i)) {
        
temp.chat = player.chat.substring((6 + temp.i.length());
        if (
temp.modes.index(temp.i) > 4) {
          
temp.part = (temp.modes.index(temp.i) - 5);
          
temp.db.("BlackHolstColours" @ temp.part) = temp.chat;
          
this.colors[temp.part] = temp.chat;
        } else {
          if (
temp.i == "chat") {
            
this.chat = temp.chat;
          } else if (
temp.i == "hat") {
            
this.attr[1] = temp.chat;
          } else {
            
this.(temp.i @ "img") = temp.chat;
          }
          
temp.db.("BlackHolst" @ temp.i) = temp.chat;
        }
        break;
      }
    }
  } 
}

function 
doUpdateHolo() {
  
temp.db = findNPC("TSAdmin_Functions");
  
this.showCharacter();

  
this.headimg = temp.db.("BlackHolsthead");
  
this.bodyimg = temp.db.("BlackHolstbody");
  
this.shieldimg = temp.db.("BlackHolstshield");
  
this.attr[1] = temp.db.("BlackHolsthat");
  
  for (
temp.i = 0; temp.i < 5; temp.i++) {
    
this.colors[temp.i] = temp.db.("BlackHolstColours" @ temp.i);
  }
  
  
this.chat = temp.db.("BlackHolstchat");
} 
TSA.
__________________

Last edited by xAndrewx; 02-20-2008 at 08:16 PM..
Reply With Quote