/** * Copyright (c) ©2000-2002 Sony Online Entertainment Inc. * All Rights Reserved * * Title: systems.beast.cs_dna.script * Description: * @author jbenjamin * @version $Revision: 1$ */ //Script on Enzymes include library.incubator include library.utils; trigger OnAttach() { messageTo(self, "handleInitializeValues", null, 1, false); return SCRIPT_CONTINUE; } trigger OnInitialize() { messageTo(self, "handleInitializeValues", null, 1, false); return SCRIPT_CONTINUE; } messageHandler handleInitializeValues () { if(hasObjVar(self, incubator.DNA_TEMPLATE_OBJVAR)) { string template = getStringObjVar(self, incubator.DNA_TEMPLATE_OBJVAR); if(template != null && !template.equals("")) { removeObjVar(self, incubator.DNA_TEMPLATE_OBJVAR); int crcTemplate = incubator.convertStringTemplateToCrC(template); if(crcTemplate != 0) { setObjVar(self, incubator.DNA_TEMPLATE_OBJVAR, crcTemplate); attachScript(self, "systems.beast.dna"); detachScript(self, "systems.beast.cs_dna"); } } } return SCRIPT_CONTINUE; }