Updated Giant Wasp Hive
Updated Giant Wasp Hive. Got the Outcasts spawning with clothes on. Full compile.
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include "rnd_commoner_inc"
|
||||
#include "NW_O2_CONINCLUDE"
|
||||
#include "NW_I0_GENERIC"
|
||||
#include "ra_rnd_armor_inc"
|
||||
|
||||
void main()
|
||||
{
|
||||
@@ -29,7 +30,8 @@ void main()
|
||||
rnd_tattoo(OBJECT_SELF);
|
||||
|
||||
// Randomize Clothing
|
||||
rnd_clothes(OBJECT_SELF);
|
||||
RndOutcast(OBJECT_SELF);
|
||||
ActionEquipMostEffectiveArmor();
|
||||
|
||||
//Calls the Random Name Generator
|
||||
ms_Nomenclature(OBJECT_SELF);
|
||||
|
32
_module/nss/ra_antinude.nss
Normal file
32
_module/nss/ra_antinude.nss
Normal file
@@ -0,0 +1,32 @@
|
||||
// This method does not use ActionEquipMostEffectiveArmor() and is a workaround
|
||||
// to allow equipping clothing. It will equip any armor in the entering object's
|
||||
// inventory. It can easily be modified to be used on a NPC's spawn script, but
|
||||
// this is a good thing to have on a trigger around the module spawn point for
|
||||
// PCs. Thanks to georage.
|
||||
void main()
|
||||
{
|
||||
// Get the entering object
|
||||
object oNPC = GetEnteringObject();
|
||||
string sLocal = "DO_ONCE" + ObjectToString(OBJECT_SELF);
|
||||
|
||||
// Only do this once, and only to NPCs
|
||||
if(GetLocalInt(oNPC, sLocal) || GetIsPC(oNPC)) return;
|
||||
|
||||
// Set to not do it again
|
||||
SetLocalInt(oNPC, sLocal, TRUE);
|
||||
|
||||
// Loop the object's inventory and equip the first
|
||||
object oItem = GetFirstItemInInventory(oNPC);
|
||||
while(GetIsObjectValid(oItem))
|
||||
{
|
||||
// Check if armor, of course
|
||||
if(GetBaseItemType(oItem) == BASE_ITEM_ARMOR)
|
||||
{
|
||||
// Equip it and stop the script
|
||||
AssignCommand(oNPC, ActionEquipItem(oItem, INVENTORY_SLOT_CHEST));
|
||||
return;
|
||||
}
|
||||
|
||||
oItem = GetNextItemInInventory(oNPC);
|
||||
}
|
||||
}
|
@@ -8,6 +8,63 @@
|
||||
// Test VOID
|
||||
//void main(){}
|
||||
|
||||
void RndOutcast(object oNPC)
|
||||
{
|
||||
//:: Randomizes Clothing
|
||||
|
||||
int nResult = d6(1);
|
||||
int nStackSize = 1; // Create 1 items;
|
||||
|
||||
object oArmor;
|
||||
|
||||
string sItem;
|
||||
|
||||
if (nResult == 1)
|
||||
{
|
||||
sItem = "ra_altpd_outcst1";
|
||||
}
|
||||
else if(nResult == 2)
|
||||
{
|
||||
sItem = "ra_altpd_outcst2";
|
||||
}
|
||||
else if(nResult == 3)
|
||||
{
|
||||
sItem = "ra_altpd_outcst3";
|
||||
}
|
||||
else if(nResult == 4)
|
||||
{
|
||||
sItem = "ra_altpd_outcst4";
|
||||
}
|
||||
else if(nResult == 5)
|
||||
{
|
||||
sItem = "ra_altpd_outcst5";
|
||||
}
|
||||
else if(nResult == 6)
|
||||
{
|
||||
sItem = "ra_altpd_outcst6";
|
||||
}
|
||||
else
|
||||
sItem = "NW_AARCL009";
|
||||
|
||||
CreateItemOnObject(sItem, OBJECT_SELF, nStackSize);
|
||||
|
||||
// Loop the object's inventory and equip the first
|
||||
object oItem = GetFirstItemInInventory(OBJECT_SELF);
|
||||
while(GetIsObjectValid(oItem))
|
||||
{
|
||||
// Check if armor, of course
|
||||
if(GetBaseItemType(oItem) == BASE_ITEM_ARMOR)
|
||||
{
|
||||
// Equip it and stop the script
|
||||
DelayCommand(2.0f, ActionEquipItem(oItem, INVENTORY_SLOT_CHEST));
|
||||
return;
|
||||
}
|
||||
|
||||
oItem = GetNextItemInInventory(OBJECT_SELF);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void RndBanditArmor(object oNPC)
|
||||
{
|
||||
// Makes sure any original armor isn't dropped as loot.
|
||||
|
@@ -102,7 +102,7 @@ void main()
|
||||
|
||||
SetLocalInt(OBJECT_SELF, "iDialogue", Random(10) + 1);
|
||||
|
||||
SetLocalInt(OBJECT_SELF, "iRumor", Random(10) + 1);
|
||||
SetLocalInt(OBJECT_SELF, "iRumor", Random(60) + 1);
|
||||
|
||||
SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to.
|
||||
//WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0)
|
||||
|
@@ -10,7 +10,7 @@
|
||||
|
||||
void rnd_skin(object oPC)
|
||||
{
|
||||
// Randomize skin color
|
||||
//:: Randomize skin color
|
||||
int nKeepskin = GetLocalInt(OBJECT_SELF,"RA_KEEPSKIN");
|
||||
int nSkinColor;
|
||||
nSkinColor = Random(15);
|
||||
@@ -20,6 +20,18 @@ void rnd_skin(object oPC)
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
@@ -71,9 +83,13 @@ void rnd_clothes(object oPC)
|
||||
//Randomizes Commoner's Clothing
|
||||
int nStackSize = 1; // Create 1 items
|
||||
int nResult = d20(1);
|
||||
|
||||
string sItem;
|
||||
sItem = "baleas_cloth0" + IntToString(nResult);
|
||||
DelayCommand(1.0f, ActionEquipItem(CreateItemOnObject(sItem), INVENTORY_SLOT_CHEST));
|
||||
|
||||
object oItem = CreateItemOnObject(sItem, oPC, 1);
|
||||
|
||||
DelayCommand(0.5f, ActionEquipItem(oItem, INVENTORY_SLOT_CHEST));
|
||||
}
|
||||
|
||||
else if (GetGender(oPC) != 1) // 1 is Female
|
||||
@@ -84,7 +100,7 @@ void rnd_clothes(object oPC)
|
||||
int nResult = d10(1);
|
||||
string sItem;
|
||||
sItem = "noble_m_cloth0" + IntToString(nResult);
|
||||
DelayCommand(1.0f, ActionEquipItem(CreateItemOnObject(sItem), INVENTORY_SLOT_CHEST));
|
||||
DelayCommand(0.5f, ActionEquipItem(CreateItemOnObject(sItem), INVENTORY_SLOT_CHEST));
|
||||
}
|
||||
|
||||
else
|
||||
|
@@ -1,19 +0,0 @@
|
||||
// sc_ra_rnd_rumours
|
||||
// by: Tsurani.Nevericy
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
object oSelf = OBJECT_SELF;
|
||||
string sParam = GetScriptParam("iRumourNum");
|
||||
int nCheck = GetLocalInt(oSelf, "iRumour");
|
||||
if (!nCheck) // if no random value yet
|
||||
SetLocalInt(oSelf, "iRumour", Random(60)+1);
|
||||
|
||||
int nVal = StringToInt(sParam);
|
||||
if (nVal == nCheck)
|
||||
{
|
||||
DeleteLocalInt(oSelf, "iRumour");
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
Reference in New Issue
Block a user