RATDOG/_module/nss/x2_act_ws_makeme.nss
Jaysyn904 1c1c90e986 Updated Jasperre's AI
Updated Jasperre's AI to 1.4, fixed a few other coding bugs & fully compiled module.
2021-08-30 17:31:44 -04:00

50 lines
1.5 KiB
Plaintext

//::///////////////////////////////////////////////
//:: x2_act_ws_makeit
//:: Copyright (c) 2003 Bioware Corp.
//:://////////////////////////////////////////////
/*
Modifies the current item with the currently
selected item property.
*/
//:://////////////////////////////////////////////
//:: Created By: Brent
//:: Created On: September 2003
//:://////////////////////////////////////////////
#include "x2_inc_ws_smith"
void CopyUpgradeItem(object oItem, object oPC);
void MakeNewWeapon(object oPC);
void main()
{
object oPC = GetPCSpeaker();
object oItem = GetRightHandWeapon(oPC);
// * Oct 15: If the player has unequipped his item for some bizarre reason just
// * abort the entire thing
if (GetIsObjectValid(oItem) == FALSE)
{
return;
}
}
void CopyUpgradeItem(object oItem, object oPC)
{
object oNewItem = CopyItem(oItem, oPC, TRUE);
//---------------------------------------------------------------------------
// GZ: Bugfix for #35259 - Item properties staying around
//---------------------------------------------------------------------------
IPRemoveAllItemProperties(oNewItem,DURATION_TYPE_TEMPORARY);
DelayCommand(1.0, AssignCommand(oPC, ActionEquipItem(oNewItem, INVENTORY_SLOT_RIGHTHAND)));
}
void MakeNewWeapon(object oPC)
{
wsEnhanceItem(oPC, oPC);
AssignCommand(oPC, ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY2));
PlaySound("sim_bonholy");
location lPC = GetLocation(oPC);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_BREACH), lPC);
}