LoD_PRC8/_module/nss/x2_im_start_a.nss
Jaysyn904 94990edc60 Initial Upload
Initial Upload
2023-09-21 21:20:34 -04:00

40 lines
1.3 KiB
Plaintext

#include "x2_inc_craft"
void main()
{
StoreCameraFacing();
object oPC = GetPCSpeaker();
// * Make the camera float near the PC
float fFacing = GetFacing(oPC) + 180.0;
if (fFacing > 359.0)
{
fFacing -=359.0;
}
SetCameraFacing(fFacing, 3.5f, 75.0,CAMERA_TRANSITION_TYPE_FAST ) ;
CISetCurrentModMode(GetPCSpeaker(),X2_CI_MODMODE_ARMOR );
SetCustomToken(X2_CI_MODIFYARMOR_GP_CTOKENBASE,"0");
SetCustomToken(X2_CI_MODIFYARMOR_GP_CTOKENBASE+1,"0");
object oItem = GetItemInSlot(INVENTORY_SLOT_CHEST, oPC);
object oBackup = CopyItem(oItem,IPGetIPWorkContainer());
CISetCurrentModBackup(oPC, oBackup);
CISetCurrentModItem(oPC, oItem);
//* TODO: Light model to make changes easier to see
effect eLight = EffectVisualEffect( VFX_DUR_LIGHT_WHITE_20);
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eLight,oPC);
//* Immobilize player while crafting
effect eImmob = EffectCutsceneImmobilize();
eImmob = ExtraordinaryEffect(eImmob);
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eImmob,oPC);
// Seta variavel persistente identificando que o jogador estava fazendo Crafting.
SetCampaignInt("Hermes", "WAS_CRAFTING", TRUE, oPC);
string sObjectTag = GetTag(oItem);
SetCampaignString("Hermes", "CRAFT_OBJECT", sObjectTag, oPC);
}