// 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);
  }
Ejemplo n.º 2
0
 @Override
 public void runScript(NWObject objSelf) {
   // Bioware Default
   NWScript.executeScript("x2_mod_def_aqu", objSelf);
 }
Ejemplo n.º 3
0
 @SuppressWarnings("unchecked")
 public T create(NWObject onInventory, String resRef, String tag, int nStackSize) {
   return (T) NWScript.createItemOnObject(resRef, onInventory, nStackSize, tag);
 }
Ejemplo n.º 4
0
  public DoorUnlocked(GameObject actor) {
    super(actor);
    door = (Door) actor;

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