Well, I've looked all over... I tried to make this NPC on my own but I'm still a novice at C#.
This is as far as I got on my own.
I'm trying to make the Create Guild function...
I thought I could do something like
in the Database.cs but I'm not too sure if that's correct...
Then having
Or something to that effect... If anyone has done this already could you give me some hints/tips if I'm on the right path or possibly help me entirely?
Thanks in advance
-Jresyn
This is as far as I got on my own.
I'm trying to make the Create Guild function...
Code:
#region GuildDirector
case 10003:
{
if (LinkBack == 0)
{
Text("Greetings! I am the guild director, in charge of administrating and managing guilds. What business do you have with me?", CSocket);
Link("Create a guild", 1, CSocket);
Link("Disband my guild", 2, CSocket);
Link("Donate money", 3, CSocket);
Link("Pass my leadership", 4, CSocket);
Link("Assign Deputy Guild Leader", 5, CSocket);
Link("Remove sb. from office", 6, CSocket);
Link("Inquire about a guilde", 7, CSocket);
Link("Others", 8, CSocket);
Face(30, CSocket);
End(CSocket);
}
}
#endregion
Code:
public static void NewGuild(string Name, int Client)
{
MySqlCommand Cmd = new MySqlCommand("INSERT INTO guilds(Name, Leader) VALUES(" + Name + "," + Client + "", DatabaseConnection.NewConnection());
Cmd.ExecuteNonQuery();
Cmd.Connection.Close();
Cmd.Connection.Dispose();
Cmd.Dispose();
}
Then having
Code:
if (LinkBack == 1)
{
Text("Please input the desired Guild name", CSocket);
Input(3, CSocket);
Database.Database.NewGuild(Name, Client);
Face(30, CSocket);
End(CSocket);
}
Thanks in advance
-Jresyn