Quote:
Originally Posted by abdoumatrix
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<ushort, ProjectX_V3_Game.Data.Warehouse>(); foreach (ushort whID in whids) { if (!Warehouses.TryAdd(whID, new Data.Warehouse(this, whID))) 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<ushort, ProjectX_V3_Game.Data.Warehouse>(); foreach (ushort whID in whids) { if (!Warehouses.TryAdd(whID, new Data.Warehouse(this, whID))) 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<int, BattlePet>(); 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 ?