// function SwapStacks() //
if (itemList[itemid].weapon != null) {
    $.post("http://np-inventory/inventory:weaponSwap", JSON.stringify({}));
}
// function MoveStack() //
  if (itemList[itemidsent].weapon != null) {
    $.post("http://np-inventory/inventory:weaponSwap", JSON.stringify({}));
  }
// function CompileStacks() //
  if (itemList[itemidsent].weapon != null) {
    $.post("http://np-inventory/inventory:weaponSwap", JSON.stringify({}));
  }