![]() |
|
[C#] Offline Seal - Printable Version +- LCKB (https://lckb.dev/forum) +-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109) +--- Forum: Programmers Gateway (https://lckb.dev/forum/forumdisplay.php?fid=196) +---- Forum: Coders Talk (https://lckb.dev/forum/forumdisplay.php?fid=192) +---- Thread: [C#] Offline Seal (/showthread.php?tid=1190) Pages:
1
2
|
- Nikolee - 10-19-2012 Hey Guys im back but not with a problem, its more an question for a Idea ^^ I wanna make a Offline Seal System in C# with a Console. But im stuck on a Method how i work on the Accounts which are offline^^ I select in t_users the Accounts who are offline and then i wanna seal the Armor & Weapon if the character is logged off ^^ But to be serious i have no idea there to start. i thougt so: Get the Accounts which are Offline Select the Characters from the Accounts Seal the Items.. But how i make this for every account who is offline? I can make it with 1 but how for 100 ?^^ Sry i cant explain it right ^^ Here i select the Accounts which are offline so what i gonna do now? public void GetCharacterToSeal() { Read(); Console.BackgroundColor = ConsoleColor.Black; Console.ForegroundColor = ConsoleColor.White; DateTime date = DateTime.Now; MySqlConnection con; MySqlConnectionStringBuilder csb = new MySqlConnectionStringBuilder(); csb.Server = Ip; csb.UserID = User; csb.Database = user_db; csb.Password = pw; con = new MySqlConnection(csb.ConnectionString); MySqlConnection connection = new MySqlConnection(csb.ConnectionString); connection.Open(); string sql = @"SELECT count(a_index) FROM t_users WHERE a_zone_num = -1 "; //Zählen MySqlCommand Command = new MySqlCommand(sql, connection); int i = Command.ExecuteNonQuery(); MySqlDataAdapter dtAdp = new MySqlDataAdapter(sql, connection); string result = Convert.ToString(Command.ExecuteScalar()); Console.WriteLine(date + " : : People offline and able to Seal Items: "+result); } - someone - 10-19-2012 Isn't it simple to save the values that you get from the query into a list then then for every ID from the list apply the the seal, for its items. - Nikolee - 10-19-2012 Isn't it simple to save the values that you get from the query into a list then then for every ID from the list apply the the seal, for its items. yea i thought about that to create a list but i faild there i think i can stop this project xD - HateMe - 10-20-2012 its very simple i posted u already once an example how you can read the info in to a list i have made already a bit longer ago such a tool "bot"... but its bether to make a hook to the gameserver this one works to ofc but players need to be offline - Mr.Speedy - 10-20-2012 lol hateme u sell this tool? xD - TheEvilAnt - 10-20-2012 Well Isn't it simple to save the values that you get from the query into a list then then for every ID from the list apply the the seal, for its items. I think is not so difficult just would be take the id of the users offline and then save it on a list and then just with "foreach" would be easy - Nikolee - 10-20-2012 Well I think is not so difficult just would be take the id of the users offline and then save it on a list and then just with "foreach" would be easy You mean so : foreach(Player in List)? But i think i will try to hook some [CeNsOrEd] in C# maybe it work we will see^^ - Creep - 10-30-2012 would u release it? or sell it even a good idea if u get it workin good luck - X4lfur0z - 11-04-2012 its very simple i posted u already once an example how you can read the info in to a list i have made already a bit longer ago such a tool "bot"... but its bether to make a hook to the gameserver this one works to ofc but players need to be offline I think your's will be buggy, because of the random seals? - HateMe - 11-04-2012 I think your's will be buggy, because of the random seals? why it will be buggy? it is not buggy bc i can make settings what posible seals can come on a specifik item type |