コード例 #1
0
ファイル: Relog.cs プロジェクト: 0x1911/ZzukBot_v1
 private static void bgWorker_Login_DoWork(object sender, DoWorkEventArgs e)
 {
     if (Relog.LoginState == Enums.LoginState.login && !API.BMain.IsInGame)
     {
         Helpers.Logger.Append("Logging in..");
         Relog.Login();
     }
 }
コード例 #2
0
ファイル: Relog.cs プロジェクト: 0x1911/ZzukBot_v1
        private static void bgWorker_EnterWorld_DoWork(object sender, DoWorkEventArgs e)
        {
            Random rand = new Random();

            for (int i = 0; i <= rand.Next(8, 12); i++)
            {
                System.Threading.Thread.Sleep(500);
            }

            if (Relog.LoginState == Enums.LoginState.charselect && !API.BMain.IsInGame)
            {
                Helpers.Logger.Append("Entering world..");
                Relog.EnterWorld();
                //only one char on the account? simply enter the world on that one

                /*  if (Relog.NumCharacterCount == 1)
                 * {
                 *    Helpers.Logger.Append("Entering world..");
                 *    Relog.EnterWorld();
                 * }
                 * else if (Relog.NumCharacterCount > 1)
                 * {
                 *    Helpers.Logger.Append("We got " + Relog.NumCharacterCount + " characters on this account.");
                 *    for (var i = 0; i < Relog.NumCharacterCount; i++)
                 *    {
                 *        var tmpCharName = Relog.GetCharacterNameAtPos(i);
                 *        Helpers.Logger.Append(i + " is " + tmpCharName);
                 *
                 *        if (tmpCharName.ToLower().Equals(Options.CharacterName.ToLower()))
                 *        {
                 *            Helpers.Logger.Append("Entering world with " + tmpCharName);
                 *            Relog.EnterWorld();
                 *        }
                 *    }
                 * } */
            }
        }