
// Triggered when a player examines an object


void main()
{
    // Get the target object ID being examined from the event parameters
        object oUser = OBJECT_SELF;
     object oTarget = GetEventParamObject(0);
    object oItem = GetEventParamObject(1);



    // Check if the target object is valid and has the required local integers
   /* if (!GetIsObjectValid(oTarget) || !GetLocalInt(oTarget, "nCAS_TOKEN") || !GetLocalInt(oTarget, "nCAS_TICKET"))
    {
        SendMessageToPC(GetFirstPC(), "Error: The examined object does not have the required local integers.");
        return;
    }
 */
    // Get the current values of the local integers
    int nTokenValue = GetLocalInt(oTarget, "nCAS_TOKEN");
    int nTicketValue = GetLocalInt(oTarget, "nCAS_TICKET");

    // Create a description string with colored text
    string sDescription = "This is an OOC tool to handle casino functions. Feel free to throw it in a dark, dark corner of your inventory to never see the light of day again. ICly, its used to store your tokens/tickets. You currently have <c=008800>" + IntToString(nTokenValue) + " tokens</c> and <c þ>" + IntToString(nTicketValue) + " tickets</c>.";

    // Update the description of the examined object
    SetDescription(oTarget, sDescription);
}
