void main() { object oPC = GetPCSpeaker(); effect eEffect; int iFall = d6(1); eEffect = EffectDamage(iFall, DAMAGE_TYPE_BLUDGEONING, DAMAGE_POWER_NORMAL); ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC); object oTarget; oTarget = oPC; //Visual effects can't be applied to waypoints, so if it is a WP //the VFX will be applied to the WP's location instead int nInt; nInt = GetObjectType(oTarget); if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DUST_EXPLOSION), oTarget); else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DUST_EXPLOSION), GetLocation(oTarget)); FloatingTextStringOnCreature("You fell out of the tree!!", oPC); eEffect = EffectKnockdown(); eEffect = ExtraordinaryEffect(eEffect); ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 3.0f); }