Register for your free account! | Forgot your password?

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

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

Advertisement



[Development] 4267 Private server built using the Typesafe stack (Scala, Akka)

Discussion on [Development] 4267 Private server built using the Typesafe stack (Scala, Akka) within the CO2 Private Server forum part of the Conquer Online 2 category.

Closed Thread
 
Old 07/13/2014, 02:32   #31
 
tkblackbelt's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 266
Received Thanks: 85
Quote:
Originally Posted by sliwamaster View Post
I will be waiting, my heart hurts when i see actually Conquer..


I think that You founded one tester ^^
My english is not very well, it's not mine native language but I can help from now if You need of course ;p
Awesome thanks I will let you and everyone else know when the server is ready for beta testing.

Currently Implementing guilds.
tkblackbelt is offline  
Thanks
1 User
Old 07/16/2014, 03:46   #32
 
tkblackbelt's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 266
Received Thanks: 85
Almost finished guilds.

Edit: Just noticed join isn't working. When I try to join a guild in the client no packet is being sent to the server. Anyone know why that would happen? I'm sending the guild id & rank in the entity spawn packet and then setting the guild name using the string packet. Isn't that all the client needs for guild information?

Lmao fixed. It was being sent the whole time.

Picture is unrelated to issue
tkblackbelt is offline  
Thanks
1 User
Old 07/16/2014, 04:58   #33
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,211
Received Thanks: 4,114
I am quite amused by your testing parameters.
Spirited is offline  
Old 07/23/2014, 23:02   #34
 
CriticallyDev's Avatar
 
elite*gold: 0
Join Date: May 2012
Posts: 87
Received Thanks: 4
Wish you the best of luck! Can't wait to try it out, this patch in my opinion was one of the best TQ had came out with. anything above 5017 just killed CO. xD
CriticallyDev is offline  
Old 07/24/2014, 05:12   #35
 
tkblackbelt's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 266
Received Thanks: 85
Quote:
Originally Posted by CriticallyDev View Post
Wish you the best of luck! Can't wait to try it out, this patch in my opinion was one of the best TQ had came out with. anything above 5017 just killed CO. xD

Quote:
Originally Posted by CriticallyDev View Post
Wish you the best of luck! Can't wait to try it out, this patch in my opinion was one of the best TQ had came out with. anything above 5017 just killed CO. xD
Thanks for the interest I really enjoy this patch level as well. I'm still aiming for a closed beta around September.

______________


Just want to tell you guys how I'm handling npc scripts

High level overview.

When the server loads up, using a plugin system it finds all classes that are inheriting from NpcScript and builds up a map[Int, NpcScript]. Once these have been loaded my npc actors pull in their related script. If no script is available it default to a singleton instance that simple sends a message containing the npcs id. Each time a npc actor receives a interaction request the script is ran asynchronously using a Future. I'm using this plugin system for item usage, mob ai's (for example, one for guards and another for mobs), event scheduling, etc.

Details

The core part of NpcScript is the @Response annotation. When a method defines this it will have a link id generated and be added to an internal data structure using reflection. When a message comes in, the method with the related link is called dynamically. I also added a method(name) function that looks up the link id of a method. I find explicitly hard coding the link ids all over ugly as fuck and makes it much harder to read.

The other optional core method is handleCallback(implicit cmd: ServerNpcCommand, client: ActorRef). This function is called when a internal message is sent to the npc. For example say an NPC is checking whether a character has a specific item in their inventory. The npc actor doesn't have direct access to the character actors state. In order to check if he has an item the npc can send a DoYouHaveItem(id) message and then the client actor will response with yes or no. This function will be called in those situations.

Below is how the Twin City conductress is implemented. I haven't added gold checks yet
Code:
/**
 * Responsible for teleporting a character in TwinCity to different cities at a defined cost
 * @see TCConductress#cost
 */
class TCConductress extends NpcScript {

  lazy val market = RespawnPoints.respawnPoints.get(MapIDs.Market).get
  lazy val ape     = GamePortals.findPortal(MapIDs.ApeMoutain, MapIDs.TwinCity)
  lazy val desert = GamePortals.findPortal(MapIDs.DesertCity, MapIDs.TwinCity)
  lazy val bi        = GamePortals.findPortal(MapIDs.BirdIsland, MapIDs.TwinCity)
  lazy val pc        = GamePortals.findPortal(MapIDs.PhoenixCastle, MapIDs.TwinCity)
  val id  = 10050
  val cost = 100

