示例#1
0
 public void Execute()
 {
     foreach (var x in ItemListManager.GetFUTListItems())
     {
         x.LastPriceCheck = 0;
         x.SaveChanges();
     }
     FUTLogsDatabase.AddFUTNotification("ActionScheduler", "Pricechecks resetted");
 }
示例#2
0
 public void Execute()
 {
     foreach (var x in ItemListManager.GetFUTListItems())
     {
         x.SellPercent = Percentage;
         x.SaveChanges();
     }
     FUTLogsDatabase.AddFUTNotification("ActionScheduler", "Buypercent set to " + Percentage);
 }
示例#3
0
        public async Task RunMuleApiClientAsync(FUTClient client, MuleApiPlayer muleApiPlayer)
        {
            client.AddLog($"Starting {muleApiPlayer.MuleApiType} MuleApi!");
            //var running = client.LogicRunningReal;
            //var runningCounter = 0;
            //if (running)
            //{
            //    client.AddLog($"Stopping Logic for MuleApi {muleApiPlayer.MuleApiType} transaction!");
            //    BotManager.StopBot(client.FUTAccount.EMail);
            //    while (client.LogicRunningReal)
            //    {
            //        await Task.Delay(1000);

            //        if (runningCounter++ > 30)
            //        {

            //            client.AddLog($"Couldn't stop account!");
            //            client.StartLogic();
            //            return;
            //        }
            //    }
            //}

            var mule   = new MuleApiClient(client, muleApiPlayer);
            var result = await mule.MuleLogicAsync();

            if (result)
            {
                switch (muleApiPlayer.MuleApiType)
                {
                case MuleApiType.GameTradeEasy:
                    FUTMuleApiStatistic.Instance.GTETotalCoinVolume   += muleApiPlayer.MuleValue;
                    FUTMuleApiStatistic.Instance.GTETotalDollarVolume += muleApiPlayer.Revenue;
                    break;

                case MuleApiType.MuleFactory:
                    FUTMuleApiStatistic.Instance.MFTotalCoinVolume   += muleApiPlayer.MuleValue;
                    FUTMuleApiStatistic.Instance.MFTotalDollarVolume += muleApiPlayer.Revenue;
                    break;

                case MuleApiType.WholeSale:
                    FUTMuleApiStatistic.Instance.WSTotalCoinVolume   += muleApiPlayer.MuleValue;
                    FUTMuleApiStatistic.Instance.WSTotalDollarVolume += muleApiPlayer.Revenue;
                    break;
                }
                FUTMuleApiStatistic.Instance.SaveChanges();
                client.CoinsMuledToday += muleApiPlayer.MuleValue;
                await muleApiPlayer.MuleApiClient.UpdatePlayerStatusAsync(muleApiPlayer.TransactionId, MuleApiStatus.Bought);

                FUTLogsDatabase.AddFUTNotification(client.FUTAccount.EMail, $"Muling API sold {muleApiPlayer.MuleValue} coins for {muleApiPlayer.Revenue}$ to {muleApiPlayer.MuleApiType}");
                client.AddLog($"Muling API sold {muleApiPlayer.MuleValue} coins for {muleApiPlayer.Revenue}$ to {muleApiPlayer.MuleApiType}");
            }
            else
            {
                await muleApiPlayer.MuleApiClient.UpdatePlayerStatusAsync(muleApiPlayer.TransactionId, MuleApiStatus.Cancel);

                client.AddLog($"Muling API failed! {muleApiPlayer.MuleValue} coins for {muleApiPlayer.Revenue}$ to {muleApiPlayer.MuleApiType}");
            }
            client.Muling            = false;
            client.MulingPausedUntil = DateTime.Now.AddMinutes(FUTSettings.Instance.MuleApiSellDelayPerAccount);
            //if (running)
            //{
            //    client.AddLog($"Restarting account!");
            //    client.StartLogic();
            //}
        }
示例#4
0
 public void Execute()
 {
     FUTSettings.Instance.EnableSell = false;
     FUTSettings.Instance.SaveChanges();
     FUTLogsDatabase.AddFUTNotification("ActionScheduler", "Sell disabled");
 }
示例#5
0
 public void Execute()
 {
     FUTSettings.Instance.EnableBuy = true;
     FUTSettings.Instance.SaveChanges();
     FUTLogsDatabase.AddFUTNotification("ActionScheduler", "Buy enabled");
 }
示例#6
0
 public void Execute()
 {
     BotManager.StartAllBots();
     FUTLogsDatabase.AddFUTNotification("ActionScheduler", "Logic started");
 }
示例#7
0
 public void Execute()
 {
     FUTSettings.Instance.LoginMethod = LoginMethod.Android;
     FUTSettings.Instance.SaveChanges();
     FUTLogsDatabase.AddFUTNotification("ActionScheduler", "Loginmethod switched to Android");
 }