//Script Name: setplotcolor ////////////////////////////////////////// //Created by: Genisys / Guile //ON: 6/17/08 ///////////////////////////////////////// /* **Notes** This script goes in the Action Taken of a Converstion Line ONLY! It will colorize ALL Of the items in a PCs inventory a random color. */ //////////////////////////////////////// //Main Script// void main() { //Define Major Variables object oPC = GetPCSpeaker() ; object oItem; string sColor; int nRandom = d10(1); //Randomize the Color if(nRandom ==1) {sColor = "";} if(nRandom ==2) {sColor = "";} if(nRandom ==3) {sColor = "";} if(nRandom ==4) {sColor = "";} if(nRandom ==5) {sColor = "";} if(nRandom ==6) {sColor = "";} if(nRandom ==7) {sColor = "";} if(nRandom ==8) {sColor = "";} if(nRandom ==9) {sColor = "";} if(nRandom ==10) {sColor = "";} oItem = GetFirstItemInInventory(oPC); //Loop through all the items in the PC's inventory.. while(GetIsObjectValid(oItem)==TRUE) { //Be careful with items with a color string already on them!!! if(GetSubString(GetName(oItem), 0, 2)=="" + sName); } else { //Get the actual name of the item minus the color code.. string sName = GetSubString(GetName(oItem), 6, 40); //Set the color to the item's name SetName(oItem, sColor + sName); } //end if statement } //Since there is no color tag on the item's name give it one.. else { if(GetPlotFlag(oItem)==TRUE) { //Set the random color to the item's name.. SetName(oItem, "" + GetName(oItem)); } else { //Set the random color to the item's name.. SetName(oItem, sColor + GetName(oItem)); } } //Get all of the items! oItem = GetNextItemInInventory(oPC); } //Next cycle through all items equipped by the PC/// int nSlot; for (nSlot=0; nSlot