Preview for advanced Clone bot AI

10/10/2013 19:41 go for it#16
Quote:
Originally Posted by abdoumatrix View Post
so they r players + have special code to force them to make what u want :D
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
10/10/2013 20:41 abdoumatrix#17
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:D
10/10/2013 21:09 _DreadNought_#18
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:D
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.

[Only registered and activated users can see links. Click Here To Register...]
10/10/2013 21:35 abdoumatrix#19
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.

[Only registered and activated users can see links. Click Here To Register...]
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.
10/10/2013 22:17 go for it#20
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
10/10/2013 23:10 abdoumatrix#21
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;
        } 
10/10/2013 23:18 go for it#22
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 ?
10/10/2013 23:29 abdoumatrix#23
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.
10/11/2013 00:21 _DreadNought_#24
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