Jump to content

Recommended Posts

Posted

And yet, dear people!  Attention! With all their corrections published in a single day. (!) And they are completely similar to our :)

Yep, true, we are so smart that we let you work for 5 months on datapack, and took it from you in 1 day:), and implemented in our Pack. :))) .It's absolutely normal to do that why work for alot of time when you can get from Initiative in 1 day? :)).If you wore so smart you would implement 3 way jump, Feo Wizzard Toggles properly with correct animation, Harmony system, subclass changing and alot of stuff, you have 3k updates in DataPack wich are useless w/o the core

Posted

package inproject.nuc;
import inproject.commons.lang.StatsUtils;
import inproject.commons.net.nio.impl.SelectorThread;
import inproject.commons.versioning.Version;
import inproject.nuc.cache.CrestCache;
import inproject.nuc.dao.CharacterDAO;
import inproject.nuc.dao.ItemsDAO;
import inproject.nuc.data.BoatHolder;
import inproject.nuc.data.xml.Parsers;
import inproject.nuc.data.xml.holder.EventHolder;
import inproject.nuc.data.xml.holder.ResidenceHolder;
import inproject.nuc.data.xml.holder.StaticObjectHolder;
import inproject.nuc.database.DatabaseFactory;
import inproject.nuc.geodata.GeoEngine;
import inproject.nuc.handler.admincommands.AdminCommandHandler;
import inproject.nuc.handler.items.ItemHandler;
import inproject.nuc.handler.usercommands.UserCommandHandler;
import inproject.nuc.handler.voicecommands.VoicedCommandHandler;
import inproject.nuc.idfactory.IdFactory;
import inproject.nuc.instancemanager.AutoSpawnManager;
import inproject.nuc.instancemanager.AwakingManager;
import inproject.nuc.instancemanager.BloodAltarManager;
import inproject.nuc.instancemanager.CastleManorManager;
import inproject.nuc.instancemanager.CoupleManager;
import inproject.nuc.instancemanager.CursedWeaponsManager;
import inproject.nuc.instancemanager.DelusionChamberManager;
import inproject.nuc.instancemanager.HellboundManager;
import inproject.nuc.instancemanager.PetitionManager;
import inproject.nuc.instancemanager.PlayerMessageStack;
import inproject.nuc.instancemanager.RaidBossSpawnManager;
import inproject.nuc.instancemanager.SoDManager;
import inproject.nuc.instancemanager.SoIManager;
import inproject.nuc.instancemanager.SpawnManager;
import inproject.nuc.instancemanager.games.FishingChampionShipManager;
import inproject.nuc.instancemanager.games.LotteryManager;
import inproject.nuc.instancemanager.games.MiniGameScoreManager;
import inproject.nuc.instancemanager.itemauction.ItemAuctionManager;
import inproject.nuc.instancemanager.naia.NaiaCoreManager;
import inproject.nuc.instancemanager.naia.NaiaTowerManager;
import inproject.nuc.listener.GameListener;
import inproject.nuc.loginservercon.LoginServerCommunication;
import inproject.nuc.model.World;
import inproject.nuc.model.entity.Hero;
import inproject.nuc.model.entity.MonsterRace;
import inproject.nuc.model.entity.olympiad.Olympiad;
import inproject.nuc.network.GameClient;
import inproject.nuc.network.GamePacketHandler;
import inproject.nuc.network.telnet.TelnetServer;
import inproject.nuc.scripts.Scripts;
import inproject.nuc.tables.AugmentationData;
import inproject.nuc.tables.CharTemplateTable;
import inproject.nuc.tables.ClanTable;
import inproject.nuc.tables.EnchantHPBonusTable;
import inproject.nuc.tables.LevelUpTable;
import inproject.nuc.tables.PetSkillsTable;
import inproject.nuc.tables.SkillTreeTable;
import inproject.nuc.taskmanager.ItemsAutoDestroy;
import inproject.nuc.taskmanager.TaskManager;
import inproject.nuc.taskmanager.tasks.RestoreOfflineTraders;
import inproject.nuc.utils.Strings;
import java.io.File;
import java.net.InetAddress;
import java.net.ServerSocket;
import java.sql.Connection;
import net.sf.ehcache.CacheManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class GameServer
{
  public static final int LOGIN_SERVER_PROTOCOL = 2;
  private static final Logger _log = LoggerFactory.getLogger(GameServer.class);
  public static GameServer _instance;
  private final SelectorThread<GameClient>[] _selectorThreads;
  private Version version;
  private TelnetServer statusServer;
  private final GameServer.GameServerListenerList _listeners;
  private int _serverStarted;

  public SelectorThread<GameClient>[] getSelectorThreads()
  {
    return this._selectorThreads;
  }

  public int time() {
    return (int)(System.currentTimeMillis() / 1000L);
  }

  public int uptime() {
    return time() - this._serverStarted;
  }

  public GameServer() throws Exception
  {
    _instance = this;
    this._serverStarted = time();
    this._listeners = new GameServer.GameServerListenerList(this);

    new File("./log/").mkdir();

    this.version = new Version(GameServer.class);

    _log.info("=================================================");
    _log.info("Cracked by NightKhaos from the scumbags of Initiative-Project");
    _log.info("=================================================");
    _log.info("Database: checking connection to db...");
    _log.info("Database: checking network connection...");

    Config.load();

    checkFreePorts();

    Class.forName(Config.DATABASE_DRIVER).newInstance();
    DatabaseFactory.getInstance().getConnection().close();

    IdFactory localIdFactory = IdFactory.getInstance();
    if (!localIdFactory.isInitialized()) {
      _log.error("Could not read object IDs from DB. Please Check Your Data.");
      throw new Exception("Could not initialize the ID factory");
    }

    CacheManager.getInstance();
    ThreadPoolManager.getInstance();
    Scripts.getInstance();
    AwakingManager.getInstance();
    GeoEngine.load();
    Strings.reload();
    GameTimeController.getInstance();
    World.init();
    Parsers.parseAll();
    ItemsDAO.getInstance();
    CrestCache.getInstance();
    CharacterDAO.getInstance();
    ClanTable.getInstance();
    SkillTreeTable.getInstance();
    AugmentationData.getInstance();
    CharTemplateTable.getInstance();
    EnchantHPBonusTable.getInstance();
    LevelUpTable.getInstance();
    PetSkillsTable.getInstance();
    ItemAuctionManager.getInstance();
    SpawnManager.getInstance().spawnAll();
    BoatHolder.getInstance().spawnAll();
    StaticObjectHolder.getInstance().spawnAll();
    RaidBossSpawnManager.getInstance();
    Scripts.getInstance().init();
    Announcements.getInstance();
    DelusionChamberManager.getInstance();
    LotteryManager.getInstance();
    PlayerMessageStack.getInstance();

    if (Config.AUTODESTROY_ITEM_AFTER > 0) {
      ItemsAutoDestroy.getInstance();
    }
    MonsterRace.getInstance();

    AutoSpawnManager.getInstance();

    if (Config.ENABLE_OLYMPIAD) {
      Olympiad.load();
      Hero.getInstance();
    }

    PetitionManager.getInstance();

    CursedWeaponsManager.getInstance();

    if (!Config.ALLOW_WEDDING) {
      CoupleManager.getInstance();
      _log.info("CoupleManager initialized");
    }

    ItemHandler.getInstance();

    AdminCommandHandler.getInstance().log();
    UserCommandHandler.getInstance().log();
    VoicedCommandHandler.getInstance().log();

    TaskManager.getInstance();

    _log.info("=[Events]=========================================");
    ResidenceHolder.getInstance().callInit();
    EventHolder.getInstance().callInit();
    _log.info("==================================================");

    CastleManorManager.getInstance();

    Runtime.getRuntime().addShutdownHook(Shutdown.getInstance());

    _log.info("IdFactory: Free ObjectID's remaining: " + IdFactory.getInstance().size());

    CoupleManager.getInstance();

    if (Config.ALT_FISH_CHAMPIONSHIP_ENABLED) {
      FishingChampionShipManager.getInstance();
    }
    HellboundManager.getInstance();

    NaiaTowerManager.getInstance();
    NaiaCoreManager.getInstance();

    SoDManager.getInstance();
    SoIManager.getInstance();
    BloodAltarManager.getInstance();

    MiniGameScoreManager.getInstance();

    Shutdown.getInstance().schedule(Config.RESTART_AT_TIME, 2);

    _log.info("GameServer Started");
    _log.info("Maximum Numbers of Connected Players: " + Config.MAXIMUM_ONLINE_USERS);

    GamePacketHandler localGamePacketHandler = new GamePacketHandler();

    InetAddress localInetAddress = Config.GAMESERVER_HOSTNAME.equalsIgnoreCase("*") ? null : InetAddress.getByName(Config.GAMESERVER_HOSTNAME);

    this._selectorThreads = new SelectorThread[Config.PORTS_GAME.length];
    for (int i = 0; i < Config.PORTS_GAME.length; i++) {
      this._selectorThreads[i] = new SelectorThread(Config.SELECTOR_CONFIG, localGamePacketHandler, localGamePacketHandler, localGamePacketHandler, null);
      this._selectorThreads[i].openServerSocket(localInetAddress, Config.PORTS_GAME[i]);
      this._selectorThreads[i].start();
    }

    LoginServerCommunication.getInstance().start();

    if (Config.SERVICES_OFFLINE_TRADE_RESTORE_AFTER_RESTART) {
      ThreadPoolManager.getInstance().schedule(new RestoreOfflineTraders(), 30000L);
    }
    getListeners().onStart();

    if (Config.IS_TELNET_ENABLED)
      this.statusServer = new TelnetServer();
    else {
      _log.info("Telnet server is currently disabled.");
    }
    _log.info("=================================================");
    String str1 = StatsUtils.getMemUsage().toString();
    for (String str2 : str1.split("\n"))
      _log.info(str2);
    _log.info("=================================================");
  }

  public GameServer.GameServerListenerList getListeners()
  {
    return this._listeners;
  }

  public static GameServer getInstance() {
    return _instance;
  }

  public <T extends GameListener> boolean addListener(T paramT) {
    return this._listeners.add(paramT);
  }

  public <T extends GameListener> boolean removeListener(T paramT) {
    return this._listeners.remove(paramT);
  }

  public static void checkFreePorts() {
    int i = 0;
    while (i == 0)
      for (int m : Config.PORTS_GAME)
        try
        {
          ServerSocket localServerSocket;
          if (Config.GAMESERVER_HOSTNAME.equalsIgnoreCase("*"))
            localServerSocket = new ServerSocket(m);
          else
            localServerSocket = new ServerSocket(m, 50, InetAddress.getByName(Config.GAMESERVER_HOSTNAME));
          localServerSocket.close();
          i = 1;
        } catch (Exception localException) {
          _log.warn("Port " + m + " is allready binded. Please free it and restart server.");
          i = 0;
          try {
            Thread.sleep(1000L);
          } catch (InterruptedException localInterruptedException) {
          }
        }
  }

  public static void main(String[] paramArrayOfString) throws Exception {
    new GameServer();
  }

  public Version getVersion() {
    return this.version;
  }

  public TelnetServer getStatusServer() {
    return this.statusServer;
  }
}

 

Last Chance to apologize, i bet this code looks very familiar

Posted

I don't really know what the arguments are all about, but that doesn't concern me, I'm here to talk about this purchase I've made over a month ago, and so far every week I'm getting updates and support almost 7 days a week, at first I wanted to buy GoD packs from other people which I won't mention their names, but they wouldn't even have de delicacy of answering emails, so far no problems with support from mavmdox so to anyone thinking about buying a GOD pack this trust me this one is a very good one

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...