Redoing drop rates and other minor stuff
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
void main()
|
||||
{
|
||||
DelayCommand(10.0, ActionCloseDoor(OBJECT_SELF));
|
||||
DelayCommand(20.0, ActionCloseDoor(OBJECT_SELF));
|
||||
}
|
||||
|
@@ -116,7 +116,7 @@ void main()
|
||||
// * Same as above, except NPC will wander randomly around the
|
||||
// * area.
|
||||
// *
|
||||
// SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
|
||||
SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -138,7 +138,7 @@ void main()
|
||||
// * Humanoid races are civilized by default, so only
|
||||
// * set this flag for monster races that you want to
|
||||
// * behave the same way.
|
||||
// SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED);
|
||||
SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED);
|
||||
|
||||
// * If this flag is set, this creature will constantly
|
||||
// * be acting. Otherwise, creatures will only start
|
||||
@@ -151,7 +151,7 @@ void main()
|
||||
// * randomly use a few voicechats. It's a good
|
||||
// * idea to avoid putting this on multiple
|
||||
// * creatures using the same voiceset.
|
||||
// SetAnimationCondition(NW_ANIM_FLAG_CHATTER);
|
||||
SetAnimationCondition(NW_ANIM_FLAG_CHATTER);
|
||||
|
||||
// * Creatures with _immobile_ ambient animations
|
||||
// * can have this flag set to make them mobile in a
|
||||
@@ -174,11 +174,11 @@ void main()
|
||||
// * Ranged attacker
|
||||
// * Will attempt to stay at ranged distance from their
|
||||
// * target.
|
||||
// SetCombatCondition(X0_COMBAT_FLAG_RANGED);
|
||||
SetCombatCondition(X0_COMBAT_FLAG_RANGED);
|
||||
|
||||
// * Defensive attacker
|
||||
// * Will use defensive combat feats and parry
|
||||
// SetCombatCondition(X0_COMBAT_FLAG_DEFENSIVE);
|
||||
SetCombatCondition(X0_COMBAT_FLAG_DEFENSIVE);
|
||||
|
||||
// * Ambusher
|
||||
// * Will go stealthy/invisible and attack, then
|
||||
@@ -324,5 +324,5 @@ void main()
|
||||
}
|
||||
|
||||
ExecuteScript("prc_pwonspawn", OBJECT_SELF);
|
||||
//DelayCommand(10.5, ExecuteScript("npc_sit_stay", OBJECT_SELF));
|
||||
DelayCommand(0.5, ExecuteScript("random_drop", OBJECT_SELF));
|
||||
}
|
||||
|
@@ -1,25 +1,19 @@
|
||||
//RANDOM DROP
|
||||
// Ginge McDaggart
|
||||
void main()
|
||||
{
|
||||
object oNPC = OBJECT_SELF;
|
||||
object oItem = GetFirstItemInInventory(oNPC);
|
||||
|
||||
while (GetIsObjectValid(oItem))
|
||||
{
|
||||
if(GetDroppableFlag(oItem)== TRUE)
|
||||
while (GetIsObjectValid(oItem))
|
||||
{
|
||||
SetDroppableFlag(oItem, TRUE);
|
||||
}
|
||||
|
||||
if(GetDroppableFlag(oItem)== FALSE)
|
||||
{
|
||||
int bDroppable=d100()>65;
|
||||
SetDroppableFlag(oItem, bDroppable);
|
||||
}
|
||||
// if item set to droppable it will 100% drop
|
||||
if (GetDroppableFlag(oItem)== TRUE)
|
||||
{
|
||||
SetDroppableFlag(oItem, TRUE);
|
||||
}
|
||||
//10% chance of item in inventory being droppable if not marked droppable
|
||||
int bDroppable=d100()>90;
|
||||
|
||||
SetDroppableFlag(oItem, bDroppable);
|
||||
oItem = GetNextItemInInventory(oNPC);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user