Autor Tema: PartyFarm Event [JAcis - Frozen]  (Leído 22 veces)

0 Usuarios y 1 Visitante están viendo este tema.

Conectado UndergrOundCodes

  • Grado B
  • *
  • Topic Author
  • Mensajes: 219
  • 00
  • Agradecimientos: 103
  • Enjoy the game
    • Facebook Page
  • Cronica: : Interlude
  • Revision: ultima
  • S.O: Windows 7
  • Serverpack : jfrozen
PartyFarm Event [JAcis - Frozen]
« en: Julio 31, 2020, 11:45:52 pm »
gracias
Este post tiene 0 agradecimientos
  • Añade a tus favoritos
  • ¡Hola! Estaba mirando la fuente compartida por BAN Para Acis y decidí adaptar algunos códigos para frozen. Aunque no tengo la PC, las comparto para que puedan probarse. Este es el evento Farm Party. El codigo para Acis original que compartió Ban estaba incompleto y tuve que corregirlo. No pude probarlo.

    Creditos: BAN
    Link codigo original: https://pastebin.com/w549165z

    Creditos adaptacion para Frozen: Undergr'O'und c#0de$


    Código: [Seleccionar]
    Index: java/head-src/com/l2jfrozen/Config.java
    ===================================================================
    --- java/head-src/com/l2jfrozen/Config.java (revision 84)
    +++ java/head-src/com/l2jfrozen/Config.java (working copy)

    }
    catch (final Exception e)
    {
    e.printStackTrace();
    throw new Error("Failed to Load " + OFFLINE + " File.");
    }
    }

    + // ============================================================
    + public static boolean PARTY_FARMANNONCER;
    + public static int CHANCE_PARTY_DROP;
    + public static int[] NPC_LIST_SET;
    + public static String NPC_LIST;
    + public static String PARTY_DROP_REWARDS;
    + public static int PARTY_FARM_MONSTER_DALAY;
    + public static boolean PARTY_FARM_BY_TIME_OF_DAY;
    + public static boolean START_PARTY;
    + public static int NPC_SERVER_DELAY;
    + public static int EVENT_BEST_FARM_TIME;
    + public static String[] EVENT_BEST_FARM_INTERVAL_BY_TIME_OF_DAY;
    + public static boolean PARTY_MESSAGE_ENABLED;
    + public static String PARTY_FARM_MESSAGE_TEXT;
    + public static int PARTY_FARM_MESSAGE_TIME;
    + public static int monsterId;
    + public static String PARTY_FARM_TITLE;
    + public static int PARTY_FARM_REWARD_ID;
    + public static int PARTY_FARM_REWARD_COUNT;
    +
    + public static int MONSTER_LOCS_COUNT;
    + public static int[][] MONSTER_LOCS;
    +
    + //evento Party Farm
    + // Creditos: Ban
    + // Adaptacion para frozen: Undergr'O'und c#0de$//
    + public static void loadPartyFarm()
    +    {
    +    final String PartyFarm = FService.PARTYFARM_FILE;
    +    
    +    try
    + {
    + final Properties PartyFarmSettings = new Properties();
    + final InputStream is = new FileInputStream(new File(PartyFarm));
    + PartyFarmSettings.load(is);
    + is.close();
    +    
    +        NPC_LIST = PartyFarmSettings.getProperty("NpcListPartyDrop", "22125,22126");
    +    
    +        PARTY_FARMANNONCER = Boolean.parseBoolean(PartyFarmSettings.getProperty("TownAnnoncer", "Abandoned Camp"));
    +        
    +        CHANCE_PARTY_DROP = Integer.parseInt(PartyFarmSettings.getProperty("ChanceForDrops", "100"));
    +    
    +        String[] NpcList = NPC_LIST.split(",");
    +        NPC_LIST_SET = new int[NpcList.length];
    +        for (int i = 0; i < NpcList.length; i++)
    +            NPC_LIST_SET[i] = Integer.parseInt(NpcList[i]);
    +    
    +        String PARTY_DROP_REWARD_VALUE = PartyFarmSettings.getProperty("PartyDropReward", "57,100000000;");
    +        String[] party_drop_reward_splitted_1 = PARTY_DROP_REWARD_VALUE.split(";");
    +        for (String i : party_drop_reward_splitted_1)
    +        {
    +            String[] party_drop_reward_splitted_2 = i.split(",");
    +            
    +            PARTY_DROP_REWARDS.put(Integer.parseInt(party_drop_reward_splitted_2[1]), Integer.parseInt(party_drop_reward_splitted_2[0]));
    +        }
    +    
    +        PARTY_FARM_MONSTER_DALAY = Integer.parseInt(PartyFarmSettings.getProperty("MonsterDelay", "10"));
    +        PARTY_FARM_BY_TIME_OF_DAY = Boolean.parseBoolean(PartyFarmSettings.getProperty("PartyFarmEventEnabled", "false"));
    +        START_PARTY = Boolean.parseBoolean(PartyFarmSettings.getProperty("StartSpawnPartyFarm", "false"));
    +        NPC_SERVER_DELAY = Integer.parseInt(PartyFarmSettings.getProperty("npcServerDelay", "70"));
    +    
    +        EVENT_BEST_FARM_TIME = Integer.parseInt(PartyFarmSettings.getProperty("EventBestFarmTime", "1"));
    +        EVENT_BEST_FARM_INTERVAL_BY_TIME_OF_DAY = PartyFarmSettings.getProperty("BestFarmStartTime", "20:00").split(",");
    +        PARTY_MESSAGE_ENABLED = Boolean.parseBoolean(PartyFarmSettings.getProperty("ScreenPartyMessageEnable", "false"));
    +        PARTY_FARM_MESSAGE_TEXT = PartyFarmSettings.getProperty("ScreenPartyFarmMessageText", "Welcome to l2j server!");
    +        PARTY_FARM_MESSAGE_TIME = Integer.parseInt(PartyFarmSettings.getProperty("ScreenPartyFarmMessageTime", "10")) * 1000;
    +    
    +        String[] monsterLocs2 = PartyFarmSettings.getProperty("MonsterLoc", "").split(";");
    +        String[] locSplit3 = null;
    +    
    +        monsterId = Integer.parseInt(PartyFarmSettings.getProperty("MonsterId", "1"));
    +        PARTY_FARM_TITLE = PartyFarmSettings.getProperty("PartyFarmTitle", "");
    +        PARTY_FARM_REWARD_ID = Integer.parseInt(PartyFarmSettings.getProperty("PartyFarmRewardID", "57"));
    +        PARTY_FARM_REWARD_COUNT = Integer.parseInt(PartyFarmSettings.getProperty("PartyFarmRewardCount", "100"));
    +    
    +        MONSTER_LOCS_COUNT = monsterLocs2.length;
    +        MONSTER_LOCS = new int[MONSTER_LOCS_COUNT][3];
    +        int g;
    +        for (int e = 0; e < MONSTER_LOCS_COUNT; e++)
    +        {
    +            locSplit3 = monsterLocs2[e].split(",");
    +            for (g = 0; g < 3; g++)
    +                MONSTER_LOCS[e][g] = Integer.parseInt(locSplit3[g].trim());
    +        }
    + }
    + catch (final Exception e)
    + {
    + e.printStackTrace();
    + throw new Error("Failed to Load " + PartyFarm + " File.");
    + }
    +    }
                                                                 
    ==================================================================
    --- java/head-src/com/l2jfrozen/FService.java (revision 84)
    +++ java/head-src/com/l2jfrozen/FService.java (working copy)

    public static final String LEGACY_BANNED_IP = "./config/banned_ip.cfg";
    public static final String LEGACY_SERVER_NAME_FILE = "./servername.xml";
    +public static final String PARTYFARM_FILE = "./config/frozen/PartyFarm.properties";
    }

    ==================================================================
    --- java/config/frozen/PartyFarm.properties (revision 84)
    +++ java/config/frozen/PartyFarm.properties (working copy)

    #=========================================================
    #                  PARTY FARM Event
    # Creditos: Ban
    # Adaptacion para frozen: Undergr'O'und c#0de$
    #=========================================================
       
       #NPC'S list of party drop
       NpcListPartyDrop = 22125,22126
       
       #Announce Town
       TownAnnoncer = Abandoned Camp / Primavel Isle
       
       #Chance for the drop
       ChanceForDrops = 100

       #Party Drop reward
       PartyDropReward = 57,100000000
       
       #Party Farm Reward
       PartyFarmRewardID = 57
       
       #Party Farm Count
       PartyFarmRewardCount = 100
                   
       # Tempo em Segundos para o MOB aparecer apos ser morto
       # Default: 300 (5 minutos)
       MonsterDelay = 600
       
       # Id do Mob
       MonsterId = 88000
       
       # Tempo para aparecer os MOBS
       npcServerDelay = 0
       
       #Ativar o Party Farm Event por tempo igual TvT
       PartyFarmEventEnabled = true
       
       # Iniciar party farm ao ligar o server
       StartSpawnPartyFarm = False
       
       #Party Farm Title
       PartyFarmTitle = Evento
       
       #=========================================================
       #                CONFIG START TIME EVENT             
       #=========================================================
       #minutos de evento
       # PartyFarmEventEnabled=11:00,15:00,19:00,23:00,
       EventBestFarmTime = 30
       BestFarmStartTime = 06:00,07:00,08:00,09:00,10:00,11:00,12:00,13:00,14:00,15:00,16:00,17:00,00:01,01:00,02:00,03:00,04:00,05:00,
       
       # Show screen Party message on character login
       # Default: False
       ScreenPartyMessageEnable = True
       
       # Screen Party Farm message text
       ScreenPartyFarmMessageText = Event Party Farm Teleport now.
       # Show screen PartyFarm message for x seconds.
       ScreenPartyFarmMessageTime = 6
       
       MonsterLoc = 10565, -23681, -3656;\
       9119,   -23577, -3716;\
       7392,   -20364, -3552;\
       7506,   -18819, -3674;\
       5955,   -20312, -3522;\
       4675,   -19989, -3548;\
       4348,   -18389, -3653;\
       2838,   -17173, -3574;\
       4309,   -15651, -3588;\
       -50324, 137542, -2871;\
       -49694, 138843, -2919;\
       -48580, 139801, -2930;\
       -51061, 139072, -2925;\
       -52648, 139600, -2937;\
       -52084, 137211, -2884;\
       -51885, 140437, -2859;\
       -51313, 141965, -2878;\
       -53470, 141986, -2858;\
       -54383, 139210, -2906;\
       -55321, 137909, -2911;\
       -57082, 138361, -2714;\
       -57845, 140766, -2649;\
       -56629, 143361, -2566;\
       -59379, 139309, -2466;\
       -60082, 137623, -2327;\
       -58639, 135770, -2457;\
       -56714, 135084, -2433;\
       -56715, 136673, -2789;\
       -56264, 141358, -2628;\
       -54986, 142629, -2839;\
       -53362, 143202, -2892;\
       -52410, 141770, -2925;\
       -50588, 143081, -2895;\
       -51088, 144450, -2893;\
       -50856, 145485, -2812;\
       -52172, 145466, -2820;\
       -54007, 145158, -2875;\
       -54325, 146502, -2877;\
       -52890, 144172, -2908;\
       -54113, 137140, -2752;\
       -51976, 138979, -2952;\
       -53666, 139817, -2857;\
       -52753, 137986, -2921;\
       -50593, 140423, -2855;\
       -51996, 143661, -2892;
     
    ==================================================================
    --- java/head-src/com/l2jfrozen/gameserver/model/network/EnterWorld.java (revision 84)
    +++ java/head-src/com/l2jfrozen/gameserver/model/network/EnterWorld.java (working copy)

    import com.l2jfrozen.gameserver.model.entity.event.DM;
    import com.l2jfrozen.gameserver.model.entity.event.L2Event;
    +import com.l2jfrozen.events.PartyFarm;


    activeChar.stopEffects(L2Effect.EffectType.COMBAT_POINT_HEAL_OVER_TIME);
    activeChar.removeEffect(e);
    }
    }
    }
    +         if (PartyFarm.is_started() && Config.PARTY_FARM_BY_TIME_OF_DAY)
    +        activeChar.sendPacket(new CreatureSay(0, 3, ".", "" + Config.PARTY_FARM_MESSAGE_TEXT + " " + Config.PARTY_FARMANNONCER + " :."));


    ==================================================================
    --- java/head-src/com/l2jfrozen/gameserver/gameserver.java (revision 84)
    +++ java/head-src/com/l2jfrozen/gameserver/gameserver.java (working copy)
     

    import com.l2jfrozen.gameserver.managers.PetitionManager;
    import com.l2jfrozen.gameserver.managers.QuestManager;
    +import com.l2jfrozen.events.PartyFarm;



    FaenorScriptEngine.getInstance();
    }
    else
    {
    LOGGER.info("Script: disable load.");
    }

    +    LOGGER.info("Evento Party Farm");
    +    
    +    if (Config.PARTY_FARM_BY_TIME_OF_DAY && !Config.START_PARTY)
    +    {
    +    com.l2jfrozen.events.InitialPartyFarm.getInstance().StartCalculationOfNextEventTime();
    +        LOGGER.info("[Party Farm Time]: Enabled");
    +    }
    +    else if (Config.START_PARTY && !Config.PARTY_FARM_BY_TIME_OF_DAY)
    +    {
    +        LOGGER.info("[Start Spawn Party Farm]: Enabled");
    +        ThreadPoolManager.getInstance(new SpawnMonsters(), Config.NPC_SERVER_DELAY * 1000L);
    +    }

    ==================================================================
    --- java/head-src/com/l2jfrozen/events/InitialPartyFarm.java (revision 84)
    +++ java/head-src/com/l2jfrozen/events/InitialPartyFarm.java (working copy)
     
    + package com.l2jfrozen.events;

    +   import java.text.SimpleDateFormat;
    +   import java.util.Calendar;
    +    import java.util.logging.Logger;
    +   
    +   import com.l2jfrozen.gameserver.thread.ThreadPoolManager;
    +   
    +   import com.l2jfrozen.Config;
    +   
    +   public class InitialPartyFarm
    +   {
    +       private static InitialPartyFarm _instance = null;
    +       protected static final Logger _log = Logger.getLogger(InitialPartyFarm.class.getName());
    +       private Calendar NextEvent;
    +       private final SimpleDateFormat format = new SimpleDateFormat("HH:mm");
    +   
    +       public static InitialPartyFarm getInstance()
    +       {
    +           if (_instance == null)
    +               _instance = new InitialPartyFarm();
    +           return _instance;
    +       }
    +   
    +       public String getRestartNextTime()
    +       {
    +           if (NextEvent.getTime() != null)
    +               return format.format(NextEvent.getTime());
    +           return "Erro";
    +       }
    +   
    +       public void StartCalculationOfNextEventTime()
    +       {
    +           try
    +           {
    +               Calendar currentTime = Calendar.getInstance();
    +               Calendar testStartTime = null;
    +               long flush2 = 0L;
    +               long timeL = 0L;
    +               int count = 0;
    +               for (String timeOfDay : Config.EVENT_BEST_FARM_INTERVAL_BY_TIME_OF_DAY)
    +               {
    +                   testStartTime = Calendar.getInstance();
    +                   testStartTime.setLenient(true);
    +                   String[] splitTimeOfDay = timeOfDay.split(":");
    +                   testStartTime.set(11, Integer.parseInt(splitTimeOfDay[0]));
    +                   testStartTime.set(12, Integer.parseInt(splitTimeOfDay[1]));
    +                   testStartTime.set(13, 0);
    +                   if (testStartTime.getTimeInMillis() < currentTime.getTimeInMillis())
    +                       testStartTime.add(5, 1);
    +                   timeL = testStartTime.getTimeInMillis() - currentTime.getTimeInMillis();
    +                   if (count == 0)
    +                   {
    +                       flush2 = timeL;
    +                       NextEvent = testStartTime;
    +                   }
    +                   if (timeL < flush2)
    +                   {
    +                       flush2 = timeL;
    +                       NextEvent = testStartTime;
    +                   }
    +                   count++;
    +               }
    +               _log.info("[Party Farm]: Proximo Evento: " + NextEvent.getTime().toString());
    +               ThreadPoolManager.getInstance().scheduleGeneral(new StartEventTask(), flush2);
    +           }
    +           catch (Exception e)
    +           {
    +               System.out.println("[Party Farm]: Algum erro nas config foi encontrado!");
    +           }
    +       }
    +   
    +       class StartEventTask implements Runnable
    +       {
    +           StartEventTask()
    +           {
    +           }
    +   
    +           @Override
    +           public void run()
    +           {
    +               InitialPartyFarm._log.info("[Party Farm]: Event Started.");
    +               PartyFarm.bossSpawnMonster();
    +           }
    +       }
    +   }
    +
    ==================================================================
    --- java/head-src/com/l2jfrozen/events/PartyFarm.java (revision 84)
    +++ java/head-src/com/l2jfrozen/events/PartyFarm.java (working copy)

    +package com.l2jfrozen.events;

    +import java.util.ArrayList;
    +
    +import com.l2jfrozen.Config;
    +import com.l2jfrozen.gameserver.datatables.sql.SpawnTable;
    +import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminPartyFarm;
    +import com.l2jfrozen.gameserver.model.entity.Announcements;
    +import com.l2jfrozen.gameserver.model.spawn.L2Spawn;
    +import com.l2jfrozen.gameserver.model.L2World;
    +import com.l2jfrozen.gameserver.templates.L2NpcTemplate;
    +import com.l2jfrozen.gameserver.network.serverpackets.MagicSkillUser;
    +import com.l2jfrozen.gameserver.datatables.sql.NpcTable;
    +import com.l2jfrozen.gameserver.network.serverpackets.NpcInfo;
    +import com.l2jfrozen.gameserver.model.entity.Announcements;   
    +   
     +  public class PartyFarm
    +   {
    +       public static L2Spawn _monster;
    +       public static int _bossHeading = 0;
    +       public static String _eventName = "";
    +       public static boolean _started = false;
    +       public static boolean _aborted = false;
    +       protected static boolean _finish = false;
    +       static PartyFarm _instance;
    +   
    +       public static void bossSpawnMonster()
    +       {
    +           spawnMonsters();
    +           Announcements.getInstance().announceToAll("Teleport Now! " + Config.PARTY_FARMANNONCER);
    +           Announcements.getInstance().announceToAll("[Party Farm]: Duration: " + Config.EVENT_BEST_FARM_TIME + " minute(s)!");
    +   
    +           _aborted = false;
    +           _started = true;
    +   
    +           waiter(Config.EVENT_BEST_FARM_TIME * 60 * 1000);
    +           if (!_aborted)
    +               Finish_Event();
    +           unSpawnMonsters();
    +       }
    +   
    +       public static void Finish_Event()
    +       {
    +           unSpawnMonsters();
    +   
    +           _started = false;
    +           _finish = true;
    +   
    +           Announcements.getInstance().announceToAll("[Party Farm]: Finished!");
    +           if (!AdminPartyFarm._bestfarm_manual)
    +               InitialPartyFarm.getInstance().StartCalculationOfNextEventTime();
    +           else
    +               AdminPartyFarm._bestfarm_manual = false;
    +       }
    +   
    +       public static void spawnMonsters()
    +       {
    +           for (int i = 0; i < Config.MONSTER_LOCS_COUNT; i++)
    +           {
    +               int[] coord = Config.MONSTER_LOCS[i];
    +               monsters.add(spawnNPC(coord[0], coord[1], coord[2], Config.monsterId));
    +               
    +           
    +           }
    +       }
    +       
    +   
    +       public static boolean is_started()
    +       {
    +           return _started;
    +       }
    +   
    +       public static boolean is_finish()
    +       {
    +           return _finish;
    +       }
    +   
    +       protected static L2Spawn spawnNPC(int xPos, int yPos, int zPos, int npcId)
    +       {
    +           L2NpcTemplate template = NpcTable.getInstance().getTemplate(npcId);
    +           try
    +           {
    +               L2Spawn spawn = new L2Spawn(template);
    +               spawn.setLoc(xPos, yPos, zPos, 0);
    +               spawn.setRespawnDelay(Config.PARTY_FARM_MONSTER_DALAY);
    +   
    +               SpawnTable.getInstance().addNewSpawn(spawn, false);
    +   
    +               spawn.setRespawnState(true);
    +               spawn.doSpawn(false);
    +               spawn.getLastSpawn().isAggressive();
    +               spawn.getNpc().decayMe();
    +               spawn.getNpc().spawnMe(spawn.getNpc().getX(), spawn.getNpc().getY(), spawn.getNpc().getZ());
    +               spawn.getNpc().broadcastPacket(new MagicSkillUser(spawn.getNpc(), spawn.getNpc(), 1034, 1, 1, 1));
    +               return spawn;
    +           }
    +           catch (Exception e)
    +           {
    +           }
    +           return null;
    +       }
    +       
    +       
    +   
    +   
    +   
    +       protected static ArrayList<L2Spawn> monsters = new ArrayList<>();
    +   
    +       protected static void unSpawnMonsters()
    +       {
    +           for (L2Spawn s : monsters)
    +           {
    +               if (s == null)
    +               {
    +                   monsters.remove(s);
    +                   return;
    +               }
    +               
    +               s.getNpc().deleteMe();
    +               s.setRespawnState(false);
    +               SpawnTable.getInstance().deleteSpawn(s, true);
    +   
    +           }
    +       }
    +   
    +      protected static void waiter(long interval)
    +       {
    +           long startWaiterTime = System.currentTimeMillis();
    +           int seconds = (int) (interval / 1000L);
    +           while (startWaiterTime + interval > System.currentTimeMillis() && !_aborted)
    +           {
    +               seconds--;
    +               switch (seconds)
    +               {
    +                   case 3600:
    +                       if (_started)
    +                           
    +                       Announcements.getInstance().announceToAll("[Party Farm]: " + seconds / 60 / 60 + " Time event finish!");
    +                       
    +                       break;
    +                   case 60:
    +                   case 120:
    +                   case 180:
    +                   case 240:
    +                   case 300:
    +                   case 600:
    +                   case 900:
    +                   case 1800:
    +                       if (_started)
    +                       Announcements.getInstance().announceToAll("[Party Farm]: " + seconds / 60 + " minute(s) event finish!");
    +                       break;
    +                   case 1:
    +                   case 2:
    +                   case 3:
    +                   case 10:
    +                   case 15:
    +                   case 30:
    +                       if (_started)
    +                       Announcements.getInstance().announceToAll("[Party Farm]: " + seconds + " second(s) event finish!");
    +                       
    +                       
    +                       
    +                       break;
    +               }
    +               long startOneSecondWaiterStartTime = System.currentTimeMillis();
    +               while (startOneSecondWaiterStartTime + 1000L > System.currentTimeMillis())
    +                   try
    +               {
    +                       Thread.sleep(1L);
    +               }
    +               catch (InterruptedException ie)
    +               {
    +                   ie.printStackTrace();
    +               }
    +           }
    +       }
    +   
    +   }

    ==================================================================
    --- java/head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminPartyFarm.java (revision 84)
    +++ java/head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminPartyFarm.java (working copy)

    +package com.l2jfrozen.gameserver.handler.admincommandhandlers;
    +   
    +import java.util.ArrayList;
    +import java.util.logging.Logger;
    +import com.l2jfrozen.gameserver.thread.ThreadPoolManager;
    +import com.l2jfrozen.events.PartyFarm; 
    +import com.l2jfrozen.gameserver.datatables.sql.SpawnTable;
    +import com.l2jfrozen.gameserver.handler.IAdminCommandHandler;
    +import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
    +import com.l2jfrozen.gameserver.model.spawn.L2Spawn;
    +
    +   /**
    +    * L2jBan
    +    * Adaptacion: Undergr'O'und c#0de$
    +    */
    +   
    +   public class AdminPartyFarm implements IAdminCommandHandler
    +   {
    +       public static L2Spawn _monster;
    +       private static final String[] ADMIN_COMMANDS =
    +       {
    +           "admin_ptfarm"
    +   
    +       };
    +       
    +       protected static final Logger _log = Logger.getLogger(AdminPartyFarm.class.getName());
    +       public static boolean _bestfarm_manual = true;
    +       public static boolean _arena_manual = false;
    +   
    +       @Override
    +       public boolean useAdminCommand(String command, L2PcInstance activeChar)
    +       {
    +           
    +   
    +           
    +           if (command.startsWith("admin_ptfarm"))
    +               if (PartyFarm._started)
    +               {
    +                   _log.info("----------------------------------------------------------------------------");
    +                   _log.info("[Party Farm]: Event Finished.");
    +                   _log.info("----------------------------------------------------------------------------");
    +                   PartyFarm._aborted = true;
    +                   unSpawnMonsters();
    +                   finishEventPartyFarm();
    +   
    +                   activeChar.sendMessage("SYS: Voce Finalizou o Party Farm Manualmente..");
    +               }
    +               else
    +               {
    +                   _log.info("----------------------------------------------------------------------------");
    +                   _log.info("[Party Farm]: Event Started.");
    +                   _log.info("----------------------------------------------------------------------------");
    +                   initEventPartyFarm();
    +                   _bestfarm_manual = true;
    +                   activeChar.sendMessage("SYS: Voce ativou o Best Farm Manualmente..");
    +               }
    +           return true;
    +       }
    +   
    +   
    +   
    +       /**
    +        *
    +        */
    +       protected static ArrayList<L2Spawn> monsters = new ArrayList<>();
    +       
    +       private static void unSpawnMonsters()
    +       {
    +           for (L2Spawn s : monsters)
    +           {
    +               if (s == null)
    +               {
    +                   monsters.remove(s);
    +                   return;
    +               }
    +               
    +               s.getNpc().deleteMe();
    +               s.setRespawnState(false);
    +               SpawnTable.getInstance().deleteSpawn(s, true);
    +   
    +           }
    +           
    +       }
    +   
    +   
    +   
    +       private static void initEventPartyFarm()
    +       {
    +       ThreadPoolManager.getInstance().scheduleGeneral(new Runnable()
    +           {
    +               @Override
    +               public void run()
    +               {
    +   
    +                   PartyFarm.bossSpawnMonster();
    +               }
    +           }, 1L);
    +       }
    +   
    +       private static void finishEventPartyFarm()
    +       {
    +       ThreadPoolManager.getInstance().scheduleGeneral(new Runnable()
    +           {
    +               @Override
    +               public void run()
    +               {
    +   
    +                   PartyFarm.Finish_Event();
    +   
    +               }
    +           }, 1L);
    +       }
    +   
    +       @Override
    +       public String[] getAdminCommandList()
    +       {
    +           return ADMIN_COMMANDS;
    +       }
    +   }

    ==================================================================
    --- java/head-src/com/l2jfrozen/gameserver/handler/AdminCommandHandler.java (revision 84)
    +++ java/head-src/com/l2jfrozen/gameserver/handler/AdminCommandHandler.java (working copy)

    registerAdminCommandHandler(new AdminBuffs());
    registerAdminCommandHandler(new AdminAio());
    registerAdminCommandHandler(new AdminCharSupervision());
    +registerAdminCommandHandler(new AdminPartyFarm());

    ==================================================================
    --- java/head-src/com/l2jfrozen/gameserver/model/spawn/L2Spawn.java (revision 84)
    +++ java/head-src/com/l2jfrozen/gameserver/model/spawn/L2Spawn.java (working copy)
     
      public void setInstanceId(final int instanceId)
    {
    _instanceId = instanceId;
    }

    + /**
    + * @param b
    + */
    + public void setRespawnState(boolean b)
    + {
    + // TODO Auto-generated method stub
    +
    + }
    +
    + /**
    + * @return
    + */
    + public L2PcInstance getNpc()
    + {
    + // TODO Auto-generated method stub
    + return null;
    + }

    }