// Direct calls to NWNX_Structs's SetItemPropertyInteger don't work from Java.
  // For this reason, I've had to make a script that calls the methods inside NWScript.
  public static void AddCustomItemProperty(
      NWObject oItem,
      int type,
      int subType,
      int costTable,
      int costValue,
      int paramTable,
      int paramValue) {
    NWScript.setLocalInt(NWObject.MODULE, "jvm_ipdirect_type", type);
    NWScript.setLocalInt(NWObject.MODULE, "jvm_ipdirect_subtype", subType);
    NWScript.setLocalInt(NWObject.MODULE, "jvm_ipdirect_costtable", costTable);
    NWScript.setLocalInt(NWObject.MODULE, "jvm_ipdirect_costvalue", costValue);
    NWScript.setLocalInt(NWObject.MODULE, "jvm_ipdirect_paramtable", paramTable);
    NWScript.setLocalInt(NWObject.MODULE, "jvm_ipdirect_paramvalue", paramValue);

    NWScript.executeScript("jvm_ipdirect", oItem);
  }
Пример #2
0
 @Override
 public void runScript(NWObject objSelf) {
   // Bioware Default
   NWScript.executeScript("x2_mod_def_aqu", objSelf);
 }
Пример #3
0
 @SuppressWarnings("unchecked")
 public T create(NWObject onInventory, String resRef, String tag, int nStackSize) {
   return (T) NWScript.createItemOnObject(resRef, onInventory, nStackSize, tag);
 }
Пример #4
0
  public DoorUnlocked(GameObject actor) {
    super(actor);
    door = (Door) actor;

    unlocker = (GameObject) NWScript.getLastUnlocked();
  }