Initial upload
Initial upload. PRC8 has been added. Module compiles, PRC's default AI & treasure scripts have been integrated. Started work on top hak for SLA / Ability / Scripting modifications.
This commit is contained in:
67
_module/nss/x2_im_cancel.nss
Normal file
67
_module/nss/x2_im_cancel.nss
Normal file
@@ -0,0 +1,67 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
/*
|
||||
Item Appearance Modification Conversation
|
||||
Cancel Conversation Script
|
||||
*/
|
||||
// created/updated 2003-06-24 Georg Zoeller, Bioware Corp
|
||||
//////////////////////////////////////////////////////////
|
||||
#include "prc_x2_craft"
|
||||
#include "jw_inc_craft"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker(); //GetLocalObject(OBJECT_SELF, "X2_TAILOR_OBJ");
|
||||
if (CIGetCurrentModMode(GetPCSpeaker()) != X2_CI_MODMODE_INVALID )
|
||||
{
|
||||
object oBackup = CIGetCurrentModBackup(oPC);
|
||||
object oItem = CIGetCurrentModItem(oPC);
|
||||
|
||||
DeleteLocalInt(oPC,"X2_TAILOR_CURRENT_COST");
|
||||
DeleteLocalInt(oPC,"X2_TAILOR_CURRENT_DC");
|
||||
|
||||
//Give Backup to Player
|
||||
object oNew = CopyItem(oBackup, oPC,TRUE);
|
||||
DestroyObject(oItem);
|
||||
DestroyObject(oBackup);
|
||||
|
||||
AssignCommand(oPC,ClearAllActions(TRUE));
|
||||
if (CIGetCurrentModMode(oPC) == X2_CI_MODMODE_ARMOR)
|
||||
{
|
||||
AssignCommand(oPC, ActionEquipItem(oNew,INVENTORY_SLOT_CHEST));
|
||||
}
|
||||
else if (CIGetCurrentModMode(oPC) == X2_CI_MODMODE_WEAPON)
|
||||
{
|
||||
AssignCommand(oPC, ActionEquipItem(oNew,INVENTORY_SLOT_RIGHTHAND));
|
||||
}
|
||||
else if (CIGetCurrentModMode(oPC) == X2_CI_MODMODE_HELMET)
|
||||
{
|
||||
AssignCommand(oPC, ActionEquipItem(oNew,INVENTORY_SLOT_HEAD));
|
||||
}
|
||||
else if (CIGetCurrentModMode(oPC) == X2_CI_MODMODE_SHIELD)
|
||||
{
|
||||
AssignCommand(oPC, ActionEquipItem(oNew,INVENTORY_SLOT_LEFTHAND));
|
||||
}
|
||||
|
||||
CISetCurrentModMode(oPC,X2_CI_MODMODE_INVALID );
|
||||
}
|
||||
else
|
||||
{
|
||||
ClearAllActions();
|
||||
}
|
||||
|
||||
// Remove custscene immobilize from player
|
||||
effect eEff = GetFirstEffect(oPC);
|
||||
while (GetIsEffectValid(eEff))
|
||||
{
|
||||
if (GetEffectType(eEff) == EFFECT_TYPE_CUTSCENEIMMOBILIZE
|
||||
&& GetEffectCreator(eEff) == oPC
|
||||
&& GetEffectSubType(eEff) == SUBTYPE_EXTRAORDINARY )
|
||||
{
|
||||
RemoveEffect(oPC,eEff);
|
||||
}
|
||||
eEff = GetNextEffect(oPC);
|
||||
}
|
||||
|
||||
RestoreCameraFacing();
|
||||
ExportSingleCharacter(oPC);
|
||||
}
|
||||
Reference in New Issue
Block a user