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.