Initial upload

Initial upload
This commit is contained in:
Jaysyn904
2022-10-07 14:20:31 -04:00
parent 0bbbd2678a
commit 128e7e59a4
7060 changed files with 4955665 additions and 0 deletions

View File

@@ -0,0 +1,66 @@
//Script Name: coloritembrtblue
////////////////////////////////////////////////
//Created by: Genisys / Guile
//ON: 6/17/08
////////////////////////////////////////////////
/* **Notes**
This script goes in the ActionTaken
event of the coloritemconv conversation
on the line which will turn the item targeted
to the proper color that matches this script's
name (ie coloritemwhite script goes on the line
which changes the color to white!)
*/
////////////////////////////////////////////////
//Main Script//
void main()
{
//Define Major Variables
object oPC = GetPCSpeaker();
string sName = GetLocalString(oPC, "ONNC");
string sToken = "<c <20><>>"; //Light Blue
string sMod;
//Let's make sure it doesn't already have a color on it!!!
if(GetStringLeft(sName, 2)=="<c")
{
//Get the original name without the color strings!
sMod = GetSubString(sName, 6, 40);
}
else
{
sMod = sName;
}
//The new name of item (Color + Original Name)
string sNew = sToken + sMod;
object oItem;
//Cycle through thier inventory to find the proper item(s)
oItem = GetFirstItemInInventory(oPC);
while(GetIsObjectValid(oItem)==TRUE)
{
//Change all items with the same name
if(GetName(oItem)==sName)
//Change the name to include color..
SetName(oItem, sNew);
oItem = GetNextItemInInventory(oPC);
}
//Kill the NPC now..
DestroyObject(OBJECT_SELF, 2.0f);
//Remove the variables from the PC
DelayCommand(2.2, DeleteLocalString(oPC, "ONNC"));
//Main Script End
}