} else { if ($sellPricePerQuantity > 0) { $sellPrice = $sellPricePerQuantity / $sellQuantity; } if (is_numeric($sellPrice)) { if (is_numeric($sellQuantity) && $sellQuantity >= 0) { $sellQuantity = round($sellQuantity); if ($item->quantity >= $sellQuantity) { if ($isAdmin) { if ($chargeAdmins) { $itemFee = $item->marketprice / 100 * $auctionFee * $sellQuantity; } else { $itemFee = 0; } if ($player->money >= $itemFee) { $item->changeQuantity(0 - $sellQuantity); $timeNow = time(); $player->spend($itemFee, $useMySQLiConomy, $iConTableName); $itemQuery = mysql_query("INSERT INTO WA_Auctions (name, damage, player, quantity, price, created, allowBids, currentBid, currentWinner) VALUES ('{$item->name}', '{$item->damage}', '{$item->owner}', '{$sellQuantity}', '{$sellPrice}', '{$timeNow}', '{$allowBids}', '{$minBid}', '{$item->owner}')"); $queryLatestAuction = mysql_query("SELECT id FROM WA_Auctions ORDER BY id DESC"); list($latestId) = mysql_fetch_row($queryLatestAuction); if ($item->quantity == 0) { $item->delete(); } if ($useTwitter == true) { try { $twitter = new Twitter($consumerKey, $consumerSecret, $accessToken, $accessTokenSecret); if ($sellQuantity == 0) { $twitQuant = "Infinite"; } else { $twitQuant = $sellQuantity;