|
You last visited: Today at 16:20
Advertisement
[Help] CoEmu v2 GuildDirector
Discussion on [Help] CoEmu v2 GuildDirector within the CO2 Private Server forum part of the Conquer Online 2 category.
10/11/2009, 02:09
|
#1
|
elite*gold: 0
Join Date: Oct 2009
Posts: 4
Received Thanks: 0
|
[Help] CoEmu v2 GuildDirector
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...
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
I thought I could do something like
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();
}
in the Database.cs but I'm not too sure if that's correct...
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);
}
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
|
|
|
10/11/2009, 02:42
|
#2
|
elite*gold: 0
Join Date: Sep 2009
Posts: 260
Received Thanks: 59
|
The right syntax should be :
else if (LinkBack == 1)
{
Text("Please input the desired Guild name.", CSocket);
Input("something here", 3, CSocket);
Database.Database.NewGuild(Name, Client);
Face(30, CSocket);
End(CSocket);
}
|
|
|
10/11/2009, 02:48
|
#3
|
elite*gold: 0
Join Date: Oct 2009
Posts: 4
Received Thanks: 0
|
Ok, so am I going in the right direction with this?
|
|
|
10/11/2009, 02:52
|
#4
|
elite*gold: 0
Join Date: Sep 2009
Posts: 260
Received Thanks: 59
|
Pretty much yes. But you need the packets and the packet structure and the handlers for it to eh?
Cya'round,
Yashi.
|
|
|
10/11/2009, 03:20
|
#5
|
elite*gold: 0
Join Date: Oct 2009
Posts: 4
Received Thanks: 0
|
So does this mean I have to sniff the packets myself and figure out the structure on my own?
Or is this posted on the forums somewhere?
If anyone cares to help me on this it'd be appreciated
Edit: I actually did some more searching... and found a thread on this D=...
Thanks for your help though Yashi
|
|
|
10/11/2009, 09:58
|
#6
|
elite*gold: 0
Join Date: Sep 2009
Posts: 260
Received Thanks: 59
|
Press thanks if i helped you out.
Cya'round,
Yashi.
|
|
|
10/11/2009, 17:15
|
#7
|
elite*gold: 20
Join Date: Jul 2007
Posts: 613
Received Thanks: 486
|
Quote:
Originally Posted by Jresyn
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...
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
I thought I could do something like
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();
}
in the Database.cs but I'm not too sure if that's correct...
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);
}
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
|
1-you have to get the name the player entered first , usually it starts from Data 14 to (Data.length -11) and that would be the name
2-the MySql command should be
Code:
VALUES([COLOR="Red"]'[/COLOR]" + Name + "[COLOR="Red"]'[/COLOR],
Quote:
Originally Posted by Jresyn
Ok, so am I going in the right direction with this?
|
Quote:
Originally Posted by Jresyn
So does this mean I have to sniff the packets myself and figure out the structure on my own?
Or is this posted on the forums somewhere?
If anyone cares to help me on this it'd be appreciated
Edit: I actually did some more searching... and found a thread on this D=...
Thanks for your help though Yashi 
|
the data u need is already there and decrypted u just need to convert it from hexa to characters to get the r8 name and then the Client should be CSocket.Client.ID
|
|
|
 |
Similar Threads
|
[npc help]GuildDirector code and Guild war ??help
08/06/2009 - CO2 Private Server - 2 Replies
GuildDirector code and Guild war ??help
:confused:
|
Help with CoEmu v2!
05/31/2009 - CO2 Private Server - 11 Replies
Hello Elitepvpers,
I can't login!
This is my error:
http://img46.imageshack.us/img46/1135/errorhxb.th .png
Can someone help me?
|
[HELP] CoEmu v2 GW
05/31/2009 - CO2 Private Server - 5 Replies
Hey, how i can open GW in CoEmu v2 source by andy?
Thanks for help.
|
[Help]Can't get GuildDirector to work
09/22/2008 - CO2 Private Server - 5 Replies
Source Base: LOTF
Source Version: TCWNN v1.0
First off let me start by saying I have tried to the best of my (very noobish) abilities to get the GD to work. I have fixed the values in the dialogues so that they are directing to the proper replies of the choices.
At first I was under the impression that I was able to edit the source using solely Notepad, which seemed to be able to read the .cs files fine. I was even convinced that my change to the DB Drop Rates was working. But I was then...
|
[REQUEST]GuildDirector NPC
07/25/2008 - Conquer Online 2 - 0 Replies
Can someone help me get the box to pop up on the GuildDirector Can someone help me out? xD
|
All times are GMT +1. The time now is 16:23.
|
|