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

Development::Bots Forum for bots.

Reply
 
Thread Tools Display Modes
  #1  
Old 10-17-2009, 01:56 AM
v6greenfbird95@yahoo.com
Fire Beetle
 
Join Date: Feb 2005
Posts: 15
Default #bot archery

On my server when i attempt the #bot archery command, the client goes linkdead any ideas? or is that command just broken atm
Reply With Quote
  #2  
Old 10-17-2009, 01:03 PM
v6greenfbird95@yahoo.com
Fire Beetle
 
Join Date: Feb 2005
Posts: 15
Default

Just noticed on the servers world output it says bad/expired session key
Reply With Quote
  #3  
Old 10-19-2009, 02:32 PM
Drakson
Fire Beetle
 
Join Date: Sep 2009
Posts: 7
Default

I have the same problem. Check the logs all I see is the zone going down and the server bring it back up.

Code:
[10.19. - 13:27:31] [WORLD__CLIENT] Drakson: Entering zone hollowshade (166:0)
[10.19. - 13:27:31] [WORLD__ZONE] [50] [hollowshade] Broadcasting a world time update
[10.19. - 13:27:32] [WORLD__ZONE] [50] [hollowshade] Setting to 'hollowshade' (166:0)
[10.19. - 13:27:32] [WORLD__CLIENT] Drakson: Sending client to zone hollowshade (166:0) at 208.109.124.182:7049
[10.19. - 13:27:32] [WORLD__CLIENT] Drakson: Client disconnected (not active in process)
[10.19. - 13:29:27] [WORLD__ZONELIST] Removing zoneserver #50 at :7049
[10.19. - 13:29:27] [WORLD__ZONELIST] Hold Zones mode is ON - rebooting lost zone
[10.19. - 13:29:27] [WORLD__LAUNCH] zone: dynamic_50 reported state STOPPED (1 starts)
[10.19. - 13:29:37] [WORLD__LAUNCH] zone: dynamic_50 reported state STARTED (2 starts)
[10.19. - 13:29:37] [WORLD__ZONE] New TCP connection from 127.0.0.1:3017
[10.19. - 13:29:37] [WORLD__CONSOLE] New zoneserver #53 from 127.0.0.1:3017
[10.19. - 13:29:37] [WORLD__ZONE] [53] Zone started with name dynamic_50 by launcher zone
[10.19. - 13:29:37] [WORLD__ZONE] [53] Auto zone port configuration.  Telling zone to use port 7052
__________________
Drakson / Mythol - Raven's Paradise


Reply With Quote
  #4  
Old 12-27-2009, 07:35 PM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

I am having this problem on my server as well. When you tell the ranger to use archery, it crashes the zone.
Reply With Quote
  #5  
Old 12-28-2009, 04:32 AM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Here's the code:

zone/bot.cpp
Code:
	if(!strcasecmp(sep->arg[1], "archery")) {
		if((c->GetTarget() == NULL) || (c->GetTarget() == c) || !c->GetTarget()->IsBot()) {
			c->Message(15, "You must target a bot!");
			return;
		}

		Mob *archerbot = c->GetTarget();
		if((archerbot->GetClass()==WARRIOR)||(archerbot->GetClass()==PALADIN)||(archerbot->GetClass()==RANGER)||(archerbot->GetClass()==SHADOWKNIGHT)||(archerbot->GetClass()==ROGUE)) {
			//const Item_Struct* botweapon = database.GetItem(archerbot->CastToBot()->GetItem(SLOT_RANGE));
			const Item_Struct* botweapon = database.GetItem(archerbot->CastToBot()->GetItem(SLOT_RANGE)->item_id);
			uint32 archeryMaterial;
			uint32 archeryColor;
			uint32 archeryBowID;
			uint32 archeryAmmoID;
			uint32 range = 0;
			if(botweapon && (botweapon->ItemType == ItemTypeBow)) {
				archeryMaterial = atoi(botweapon->IDFile+2);
				archeryBowID = botweapon->ID;
				archeryColor = botweapon->Color;
				range =+ botweapon->Range;
				botweapon = database.GetItem(archerbot->CastToNPC()->GetItem(SLOT_AMMO)->item_id);
				if(!botweapon || (botweapon->ItemType != ItemTypeArrow)) {
					archerbot->Say("I don't have any arrows.");
					archerbot->CastToBot()->SetBotArcheryRange(0);
					return;
				}
				range += botweapon->Range;
				archeryAmmoID = botweapon->ID;
			}
			else {
				archerbot->Say("I don't have a bow.");
				archerbot->CastToBot()->SetBotArcheryRange(0);
				return;
			}
			if(archerbot->CastToBot()->IsBotArcher()) {
				archerbot->CastToBot()->SetBotArcher(false);
				archerbot->Say("Using melee skills.");
				archerbot->CastToBot()->BotAddEquipItem(SLOT_PRIMARY, archerbot->CastToBot()->GetBotItemBySlot(SLOT_PRIMARY, &TempErrorMessage));

				if(!TempErrorMessage.empty()) {
					c->Message(13, "Database Error: %s", TempErrorMessage.c_str());
					return;
				}
				//archerbot->SendWearChange(MATERIAL_PRIMARY);
				archerbot->CastToBot()->BotAddEquipItem(SLOT_SECONDARY, archerbot->CastToBot()->GetBotItemBySlot(SLOT_SECONDARY, &TempErrorMessage));

				if(!TempErrorMessage.empty()) {
					c->Message(13, "Database Error: %s", TempErrorMessage.c_str());
					return;
				}
				//archerbot->SendWearChange(MATERIAL_SECONDARY);
				archerbot->CastToBot()->SetBotArcheryRange(0);
			}
			else {
				archerbot->CastToBot()->SetBotArcher(true);
				archerbot->Say("Using archery skills.");
				archerbot->CastToBot()->BotRemoveEquipItem(SLOT_PRIMARY);
				//archerbot->SendWearChange(MATERIAL_PRIMARY);
				archerbot->CastToBot()->BotRemoveEquipItem(SLOT_SECONDARY);
				//archerbot->SendWearChange(MATERIAL_SECONDARY);
				archerbot->CastToBot()->BotAddEquipItem(SLOT_SECONDARY, archeryBowID);
				archerbot->CastToBot()->SendBotArcheryWearChange(MATERIAL_SECONDARY, archeryMaterial, archeryColor);
				archerbot->CastToBot()->BotAddEquipItem(SLOT_PRIMARY, archeryAmmoID);
				archerbot->CastToBot()->SetBotArcheryRange(range);
			}
		}
		else {
			archerbot->Say("I don't know how to use a bow.");
		}
		return;
	}
