View Single Post
  #2  
Old 02-07-2014, 07:34 PM
DrakePhoenix
Fire Beetle
 
Join Date: Jan 2014
Posts: 22
Default

I can't speak to the other issues, but for limiting the classes that are available to bots, take a look at bot.cpp, specifically the Bot::IsValidRaceClassCombo() function and the Bot::ProcessBotCommands(Client *c, const Seperator *sep) function (namely the section beginning "if(!strcasecmp(sep->arg[1], "create"))"). I believe a change to either of them should allow you to accomplish the limitation you want, but my personal choice would be to set the limitation in the ProcessBotCommands function.

Basically (if you go with the ProcessBotCommands function), what you would want to do is limit the valid class id's that are allowable input for arg[3]. By simply removing the class id's that you want to disallow, you would make it so that the #bot create command would always fail if someone tried to create a bot with a class other than the ones you want to allow.

Be sure to back up your file before you change it. I personally also recommend commenting out the original code that you are going to change, adding in an uncommented duplicate of the original code, and then change the duplicate to work the way you want. I would also suggest that you consider altering the "Usage: #bot create..." message to include more complete information informing users of the class restriction for bots.

Hope that helps,
Drake Phoenix
Reply With Quote