Posts: 528
Threads: 50
Thanks Received:
0 in 0 posts
Thanks Given: 0
Joined: Oct 2011
Reputation:
0
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);
}
Posts: 313
Threads: 20
Thanks Received:
0 in 0 posts
Thanks Given: 0
Joined: Jul 2011
Reputation:
0
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.
Posts: 528
Threads: 50
Thanks Received:
0 in 0 posts
Thanks Given: 0
Joined: Oct 2011
Reputation:
0
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
Posts: 335
Threads: 22
Thanks Received:
0 in 0 posts
Thanks Given: 0
Joined: Aug 2011
Reputation:
0
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
Posts: 154
Threads: 2
Thanks Received:
0 in 0 posts
Thanks Given: 0
Joined: Sep 2011
Reputation:
0
lol hateme u sell this tool? xD
Posts: 106
Threads: 15
Thanks Received:
0 in 0 posts
Thanks Given: 0
Joined: Dec 2011
Reputation:
0
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
Posts: 528
Threads: 50
Thanks Received:
0 in 0 posts
Thanks Given: 0
Joined: Oct 2011
Reputation:
0
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^^
Posts: 393
Threads: 22
Thanks Received:
0 in 0 posts
Thanks Given: 0
Joined: Dec 2011
Reputation:
0
would u release it? or sell it even a good idea if u get it workin good luck
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?
Posts: 335
Threads: 22
Thanks Received:
0 in 0 posts
Thanks Given: 0
Joined: Aug 2011
Reputation:
0
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