Just scanning through, it looks like there may be a spot or 2 that could end up with a null pointer, but adding some debugging code would help to verify.
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #6  
Old 01-07-2010, 02:45 PM
WildcardX
Developer
 
Join Date: Apr 2003
Posts: 589
Default

There is definitely an issue here that crashes the zone when you tell your bot ranger to use archery. I have reproduced this crash and I'll have a fix committed for it later today.

Thank you for reporting it.
__________________
Read my developer notes at my blog.

Quote:
If it's not on IRC, it ain't l33t!
Reply With Quote
  #7  
Old 01-07-2010, 04:27 PM
WildcardX
Developer
 
Join Date: Apr 2003
Posts: 589
Default

I just committed a fix to address this issue. Download at least r1082 from the repo and give it a try.
__________________
Read my developer notes at my blog.

Quote:
If it's not on IRC, it ain't l33t!
Reply With Quote
  #8  
Old 01-07-2010, 04:36 PM
Lillu
Hill Giant
 
Join Date: Sep 2008
Posts: 204
Default

WildcardX, you are a hero. Thanks for all your hard work!
__________________
Reply With Quote
  #9  
Old 01-07-2010, 06:17 PM
WildcardX
Developer
 
Join Date: Apr 2003
Posts: 589
Default

I love your love.
__________________
Read my developer notes at my blog.

Quote:
If it's not on IRC, it ain't l33t!
Reply With Quote
  #10  
Old 01-09-2010, 09:43 PM
prickle
Hill Giant
 
Join Date: Sep 2009
Posts: 147
Default

question out of curiosity, because I haven't tried it since I discovered archery crashed my zone server. Now that it's fixed, will the bots you tell to use archery remember to use archery when you camp and respawn them? Or will you need to tell them to use archery again on respawn?
Reply With Quote
  #11  
Old 04-28-2010, 03:05 AM
HHocker
Fire Beetle
 
Join Date: May 2007
Posts: 2
Default

Do these ranger bots need arrows in the apprpriate slot? I hope they do not need arrows. I am getting the rangers to go with the bow but they melee anyway. So they equip it then engage with swords.
Reply With Quote
  #12  
Old 04-28-2010, 04:12 AM
Frosef
Sarnak
 
Join Date: Mar 2010
Posts: 36
Default

Quote:
Originally Posted by HHocker View Post
Do these ranger bots need arrows in the apprpriate slot? I hope they do not need arrows. I am getting the rangers to go with the bow but they melee anyway. So they equip it then engage with swords.
From my testing they have the Endless Quiver AA from the getgo, I gave my Ranger bot a bow and single arrow, and the arrow never disappeared.
Reply With Quote
  #13  
Old 04-29-2010, 01:59 AM
HHocker
Fire Beetle
 
Join Date: May 2007
Posts: 2
Default

Figures it would be so simple. Haha, thanks
Reply With Quote
Reply

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