51 lines
1.2 KiB
Plaintext
51 lines
1.2 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" || GetTag(oItem)=="L_HeavensArmour")
|
||
|
{
|
||
|
CreateItemOnObject("limbosrobes", oPC);//armour 4 armour swap
|
||
|
}
|
||
|
|
||
|
if(GetTag(oItem)=="L_PlannarDemonsSoul" || GetTag(oItem)=="L_PlannarHeavensBow")
|
||
|
{
|
||
|
CreateItemOnObject("limbosharp", oPC);//bow 4 2hand weapon swap
|
||
|
}
|
||
|
|
||
|
if(GetTag(oItem)=="L_DemonBlade" || GetTag(oItem)=="L_HeavensJustice")
|
||
|
{
|
||
|
CreateItemOnObject("archonsteel", oPC);// sword 4 sword swap
|
||
|
}
|
||
|
|
||
|
if(GetTag(oItem)=="L_PlannarDemonsBand" || GetTag(oItem)=="L_planarcelestcape")
|
||
|
{
|
||
|
CreateItemOnObject("item022", oPC);// cloak 4 belt swap
|
||
|
}
|
||
|
|
||
|
oItem = GetNextItemInInventory(oChest);
|
||
|
|
||
|
}
|
||
|
Chest(oChest);
|
||
|
DestroyObject(oChest, 3.0);
|
||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oChest);
|
||
|
}
|