// Character skills
FOR X 1 58
DB.EXECUTE INSERT INTO CHARACTERS_SKILLS (CHAR_ID, SKILL_ID, SKILL_VALUE) VALUES ('<dUID>','<dLOCAL.X>','<EVAL <<DEF.PLAYER_SKILL_<dLOCAL.X>>>>') ON DUPLICATE KEY UPDATE SKILL_VALUE='<EVAL <<DEF.PLAYER_SKILL_<dLOCAL.X>>>>'
ENDFOR
DB.EXECUTE DELETE FROM CHARACTERS_LAYERS WHERE CHAR_ID='<dUID>'
FOR X 1 24
IF <FINDLAYER.<dDEF.PLAYER_LAYER_<dLOCAL.X>>> && !<dLOCAL.<dLOCAL.X>> && <dDEF.PLAYER_LAYER_<dLOCAL.X>> != 21
REF1 <FINDLAYER.<dDEF.PLAYER_LAYER_<dLOCAL.X>>.UID>
DB.EXECUTE INSERT INTO CHARACTERS_LAYERS (CHAR_ID, SEQUENCE, LAYER_ID, ITEM_ID, ITEM_HUE, ITEM_DEFNAME, ITEM_NAME) VALUES ('<dREF1.CONT.UID>','<dLOCAL.X>','<dDEF.PLAYER_LAYER_<dLOCAL.X>>','<dREF1.ID>','<dREF1.COLOR>','<REF1.DEFNAME>','<REMOVEQUOTE <REF1.NAME>>') //
ENDIF
ENDFOR