Register for your free account! | Forgot your password?

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

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

Advertisement



Preview for advanced Clone bot AI

Discussion on Preview for advanced Clone bot AI within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old 10/10/2013, 19:41   #16
 
elite*gold: 0
Join Date: Sep 2012
Posts: 775
Received Thanks: 327
Quote:
Originally Posted by abdoumatrix View Post
so they r players + have special code to force them to make what u want
all players are entities but not all entities are players, aka players inhirite from entities , so nope they are not actually players but they have entities inhirting both in common, have a peak at albetrous
go for it is offline  
Old 10/10/2013, 20:41   #17
 
abdoumatrix's Avatar
 
elite*gold: 0
Join Date: Jul 2008
Posts: 874
Received Thanks: 239
Quote:
Originally Posted by go for it View Post
all players are entities but not all entities are players, aka players inhirite from entities , so nope they are not actually players but they have entities inhirting both in common, have a peak at albetrous
already had a peak at all soures and i know all of this.
but i consider them players but i moved them
abdoumatrix is offline  
Old 10/10/2013, 21:09   #18
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,223
Received Thanks: 867
Quote:
Originally Posted by abdoumatrix View Post
already had a peak at all soures and i know all of this.
but i consider them players but i moved them
You're thinking about this right, but so wrong at the same time. :P

Bots are AI'd Players, yes.

If your entity class was similar to how we have it in AcidCO, it may work.

However - GameState is designed as a front-end wrapper for a Player Entity.

NOT designed for players, GameState just has a .Entity that you can call to access that, while it handles everything else.

You should be writing your own GameState from scratch that also uses the Entity.

Here..

Check this code I did over 2 years ago for Impulses 5165 basic source... it doesn't use GameState to control the bot, just stores it so we know who the owner is.

_DreadNought_ is offline  
Old 10/10/2013, 21:35   #19
 
abdoumatrix's Avatar
 
elite*gold: 0
Join Date: Jul 2008
Posts: 874
Received Thanks: 239
Quote:
Originally Posted by _DreadNought_ View Post
You're thinking about this right, but so wrong at the same time. :P

Bots are AI'd Players, yes.

If your entity class was similar to how we have it in AcidCO, it may work.

However - GameState is designed as a front-end wrapper for a Player Entity.

NOT designed for players, GameState just has a .Entity that you can call to access that, while it handles everything else.

You should be writing your own GameState from scratch that also uses the Entity.

Here..

Check this code I did over 2 years ago for Impulses 5165 basic source... it doesn't use GameState to control the bot, just stores it so we know who the owner is.

i got it that why i say to him to use
PHP Code:
GameState Bot = new GameState(); 
or
PHP Code:
GameState Bot = new GameState(null); 
so i could easily edit it

i already taked a peaked at albertos and project x so i could have a liltte hints befor doing my own.
abdoumatrix is offline  
Old 10/10/2013, 22:17   #20
 
elite*gold: 0
Join Date: Sep 2012
Posts: 775
Received Thanks: 327
Quote:
Originally Posted by abdoumatrix View Post
i got it that why i say to him to use
PHP Code:
GameState Bot = new GameState(); 
or
PHP Code:
GameState Bot = new GameState(null); 
so i could easily edit it

i already taked a peaked at albertos and project x so i could have a liltte hints befor doing my own.
i can't really figure out what you mean at all, 2 instances for class called GameState which i duno how it's structed and the first calls the default ctor which i duno what it contains and the second calls an overloaded ctor with null which i don't still know what that contains, how could i give you any hint of which to use :O
go for it is offline  
Old 10/10/2013, 23:10   #21
 
abdoumatrix's Avatar
 
elite*gold: 0
Join Date: Jul 2008
Posts: 874
Received Thanks: 239
Quote:
Originally Posted by go for it View Post
i can't really figure out what you mean at all, 2 instances for class called GameState which i duno how it's structed and the first calls the default ctor which i duno what it contains and the second calls an overloaded ctor with null which i don't still know what that contains, how could i give you any hint of which to use :O
i used some thing like this (from ProjectX >> SuperAids)
PHP Code:
public AIBot()
        {
            
Original = new GameClient();
            
SetLevel(Enums.BotLevel.Normal);
        } 
