Example #1
0
 public void Awake()
 {
     if (instance)
     {
         DestroyImmediate(WorldConnectObject);
     }
     else
     {
         DontDestroyOnLoad(WorldConnectObject);
         instance = this;
     }
 }
Example #2
0
        void Start()
        {
//			googleAnalytics.StartSession();
            instance = this;

            opcodeDict = new Dictionary <string, OpcodeFunc>();           //for testing
            opcodeDict.Add("423", HandleWorldMessage_SendCharInfo);
            opcodeDict.Add("36", HandleWorldMessage_ApproveName);
            opcodeDict.Add("548", HandleWorldMessage_ZoneUnavailable);
            opcodeDict.Add("545", HandleWorldMessage_ZoneServerInfo);
            opcodeDict.Add("365", HandleWorldMessage_PlayerProfile);
            opcodeDict.Add("338", HandleWorldMessage_NewZone);
            opcodeDict.Add("546", HandleWorldMessage_ZoneServerReady);
            opcodeDict.Add("549", HandleWorldMessage_EmuKeepAlive);
            opcodeDict.Add("550", HandleWorldMessage_EmuKeepAlive);
            opcodeDict.Add("551", HandleWorldMessage_EmuRequestClose);
            opcodeDict.Add("296", HandleWorldMessage_LogOutReply);
            opcodeDict.Add("424", HandleWorldMessage_SendExpZonein);
            opcodeDict.Add("547", HandleWorldMessage_ZoneSpawns);
            opcodeDict.Add("336", HandleWorldMessage_ZoneSpawns);
            opcodeDict.Add("539", HandleWorldMessage_ZoneChange);
            opcodeDict.Add("116", HandleWorldMessage_DeleteSpawn);
            opcodeDict.Add("69", HandleWorldMessage_ChannelMessage);
            opcodeDict.Add("87", HandleWorldMessage_ClientUpdate);
            opcodeDict.Add("458", HandleWorldMessage_SimpleMessage);
            opcodeDict.Add("168", HandleWorldMessage_FormattedMessage);
            opcodeDict.Add("109", HandleWorldMessage_Damage);
            opcodeDict.Add("242", HandleWorldMessage_HPUpdate);
            opcodeDict.Add("541", HandleWorldMessage_ZoneEntryInfo);
            opcodeDict.Add("366", HandleWorldMessage_PlayerStateAdd);
            opcodeDict.Add("367", HandleWorldMessage_PlayerStateRemove);
            opcodeDict.Add("323", HandleWorldMessage_MobHealth);
            opcodeDict.Add("154", HandleWorldMessage_ExpUpdate);
            opcodeDict.Add("110", HandleWorldMessage_Death);
            opcodeDict.Add("465", HandleWorldMessage_SpawnAppearance);
            opcodeDict.Add("52", HandleWorldMessage_BecomeCorpse);
            opcodeDict.Add("544", HandleWorldMessage_ZonePlayerToBind);
            opcodeDict.Add("257", HandleWorldMessage_ItemPacket);
            opcodeDict.Add("327", HandleWorldMessage_MoneyOnCorpse);
            opcodeDict.Add("329", HandleWorldMessage_WorldMOTD);
            opcodeDict.Add("72", HandleWorldMessage_ItemPacket);
            opcodeDict.Add("151", HandleWorldMessage_EnterWorld);



            //Auto-Connect to Salty Server
            //			StartCoroutine(ConnectToWebSocketServer("158.69.221.200", "aksdjlka23ij3l1j23lk1j23j123jkjql", "XLOGINX", "XPASSWORDX"));
        }
Example #3
0
        void Start()
        {
            instance = this;

            opcodeDict = new Dictionary <string, OpcodeFunc>();           //for testing
            opcodeDict.Add("423", HandleWorldMessage_SendCharInfo);
            opcodeDict.Add("36", HandleWorldMessage_ApproveName);
            opcodeDict.Add("548", HandleWorldMessage_ZoneUnavailable);
            opcodeDict.Add("545", HandleWorldMessage_ZoneServerInfo);
            opcodeDict.Add("365", HandleWorldMessage_PlayerProfile);
            opcodeDict.Add("338", HandleWorldMessage_NewZone);
            opcodeDict.Add("546", HandleWorldMessage_ZoneServerReady);
            opcodeDict.Add("549", HandleWorldMessage_EmuKeepAlive);

            //Auto-Connect to Salty Server
//			StartCoroutine(ConnectToWebSocketServer("198.245.55.69", "aksdjlka23ij3l1j23lk1j23j123jkjql", "gary1", "pies"));
            //Auto-Connect to Secrets Server
//			StartCoroutine(ConnectToWebSocketServer("68.83.231.103", "aksdjlka23ij3l1j23lk1j23j123jkjql", "secrets", "test"));
        }