generated from Jaysyn/ModuleTemplate
Initial Commit
Initial Commit.
This commit is contained in:
26
_module/nss/sparringcloak.nss
Normal file
26
_module/nss/sparringcloak.nss
Normal file
@@ -0,0 +1,26 @@
|
||||
//Author: Big E
|
||||
//July 2002
|
||||
int IsSparring(object oVictim)
|
||||
{
|
||||
object oAgressor = GetLastAttacker(oVictim);
|
||||
object oVictimCloak = GetItemInSlot(INVENTORY_SLOT_CLOAK, oVictim);
|
||||
object oAgressorCloak = GetItemInSlot(INVENTORY_SLOT_CLOAK, oAgressor);
|
||||
if(GetIsObjectValid(oVictimCloak) && GetIsObjectValid(oAgressorCloak))
|
||||
{
|
||||
if((GetName(oVictimCloak)=="Sparring Cloak") && (GetName(oAgressorCloak)=="Sparring Cloak"))
|
||||
{
|
||||
SendMessageToPC(oVictim,GetName(oAgressor)+" has won the sparring match.");
|
||||
SendMessageToPC(oAgressor,GetName(oAgressor)+" has won the sparring match.");
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectResurrection(),oVictim,0.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectHeal(GetMaxHitPoints(oVictim)),oVictim,0.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectHeal(GetMaxHitPoints(oAgressor)),oAgressor,0.0);
|
||||
AssignCommand(oVictim, ClearAllActions());
|
||||
AssignCommand(oAgressor, ClearAllActions());
|
||||
AssignCommand(oVictim,ActionPlayAnimation(ANIMATION_FIREFORGET_BOW,1.0,2.0));
|
||||
AssignCommand(oAgressor,ActionPlayAnimation(ANIMATION_FIREFORGET_BOW,1.0,2.0));
|
||||
return TRUE;
|
||||
};
|
||||
};
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user