#include "cas_casinoinc"

void main()
{
    // Get the player character who triggered the event
    object oEnteringPC = GetEnteringObject();

    // Check if the entering object is a player character
    if (!GetIsPC(oEnteringPC)) return;

    // Retrieve the name of the variable from the trigger's local string
    string sVariableName = GetLocalString(OBJECT_SELF, "VariableName");

    // Retrieve the value of the variable from the trigger
    int nVariableValue = GetLocalInt(OBJECT_SELF, "VariableValue");

    // Assign the value to the entering player character
    SetLocalInt(oEnteringPC, sVariableName, nVariableValue);
}
