Register for your free account! | Forgot your password?

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

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

Advertisement



Mini Project: Companions/Bots

Discussion on Mini Project: Companions/Bots within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old 05/24/2010, 23:25   #16
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Quote:
Originally Posted by Korvacs View Post
What sort of AI will you be using? Im still working on my monster AI, and at the moment it works quite well, although its difficult to test without implementing the majority of the monster system.
I'm toying with the idea of trying a neural network to have the bot 'make decisions' with but i'm kinda drawing a blank on how that would actually apply to some things.


Right now i'm just using datetimes and ints to control how often actions CAN occur and random chance combined with bot behavior types and difficulty to determine how often they DO occur... then actual actions have random chance and all that stuff in them and try to determine the best course of action (such as running through a few tries to determine which way to walk to get closer to their target coords).

Haven't done any high level ai yet though so they are still quite basic. Using a main bot thread to run all my checks and then splitting off into behavior types which splits off into types of actions (move/atk/etc)

Duelist bot isn't quite like a person but if you bump up the difficulty it puts up a hell of a fight.

I'm rewriting almost everything and taking it over to my hellmouth source (which could use a ton of cleaning) so if i get things working there i'll prob just release it as an entire source cause it really tends to run into every area of code... trying to keep it more self contained this time though.

ps. Yes, duelist bot is working now quite well.

What's your oppinion on the best way to do ai korv? I hate using sooo many if statements just to do something simple but something tells me any more advanced system will cause more problems... i do like the idea of a connectionalist structure though.. give weight to diff actions and have it spit out a choice based on the result/history of the network
pro4never is offline  
Old 05/25/2010, 07:06   #17
 
BlueFlame11's Avatar
 
elite*gold: 0
Join Date: Apr 2010
Posts: 116
Received Thanks: 12
Nice Idea it looks bad *** =P
BlueFlame11 is offline  
Old 05/25/2010, 20:06   #18
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380

Note: WATCH THE HQ VERSION. If not none of the text will be readable really. next time I'll do a proper one with annotations and w/e.


I'll record a much shorter video showing the companion bot later. This one is so long because I was writing about the upgrades I made and showing off the different difficulty levels.

Also ignore me not hitting anything, it was laggy due to recording and I wasn't really caring to try.
pro4never is offline  
Old 05/25/2010, 21:01   #19
 
xScott's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 322
Received Thanks: 63
I realy wanna try this, looks fun.
Shame my coding skills are not that great
xScott is offline  
Old 05/25/2010, 21:52   #20
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Quote:
Originally Posted by xScott View Post
I realy wanna try this, looks fun.
Shame my coding skills are not that great
Welll once i recode it into the hellmouth source and fix some of the problems i left in that version i may put a test server online. One of my friends still has his dedi server in europe that i can use. 1 gig unmetered connection ftw
pro4never is offline  
Old 05/25/2010, 22:04   #21
 
