Try this? I haven't tested it so just let me know if it works or not. Replace the parts that need replacing, from the $item line to the remove item line.
PHP Code:
$item = "Fishing pole";
$item2 = "Worm Bait";
$hasitem = $mysidia->db->select("inventory", array("quantity"), "itemname ='{$item}' and owner='{$mysidia->user->username}'")->fetchColumn();
$hasitem2 = $mysidia->db->select("inventory", array("quantity"), "itemname ='{$item2}' and owner='{$mysidia->user->username}'")->fetchColumn();
if($hasitem && $hasitem2){
$today = date("d"); // Day of the month
// Reset explore counter if the last recorded exploration was on a different day than today:
$reset = $mysidia->user->lastday != $today;
// Allow user to explore if they are under the limit or if reset condition is true.
if ($mysidia->user->exploretimes <= 50 || $reset) {
// Update the last day that they explored to today
$mysidia->db->update("users", array("lastday" => $today), "username = '{$mysidia->user->username}'");
// If $reset condition was true, reset the count to 1, otherwise increment the existing count.
$updatedExploreTimes = $reset ? 1 : $mysidia->user->exploretimes + 1;
$mysidia->db->update("users", array("exploretimes" => ($updatedExploreTimes)), "username = '{$mysidia->user->username}'");
$item_name = "Worm bait";
$qty = 1;
$item_name = new PrivateItem($item_name, $mysidia->user->username);
$item_name->remove($qty, $mysidia->user->username);