@Override
protected void onEnter(L2Character character)
{
character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, true);
character.setInsideZone(ZoneId.MULTI_FUNCTION, true);
if (character instanceof L2PcInstance)
{
L2PcInstance activeChar = ((L2PcInstance) character);
if (classes != null && classes.contains(""+activeChar.getClassId().getId()))
{
activeChar.teleToLocation(147448, 26850, -2200, 0);
activeChar.sendMessage("Your class is not allowed in the flag zone.");
return;
}
for (L2ItemInstance o : activeChar.getInventory()._items)
{
if (o.isEquipable() && o.isEquipped() && !checkItem(o))
{
int slot = activeChar.getInventory().getSlotFromItem(o);
activeChar.getInventory().unEquipItemInBodySlotAndRecord(slot);
activeChar.sendMessage(o.getItemName()+ " unequiped because is not allowed inside this zone.");
}
}
if (give_noblesse)
noblesse.getEffects(activeChar, activeChar);
if (pvp_enabled)
activeChar.updatePvPFlag(1);
activeChar.sendMessage("You entered in a flag zone.");
clear(activeChar);
}
}
Here?
The only line with isInsideZone is this one:
public static void givereward(L2PcInstance player)
{
if (player.isInsideZone(ZoneId.MULTI_FUNCTION))
{
for (int[] reward : rewards)
{
PcInventory inv = player.getInventory();
inv.addItem("Custom Reward", reward[0], reward[1], player, player);
}
}
}
Should i put here like this:
public static void givereward(L2PcInstance player)
{
if (player.isInsideZone(ZoneId.MULTI_FUNCTION))
{
for (int[] reward : rewards)
{
PcInventory inv = player.getInventory();
inv.addItem("Custom Reward", reward[0], reward[1], player, player);
}
if (pvp_enabled)
activeChar.updatePvPFlag(1);
}
}
Found 1 more bug. When some1 hits another player and enter the zone already flagged. In 30 seconds its deflagged