void main()
{
    object oItem = GetEventParamObject(0);
    object oTarget = GetEventParamObject(1);
    object oPC = OBJECT_SELF;

    // Check if the item is being used in the specified area
    object oArea = GetArea(oPC);
    if (GetTag(oArea) != "A_CAS_CASINOCOINS")
    {
        SendMessageToPC(oPC, "This item cannot be used in this area.");
        return;
    }

    // Check if a valid target has been selected
    if (oTarget == OBJECT_INVALID)
    {
        SendMessageToPC(oPC, "No valid target selected.");
        return;
    }

    // Retrieve the waypoint object using its tag
    object oWaypoint = GetObjectByTag("WP_CAS_SECURITY");
    if (oWaypoint == OBJECT_INVALID)
    {
        SendMessageToPC(oPC, "Waypoint not found.");
        return;
    }

    // Get the location of the waypoint
    location lDestination = GetLocation(oWaypoint);


    AssignCommand(oTarget, ActionJumpToLocation(lDestination));
    SendMessageToPC(oTarget, "Hello! You've been sent to the security cells of the Casino. Please wait for the security to come deal with you.");

}
