#include "zep_inc_craft" void main() { object oPC = GetPCSpeaker(); object oCloak = GetItemInSlot(INVENTORY_SLOT_CLOAK, oPC); // Immobilize player while crafting effect eImmob = EffectCutsceneImmobilize(); eImmob = ExtraordinaryEffect(eImmob); ApplyEffectToObject(DURATION_TYPE_PERMANENT,eImmob,oPC); // Make the camera float near the PC StoreCameraFacing(); float fFacing = GetFacing(oPC); if (fFacing >= 360.0) fFacing -=360.0; SetCameraFacing(fFacing, 3.5f, 75.0, CAMERA_TRANSITION_TYPE_FAST); // Make backup // Note from Loki: Changed implemenation to stash item in container ALWAYS. // ZEP_GetZEPWorkContainer will create container if needs be. object oBackup = CopyItem(oCloak, ZEP_GetZEPWorkContainer(OBJECT_SELF), TRUE); SetLocalObject(oPC, "ZEP_CR_BACKUP", oBackup); // Mark temporary item SetStolenFlag(oCloak, TRUE); SetLocalInt(oCloak, "ZEP_CR_TEMPITEM", TRUE); SetLocalObject(oPC, "ZEP_CR_ITEM", oCloak); // Preset settings SetLocalInt(oPC, "ZEP_CR_STARTED", 1); SetLocalInt(oPC, "ZEP_CR_COST", 0); SetLocalInt(oPC, "ZEP_CR_DC", 0); SetLocalInt(oPC, "ZEP_CR_DONE", 0); SetLocalInt(oPC, "ZEP_CR_CHANGED", FALSE); SetCustomToken(ZEP_CR_TOKENBASE, ""); SetCustomToken(ZEP_CR_TOKENBASE+1, "0"); SetCustomToken(ZEP_CR_TOKENBASE+2, "0"); SetCustomToken(ZEP_CR_TOKENBASE+3, ""); }