74 lines
1.9 KiB
Plaintext
74 lines
1.9 KiB
Plaintext
|
|
void ModifyClone(object oClone)
|
|
{
|
|
AssignCommand(oClone, SetIsDestroyable(FALSE, FALSE, FALSE));
|
|
|
|
int nHP = GetMaxHitPoints(oClone);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectHeal(nHP), oClone);
|
|
|
|
object oItem = GetFirstItemInInventory(oClone);
|
|
while (GetIsObjectValid(oItem) == TRUE)
|
|
{
|
|
DestroyObject(oItem);
|
|
oItem = GetNextItemInInventory(oClone);
|
|
}
|
|
}
|
|
|
|
|
|
#include "NW_I0_GENERIC"
|
|
void CommandClone(object oClone,object oTarget)
|
|
{
|
|
SetIsTemporaryEnemy(oTarget,oClone);
|
|
AdjustReputation(oTarget,oClone, -100);
|
|
|
|
DelayCommand(0.5,AssignCommand(oClone,PlayVoiceChat(VOICE_CHAT_TAUNT, oClone)));
|
|
DelayCommand(1.5,AssignCommand(oClone,ActionAttack(oTarget,FALSE)));
|
|
AssignCommand(oClone,DetermineCombatRound(oTarget));
|
|
}
|
|
|
|
void DestroyClone(object oClone)
|
|
{
|
|
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2);
|
|
int nHealth = GetMaxHitPoints(oClone);
|
|
effect eDeath = EffectDamage(nHealth,DAMAGE_TYPE_MAGICAL,DAMAGE_POWER_ENERGY);
|
|
location lClone = GetLocation(oClone);
|
|
|
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eVis,lClone);
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eDeath,oClone);
|
|
|
|
|
|
}
|
|
|
|
#include "x2_inc_switches"
|
|
void main()
|
|
{
|
|
int nEvent =GetUserDefinedItemEventNumber();
|
|
|
|
if (nEvent ==X2_ITEM_EVENT_UNEQUIP) return;
|
|
if (nEvent ==X2_ITEM_EVENT_EQUIP) return;
|
|
|
|
if (GetTag(GetItemActivated()) == "clone_test_ring3")
|
|
{
|
|
|
|
object oTarget = GetItemActivatedTarget();
|
|
object oPC = GetItemActivator();
|
|
|
|
if ((GetObjectType(GetItemActivatedTarget())!=OBJECT_TYPE_CREATURE))
|
|
{
|
|
SendMessageToPC(oPC, "Improper use of item!");
|
|
return;
|
|
}
|
|
|
|
|
|
location lWp = GetLocation(oTarget);
|
|
object oClone = CopyObject(oPC, lWp);
|
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_MYSTICAL_EXPLOSION),lWp);
|
|
|
|
ModifyClone(oClone);
|
|
CommandClone(oClone,oTarget);
|
|
|
|
DelayCommand(150.0,DestroyClone(oClone));
|
|
|
|
}
|
|
}
|