Initial upload

Initial upload
This commit is contained in:
Jaysyn904
2023-09-25 20:24:01 -04:00
parent 4e16ca63ca
commit 5197ad9a4d
7741 changed files with 5391820 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
//::///////////////////////////////////////////////
//:: Confusion Heartbeat Support Script
//:: NW_G0_Confuse
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
This heartbeat script runs on any creature
that has been hit with the confusion effect.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Sept 27, 2001
//:://////////////////////////////////////////////
void main()
{
//Make sure the creature is commandable for the round
AssignCommand(OBJECT_SELF, SetCommandable(TRUE));
//Clear all previous actions.
AssignCommand(OBJECT_SELF, ClearAllActions());
int nRandom = d10();
//Roll a random int to determine this rounds effects
if(nRandom == 1)
{
object enemy = GetFactionWorstAC(OBJECT_SELF, TRUE);
if (enemy == OBJECT_INVALID) {
GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE,OBJECT_SELF);
}
AssignCommand(OBJECT_SELF, ActionAttack(enemy));
}
else if (nRandom >= 2 && nRandom <= 6)
{
object enemy = GetFactionWeakestMember(OBJECT_SELF, TRUE);
if (enemy == OBJECT_INVALID) {
GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE,OBJECT_SELF);
}
AssignCommand(OBJECT_SELF, ActionAttack(enemy));
}
else if(nRandom >= 7 && nRandom <= 10)
{
object enemy = GetFactionMostDamagedMember(OBJECT_SELF, TRUE);
if (enemy == OBJECT_INVALID) {
GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE,OBJECT_SELF);
}
AssignCommand(OBJECT_SELF, ActionAttack(enemy));
}
DelayCommand(0.1, AssignCommand(OBJECT_SELF, SetCommandable(FALSE)));
}