Advertisement
Guest User

NWN2 Update Chest

a guest
Nov 22nd, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.56 KB | None | 0 0
  1. void CreateHolyAvenger()
  2. {
  3.     string sItemRR = "3032_chest_havenger";
  4.     object oWP = GetTarget("3032_wp_holy_weapon");
  5.     location lWP = GetLocation(oWP);
  6.  
  7.     object oChest = CreateObject(OBJECT_TYPE_PLACEABLE, sItemRR, lWP);
  8.  
  9.     // Replace the old blueprint for Holy Avenger
  10.     object oItem = GetFirstItemInInventory(oChest);
  11.     while (GetIsObjectValid(oItem))
  12.     {
  13.         if (GetTag(oItem) == "n2_wswmls007")
  14.         {
  15.             DestroyObject(oItem);
  16.             break;
  17.         }
  18.         oItem = GetNextItemInInventory(oChest);
  19.     }
  20.  
  21.     DelayCommand(0.1f, VoidCreateItemOnObject("n2_wswmls007", oChest));
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement