Guide/Release: Conquer Server (CoFuture) Using MySql!

03/13/2008 00:44 HolyMage#496
Quote:
Originally Posted by Korvacs View Post
@holymage,

gg on making them commands, however your skill command needs to be changed to else if not just if, to save the server some time, secondly youll also need to add return 2; to the end of the skill command, to inform the server that the command was used succesfully otherwise youll never know if there was a problem durring using it,

thirdly you also need to add the line to change the char's last command var to the last command you used so that if there is a problem the server will be able to inform you of the last command you used....

all trivial stuff really but.....ya know
Thanks for the advice I do that right away:)

EDIT: I fixed it, that wasn't really that hard at all. I would like to learn a lot more about mysql version of co and C#. Do you have any suggestions on where to get me started on the right track?
03/13/2008 02:46 walmartboi#497
@HolyMage, will you send me the new commands.cs once you have it fixed? Thanks
03/14/2008 21:08 Kiyono#498
1 question the /item command swork like this right?
/item [itemhere] 9 7 255 13 13 right?
but that doesn't work
03/14/2008 23:55 wolas112pl#499
Ihave error:
Auth Packet:Auth Request ;(

Help me pls
03/15/2008 01:59 HolyMage#500
Quote:
Ihave error:
Auth Packet:Auth Request ;(

Help me pls
You need to read the posts

Quote:
Originally Posted by Korvacs
Quote:
Also for all people receiving the 317/318 error:

Change your database type from 0 to 1, a noob error on mine and futures part,


Quote:
Originally Posted by Walos
Ok if you get try to log in and get an error similar to this


Code:
System.NullReferenceException: Object reference not set to an instance of an object.
   at COServer.Start.Game_FirstDataArrived(Object sender, DataArgs e) in CoFuture_ReleaseServerStart.cs:line 317which should be one of these 2 lines
Code:
                COClient Cli = ((COServer.AuthServerPackets.AuthRequest.AuthBinder)GameClients[e.Conn]).Client;
                string User = Cli.Account + ": " + Cli.Char.Name;and get the Error: Connection with Server is interupted. Please re-login. on your client
make sure in your account table auth is set to 1
eg
Code:
AccountID    Password    Type   Auth     Address
NewChar                    0      1       NULLAlso make sure tha the password field is blank
Changing the Auth to 1 and having a blank password try to log in again and now you should have the create char screen on the client

If you get

Code:
System.NullReferenceException: Object reference not set to an instance of an object.
   at COServer.Start.Game_FirstDataArrived(Object sender, DataArgs e) in CoFuture_ReleaseServerStart.cs:line 317
and get to the create char screen of the client then what i think is happening is that it is connecting you to the game server without first making sure that there is a row in the character table (CharID) with the same accountid as in the account table. CharID == AccountID.... This will raise the exception but allow you to create the char.

After you successfully created the char you should be able to login and these error will not appear for that account/char

I hope this helps the thing to make sure is that Auth is 1 and password is blank
Cheers
Walos

I Have had a bit of a look through this again and if you change this in start.cs



Code:
string User = Cli.Account + ": " + Cli.Char.Name;
ClientList.Items.Add(User);to

Code:
if (Cli.Status != Mode.CreateCharacter)
{
   string User = Cli.Account + ": " + Cli.Char.Name;
   ClientList.Items.Add(User);
}
Assumming that Auth is set right in the account table you shouldnt see this error again.
Its caused when you are creating a new Character as Cli.Char does not exist yet
Cheers
Walos

And that should be that, full credit to Walos for finding the source of the error and correcting it
Also you have to make sure your sql database server port matches your gameport in your Start.cs and in you server.dat also.


Quote:
Originally Posted by Djago160 View Post
1 question the /item command swork like this right?
/item [itemhere] 9 7 255 13 13 right?
but that doesn't work
This is how it should go when you typing it in
/item [ItemID] [PLUS] [MINUS] [HP] [GEM1]* [GEM2]* 0 0
So here is an example.
Code:
/item [ItemID] 9 7 255 13 13 0 0
To make an item super using this method. The last number has to be 9 so like for example
ItemID = 111309
which is a Super Iron Helment notice the 9 at the end
ItemID = 111303
is a normal one

To Find the Item ID you have to have the items list I have provide at this posted.

*
For each gem in the socs as follows.
1= Normal PhoenixGem
2= Refined PhoenixGem
3= Super PhoenixGem
11= Normal DragonGem
12= Refined DragonGem
13= Super DragonGem
21= Normal FuryGem
22= Refined FuryGem
23= Super FuryGem
31= Normal RainbowGem
32= Refined RainbowGem
33= Super RainbowGem
41= Normal KylinGem
42= Refined KylinGem
43= Super KylinGem
51= Normal VioletGem
52= Refined VioletGem
53= Super VioletGem
03/15/2008 09:40 Kiyono#501
i can also find the item IDs in the itemtype.dat right
btw i have a problem
when i put the /prof part in the commands.cs and the prof.cs in the folder and i try to rebuild i get a error:
The name prof does not exist in the current context
03/15/2008 10:52 tanelipe#502
About the /prof command, made it a little better looking ->

Can someone test it and say if it worked, 'cause I don't have the COFuture currently on my computer.

P.S You gotta admit it looks a little neater. :P

Code:
if (Splitter[0] == "/wskill" || Splitter[0] == "/prof")
            {
                ushort ProfID = 0;
                switch (Splitter[1])
                {
                    #region WeaponNames
                    case "blade": ProfID = 410; break;
                    case "sword": ProfID = 420; break;
                    case "bow": ProfID = 500; break;
                    case "club": ProfID = 480; break;
                    case "bs": ProfID = 421; break;
                    case "hook": ProfID = 430; break;
                    case "whip": ProfID = 440; break;
                    case "mace": ProfID = 441; break;
                    case "axe": ProfID = 450; break;
                    case "hammer": ProfID = 460; break;
                    case "scepter": ProfID = 481; break;
                    case "dagger": ProfID = 490; break;
                    case "glaive": ProfID = 510; break;
                    case "poleaxe": ProfID = 530; break;
                    case "spear": ProfID = 560; break;
                    case "longhammer": ProfID = 540; break;
                    case "halbert": ProfID = 580; break;
                    case "wand": ProfID = 561; break;
                    #endregion
                }
                if (ProfID != 0)
                {
                    byte ProfLvl = 0;
                    byte.TryParse(Splitter[2], out ProfLvl);
                    if (ProfLvl == 0)
                        ProfLvl = 1;
                    if (ProfLvl > 20)
                        ProfLvl = 20;

                    Client.Char.PreviousCommand = Splitter[1];
                    Client.SendData(Prof.Skill(ProfID, ProfLvl));
                    return 2;
                }
            }
03/15/2008 10:54 Kiyono#503
Quote:
Originally Posted by tanelipe View Post
About the /prof command, made it a little better looking ->

Can someone test it and say if it worked, 'cause I don't have the COFuture currently on my computer.

Code:
if (Splitter[0] == "/wskill" || Splitter[0] == "/prof")
            {
                ushort ProfID = 0;
                switch (Splitter[1])
                {
                    #region WeaponNames
                    case "blade": ProfID = 410; break;
                    case "sword": ProfID = 420; break;
                    case "bow": ProfID = 500; break;
                    case "club": ProfID = 480; break;
                    case "bs": ProfID = 421; break;
                    case "hook": ProfID = 430; break;
                    case "whip": ProfID = 440; break;
                    case "mace": ProfID = 441; break;
                    case "axe": ProfID = 450; break;
                    case "hammer": ProfID = 460; break;
                    case "scepter": ProfID = 481; break;
                    case "dagger": ProfID = 490; break;
                    case "glaive": ProfID = 510; break;
                    case "poleaxe": ProfID = 530; break;
                    case "spear": ProfID = 560; break;
                    case "longhammer": ProfID = 540; break;
                    case "halbert": ProfID = 580; break;
                    case "wand": ProfID = 561; break;
                    #endregion
                }
                if (ProfID != 0)
                {
                    byte ProfLvl = 0;
                    byte.TryParse(Splitter[2], out ProfLvl);
                    if (ProfLvl == 0)
                        ProfLvl = 1;
                    if (ProfLvl > 20)
                        ProfLvl = 20;

                    Client.Char.PreviousCommand = Splitter[1];
                    Client.SendData(Prof.Skill(ProfID, ProfLvl));
                    return 2;
                }
            }
i will try because the other prof script doesn't work
edit: no i get the same error
03/15/2008 11:03 tanelipe#504
The problem with your error is probably.. that you don't have the Skill Packet declared. Let me see If I can find a fix for you.

EDIT :

Try replacing the line

Client.SendData(Prof.Skill(ProfID, ProfLvl));

with ->

Client.SendData(CPacket.Skill(ProfID, ProfLvl, 0));


EDIT2 ::
After reading error you described, and looking on the Prof.cs
I suppose It should be -> PacketBuilder.Skill(ProfID, ProfLvl)
Instead of Prof.Skill(ProfID, ProfLvl)

And have you added the Prof.cs to the project? Or have you just put the file on the folder ? (It won't automatically include it in the project..)
03/15/2008 11:10 wolas112pl#505
OK work! :)
Thank You !!
03/15/2008 11:36 Kiyono#506
O.o i have no idea what i did but i van't connect to my server anymore...
03/15/2008 11:41 Kiyono#507
Quote:
Originally Posted by tanelipe View Post
The problem with your error is probably.. that you don't have the Skill Packet declared. Let me see If I can find a fix for you.

EDIT :

Try replacing the line

Client.SendData(Prof.Skill(ProfID, ProfLvl));

with ->

Client.SendData(CPacket.Skill(ProfID, ProfLvl, 0));


EDIT2 ::
After reading error you described, and looking on the Prof.cs
I suppose It should be -> PacketBuilder.Skill(ProfID, ProfLvl)
Instead of Prof.Skill(ProfID, ProfLvl)

And have you added the Prof.cs to the project? Or have you just put the file on the folder ? (It won't automatically include it in the project..)
i did include dit(left click Prof.CS add in project right)

edit:after i replaced it i get a other error
No overload for method 'Skill' takes '2' arguments
edit2:i tried packetbuilder instead of proff and now it does work
edit3:downloading Qonquer client
03/15/2008 12:15 tanelipe#508
So, it's compiling just fine now? :D
03/15/2008 12:18 wolas112pl#509
I can't wear weapon lvl 130 why ??
03/15/2008 12:28 Kiyono#510
Acct typ 2 auth 1 doesn't work...