Remade Dungeon Level One: Central

Remade Dungeon Level One: Central.  Added Didiamus' creature overrides.  Full compile.
This commit is contained in:
Jaysyn904
2023-09-17 23:08:55 -04:00
parent 84d583b489
commit d168e90e83
225 changed files with 189628 additions and 114247 deletions

View File

@@ -21,15 +21,16 @@ const int EVENT_USER_DEFINED_POSTSPAWN = 1511;
void main()
{
//:: Declare major variables
int nUser = GetUserDefinedEventNumber();
object oSelf = OBJECT_SELF;
int nUser = GetUserDefinedEventNumber();
int nFireDamage = 0;
int nAcidDamage = 0;
int nTotalHP = GetMaxHitPoints(OBJECT_SELF);
int nTotalHP = GetMaxHitPoints(oSelf);
string sResRef = GetResRef(OBJECT_SELF);
string sResRef = GetResRef(oSelf);
effect eSleep = EffectSleep();
effect eSlow = EffectSlow();
effect eSleep = EffectSleep();
effect eSlow = EffectSlow();
if(nUser == EVENT_HEARTBEAT ) //HEARTBEAT
{
@@ -44,18 +45,52 @@ void main()
RemoveEffect(OBJECT_SELF, eSleep);
}
SpeakString("My Subdual is now " + IntToString(GetLocalInt(OBJECT_SELF, "nSubDual")));
}
} */
}
else if(nUser == EVENT_PERCEIVE) // PERCEIVE
{
if (sResRef == "ra_ghast002")
{
SpeakString("Well hello to you, my first meal in a century!", TALKVOLUME_TALK);
}
}
else if(nUser == EVENT_END_COMBAT_ROUND) // END OF COMBAT
{
if (sResRef == "ra_ghast002")
{
// Randomly choose a threat message
int threatChoice = Random(4) + 1; // You can adjust the number of threats as needed
}
// Depending on the threatChoice, the NPC will say different things
string threatMessage = "";
switch (threatChoice)
{
case 1:
threatMessage = "You look delicious!!";
break;
case 2:
threatMessage = "Thank you so much!!";
break;
case 3:
threatMessage = "FREEEDOM!!";
break;
case 4:
threatMessage = "So sorry, I can't help it you see?";
break;
}
// Get the nearest enemy and make the NPC say the threat
object oNearestEnemy = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, PLAYER_CHAR_IS_PC, oSelf);
if (GetIsObjectValid(oNearestEnemy))
{
SpeakString(threatMessage, TALKVOLUME_TALK);
}
}
}
else if(nUser == EVENT_DIALOGUE) // ON DIALOGUE
{
@@ -73,21 +108,21 @@ void main()
if(GetDamageDealtByType(DAMAGE_TYPE_FIRE) >= 1)
{
nFireDamage = GetDamageDealtByType(DAMAGE_TYPE_FIRE);
SpeakString("Fire Damage: " + IntToString(nFireDamage));
SpeakString("Fire Damage: " + IntToString(nFireDamage));
}
if(GetDamageDealtByType(DAMAGE_TYPE_ACID) >= 1)
{
nAcidDamage = GetDamageDealtByType(DAMAGE_TYPE_ACID);
SpeakString("Acid Damage: " + IntToString(nAcidDamage));
SpeakString("Acid Damage: " + IntToString(nAcidDamage));
}
int nSubDmg = nTotalDamage - (nFireDamage + nAcidDamage);
int nActDmg = nFireDamage + nAcidDamage;
SpeakString("Real damage this attack: " + IntToString(nActDmg));
SetLocalInt(OBJECT_SELF, "nActDmg", nActDmg + GetLocalInt(OBJECT_SELF, "nActDmg"));
SpeakString("Real damage this attack: " + IntToString(nActDmg));
SetLocalInt(OBJECT_SELF, "nActDmg", nActDmg + GetLocalInt(OBJECT_SELF, "nActDmg"));
effect eHeal = EffectHeal(nSubDmg);
@@ -101,10 +136,10 @@ void main()
int nSD = GetLocalInt(OBJECT_SELF, "nSubDual");
int nCurrentHP = GetCurrentHitPoints(OBJECT_SELF);
SpeakString("SD: " + IntToString(nSD));
SpeakString("CH: " + IntToString(nCurrentHP));
SpeakString("ActDmg: " + IntToString(nActDmg));
SpeakString("ActDmg: " + IntToString(nActDmg));
if(nSD > nCurrentHP)
{
@@ -117,13 +152,13 @@ void main()
SpeakString("I am staggered!");
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSlow, OBJECT_SELF, 6.0f);
}
if ((nTotalHP - nActDmg) < nCurrentHP)
{
nCurrentHP = nTotalHP - nActDmg;
SpeakString("Setting HP to: " + IntToString(nCurrentHP));
SetCurrentHitPoints(OBJECT_SELF, nCurrentHP);
}
if ((nTotalHP - nActDmg) < nCurrentHP)
{
nCurrentHP = nTotalHP - nActDmg;
SpeakString("Setting HP to: " + IntToString(nCurrentHP));
SetCurrentHitPoints(OBJECT_SELF, nCurrentHP);
}
} */
}
else if(nUser == 1007) // DEATH - do not use for critical code, does not fire reliably all the time