die; } //Try getting the refund record $row = ItemRefundSystem::GetRefundable($refundId); unset($refundId); if (!$row) { echo 'The refund id is invalid.'; die; } //verify the refund status if ($row['status'] != IRS_STATUS_NONE) { echo 'The refund record has been already refunded.'; die; } //Check if the user is allowed to refund more items this week if (ItemRefundSystem::GetRefundsDone() >= 2) { echo 'You are not allowed to refund more items this week.'; die; } #################################################################### ## The actual unstuck script begins here //Get the character name by the guid $charName = $chars->getCharacterName($row['character']); //try unsticking $refund = $command->RefundItem($row['entry'], $charName, $RealmId); //unset the class unset($chars, $command, $charName); //Check if the item was destroyed if ($refund === false) { echo 'The website failed to refund the item. Please try again later or contact the administration.'; die;