Well, I gave my IF ranges a lower range to check for and it seems to be working properly so far, but I'm still very very perplexed....
For example, I want it to change the description of an item to let the player know what 'Tier' the item is in. This works perfectly fine for all of the gear EXCEPT helmets, armor, and weapons, even though they use the EXACT SAME function.
If I put a trigger on the ground to change the description of these, it works fine. In the default9, it doesn't work at all. I can change the name of the helmet / armor/ weapon or do anything else to it, but the description won't work......
Here's what it looks like for the clothing section of the script
object oSpawn = OBJECT_SELF;
int iSpawnLevel = GetHitDice(oSpawn);
object oWeapon = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oSpawn);
object oOffhander = GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oSpawn);
object oChest = GetItemInSlot(INVENTORY_SLOT_CHEST, oSpawn);
object oHelm = GetItemInSlot(INVENTORY_SLOT_HEAD, oSpawn);
object oBelt = GetItemInSlot(INVENTORY_SLOT_BELT, oSpawn);
object oBoots = GetItemInSlot(INVENTORY_SLOT_BOOTS, oSpawn);
object oCloak = GetItemInSlot(INVENTORY_SLOT_CLOAK, oSpawn);
object oGauntlet = GetItemInSlot(INVENTORY_SLOT_ARMS, oSpawn);
string sDesc;
// Chest
if(iSpawnLevel >= 1 && iSpawnLevel <= 20){
RandomMagicArmor(oChest);
sDesc = GetDescription(oChest);
SetDescription(oChest, sDesc+"\n"+"Tier 1");
}
if(iSpawnLevel >= 21 && iSpawnLevel <= 30){
RandomMagicArmor2(oChest);
sDesc = GetDescription(oChest);
SetDescription(oChest, sDesc+"\n"+"Tier 2");
}
// Helmet
if(iSpawnLevel >= 1 && iSpawnLevel <= 20){
RandomMagicArmor(oHelm);
sDesc = GetDescription(oHelm);
SetDescription(oHelm, "TEST");
}
if(iSpawnLevel >= 21 && iSpawnLevel <= 30){
RandomMagicArmor2(oHelm);
sDesc = GetDescription(oHelm);
SetDescription(oHelm, "TEST");
}
// Belt
if(iSpawnLevel >= 1 && iSpawnLevel <= 20 && GetIsObjectValid(oBelt) == TRUE){
RandomMagicArmor(oBelt);
sDesc = GetDescription(oBelt);
SetDescription(oBelt, sDesc+"\n"+"Tier 1");
}
if(iSpawnLevel >= 21 && iSpawnLevel <= 30 && GetIsObjectValid(oBelt) == TRUE){
RandomMagicArmor2(oBelt);
sDesc = GetDescription(oBelt);
SetDescription(oBelt, sDesc+"\n"+"Tier 2");
}
// Boots
if(iSpawnLevel >= 1 && iSpawnLevel <= 20 && GetIsObjectValid(oBoots) == TRUE){
RandomMagicArmor(oBoots);
sDesc = GetDescription(oBoots);
SetDescription(oBoots, sDesc+"\n"+"Tier 1");
}
if(iSpawnLevel >= 21 && iSpawnLevel <= 30 && GetIsObjectValid(oBoots) == TRUE){
RandomMagicArmor2(oBoots);
sDesc = GetDescription(oBoots);
SetDescription(oBoots, sDesc+"\n"+"Tier 2");
}
// Cloak
if(iSpawnLevel >= 1 && iSpawnLevel <= 20 && GetIsObjectValid(oCloak) == TRUE){
RandomMagicArmor(oCloak);
sDesc = GetDescription(oCloak);
SetDescription(oCloak, sDesc+"\n"+"Tier 1");
}
if(iSpawnLevel >= 21 && iSpawnLevel <= 30 && GetIsObjectValid(oCloak) == TRUE){
RandomMagicArmor2(oCloak);
sDesc = GetDescription(oCloak);
SetDescription(oCloak, sDesc+"\n"+"Tier 2");
}
// Gauntlet
if(iSpawnLevel >= 1 && iSpawnLevel <= 20 && GetIsObjectValid(oGauntlet) == TRUE){
RandomGauntMagic(oGauntlet);
sDesc = GetDescription(oGauntlet);
SetDescription(oGauntlet, sDesc+"\n"+"Tier 1");
}
if(iSpawnLevel >= 21 && iSpawnLevel <= 30 && GetIsObjectValid(oGauntlet) == TRUE){
RandomGauntMagic2(oGauntlet);
sDesc = GetDescription(oGauntlet);
SetDescription(oGauntlet, sDesc+"\n"+"Tier 2");
}
The RandomMagicArmor works fine for the helmet and armor, but the description just gets completely ignored....