[C#] Offline Seal
#1

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);
}

#2
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.

#3


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

#4

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

 

#5
lol hateme u sell this tool? xD

#6

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

#7


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^^

#8
would u release it? or sell it even a good idea if u get it workin good luck

#9


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?

#10


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



Forum Jump:


Users browsing this thread: 1 Guest(s)