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 08-10-2009, 10:45 PM
Taurinus
Hill Giant
 
Join Date: Jul 2009
Location: Southern United States
Posts: 107
Default Submission: #bot list

This is a change that I have committed on my end and I thought I would share it.

It uses the existing client UI interface to send the bot list to the client via Popup. It helps lower the business of the chat window. It also rectifies filtering logic (i.e. #bot list 1) for classes.

bot.cpp
Code:
2009-08-10 20:32:18.694884800 -0500
@@ -8467,7 +8467,7 @@

        if(!strcasecmp(sep->arg[1], "list")) {
                bool listAll = true;
-               int iClass = atoi(sep->arg[2]);
+               uint16 iClass = (uint16) atoi(sep->arg[2]);

                if(iClass > 0 && iClass < 17)
                        listAll = false;
@@ -8480,14 +8480,21 @@
                }

                if(!AvailableBots.empty()) {
+                       std::stringstream botListStringStream;
+                       std::string botListString;
                        for(std::list<BotsAvailableList>::iterator TempAvailable
BotsList = AvailableBots.begin(); TempAvailableBotsList != AvailableBots.end();
TempAvailableBotsList++) {
-                               if(listAll) {
-                                       c->Message(0, "ID: %u -- Class: %s -- Na
me: %s -- Race: %s", TempAvailableBotsList->BotID, ClassIdToString(TempAvailable
BotsList->BotClass).c_str(), TempAvailableBotsList->BotName, RaceIdToString(Temp
AvailableBotsList->BotRace).c_str());
+                               if(listAll) {

+
+                                       botListStringStream <<"ID: " << TempAvai
lableBotsList->BotID << " " << TempAvailableBotsList->BotName << " " << RaceIdTo
String(TempAvailableBotsList->BotRace) << " " << ClassIdToString(TempAvailableBo
tsList->BotClass) << "<br>";
+
                                }
                                else {
-                                       if(TempAvailableBotsList->BotClass == iC
lass)
-                                               c->Message(0, "ID: %u -- Class:
%s -- Name: %s -- Race: %s", TempAvailableBotsList->BotID, ClassIdToString(TempA
vailableBotsList->BotClass).c_str(), TempAvailableBotsList->BotName, RaceIdToStr
ing(TempAvailableBotsList->BotRace).c_str());
+                                       if(TempAvailableBotsList->BotClass == iC
lass)
+                                               botListStringStream <<"ID: " <<
TempAvailableBotsList->BotID << " " << TempAvailableBotsList->BotName << " " <<
RaceIdToString(TempAvailableBotsList->BotRace) << " " << ClassIdToString(TempAva
ilableBotsList->BotClass) << "<br>";
+
                                }
+                               botListString = botListStringStream.str();
+                               c->SendPopupToClient("Available Bots", botListSt
ring.c_str());
                        }
                }
                else {
I plan to also make this change to "#bot inventory list". I will post that when I have it done if anyone is interested.
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 03:49 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