public void Connect()
 {
     if (!connection.IsConnected())
     {
         connection.Connect(userName, password, region, Properties.Settings.Default.clientVer);
     }
 }
 public void levelUp()
 {
     updateStatus("Level Up: " + sumLevel, Accountname);
     rpBalance = loginPacket.RpBalance;
     if (sumLevel >= Program.maxLevel)
     {
         connection.Disconnect();
         //bool connectStatus = await connection.IsConnected();
         if (!connection.IsConnected())
         {
             Program.lognNewAccount();
         }
     }
     if (rpBalance == 400.0 && Program.buyBoost)
     {
         updateStatus("Buying XP Boost", Accountname);
         try
         {
             Task t = new Task(buyBoost);
             t.Start();
         }
         catch (Exception exception)
         {
             updateStatus("Couldn't buy RP Boost.\n" + exception, Accountname);
         }
     }
 }
Esempio n. 3
0
 private void levelUp()
 {
     updateStatus("Level Up: " + sumLevel, Accountname);
     rpBalance = loginPacket.RpBalance;
     if (sumLevel >= parent.maxLevel)
     {
         connection.Disconnect();
         if (!connection.IsConnected())
         {
             parent.lognNewAccount();
         }
     }
     if (rpBalance == 400.0 && parent.buyBoost && sumLevel < 5)
     {
         updateStatus("Buying XP Boost", Accountname);
         try
         {
             Task t = new Task(buyBoost);
             t.Start();
         }
         catch (Exception exception)
         {
             updateStatus("Couldn't buy RP Boost.\n" + exception, Accountname);
         }
     }
 }
Esempio n. 4
0
 public void levelUp()
 {
     updateStatus("Level Up: " + sumLevel, Accountname);
     rpBalance = loginPacket.RpBalance;
     if (sumLevel >= Program.maxLevel)
     {
         connection.Disconnect();
         //bool connectStatus = await connection.IsConnected();
         if (!connection.IsConnected())
         {
             Program.lognNewAccount();
         }
     }
 }
Esempio n. 5
0
 private void Dispose(bool disposing)
 {
     if (!m_disposed)
     {
         if (disposing)
         {
         }
         m_disposed = true;
         if (connection.IsConnected())
         {
             connection.Disconnect();
         }
     }
 }