Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bots

Development::Bots Forum for bots.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-04-2015, 12:38 PM
zhangshen147
Fire Beetle
 
Join Date: Nov 2009
Posts: 17
Default bot command change

Set #bot spawn command Character using the level limit.

add common/ruletypes.h
Code:
#ifdef BOTS
RULE_CATEGORY(Bots)
RULE_REAL(Bots, BotManaRegen, 2.0) // Adjust mana regen for bots, 1 is fast and higher numbers slow it down 3 is about the same as players.
RULE_BOOL(Bots, BotFinishBuffing, false) // Allow for buffs to complete even if the bot caster is out of mana. Only affects buffing out of combat.
RULE_INT(Bots, CreateBotCount, 150) // Number of bots that each account can create
RULE_INT(Bots, SpawnBotCount, 71) // Number of bots a character can have spawned at one time, You + 71 bots is a 12 group raid
RULE_BOOL(Bots, BotQuest, false) // Optional quest method to manage bot spawn limits using the quest_globals name bot_spawn_limit, see: /bazaar/Aediles_Thrall.pl
RULE_BOOL(Bots, BotGroupBuffing, false) // Bots will cast single target buffs as group buffs, default is false for single. Does not make single target buffs work for MGB.
RULE_BOOL(Bots, BotSpellQuest, false) // Anita Thrall's (Anita_Thrall.pl) Bot Spell Scriber quests.
RULE_INT(Bots, BotAAExpansion, 8) // Bots get AAs through this expansion
RULE_BOOL(Bots, BotGroupXP, false) // Determines whether client gets xp for bots outside their group.
RULE_BOOL(Bots, BotBardUseOutOfCombatSongs, true) // Determines whether bard bots use additional out of combat songs.
RULE_BOOL(Bots, BotLevelsWithOwner, false) // Auto-updates spawned bots as owner levels/de-levels (false is original behavior)
RULE_INT ( Bots, BotSpawnCharacterLevel, 45 ) // add custom rules to bot spawn commands to limit via character level.
RULE_CATEGORY_END()
#endif
add zone/bot.cpp
line 9403
Code:
void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
	// All bot command processing occurs here now instead of in command.cpp

	// TODO: Log any possible error messages as most of these will be MySQL error messages.
	std::string TempErrorMessage;
	int16 charlevel = (RuleI(Bots, BotSpawnCharacterLevel)); // Character level limit order bot spawn

	if(sep->arg[1][0] == '\0') {
		c->Message(13, "Bad argument, type #bot help");
		return;
and line 9767
Code:
	if(!strcasecmp(sep->arg[1], "spawn") ) {
		if(c->GetLevel() > charlevel) {
			c->Message(0, "Sorry, your level is too high to use this command.");
			return;
		}
		
		uint32 botId = GetBotIDByBotName(std::string(sep->arg[2]));
add to you mysql database
Quote:
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'Bots:BotSpawnCharacterLevel', '45', 'add custom rules to bot spawn commands to limit via character level.');
over~
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 12:30 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3