Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 22:28

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Development] KraHen`s devblog

Discussion on [Development] KraHen`s devblog within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1


 
KraHen's Avatar
 
elite*gold: 0
Join Date: Jul 2006
Posts: 2,216
Received Thanks: 793
[Development] KraHen`s devblog

Okay, so I thought I`d create a separate blog for my dev process of ProjectX and leave the other thread for everything else related to the server, such as discussions about design, gameplay, etc. I need something like this to keep reminders, etc.

So basically, if you don`t know what this is for, check out

About :
Source written in C# using .NET. External libraries used so far : NHibernate, CSScript. One more time, special thanks to pro4never for the packets in Albetros.

Done
  • Auth server (handles login, ban, etc.)
  • Game encryption setup
  • Characters properly saving/loading from MySQL (using NHibernate)
  • Proper login if the user has a character
  • Move/Run (no steed considered yet), have to add speedhack protection
  • Jump (have to add speedhack protection + DMap validation)
  • Screening system for Players and NPCs (this was bugging me a lot)
  • Chat (Talk, Whisper)
  • NPC loading from cq_npc using MySQL / NHibernate
  • NPC dialogs, face, options, etc. you know
  • NPC scriping using C# via CSScript
  • Item information classes (like the domains for NHibernate)
  • Item information loading from SQL
  • Item-related packets` implementation
  • Inventory
  • Item equipment (and finish the spawnpacket as well, at least the part I did finish)
  • Proficiencies
  • Sync packet, stat calculations(besides mana), stat window (for the stats I use so far)

Latest screenshot


Latest addition
External scripting for NPCs using C#. Here`s how the first script looks like :
PHP Code:

using System
;
using ProjectXGame;
using ProjectXGame.NPC;
using ProjectXGame.Client;


    public class 
NPCScript
    
{
        
// GuildChief in Twin City
        
private byte m_Face 6;    // Face nr - avatar
        
public byte Face() { return m_Face;}

        public 
void Execute(byte linkPlayerNPCHandler NPC)
        {
            switch (
link)
            {
                case 
0:
                    {
                        
NPC.AddTextLine("Welcome, " NPC.MyClient.Character.Data.Name "! I was sent here to aid developers with their needs! What can I help you with?");
                        
NPC.AddOption("KraHen`s TODO list"2);
                        
NPC.AddOption("Nothing, thanks."255);
                        break;
                    }
                case 
2:
                    {
                        
NPC.AddTextLine("TODO : " Kernel.TODO);
                        
NPC.AddOption("Thanks."255);
                        break;
                    }
            }
            
NPC.SendNPCData();
        }
    } 
SOON-TODO list - stuff I plan to implement in the near future
  • Portals
  • DMap support for setting the client`s location, also portal validation so there`s no teleport exploit using this
  • Attack handler - melee, weapon skills
KraHen is offline  
Thanks
3 Users
Old 12/06/2011, 14:32   #2
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
Without you it wouldn't be this far :3<3
BaussHacker is offline  
Old 12/06/2011, 23:00   #3
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,211
Received Thanks: 4,114
Looks bad-***. =p It's scary seeing more and more people knowing how to code well.
Tell me more about how you're doing things.
Spirited is offline  
Old 12/06/2011, 23:05   #4
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
Quote:
Originally Posted by Fаng View Post
Looks bad-***. =p It's scary seeing more and more people knowing how to code well.
Tell me more about how you're doing things.
Lol. He was a good coder, before you joined this community :P
BaussHacker is offline  
Thanks
1 User
Old 12/06/2011, 23:15   #5
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,211
Received Thanks: 4,114
Quote:
Originally Posted by BaussHacker View Post
Lol. He was a good coder, before you joined this community :P
Mk. Well he's better than he was when I first saw him.
Spirited is offline  
Old 12/06/2011, 23:16   #6
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
Looking good. You mentioned you're using npcs from binaries though. I assume that's just to fill in missing npcs cause then you go on to show a custom scripting system you're writing so I'm a tad confused there ahah.

Looks nice though ^^.
pro4never is offline  
Old 12/07/2011, 10:20   #7


 
KraHen's Avatar
 
elite*gold: 0
Join Date: Jul 2006
Posts: 2,216
Received Thanks: 793
Let me explain a bit clearer, lol. I`m using the binary database (cq_npc) for the NPC spawns only.

And don`t praise my skills until this gets tested in a larger scale as well lol. Also this would be nowhere so far without Albetros, that thing makes my work a lot easier, having to code only my systems and not structure stuff.

By the way, I`d like to get your opinions about coding the inventory. I mean the database part. I was thinking of coding a DB for all items that were added throughout the games, and looping through that when I retrieve the items. When I`d add them, I wouldn`t store them immediately, just on logout. UID`s won`t be a problem since I`ll calculate next item UID everytime I add an item (I actually store the last item UID in a txt file lol). Any better ideas?
KraHen is offline  
Old 12/07/2011, 10:43   #8
 
Arco.'s Avatar
 
elite*gold: 0
Join Date: Feb 2011
Posts: 335
Received Thanks: 170
Quote:
Originally Posted by KraHen View Post
Let me explain a bit clearer, lol. I`m using the binary database (cq_npc) for the NPC spawns only.

And don`t praise my skills until this gets tested in a larger scale as well lol. Also this would be nowhere so far without Albetros, that thing makes my work a lot easier, having to code only my systems and not structure stuff.

