void main()
{

object oPC = GetEnteringObject();

if (!GetIsPC(oPC)) return;

object oTarget;
location lTarget;
oTarget = GetWaypointByTag("wp_goto_jail");

lTarget = GetLocation(oTarget);

if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;

AssignCommand(oPC, ClearAllActions());

AssignCommand(oPC, ActionJumpToLocation(lTarget));

FloatingTextStringOnCreature("You are in Jail Because you pushed through a wall.... that is cheating. No way out, respawn!", oPC);
FloatingTextStringOnCreature("You are in Jail Because you pushed through a wall.... that is cheating. No way out, respawn!", oPC);
FloatingTextStringOnCreature("You are in Jail Because you pushed through a wall.... that is cheating. No way out, respawn!", oPC);

effect eEffect;
eEffect = EffectDamage(1000, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_NORMAL);

DelayCommand(20.0,ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC));

oTarget = oPC;

int nInt;
nInt = GetObjectType(oTarget);

if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DEATH), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DEATH), GetLocation(oTarget));

}