private static async Task Min60Timer() { await Delay(1000 * 60 * 180); var rand = new Random(); DataTable tbl = Appi.MySql.ExecuteQueryWithResult("SELECT * FROM business WHERE type = 0 OR type = 1 OR type = 4 OR type = 5 OR type = 7 OR type = 9 OR type = 12 OR type = 8 OR type = 13"); foreach (DataRow row in tbl.Rows) { if (!Server.Sync.Data.Has(-20000 + (int)row["id"], "bizzPayDay")) { continue; } if ((int)row["id"] == 91) { continue; } int payPay = (int)Server.Sync.Data.Get(-20000 + (int)row["id"], "bizzPayDay"); if (payPay <= 1) { continue; } int sum = rand.Next(1, payPay); Server.Sync.Data.Set(-20000 + (int)row["id"], "bizzPayDay", payPay - sum); Business.AddMoney((int)row["id"], sum); } }