34 lines
753 B
Plaintext
34 lines
753 B
Plaintext
void main()
|
|
{
|
|
object oItem=GetInventoryDisturbItem();
|
|
object oPC=GetLastDisturbed();
|
|
effect eVis = EffectVisualEffect(VFX_IMP_HEAD_NATURE);
|
|
effect eVis2 = EffectVisualEffect(VFX_IMP_SLOW );
|
|
int nType=GetInventoryDisturbType();
|
|
|
|
while (GetIsObjectValid(oItem))
|
|
{
|
|
|
|
if(GetTag(oItem)!= "earthgem") return;
|
|
|
|
if(nType == INVENTORY_DISTURB_TYPE_ADDED)
|
|
{
|
|
AssignCommand(oPC, PlaySound("sim_pulsnatr"));
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF);
|
|
|
|
return;
|
|
}
|
|
|
|
if(nType == INVENTORY_DISTURB_TYPE_REMOVED)
|
|
{
|
|
AssignCommand(oPC, PlaySound("sce_negative"));
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, OBJECT_SELF);
|
|
|
|
return;
|
|
}
|
|
|
|
|
|
}
|
|
|
|
}
|