  override def handle(implicit event: NpcInteraction, client: ActorRef) {
    method(event.linkID).invoke(this, event, client)


    @ResponseInit
    def init() {
      Options(
        "Welcome to the Twin City Conductress. Where would you like to go?",
        "No thanks",
        "Ape Mountain" -> method("toApe"),
        "Bird Island" -> method("toBI"),
        "Desert City" -> method("toDC"),
        "Phoenix Castle" -> method("toPC"),
        "Market" -> method("toMarket")
      )
    }

    @Response
    def toApe() =
      sendToClient(TeleportTo(ape.toMap, ape.toX, ape.toY))

    @Response
    def toBI() =
      sendToClient(TeleportTo(bi.toMap, bi.toX, bi.toY))

    @Response
    def toDC =
      sendToClient(TeleportTo(desert.toMap, desert.toX, desert.toY))

    @Response
    def toPC =
      sendToClient(TeleportTo(pc.toMap, pc.toX, pc.toY))

    @Response
    def toMarket =
      sendToClient(TeleportTo(market.revivemapid, market.revivex, market.revivey))

  }
}
Let me know what you guys think.

Also digital ocean is freaking amazing for remote testing. I can spin up an SSD VPS in seconds for an hour or so and only get charged about 5 cents. The server is running perfectly fine on a 2CPU/2GIG/40SSD Linux VPS.
tkblackbelt is offline  
Old 07/24/2014, 12:27   #36
 
turk55's Avatar
 
elite*gold: 130
Join Date: Oct 2007
Posts: 1,652
Received Thanks: 701
Quote:
Originally Posted by tkblackbelt View Post

Also digital ocean is freaking amazing for remote testing. I can spin up an SSD VPS in seconds for an hour or so and only get charged about 5 cents. The server is running perfectly fine on a 2CPU/2GIG/40SSD Linux VPS.
Just like except that you would of gotten 4gb ram, 65gb storage and 4000gb data transfer
turk55 is offline  
Thanks
1 User
Old 07/24/2014, 14:16   #37
 
tkblackbelt's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 266
Received Thanks: 85
Quote:
Originally Posted by turk55 View Post
Just like except that you would of gotten 4gb ram, 65gb storage and 4000gb data transfer
Haha there's always another service that offers a bit more for the same or less cost. Thanks for letting me know. I'll probably stick with DO for now as I've heard good things about them and they work great for my needs.
tkblackbelt is offline  
Thanks
1 User
Old 07/24/2014, 15:24   #38
 
turk55's Avatar
 
elite*gold: 130
Join Date: Oct 2007
Posts: 1,652
Received Thanks: 701
Quote:
Originally Posted by tkblackbelt View Post
Haha there's always another service that offers a bit more for the same or less cost. Thanks for letting me know. I'll probably stick with DO for now as I've heard good things about them and they work great for my needs.
Or perhaps because you had to put money on your account haha.

Edit: If you plan on using Vultr later, do you mind using my referrer link ?
turk55 is offline  
Old 07/24/2014, 15:53   #39
 
tkblackbelt's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 266
Received Thanks: 85
Quote:
Originally Posted by turk55 View Post
Or perhaps because you had to put money on your account haha.

Edit: If you plan on using Vultr later, do you mind using my referrer link ?
Lol yeah, I already put $15 [emoji1]

Sure pm me your link and if I decide to try them out later I'll use it.
tkblackbelt is offline  
Closed Thread


Similar Threads Similar Threads
[Development] 4267 conquer server.
06/16/2010 - CO2 Private Server - 408 Replies
Heya, I've started a new development for a classic co server as I never saw one succesfull build up with a from scratch written and not leeched source. We're currently aiming to add-in bot protection, proxy detection and various protections to prevent hacking. So let's talk more about the source itsself, It's made from scratch and self written socket system, database handling is currently flatfile based. The loginserver is done but we're working on the gameserver now. (Will be...



All times are GMT +2. The time now is 20:31.


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.