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

Development::Bots Forum for bots.

Reply
 
Thread Tools Display Modes
  #1  
Old 07-05-2011, 12:19 PM
Criimson
Hill Giant
 
Join Date: Sep 2006
Posts: 172
Default Anyone able to help

So I have been having a bitch of a time with a conversion.
Tried everything I could think of and no luck.
Anyone able to help with this?

Code:
//Criimson added Bot follow distance - SetFollowDistance
	if(!strcasecmp(sep->arg[1], "setfollowdistance")) {
		if((c->GetTarget() == NULL) || (c->GetTarget() == c) || (!c->GetTarget()->IsBot()) ) {
			c->Message(15, "You must target a bot!");
		}
		else {
			//string strConvert = (sep->arg[2]);
			//c->Message(15, strConvert);
			//int32 BotFollowDistance = atoi(strConvert.c_str());
			//int32 BotFollowDistance = atoi(strConvert);
			//int32 BotFollowDistance = atoi(sep->arg[2]);
			//int32 BotFollowDistance = Convert::ToInt32((sep->arg[2]), 16);
			//SetFollowDistance(BotFollowDistance);
		}

		return;
	}

LEft all the things Ive tried in comments so I could look it over as I scratched me head.
Thank you
Criimson
Reply With Quote
  #2  
Old 07-05-2011, 01:00 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

Seems like
Code:
int32 BotFollowDistance = atoi(sep->arg[2]);
which you have already tried, should work, however you will also want to use
Code:
c->GetTarget()->SetFollowDistance(BotFollowDistance);
rather than just
Code:
SetFollowDistance(BotFollowDistance);
Reply With Quote
  #3  
Old 07-05-2011, 01:46 PM
Criimson
Hill Giant
 
Join Date: Sep 2006
Posts: 172
Default

I love you.

Works like a charm. Now I can set all of my bots at different distances. Melees close and casters far, with none of them standing on the other.

Thank you

Criimson
Reply With Quote
  #4  
Old 07-06-2011, 10:06 AM
revloc02c's Avatar
revloc02c
Hill Giant
 
Join Date: Aug 2010
Location: UT
Posts: 215
Default

Quote:
Originally Posted by Criimson View Post
I love you.
ROFL

I know exactly how you feel--pullin your hair out for hours and then some kind soul finally shows you the way.
Reply With Quote
Reply


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 06:53 PM.


 

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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3