By the way, I`d like to get your opinions about coding the inventory. I mean the database part. I was thinking of coding a DB for all items that were added throughout the games, and looping through that when I retrieve the items. When I`d add them, I wouldn`t store them immediately, just on logout. UID`s won`t be a problem since I`ll calculate next item UID everytime I add an item (I actually store the last item UID in a txt file lol). Any better ideas?
Regarding the DB, we talking flatfile or sql?
Arco. is offline  
Old 12/07/2011, 11:30   #9


 
KraHen's Avatar
 
elite*gold: 0
Join Date: Jul 2006
Posts: 2,216
Received Thanks: 793
MySQL, it even says so in my starter post. Using NHibernate.
KraHen is offline  
Old 12/07/2011, 11:34   #10


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
If hes got sense its Sql, your database idea for items is good, you should extend it to include all forms of item storage.

I disagree entirely with your "I wouldn`t store them immediately, just on logout" as if your server crashes in such a way that you cannot perform the storing then you immediately rollback items by an entire users session, far from an optimal solution - a complete rollback is better than a partial one, and no rollback due to real-time updating is better than both. Sql is designed to be used under heavy load so it should be used accordingly.

And to be honest i dont really agree with this type of scripted npc dialogue anymore, be that internal or external.
Korvacs is offline  
Thanks
1 User
Old 12/07/2011, 11:41   #11


 
KraHen's Avatar
 
elite*gold: 0
Join Date: Jul 2006
Posts: 2,216
Received Thanks: 793
Quote:
Originally Posted by Korvacs View Post
If hes got sense its Sql, your database idea for items is good, you should extend it to include all forms of item storage.

I disagree entirely with your "I wouldn`t store them immediately, just on logout" as if your server crashes in such a way that you cannot perform the storing then you immediately rollback items by an entire users session, far from an optimal solution - a complete rollback is better than a partial one, and no rollback due to real-time updating is better than both. Sql is designed to be used under heavy load so it should be used accordingly.

And to be honest i dont really agree with this type of scripted npc dialogue anymore, be that internal or external.
What has changed your mind regarding the NPC scripting? And thanks for the upper info.
KraHen is offline  
Old 12/07/2011, 12:20   #12


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
I just dont feel its as flexible as it could be, which i guess is abit strange but there are definitely better ways to do scripting.
Korvacs is offline  
Old 12/07/2011, 12:28   #13


 
KraHen's Avatar
 
elite*gold: 0
Join Date: Jul 2006
Posts: 2,216
Received Thanks: 793
There sure would be better options if it was only intended for NPC dialogs, etc, but these are pretty much universal scripts, so I can do w/e I want in them externally, like tournaments, etc. And it`s intended for internal developers only, so yeah. That`s why I like it at least.
KraHen is offline  
Old 12/07/2011, 12:50   #14


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
Im talking about universal though, not just text.
Korvacs is offline  
Old 12/07/2011, 13:22   #15


 
KraHen's Avatar
 
elite*gold: 0
Join Date: Jul 2006
Posts: 2,216
Received Thanks: 793
Inventory loading/saving(which is actually item saving but meh) added. It`s just a dictionary lol. And wrote some new methods and constructors for the Item class, such as converting a GameItemDomain(just a data holder for nhibernate) to ConquerItem etc. Now working on Equipment.

EDIT:

Removed all bugs related to this, basically stuff I didn`t think about before testing. Now it works as intended.
KraHen is offline  
Reply


Similar Threads Similar Threads
[Development] i need help here :)
06/15/2011 - Runescape Private Server - 11 Replies
hi guys i have a lot of friends wanna me make private server for runescape and i don't know what i have to do to make one with nice function so can anyone till me how i can code something like that im C# programmer so is it good to create something like that or what !!!!!!!
EVE - Neuer DevBlog und atemberaubende Char. erstellung
01/01/2011 - Gaming News - DE - 13 Replies
Die meisten welche an EvE Online denken, denken an Raumschiffe und Planten, doch es gibt noch mehr. Jemand muss ja die Dinger steuern oder nicht ? Genau der Charakter , dieser Tritt in EVE immer mehr in den Vordergrund, auch in dem nächsten Update Incursion. Dabei wird ein wirklich atemberaubender detailreicher neuer Charakter-Editor eingebaut. Dieser wird aller wahrscheinlichkeit schon ein Schritt in richtung Dust 514 gehen, da man im moment noch im Spiel nicht sehr viel vom Charakter erlebt. ...
[Development] CPX 3G
09/05/2010 - CO2 Private Server - 6 Replies
I know, I know. My last project didn't go too well because it was really rubbish, I guess me and Nullable both agree on that. So yeah, I decided to take this project into development again for those who actually followed the development of the previous project. I'm writing a new source this time, using different methods and actually have gained more information about certain things. Some examples; Mapping system: private Dictionary<uint, IMap> mapCollection; IMap interface: ...
New bot development
12/19/2008 - Archlord - 16 Replies
Ok, i decided to make a new thread for this. So basically we have nothing, we're starting from scratch. So our obvious obstacle is: packet encryption From my testing I've discovered the whole packet where the "session key" is sent. Meaning I don't know specifically what in the packet is the session key. I can do all the programming for the bot, packet handling, GUI etc. But I do need a team, or people willing to help. Mostly I someone who can analyze the client and find the...
New Bot in Development.
03/02/2008 - Conquer Online 2 - 19 Replies
If this is not the correct place for this, then please move it mods, i was unsure of where to put it. For the DMapViewer, go to: http://www.elitepvpers.com/forum/co2-main-discussi ons-questions/113588-dmap-file-parsing.html I've started development on my new bot, it will not be standalone due to the fact that there would be to many things to code, perhaps in the future once everything has been mapped/able to be replicated it can move to standalone, but for now, it will act as a proxy,...



All times are GMT +2. The time now is 22:28.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.