Register for your free account! | Forgot your password?

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

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

Advertisement



[Side-Project] IG# / InfamousGeek Sharp

Discussion on [Side-Project] IG# / InfamousGeek Sharp within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jul 2010
Posts: 37
Received Thanks: 8
[Side-Project] IG# / InfamousGeek Sharp

As you know me of my Basic Conquer Emulator project, this is a side-project which I thought of when going through the npc server. I decided it would be a fun experience to write a scripting language which is a modification of C#, therefore IG#. So far it only supports Console.WriteLine, but every unknown method or variable will be invoked to an event which you can eventually handle on your own. Also undefined variables must be registered before compiling the external code.

A little preview:
Code:
        static void Main(string[] args)
        {
            IGReader Reader = new IGReader();
            Reader.Load(@"C:\Users\Admin\Documents\Test.txt");
            IGCompiler Compiler = Reader.ToIGCompiler();
            Compiler.Register("dialog", 3, IGVariableType.Integer);//Defining variables
            Compiler.Compile();//Compile the code

            Console.WriteLine("[IGSharp] Executed file!");
            Reader.Dispose();
            Compiler.Dispose();
            GC.Collect();

            while (true)
                Console.ReadLine();
        }
Little example code I wrote;
Code:
if (1 == 2)
{
  Console.WriteLine(Member 1 executed!);
}
if (1 == 1)
{
  Console.WriteLine(Member 2 executed!);
}
if (2 == 2)
{
  Console.WriteLine(Member 3 executed!);
}
if(%dialog == 3)
{
   Console.WriteLine(Member 4 executed!);
}
Have a good day.
InfamousGeek is offline  
Old 07/26/2010, 17:00   #2
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,225
Received Thanks: 868
Neat, using a .dll ?
_DreadNought_ is offline  
Old 07/26/2010, 17:06   #3
 
elite*gold: 0
Join Date: Jul 2010
Posts: 37
Received Thanks: 8
Quote:
Originally Posted by Eliminationn View Post
Neat, using a .dll ?
Ofcourse. Most likely I'm stupid enough to share the source with you. Meh, if life was just that easy.
InfamousGeek is offline  
Old 07/26/2010, 17:12   #4


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Doesnt look like your going to be able to modify npc scripts on the fly with this? Unless you recompile everytime an npc is accessed which makes me wonder what the performance would be like while using this.
Korvacs is offline  
Old 07/26/2010, 17:15   #5
 
elite*gold: 0
Join Date: Jul 2010
Posts: 37
Received Thanks: 8
Quote:
Originally Posted by Korvacs View Post
Doesnt look like your going to be able to modify npc scripts on the fly with this? Unless you recompile everytime an npc is accessed which makes me wonder what the performance would be like while using this.
The speed actually is pretty fast, also the process when compiling is very light-weight. I didn't have problems when testing this with npcs, also checked with GC for the memory usage.
InfamousGeek is offline  
Old 07/26/2010, 17:18   #6


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Quote:
Originally Posted by InfamousGeek View Post
The speed actually is pretty fast, also the process when compiling is very light-weight. I didn't have problems when testing this with npcs, also checked with GC for the memory usage.
Not doubting it works, or even works well, just wondering how well it compares to other script based methods.
Korvacs is offline  
Old 07/26/2010, 17:19   #7
 
elite*gold: 0
Join Date: Jul 2010
Posts: 37
Received Thanks: 8
Quote:
Originally Posted by Korvacs View Post
Not doubting it works, or even works well, just wondering how well it compares to other script based methods.
I might compare it to LUA or do you perhaps know another quick scripting language? So that I can compare it with mine.
InfamousGeek is offline  
Old 07/26/2010, 17:44   #8


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Quote:
Originally Posted by InfamousGeek View Post
I might compare it to LUA or do you perhaps know another quick scripting language? So that I can compare it with mine.
LUA would probably give the best overall benchmark i think, personally i was thinking about something like xml based npcs, with sections containing functions which require a compiler, but i havent really decided yet, that way the scripts can be updated on the fly, and the performance hit from using a compiler would be minimal since the function is only compiled when its required.
Korvacs is offline  
Old 07/26/2010, 20:48   #9
 
elite*gold: 0
Join Date: Jul 2010
Posts: 37
Received Thanks: 8
Quote:
Originally Posted by Korvacs View Post
LUA would probably give the best overall benchmark i think, personally i was thinking about something like xml based npcs, with sections containing functions which require a compiler, but i havent really decided yet, that way the scripts can be updated on the fly, and the performance hit from using a compiler would be minimal since the function is only compiled when its required.
Its kinda harsh using xml section for npc scripting, even though that is my personal opinion.
InfamousGeek is offline  
Old 07/28/2010, 18:26   #10
 
elite*gold: 0
Join Date: Sep 2008
Posts: 1,683
Received Thanks: 506
I'm speechless.
Basser is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
Server side ann client Side things.
08/29/2011 - Battle of the Immortals - 10 Replies
Just for more we know guys.. this way none will lose his time. Wtaht we know now is: Speed: Cleint Side. Map Coord: Client side. Damage : Server Side.
Client side or server side?
01/24/2010 - CO2 Private Server - 1 Replies
I have a problem .. in karlos source 5165 with my clinet getted from webpage .. Wen a player is in PK arena and other enter to loto they seeams to be on same map .. they try to hit each other but they don't dmg .. i was looking on source and it seams all is ok because .. lady luck get u in the Loto map and ArenaGurdian take u to other map .. I think the client is massed up .. were can i find other client for 5165 .. my client is downloaded from this forum on section clinet relase
Hackable: Client side vs Server side
05/01/2008 - Dekaron - 7 Replies
I'v been reading a bit and I was already familiar with winhex and the likes, so I was able to start messing around in the Dekaron process rather easily. What I'm wondering is, what exactly can be modified, and what use it could be. For example, we know that character experience is server side, so modifying it would have no real purpose, but for some reason, it'll let you equip weapons of higher level if you meet the other requirements, which could also be modified should they need be. So all...
Character name restrictions are client side, not server side
04/24/2008 - Conquer Online 2 - 1 Replies
"Sorry non-alpha numberic....." That error message you get when you type in special characters in your character name, is client sided. It does no server check. Im not a coder or anything, so I'm not sure how to fix that. But since it is client sided, it would be a lot easier to repair this problem.
server side/client side
12/19/2005 - Conquer Online 2 - 6 Replies
hey guys, could someone make a list for me that has all the server side items and then another that has the client side items? thx in advance 8)



All times are GMT +1. The time now is 14:01.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.