if (!player.isInParty())
{
player.sendPacket(Msg.YOU_ARE_NOT_CURRENTLY_IN_A_PARTY_SO_YOU_CANNOT_ENTER);
return;
}
Party party = player.getParty();
if (!party.isLeader(player))
{
player.sendPacket(Msg.ONLY_A_PARTY_LEADER_CAN_TRY_TO_ENTER);
return;
}
for (Player p : party.getPartyMembers())
{
if (!this.isInRange(p, 500))
{
player.sendPacket(Msg.ITS_TOO_FAR_FROM_THE_NPC_TO_WORK);
return;
}
}
for (int i = 0; i < medals.length; i++)
{
if (!hasItem(party, medals[i]))
{
player.sendMessage("In order to enter the Anomic Foundry your party should be carrying all 5 medals of Tully");
return;
}
}
party.Teleport(new Location(25512, 247240, -2656));
}
else
{
super.onBypassFeedback(player, command);
}