PHP Code:
public GameClient(SocketClient socketClient)
        {
            
socketClient.Owner this;
            
socketClient.Crypto = new ProjectX_V3_Lib.Cryptography.GameCrypto(Program.Config.ReadString("GameKey").GetBytes());
            
this.socketClient socketClient;
            
_screen = new ProjectX_V3_Game.Core.Screen(this);
            
_baseentity = new BaseEntity(this);
            
_maxhp 0;
            
_maxmp 0;
            
            
_inventory = new ProjectX_V3_Game.Data.Inventory(this);
            
_equipments = new ProjectX_V3_Game.Data.Equipments(this);
            
_trade = new ProjectX_V3_Game.Data.TradeData();

            
_spelldata = new ProjectX_V3_Game.Data.SpellData(this);
            
            
_subclasses = new SubClasses();
            
            
Warehouses = new ConcurrentDictionary<ushortProjectX_V3_Game.Data.Warehouse>();
            foreach (
ushort whID in whids)
            {
                if (!
Warehouses.TryAdd(whID, new Data.Warehouse(thiswhID)))
                    throw new 
Exception("Failed to add Warehouse...");
            }
            
TournamentScore = new ProjectX_V3_Game.Tournaments.TournamentScore();
            
TournamentInfo = new ProjectX_V3_Game.Tournaments.TournamentInfo(this);
        }
        
        public 
GameClient()
        {
            
IsAIBot true;
            
this.socketClient = new ProjectX_V3_Lib.Network.SocketClient();
            
socketClient.Owner this;
            
socketClient.Crypto = new ProjectX_V3_Lib.Cryptography.GameCrypto(Program.Config.ReadString("GameKey").GetBytes());
            
            
_screen = new ProjectX_V3_Game.Core.Screen(this);
            
_baseentity = new BaseEntity(this);
            
_maxhp 0;
            
_maxmp 0;
            
            
_inventory = new ProjectX_V3_Game.Data.Inventory(this);
            
_equipments = new ProjectX_V3_Game.Data.Equipments(this);
            
_trade = new ProjectX_V3_Game.Data.TradeData();

            
_spelldata = new ProjectX_V3_Game.Data.SpellData(this);
            
            
_subclasses = new SubClasses();
            
            
Warehouses = new ConcurrentDictionary<ushortProjectX_V3_Game.Data.Warehouse>();
            foreach (
ushort whID in whids)
            {
                if (!
Warehouses.TryAdd(whID, new Data.Warehouse(thiswhID)))
                    throw new 
Exception("Failed to add Warehouse...");
            }
            
TournamentScore = new ProjectX_V3_Game.Tournaments.TournamentScore();
            
TournamentInfo = new ProjectX_V3_Game.Tournaments.TournamentInfo(this);
            
            
            
Arena = new ProjectX_V3_Game.Data.ArenaInfo(this);
            
Pets = new ConcurrentDictionary<intBattlePet>();
            
            
Permission Enums.PlayerPermission.Normal;
        } 
abdoumatrix is offline  
Old 10/10/2013, 23:18   #22
 
elite*gold: 0
Join Date: Sep 2012
Posts: 775
Received Thanks: 327
Quote:
Originally Posted by abdoumatrix View Post
i used some thing like this (from ProjectX >> SuperAids)
PHP Code:
public AIBot()
        {
            
Original = new GameClient();
            
SetLevel(Enums.BotLevel.Normal);
        } 
PHP Code:
public GameClient(SocketClient socketClient)
        {
            
socketClient.Owner this;
            
socketClient.Crypto = new ProjectX_V3_Lib.Cryptography.GameCrypto(Program.Config.ReadString("GameKey").GetBytes());
            
this.socketClient socketClient;
            
_screen = new ProjectX_V3_Game.Core.Screen(this);
            
_baseentity = new BaseEntity(this);
            
_maxhp 0;
            
_maxmp 0;
            
            
_inventory = new ProjectX_V3_Game.Data.Inventory(this);
            
_equipments = new ProjectX_V3_Game.Data.Equipments(this);
            
_trade = new ProjectX_V3_Game.Data.TradeData();

            
_spelldata = new ProjectX_V3_Game.Data.SpellData(this);
            
            
_subclasses = new SubClasses();
            
            
Warehouses = new ConcurrentDictionary<ushortProjectX_V3_Game.Data.Warehouse>();
            foreach (
ushort whID in whids)
            {
                if (!
Warehouses.TryAdd(whID, new Data.Warehouse(thiswhID)))
                    throw new 
Exception("Failed to add Warehouse...");
            }
            
TournamentScore = new ProjectX_V3_Game.Tournaments.TournamentScore();
            
TournamentInfo = new ProjectX_V3_Game.Tournaments.TournamentInfo(this);
        }
        
        public 