xScott's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 322
Received Thanks: 63
Quote:
Originally Posted by pro4never View Post
Welll once i recode it into the hellmouth source and fix some of the problems i left in that version i may put a test server online. One of my friends still has his dedi server in europe that i can use. 1 gig unmetered connection ftw
awesome, definitely would like to try it!
xScott is offline  
Old 05/26/2010, 20:10   #22
 
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
Heres abit of code for impulses source 5165
well I used a hashtable and added this into GameState.cs
Code:
 public void DuelistTest()
        {
            Game.Entity duelist = new Game.Entity(Game.EntityFlag.Bot);
            duelist.MapObjType = Game.MapObjectType.Bot;
            this.BotOwner = Entity;
            BotOwner = Entity;
            duelist.Name = Entity.Name + "[BOT]";
            duelist.X = Entity.X += 1;
            duelist.Y = Entity.Y += 1;
            duelist.Dodge = Entity.Dodge *= 2;
            duelist.Defence = Entity.Defence *= 2;
            duelist.MapID = Entity.MapID;
            duelist.Body = Entity.Body;
            duelist.Hitpoints = Entity.MaxHitpoints;
            duelist.Level = Entity.Level;
            duelist.Stamina = 250;
            duelist.Face = Entity.Face;
            duelist.Facing = Entity.Facing;
            duelist.HairColor = Entity.HairColor;
            duelist.HairStyle = Entity.HairStyle;
            duelist.Strength = 750;
            duelist.Agility = 750;
            duelist.Spirit = 750;
            duelist.Vitality = 750;
            duelist.Spouse = "TheServer";
            duelist.MinAttack = 500;
            duelist.MaxAttack = 3000;
            duelist.BaseMinAttack = 500;
            duelist.BaseMaxAttack = 3000;
            duelist.BaseMagicDefence = 300;
            duelist.BaseMagicAttack = 5000;
            duelist.Class = Entity.Class;
            duelist.ItemBless = Entity.ItemBless;
            duelist.ItemHP = Entity.ItemHP;
            duelist.ItemMP = Entity.ItemMP;
            duelist.PKMode = Game.Enums.PKMode.PK;
            // entity.UID = 400001;
            duelist.UID = (uint)ServerBase.Kernel.Random.Next(400000, 500000);
            ServerBase.Kernel.Bots.Add(duelist.UID, this);
            duelist.SendSpawn(this);
        }
        public void DuelistTestMove()
        {
            if (DateTime.Now > LastBotMove.AddMilliseconds(250))
            {
                LastBotMove = DateTime.Now;
                if (Game.Attacking.Calculate.PointDistance(BotOwner.X, BotOwner.Y, Entity.X, Entity.Y) >= 4)
                {
                    DuelistJumpAround();
                }
            }
        }
        void DuelistJumpAround()
        {
            BotOwner.X = (ushort)(Entity.X + ServerBase.Kernel.Random.Next(7) - ServerBase.Kernel.Random.Next(7));
            BotOwner.Y = (ushort)(Entity.Y + ServerBase.Kernel.Random.Next(7) - ServerBase.Kernel.Random.Next(7));
            BotOwner.Action = Game.Enums.ConquerAction.Jump;
        }
and these
Code:
        public static DateTime LastBotMove = DateTime.Now;
        public static DateTime LastBotAttack = DateTime.Now;
        public static bool BotInUse = false;
        public Game.Entity BotOwner;
in kernel.cs I made the top look like
Code:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Runtime.InteropServices;
and then added
Code:
public static Hashtable Bots = new Hashtable();
In program.cs I adde
Code:
        static void BotThread_Execute()
        {
           
        }
and I added
Code:
ServerBase.Thread BotThread = new ServerBase.Thread(10);
                BotThread.Execute += new Action(BotThread_Execute);
and the
Code:
GC.KeepAlive(CharacterThread); GC.KeepAlive(FloorItems); GC.KeepAlive(StatusFlagChange);
I made look like
Code:
GC.KeepAlive(CharacterThread); GC.KeepAlive(FloorItems); GC.KeepAlive(StatusFlagChange); GC.KeepAlive(BotThread);
then added the command in packerhandler.cs
Code:
case "bot":
                                        {
                                            client.DuelistTest();
                                            break;
                                        }
