// #include "prc_x2_craft" #include "jw_inc_craft" void main() { object oPC = GetPCSpeaker(); object oBackup = CIGetCurrentModBackup(oPC); object oNew; int nDC; int nCost; oNew = CIGetCurrentModItem(oPC); if (CIGetCurrentModMode(oPC) == X2_CI_MODMODE_ARMOR) { if (GetIsObjectValid(oNew)) { nDC = CIGetArmorModificationDC(oBackup, oNew ); nCost = CIGetArmorModificationCost(oBackup, oNew ); } } else if (CIGetCurrentModMode(oPC) == X2_CI_MODMODE_WEAPON) { if (GetIsObjectValid(oNew)) { nCost = CIGetWeaponModificationCost(oBackup,oNew); //CIGetArmorModificationCost(CIGetCurrentModBackup(oPC),oNew);; nDC= JWGetWeaponModificationDC (oBackup,oNew) ; } } else if (CIGetCurrentModMode(oPC) == X2_CI_MODMODE_HELMET) { if (GetIsObjectValid(oNew)) { nCost = 100; // any helmet design for 100 nDC= 10 ; // DC is10 } } else if (CIGetCurrentModMode(oPC) == X2_CI_MODMODE_SHIELD) { if (GetIsObjectValid(oNew)) { nDC=JWGetShieldModificationDC(oNew); // from 5 to 25 nCost=JWGetShieldModificationCost(oNew); // from 50 to 800 } } if (GetIsDM(GetPCSpeaker())||GetIsDMPossessed(GetPCSpeaker())) { nCost=0; nDC=0; } CIUpdateModItemCostDC(oPC, nDC, nCost); //CISetDefaultModItemCamera(oPC); }