//
// cs_dmareatrigger
//
// This trigger exists in the DM area.  If someone attempts to leave the vicinity of the entry portal, there inventory
// is checked.  If they do not have the proper item, they will be sent back to trinity.  A penalty will also be applied,
// which is currently 50% of both Experience and Gold.
//
void main()
{
    object oPC = GetEnteringObject();
    object oTarget = GetWaypointByTag("trin_home_01");
    if (GetIsPC(oPC)) {
        if (GetItemPossessedBy(oPC, "KeyofCheating") == OBJECT_INVALID)
        {
            //SetXP(oPC, FloatToInt(GetXP(oPC) * 0.5));
            //AssignCommand(oPC, TakeGoldFromCreature(FloatToInt(GetGold(oPC) * 0.5), oPC, TRUE));
            location lTarget = GetLocation(oTarget);
            AssignCommand(oPC, ClearAllActions());
            AssignCommand(oPC, ActionJumpToLocation(lTarget));
        }
    }
}