About 25% done. OH I also find
Code:
public enum EntityFlag : byte
    {
and make it look like
Code:
        Player = 1,
        Monster = 2,
        Bot = 3
then find
Code:
 public enum MapObjectType
    {
and make it look like
Code:
    public enum MapObjectType
    {
        Npc, Item, Monster, Player, Nothing, InvalidCast, Bot
    }
again as I said 25% done.
MonstersAbroad is offline  
Thanks
1 User
Old 05/26/2010, 20:55   #23
 
BlueFlame11's Avatar
 
elite*gold: 0
Join Date: Apr 2010
Posts: 116
Received Thanks: 12
Thanks Moster

@ThreadStarter

Teheh i think it's kind of funny you lost to a bot =P or if you weren't trying rofl
BlueFlame11 is offline  
Old 05/26/2010, 23:32   #24
 
gerble93's Avatar
 
elite*gold: 40
Join Date: Sep 2006
Posts: 1,890
Received Thanks: 805
Quote:
Originally Posted by BlueFlame11 View Post
Thanks Moster

@ThreadStarter

Teheh i think it's kind of funny you lost to a bot =P or if you weren't trying rofl
Can you beat a calculator at what it does best?
gerble93 is offline  
Thanks
3 Users
Old 05/27/2010, 00:03   #25
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Quote:
Originally Posted by gerble93 View Post
Can you beat a calculator at what it does best?
Actually when i was properly fbing with it lastnigh i was winning up to difficulty 3.

In the vid i only threw out likke 3 fb's. Total and didn't try to hit due to recording lag and trying to show off the system.


@ monster: very nice looking progress. Does any of it work yet or still writing the groundwork?

@ progress: still not adding much more till i sort out exactly how i plan to do the logic server. After talking to korvaks i'm thinking named pipes are prob the way to go to get data back and forth between game and logic server and once that's running i'l work on the test version of the neural network to give proper ai. Also started making a list of new functions i'll need to write to import world stimuli to help make decisions. Planing is coming along nicely but not a ton of hard code to show for it yet. That will be a few days at least. Glad to see all the interest on the subject.
pro4never is offline  
Thanks
1 User
Old 05/27/2010, 00:15   #26
 
BlueFlame11's Avatar
 
elite*gold: 0
Join Date: Apr 2010
Posts: 116
Received Thanks: 12
Quote:
Originally Posted by gerble93 View Post
Can you beat a calculator at what it does best?
Hey i just thought it was funny =P
BlueFlame11 is offline  
Old 05/27/2010, 01:36   #27
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Quote:
Originally Posted by BlueFlame11 View Post
Hey i just thought it was funny =P
I should have recorded the first version lol..

It would only fb when the coords chosen would hit and I forgot to reset the lastSkill datetime so it would SPAM it..


I got hit 100x per second. Lots of fun.
pro4never is offline  
Old 05/27/2010, 03:53   #28
 
ImFlamedCOD's Avatar
 
elite*gold: 0
Join Date: Jun 2009
Posts: 378
Received Thanks: 141
Quote:
Originally Posted by pro4never View Post
I should have recorded the first version lol..

It would only fb when the coords chosen would hit and I forgot to reset the lastSkill datetime so it would SPAM it..


I got hit 100x per second. Lots of fun.
So he was basically aim boting that noob ai using aimbots Good luck man .
ImFlamedCOD is offline  
Old 05/27/2010, 12:08   #29
 
ImmuneOne's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
Quote:
Originally Posted by pro4never View Post
Actually when i was properly fbing with it lastnigh i was winning up to difficulty 3.

In the vid i only threw out likke 3 fb's. Total and didn't try to hit due to recording lag and trying to show off the system.


@ monster: very nice looking progress. Does any of it work yet or still writing the groundwork?

@ progress: still not adding much more till i sort out exactly how i plan to do the logic server. After talking to korvaks i'm thinking named pipes are prob the way to go to get data back and forth between game and logic server and once that's running i'l work on the test version of the neural network to give proper ai. Also started making a list of new functions i'll need to write to import world stimuli to help make decisions. Planing is coming along nicely but not a ton of hard code to show for it yet. That will be a few days at least. Glad to see all the interest on the subject.
Automated interfaces are all based upon incoming data, also you should do a bit of a fair system for skill-wise attacks. I shall give you some examples if you come online on friday.
ImmuneOne is offline  
Old 05/27/2010, 17:13   #30
 
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
Pro4Never - can you PM me ur msn please ?
MonstersAbroad is offline  
Reply


Similar Threads Similar Threads
[Fix] Companions Disappear (5165)
03/20/2010 - CO2 PServer Guides & Releases - 14 Replies
None of you deserve this. #request close
[5165] Summoning Companions
02/14/2010 - CO2 Private Server - 10 Replies
Hey everyone, I'm using the 5165 source and I was going to replace the bat with something cooler ... but the bat, skeleton, FireEvil, and BatBoss doesn't work. Instead of summoning a bat, it does this effect (which does nothing): http://i746.photobucket.com/albums/xx110/brokentw ilight91/Capture3.png Help would be appreciated. Thank you =s
Hello fellow companions i was seeking some help.
11/25/2006 - Conquer Online 2 - 3 Replies
Hi, i recently started using a bot to lvl myself but im not quite convinced with it, my one doesn't ignite xp skills such as cyclone..and also i put in the bot to pick up items such as meteors as there is a option to do that but when theres one on the floor he doesn't pick it up..is their a new bot lvler that does all that? i tried everyway with mine but still doesnt pick items up, i looked throguh the exploits and hacks but i did not see anything as im new to all this i didn't understand much....



All times are GMT +1. The time now is 17:35.


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