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

04/02/2008 05:32 cjainy#661
did you edit your server.dat to connect to your server? when you run the server a control panel pops up and it allows you to choose which IP to listen on choose the one that looks like 192.xxx.xxx.xxx copy that and paste it in your IP slot inside of the server.dat
ex:
Code:
Server2=Alumni
Ip2=192.168.1.73
Port2=9958
ServerName2=Alumni
HintWord2=
Pic2=servericon33
04/02/2008 06:05 katanahack#662
Yup, I've edited the server.dat file accordingly, and put my IP in the Control Panel.
It connects, then says the server is having matinence, and I checked back in localhost/phpmyadmin and it shows a encrypted password next to my account.

Any Ideas how to log in?

[Edit]
Open Router Ports maybe? I dont know my username/password for my router though.

[Only registered and activated users can see links. Click Here To Register...]
04/02/2008 09:04 katanahack#663
Also, is there anyway to disable the commands?
04/02/2008 13:32 tanelipe#664
Quote:
Originally Posted by tanelipe View Post
Look for Korvac's post @ page 40; There should be all the information needed to fix that error.
What I posted on previous page (about the line 317 problem..)
04/02/2008 13:57 Kiyono#665
Quote:
Originally Posted by katanahack View Post
Also, is there anyway to disable the commands?
put all commands on PM mode or remove them completly
[edit]is there a way to get the /item use names instead of IDs?
04/02/2008 16:17 g_elf#666
Quote:
Originally Posted by Djago160 View Post
[edit]is there a way to get the /item use names instead of IDs?
Enumerating in the code will probably work like the maps are or making a db table
04/02/2008 16:46 tanelipe#667
Load the ItemType.dat into Hashtable (containing all the shiz, easy to access also) (Decrypted one ofcourse) after that when you need to access, just foreach through it


Code:
foreach(DictionaryEntry DE in ItemDatabase)
{
   if(DE.Value.toString().Split('~')[1] == Splitter[1])
   {
      // If the Name was found
      // First one = ID, second = Name
      // Atleast this is how it's in the ItemType.dat
      // This would be rather messy way tho but... better than nothing
   }
}
04/02/2008 17:06 Kiyono#668
Quote:
Originally Posted by tanelipe View Post
Load the ItemType.dat into Hashtable (containing all the shiz, easy to access also) (Decrypted one ofcourse) after that when you need to access, just foreach through it

where exactly is the table?
04/02/2008 18:25 tanelipe#669
Uhm, I don't have this source, so I don't know if there even is table wich contains Item Informations. Best way probably would be that you make on your self (Doesn't even have to be in MySQL format if you load it directly from a .txt file from your server location.)
04/02/2008 19:11 Kiyono#670
Quote:
Originally Posted by tanelipe View Post
Uhm, I don't have this source, so I don't know if there even is table wich contains Item Informations. Best way probably would be that you make on your self (Doesn't even have to be in MySQL format if you load it directly from a .txt file from your server location.)
any suggestion how to? and i already have itemtype decrypted
04/02/2008 19:44 g_elf#671
WareHouse Deposite and Withdraw Money, still doesnt show in WH how much u have save still working on that, help would be nice ;D

@PacketHandler.cs find case 1009 subtype 10 and 11
Code:
case 10: // Warehouse <Deposit Money>
                                {
                                    Console.WriteLine("[Client Packet]Item Packet: Warehouse <Deposit Money>");
                                    int DepMoney = (data[9] << 8) + data[8];
                                    Console.WriteLine("DepMoney = " + DepMoney);
                                    Client.Char.Money -= DepMoney;
                                    Client.SendData(CPacket.Status(Client.Char, 1, Client.Char.Money, StatusTypes.InvMoney));
                                    Client.Char.WhMoney += DepMoney;
                                    Client.SendData(CPacket.Status(Client.Char, 1, Client.Char.WhMoney, StatusTypes.WhMoney));
                                    Database.UpdateCharMoney(Client);
                                    Database.UpdateCharWhMoney(Client);

                                    
                                    break;
                                }
                            case 11: // Warehouse <Withdraw Money>
                                {
                                    Console.WriteLine("[Client Packet]Item Packet: Warehouse <Withdraw Money>");
                                    int WithMoney = (data[9] << 8) + data[8];
                                    Console.WriteLine("WithMoney = " + WithMoney);
                                    if (Client.Char.WhMoney - WithMoney >= 0)
                                    {
                                        Client.Char.WhMoney -= WithMoney;
                                        Client.Char.Money += WithMoney;
                                        Client.SendData(CPacket.Status(Client.Char, 1, Client.Char.WhMoney, StatusTypes.WhMoney));
                                        Client.SendData(CPacket.Status(Client.Char, 1, Client.Char.Money, StatusTypes.InvMoney));
                                        Database.UpdateCharMoney(Client);
                                        Database.UpdateCharWhMoney(Client);
                                    }
                                    
                                    break;
                                }
@ ConquerPackets.cs find "StatusTypes" and add
EDIT:
Code:
WhMoney = 10,
@ Database.cs add

Code:
public static void UpdateCharWhMoney(COClient Client)
        {
            MySqlCommand Command = new MySqlCommand("UPDATE `Characters` Set `WHMoney` = "" + Client.Char.WhMoney + "" WHERE `CharID` = "" + Client.Char.CharID + """, DatabaseConnection);
            try
            {
                Command.ExecuteNonQuery();
            }
            catch
            {

            }
        }
hope it helps
04/03/2008 00:56 katanahack#672
Alright, so I can connect to my server, but my friend cannot. Yes I created an account for him, and yes Ports 9958 and 9960 are open on my firewall, and he is connected to the server with Hamachi.

Any Ideas?

[Edit]
When you edit the npcs to make them do stuff (talk, give items, etc), is there any way to make an NPC make you a certain level?
04/03/2008 05:45 katanahack#673
When I run COServer.exe, I get this error:

[Only registered and activated users can see links. Click Here To Register...]

See, it connects, but then as soon as the shops are loaded, it gets an error.
04/03/2008 15:09 damianpesta#674
Prolly u doin wrong sumthin or running wrong Server.exe Thats why go check again and make sure everythin is right
04/03/2008 16:53 Kiyono#675
k i ported the Mob files from the 5011 release to this one but i have 1 problem the mobs don't spawn and they don't spawn either on the 5011(or im not searching at the rright place)
and where is the HP located cause normaly you login with 1 HP and and that is...well anoying
[edit]how do you change the service messages when you login