36 lines
889 B
Plaintext
36 lines
889 B
Plaintext
/*
|
|
Calculate the remaining hitpoints of temple gate
|
|
Created By: Dalantriel Jul 22, 2002
|
|
*/
|
|
|
|
void main()
|
|
{
|
|
// Set the variables
|
|
int nGatestrength = (GetCurrentHitPoints(GetObjectByTag("TempleGate")));
|
|
|
|
if(nGatestrength == 400)
|
|
{
|
|
SpeakString("Undamaged", TALKVOLUME_TALK);
|
|
}
|
|
if(nGatestrength < 400 && nGatestrength > 300)
|
|
{
|
|
SpeakString("Slightly Damaged", TALKVOLUME_TALK);
|
|
}
|
|
if(nGatestrength < 301 && nGatestrength > 200)
|
|
{
|
|
SpeakString("Moderately Damaged", TALKVOLUME_TALK);
|
|
}
|
|
if(nGatestrength < 201 && nGatestrength > 100)
|
|
{
|
|
SpeakString("Heavily Damaged", TALKVOLUME_TALK);
|
|
}
|
|
if(nGatestrength < 101 && nGatestrength > 0)
|
|
{
|
|
SpeakString("Critically Damaged", TALKVOLUME_TALK);
|
|
}
|
|
if(nGatestrength == 0)
|
|
{
|
|
SpeakString("Destroyed", TALKVOLUME_TALK);
|
|
}
|
|
}
|