48 lines
1.1 KiB
Plaintext
48 lines
1.1 KiB
Plaintext
|
void Chest(object oChest)
|
||
|
{
|
||
|
object oItem = GetFirstItemInInventory(oChest);
|
||
|
while (GetIsObjectValid(oItem))
|
||
|
{
|
||
|
DestroyObject(oItem,0.0);
|
||
|
|
||
|
oItem = GetNextItemInInventory(oChest);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
#include "nw_i0_plot"
|
||
|
void main()
|
||
|
{
|
||
|
object oPC = GetLastOpenedBy();
|
||
|
object oChest = OBJECT_SELF;
|
||
|
object oItem = GetFirstItemInInventory(oChest);
|
||
|
effect eVis = EffectVisualEffect(VFX_IMP_HOLY_AID);
|
||
|
|
||
|
while (GetIsObjectValid(oItem))
|
||
|
{
|
||
|
|
||
|
if(GetTag(oItem)=="L_DemonsArmour")
|
||
|
{
|
||
|
CreateItemOnObject("heavensarmour", oPC);//armour 4 armour swap
|
||
|
}
|
||
|
if(GetTag(oItem)=="L_PlannarDemonsSoul")
|
||
|
{
|
||
|
CreateItemOnObject("item020", oPC);//bow 4 2hand weapon swap
|
||
|
}
|
||
|
if(GetTag(oItem)=="L_DemonBlade")
|
||
|
{
|
||
|
CreateItemOnObject("heavensjustice", oPC);// sword 4 sword swap
|
||
|
}
|
||
|
if(GetTag(oItem)=="L_PlannarDemonsBand")
|
||
|
{
|
||
|
CreateItemOnObject("planarcelestcape", oPC);// cloak 4 belt swap
|
||
|
}
|
||
|
|
||
|
oItem = GetNextItemInInventory(oChest);
|
||
|
|
||
|
}
|
||
|
Chest(oChest);
|
||
|
DestroyObject(oChest, 3.0);
|
||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oChest);
|
||
|
}
|