generated from Jaysyn/ModuleTemplate
42 lines
1.4 KiB
Plaintext
42 lines
1.4 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: Default:On Death
|
|
//:: NW_C2_DEFAULT7
|
|
//:: Copyright (c) 2001 Bioware Corp.
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
Shouts to allies that they have been killed
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Preston Watamaniuk
|
|
//:: Created On: Oct 25, 2001
|
|
//:://////////////////////////////////////////////
|
|
#include "NW_I0_GENERIC"
|
|
void main()
|
|
{
|
|
object oPlayer = GetFirstPC();
|
|
object oDeadNPC = OBJECT_SELF;
|
|
//location lCorpseLoc = GetLocation(oDeadNPC);
|
|
//werewolfstuff
|
|
//Set up variables
|
|
//effect eMorph = EffectPolymorph(POLYMORPH_TYPE_WEREWOLF);
|
|
|
|
//Make sure the PC we're looking at is valid, and keep cycling until the last PC
|
|
while (GetIsObjectValid(oPlayer))
|
|
{
|
|
if(GetLocalInt(oPlayer, "HAS_WEREWOLF_EFFECT") == 1)
|
|
{
|
|
int iCurHP = GetCurrentHitPoints(oPlayer);
|
|
int blarg = iCurHP-1;
|
|
effect eWolfDead = EffectDamage(blarg,DAMAGE_TYPE_MAGICAL,DAMAGE_POWER_NORMAL);
|
|
object oWerewolf= GetLocalObject(oPlayer,"MY_WOLF");
|
|
location lCorpseLoc = GetLocation(oWerewolf);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,eWolfDead,oPlayer);
|
|
AssignCommand(oPlayer,JumpToLocation(lCorpseLoc));
|
|
SetLocalInt(oPlayer, "wolfdead", 1);
|
|
}
|
|
|
|
oPlayer = GetNextPC();
|
|
}
|
|
//end werewolf stuff
|
|
}
|