Added a faction, and minor stuff
Adding faction goes through every area. I had no idea.
This commit is contained in:
125
_module/nss/rnd_commoner_inc.nss
Normal file
125
_module/nss/rnd_commoner_inc.nss
Normal file
@@ -0,0 +1,125 @@
|
||||
//:: Copyright (c) Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Randomize appearance & clothing for commoners
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: Sept 01, 2021
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void rnd_skin(object oPC)
|
||||
{
|
||||
//:: Randomize skin color
|
||||
int nKeepskin = GetLocalInt(OBJECT_SELF,"RA_KEEPSKIN");
|
||||
int nSkinColor;
|
||||
nSkinColor = Random(5);
|
||||
if (nKeepskin != 1)
|
||||
{
|
||||
SetColor(OBJECT_SELF, COLOR_CHANNEL_SKIN, nSkinColor);
|
||||
}
|
||||
}
|
||||
|
||||
void rnd_pheno(object oPC)
|
||||
{
|
||||
//: Randomize body size (3:1 ratio)
|
||||
int nKeepPheno = GetLocalInt(OBJECT_SELF, "RA_KEEPPHENO");
|
||||
int nRandom = d4();
|
||||
|
||||
if (nKeepPheno != 1 && nRandom == 1)
|
||||
{
|
||||
SetPhenoType(PHENOTYPE_BIG , OBJECT_SELF);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void rnd_head(object oPC)
|
||||
{
|
||||
// Randomize head
|
||||
int nKeephead = GetLocalInt(OBJECT_SELF,"RA_KEEPHEAD");
|
||||
int nKeephair = GetLocalInt(OBJECT_SELF,"RA_KEEPHAIR");
|
||||
int nHeadNumber;
|
||||
nHeadNumber = Random(12)+1;
|
||||
if (nKeephead != 1)
|
||||
{
|
||||
SetCreatureBodyPart(CREATURE_PART_HEAD, nHeadNumber, OBJECT_SELF);
|
||||
}
|
||||
|
||||
// Randomize hair color
|
||||
int nHairColor;
|
||||
nHairColor = Random(15);
|
||||
if (nKeephair != 1)
|
||||
{
|
||||
SetColor(OBJECT_SELF, COLOR_CHANNEL_HAIR, nHairColor);
|
||||
}
|
||||
}
|
||||
|
||||
void rnd_tattoo(object oPC)
|
||||
{
|
||||
// Randomize Tattoos
|
||||
int nKeeptats = GetLocalInt(OBJECT_SELF,"RA_KEEPTATS");
|
||||
int nTattoo1;
|
||||
nTattoo1 = Random(15);
|
||||
if (nKeeptats != 1)
|
||||
{
|
||||
SetColor(OBJECT_SELF, COLOR_CHANNEL_TATTOO_1, nTattoo1);
|
||||
}
|
||||
|
||||
int nTattoo2;
|
||||
nTattoo2 = Random(15);
|
||||
if (nKeeptats != 1)
|
||||
{
|
||||
SetColor(OBJECT_SELF, COLOR_CHANNEL_TATTOO_2, nTattoo2);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void rnd_clothes(object oPC)
|
||||
{
|
||||
int nNoble = GetLocalInt(OBJECT_SELF,"NOBLE");
|
||||
object oItem;
|
||||
|
||||
if (nNoble != 1)
|
||||
{
|
||||
//Randomizes Commoner's Clothing
|
||||
int nStackSize = 1; // Create 1 items
|
||||
int nResult = d20(1);
|
||||
|
||||
string sItem;
|
||||
sItem = "baleas_cloth0" + IntToString(nResult);
|
||||
|
||||
oItem = CreateItemOnObject(sItem, oPC, 1);
|
||||
|
||||
DelayCommand(0.5f, ActionEquipItem(oItem, INVENTORY_SLOT_CHEST));
|
||||
}
|
||||
|
||||
else if (GetGender(oPC) != 1) // 1 is Female
|
||||
|
||||
{
|
||||
//Randomizes Male Noble's Clothing
|
||||
int nStackSize = 1; // Create 1 items
|
||||
int nResult = d10(1);
|
||||
string sItem;
|
||||
sItem = "noble_m_cloth0" + IntToString(nResult);
|
||||
oItem = CreateItemOnObject(sItem, oPC, 1);
|
||||
//DelayCommand(0.5f, ActionEquipItem(CreateItemOnObject(sItem), INVENTORY_SLOT_CHEST));
|
||||
DelayCommand(0.5f, ActionEquipItem(oItem, INVENTORY_SLOT_CHEST));
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
{
|
||||
//Randomizes Female Noble's Clothing
|
||||
int nStackSize = 1; // Create 1 items
|
||||
int nResult = d10(1);
|
||||
string sItem;
|
||||
sItem = "noble_f_cloth0" + IntToString(nResult);
|
||||
oItem = CreateItemOnObject(sItem, oPC, 1);
|
||||
//DelayCommand(0.5f, ActionEquipItem(CreateItemOnObject(sItem), INVENTORY_SLOT_CHEST));
|
||||
DelayCommand(0.5f, ActionEquipItem(oItem, INVENTORY_SLOT_CHEST));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Test VOID
|
||||
//void main(){}
|
Reference in New Issue
Block a user