IF
//using the mirror
CharacterUsedItem(_Player,ITEM_HOM_CharCreation_Mirror)
AND
//making sure the user is a playable character
_Player.isPlayer()
AND
//making sure the user is not a companion
NOT DB_DefinedCompanions(_Player)
AND
//adding it to the appearance changer.
//note that this has a 2 instead of a 0 as second parameter
CharacterAddToCharacterCreation(_Player,2,1)
THEN
//set a variable indicating the player is respeccing
DB_Illusionist(_Player);
IF
//finished
CharacterCreationFinished(_Player)
AND
//check if the earlier variable is set to prevent conflicts
//with other CharacterCreationfinished events
DB_Illusionist(_Player)
THEN
//remove player from the variable, again to prevent conflicts
NOT DB_Illusionist(_Player);
//teleport the player
CharacterTeleportToTrigger(_Player,TRIGGER_HOM_PointCreationMirrorDest,"");