| 
   | 
   | 
  
 
    | 
    | 
    | 
  
 
    | 
   | 
    | 
  
 
    | 
   | 
    | 
  
 
    | 
   | 
    | 
  
 
   | 
  
	
		
   
   
      | Development::Bots Forum for bots. | 
    
    
   
		 
	 
 
	
	
		
	
	
 
    | 
   | 
    | 
  
 
	
		
		
		
			
			 
			
				07-04-2015, 12:38 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Fire Beetle 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Nov 2009 
					
					
					
						Posts: 17
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
				 
				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~  
		
	
		
		
		
		
		
		
		
		
		
	
		
			
			
			
			
				 
			
			
			
			
			
			
				
			
			
			
		 
		
	
	
	 | 
 
 
 
    | 
   | 
    | 
  
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				07-04-2015, 01:48 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Administrator 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: May 2013 
					Location: United States 
					
					
						Posts: 1,604
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		The way you did this, upon merging people will have to add this rule to their database manually, having a RULE_BOOL with a default value of false to check if the rule is enabled and if their level is greater than the RULE_INT value. 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				07-04-2015, 02:06 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Fire Beetle 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Nov 2009 
					
					
					
						Posts: 17
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		
	Quote: 
	
	
		
			
				
					Originally Posted by  Kingly_Krab
					 
				 
				The way you did this, upon merging people will have to add this rule to their database manually, having a RULE_BOOL with a default value of false to check if the rule is enabled and if their level is greater than the RULE_INT value. 
			
		 | 
	 
	 
 sorry ~ Forgot to amend the database, has been corrected.   
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				07-05-2015, 09:16 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Administrator 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: May 2013 
					Location: United States 
					
					
						Posts: 1,604
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		I will be adding this in my next pull request with it turned off by default. Once I get it merged I'll make another post here. Cool idea, I don't see why it can't be done, that's what rules are for, optional functionality. 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				07-06-2015, 09:23 AM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Administrator 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: May 2013 
					Location: United States 
					
					
						Posts: 1,604
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		Here's my  pull request. I added the ability to optionally enable it as well as a default value of 0 on the level required.  
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				07-06-2015, 02:58 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Administrator 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: May 2013 
					Location: United States 
					
					
						Posts: 1,604
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		Implemented as of  this commit.  
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				07-07-2015, 11:58 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Fire Beetle 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Nov 2009 
					
					
					
						Posts: 17
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		
	Quote: 
	
	
		
			
				
					Originally Posted by  Kingly_Krab
					 
				 
				
			
		 | 
	 
	 
  ,its a good job~ 
But you seem to have forgotten database SQL settings.
 
	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.');
			
		 | 
	 
	 
  
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				07-08-2015, 12:12 AM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Administrator 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: May 2013 
					Location: United States 
					
					
						Posts: 1,604
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		It's not necessary to have those since it has a default value, but you can add them to the database if you want to change them. 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
 
	
		
	
	
	
	
	| Thread Tools | 
	
 
	| 
	
	
	
	 | 
	
 
	| Display Modes | 
	
 
	
	
	
	
		  Linear Mode 
		
		
	 
	
	 | 
	
	
 
 
	
		
	
		 
		Posting Rules
	 | 
 
	
		
		You may not post new threads 
		You may not post replies 
		You may not post attachments 
		You may not edit your posts 
		 
		
		
		
		
		HTML code is Off 
		 
		
	  | 
 
 
	 | 
	
		
	 | 
 
 
All times are GMT -4. The time now is 01:17 AM. 
 
		 
	 
 
 
     | 
     | 
    
   
      | 
     | 
      | 
    
   
     | 
      | 
     | 
    
   
       | 
      | 
       | 
     
    
    
  | 
   |