GameClient()
        {
            
IsAIBot true;
            
this.socketClient = new ProjectX_V3_Lib.Network.SocketClient();
            
socketClient.Owner this;
            
socketClient.Crypto = new ProjectX_V3_Lib.Cryptography.GameCrypto(Program.Config.ReadString("GameKey").GetBytes());
            
            
_screen = new ProjectX_V3_Game.Core.Screen(this);
            
_baseentity = new BaseEntity(this);
            
_maxhp 0;
            
_maxmp 0;
            
            
_inventory = new ProjectX_V3_Game.Data.Inventory(this);
            
_equipments = new ProjectX_V3_Game.Data.Equipments(this);
            
_trade = new ProjectX_V3_Game.Data.TradeData();

            
_spelldata = new ProjectX_V3_Game.Data.SpellData(this);
            
            
_subclasses = new SubClasses();
            
            
Warehouses = new ConcurrentDictionary<ushortProjectX_V3_Game.Data.Warehouse>();
            foreach (
ushort whID in whids)
            {
                if (!
Warehouses.TryAdd(whID, new Data.Warehouse(thiswhID)))
                    throw new 
Exception("Failed to add Warehouse...");
            }
            
TournamentScore = new ProjectX_V3_Game.Tournaments.TournamentScore();
            
TournamentInfo = new ProjectX_V3_Game.Tournaments.TournamentInfo(this);
            
            
            
Arena = new ProjectX_V3_Game.Data.ArenaInfo(this);
            
Pets = new ConcurrentDictionary<intBattlePet>();
            
            
Permission Enums.PlayerPermission.Normal;
        } 

it won't matter which to use but both are so for a real player, at a bot class you won't need crypto or socket or such , see how it's organized at albetrous that there is entities with common properties/feilds and methods that suits both players, monsters , pla pla to inhirite from it, that's what i meant by entity
but in the end it won't really matter but at saving some memory, you would still implement stuff you won't use as you sure would inhirite somewhere from interface or an abstract class methods which you would need to implement dummy implementation for them

__________________________________________________ _______________
im stucked at something, now the wh window request items inside where there is no way to know where it been opened from at the first place before the request
i've had a bool to be setted from the bot dialog and back to normal when the request of items in wh is being done, but that couldn't work on the vip wh (daym it looks way better) as the user can select another wh and cause the same problem over again (which there is no event happens when the user change the wh while on the vip wh window so i can use, also there is no packets sent whenever he close the wh to change the inverting of my bool after that)

so i've been forced to use the normal wh screen, but then another shit happens which is that the gold in the wh is not being requested as it was sent before when the user logs in i guess in some general data packet or tho, anyway that happenes at tq when you try to open your supouse wh and you find out that it's his/her item with your saved money

im stucked any idea panty sniffers ?
go for it is offline  
Old 10/10/2013, 23:29   #23
 
abdoumatrix's Avatar
 
elite*gold: 0
Join Date: Jul 2008
Posts: 874
Received Thanks: 239
Quote:
Originally Posted by go for it View Post
it won't matter which to use but both are so for a real player, at a bot class you won't need crypto or socket or such , see how it's organized at albetrous that there is entities with common properties/feilds and methods that suits both players, monsters , pla pla to inhirite from it, that's what i meant by entity
but in the end it won't really matter but at saving some memory, you would still implement stuff you won't use as you sure would inhirite somewhere from interface or an abstract class methods which you would need to implement dummy implementation for them
yeah i have seen .
albertos has its own upstam , upxp.
but i make mine like a player to save some time.

hasing its own bla bla is better but making him luck player save much time.
abdoumatrix is offline  
Old 10/11/2013, 00:21   #24
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,223
Received Thanks: 867
Quote:
Originally Posted by abdoumatrix View Post
yeah i have seen .
albertos has its own upstam , upxp.
but i make mine like a player to save some time.

hasing its own bla bla is better but making him luck player save much time.
Yes yes, it will save time.

That is why we're saying the next time you create an AI bot to improve upon what you have, like giving it its own proper class rather than a duck-taped GameState from Trinity lol
_DreadNought_ is offline  
Reply


Similar Threads Similar Threads
[VIDEO] Black Space 4.0 Preview 1 [Dark Orbit clone]
11/06/2012 - DarkOrbit - 9 Replies
Hello today I present you the first video of the new version of my project, Black Space 4.0 .... In Black Space you will be download the client and the server, so you will can have your own private server of DarkOrbit , and personalize it, you will can change the rewards, the prices, etc. PD : The game will have their own graphics and will be an independent game. Black Space 4.0 Preview 1 - YouTube Coming soon... In december.. ;)
★ Offshore Webspace 1 Year (Forum,Blog,FB-Clone,Shop,Youtube-Clone,OsTicket-System) ★
09/09/2012 - Social Media Trading - 11 Replies
Server Standort Romania (Offshore) ------------------------------------------------- -------------------------------------------------- ------------- ★ ★ !! Closed !! ★ ★ Kann auch auf 2 x Bezahlt werden geht aber nur bei PSC und LR die 2 zahlung muss bis 10.10.2012 bezahlt werden
[PREVIEW]Nilsator's HP - Template[PREVIEW]
12/28/2010 - Flyff Private Server - 7 Replies
Wollte hier mal meine HP vorstellen, sie ist noch nicht ganz fertig, aber hier sind schon mal einige Bilder: http://img35.imageshack.us/img35/4338/homeku.jpg http://img145.imageshack.us/img145/5646/12328261. jpg http://img210.imageshack.us/img210/62/teamjg.jpg



All times are GMT +2. The time now is 00:16.


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.