Changed folder name.
Changed folder name.
This commit is contained in:
48
_module/nss/regenerateme.nss
Normal file
48
_module/nss/regenerateme.nss
Normal file
@@ -0,0 +1,48 @@
|
||||
void main()
|
||||
{
|
||||
int xHP;
|
||||
xHP = GetCurrentHitPoints(OBJECT_SELF);
|
||||
if(GetLocalInt(OBJECT_SELF, "Regenertating") !=1)
|
||||
{
|
||||
if(xHP <900)
|
||||
{
|
||||
effect eEffect;
|
||||
eEffect = EffectRegenerate(900, 6.0f);
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, OBJECT_SELF, 90.0f);
|
||||
SetLocalInt(OBJECT_SELF, "Regenerating", 1);
|
||||
DelayCommand(90.0, SetLocalInt(OBJECT_SELF, "Regenerating", 0));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
int nDice = Random(8);
|
||||
switch(nDice)
|
||||
{
|
||||
case 1:
|
||||
SpeakString("Is that the best you got?", TALKVOLUME_TALK);
|
||||
break;
|
||||
case 2:
|
||||
SpeakString("I've seen apprentices cast better magic than that!", TALKVOLUME_TALK);
|
||||
break;
|
||||
case 3:
|
||||
SpeakString("I'm sorry did you say something?", TALKVOLUME_TALK);
|
||||
break;
|
||||
case 4:
|
||||
SpeakString("Keep practicing one day you could take on a goblin.", TALKVOLUME_TALK);
|
||||
break;
|
||||
case 5:
|
||||
SpeakString("You can learn a lot from a cow.", TALKVOLUME_TALK);
|
||||
break;
|
||||
case 6:
|
||||
SpeakString("Ow, I think that hurt.", TALKVOLUME_TALK);
|
||||
break;
|
||||
case 7:
|
||||
SpeakString("Oooohh, that tingled.", TALKVOLUME_TALK);
|
||||
break;
|
||||
case 8:
|
||||
SpeakString("Red bull gives you wings!", TALKVOLUME_TALK);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user