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

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 07-12-2011, 04:46 PM
Criimson
Hill Giant
 
Join Date: Sep 2006
Posts: 172
Default

Hmm you did show me a flaw in my table structure. I didnt add a character column.

I was doing something like that with #bot autorune on/off

Code:
//Set if chanters automatically cast rune
	if(!strcasecmp(sep->arg[1], "autorune")) {

		std::string errorMessage;
		char* Query = 0;
		char TempErrorMessageBuffer[MYSQL_ERRMSG_SIZE];

		if (!strcasecmp(sep->arg[2], "off")){	
			if(!database.RunQuery(Query, MakeAnyLenString(&Query, "UPDATE `bot_variables` SET `values`= 0 WHERE bot_variable = 'auto_rune';"))){
					errorMessage = std::string(TempErrorMessageBuffer);
			}
		}
		else if (!strcasecmp(sep->arg[2], "on")){	
			if(!database.RunQuery(Query, MakeAnyLenString(&Query, "UPDATE `bot_variables` SET `values`= 1 WHERE bot_variable = 'auto_rune';"))){
					errorMessage = std::string(TempErrorMessageBuffer);
			}
		}
		else {
			c->Message(0,"Correct input is #bot autorune (on/off)");
		}
		return;
	}
This code works perfectly. Then in the botspellsai.cpp under case SpellType_Buff:

I was adding a check: if(IsEffectInSpell(selectedBotSpell.SpellId, SE_Rune))

and this is where it all broke down.

I am going to comment out the code and work on something else in the code for a bit. Restructured the bot_variables table so it can be set on a character by character basis. But my brain is starting to hurt.

Criimson
Reply With Quote
 

Thread Tools
Display Modes

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 08:45 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