Oh oh... I think I get this one to work just fine after a few tests...
void main()
{
effect eDamage;
object oTarget;
// Get the creature who triggered this event.
object oAll = GetEnteringObject();
//Checks positions
oTarget = GetNearestObjectByTag("Ropedtc001");
int a = GetLocalInt(oTarget, "LV_DTC_Areaheight");
oTarget = GetObjectByTag("DTC_Southernlift_03");
int b = GetLocalInt(oTarget, "LV_DTC_Southernliftheight");
//If falling from above the lift
if (a>
{
// Find the location to which to teleport.
oTarget = GetObjectByTag("DTC_Southernlift_03");
// Confirms the creature falls on the lift.
SetLocalInt(oAll, "LV_DTC_isonthelift", 1);
// Teleport the creature.
AssignCommand(oAll, ClearAllActions());
AssignCommand(oAll, JumpToObject(oTarget));
// Have the creature perform a sequence of actions.
AssignCommand(oAll, ActionPlayAnimation(ANIMATION_LOOPING_DEAD_FRONT, 1.0, 4.0));
// Cause damage.
oTarget = GetNearestObjectByTag("Ropedtc001");
int a = GetLocalInt(oTarget, "LV_DTC_Areaheight");
oTarget = GetObjectByTag("DTC_Southernlift_03");
int b = GetLocalInt(oTarget, "LV_DTC_Southernliftheight");
eDamage = EffectDamage(d4(a-
, DAMAGE_TYPE_BLUDGEONING);
DelayCommand(4.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oAll));
}
//If falling from under the lift
else
{
// Ports to the bottom of the pit
oTarget = GetWaypointByTag("WP_DTC_LP_3801s_down");
AssignCommand(oAll, ClearAllActions());
AssignCommand(oAll, JumpToObject(oTarget));
AssignCommand(oAll, ActionPlayAnimation(ANIMATION_LOOPING_DEAD_FRONT, 1.0, 4.0));
// Cause damage.
oTarget = GetNearestObjectByTag("Ropedtc001");
int a = GetLocalInt(oTarget, "LV_DTC_Areaheight");
eDamage = EffectDamage(d4(a), DAMAGE_TYPE_BLUDGEONING);
DelayCommand(4.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oAll));
}
}
Is there anything wrong with it? Well excepts it still doesn't work for items but I'll try to figure that out later.