|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
Development::Bots Forum for bots. |

08-11-2009, 09:07 AM
|
Discordant
|
|
Join Date: Jan 2002
Posts: 305
|
|
Interesting. I've never messed with bots before but I read on the EQLive forums that NPCs only have one bracer, earring, and ring slot. Apparently we're doing better in that area than them 
|

08-11-2009, 02:05 PM
|
Developer
|
|
Join Date: Apr 2003
Posts: 589
|
|
i still think Sony stole their mercs from our bots. I believe we had bots before they had mercs.
__________________
Read my developer notes at my blog.
Quote:
If it's not on IRC, it ain't l33t!
|
|

08-11-2009, 05:09 PM
|
Hill Giant
|
|
Join Date: Jul 2009
Location: Southern United States
Posts: 107
|
|
r920 seems to have removed the need for a popup for inventory purposes. Great job on that.
I still feel that a popup for the bot list is cleaner, though. You may have another idea for this, I know.
|

08-11-2009, 05:23 PM
|
Developer
|
|
Join Date: Apr 2003
Posts: 589
|
|
i think both have their purposes.. Again, for your popup window I am thinking something more along the lines of all the info you get as a character by pressing your "I" key, but for bots.
__________________
Read my developer notes at my blog.
Quote:
If it's not on IRC, it ain't l33t!
|
|

08-11-2009, 08:08 PM
|
Hill Giant
|
|
Join Date: Jul 2009
Location: Southern United States
Posts: 107
|
|
I am still working with the inventory popup and I can display the stats just fine. The problem I am having is prettying it up, because it seems the popup window does accept most html tags but does not display them properly (i.e. tables). The html support is pretty rudimentary, so I am going to be limited as to just how good it can look.
I will post a diff later this evening.
|

08-11-2009, 08:24 PM
|
Developer
|
|
Join Date: Apr 2003
Posts: 589
|
|
Just do the best you can.
__________________
Read my developer notes at my blog.
Quote:
If it's not on IRC, it ain't l33t!
|
|
 |
|
 |

08-11-2009, 10:40 PM
|
Hill Giant
|
|
Join Date: Jul 2009
Location: Southern United States
Posts: 107
|
|
Here is my work so far:
New bot command "stats" is implemented. You get a popup with all of your bot's vitals.
Includes revised "inventory list" as well as revised "list".
So now we would have bot inspection for inventory purposes, a listing via popup for slot reference, a stat listing. The only problem you might have with the diff is that I pulled out all of the chat messages being sent to the client for inventory lists. This kinda kills the item links as they do not work with the popups (yet? dunno if it is even possible. Bogus data is being sent to highlight the item in the popup).
Plus, yea, the popups are kinda no-frills.
Anyway, here it is:
Code:
@@ -8479,7 +8479,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;
@@ -8492,15 +8492,19 @@
}
if(!AvailableBots.empty()) {
+ std::stringstream botListStringStream;
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());
+ botListStringStream <<"ID: " << TempAvai
lableBotsList->BotID << " " << TempAvailableBotsList->BotName << " " << RaceIdTo
String(TempAvailableBotsList->BotRace) << " " << ClassIdToString(TempAvailableBo
tsList->BotClass) << "<br>";
+ //c->Message(0, "ID: %u -- Class: %s --
Name: %s -- Race: %s", TempAvailableBotsList->BotID, ClassIdToString(TempAvailab
leBotsList->BotClass).c_str(), TempAvailableBotsList->BotName, RaceIdToString(Te
mpAvailableBotsList->BotRace).c_str());
}
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());
+ botListStringStream <<"ID: " <<
TempAvailableBotsList->BotID << " " << TempAvailableBotsList->BotName << " " <<
RaceIdToString(TempAvailableBotsList->BotRace) << " " << ClassIdToString(TempAva
ilableBotsList->BotClass) << "<br>";
+ //c->Message(0, "ID: %u -- Class
: %s -- Name: %s -- Race: %s", TempAvailableBotsList->BotID, ClassIdToString(Tem
pAvailableBotsList->BotClass).c_str(), TempAvailableBotsList->BotName, RaceIdToS
tring(TempAvailableBotsList->BotRace).c_str());
}
}
+ c->SendPopupToClient("Available Bots", botListStringStre
am.str().c_str());
}
else {
c->Message(0, "You have no bots created. Use the #bot cr
eate command to create a bot.");
@@ -9105,7 +9109,47 @@
return;
}
-
+ if(!strcasecmp(sep->arg[1], "stats"))
+ {
+ if(c->GetTarget() != NULL)
+ {
+ if(c->GetTarget()->IsBot() && c->GetTarget()->CastToBot(
)->GetBotOwnerCharacterID() == c->CharacterID())
+ {
+ std::stringstream botStatStream;
+ Bot *b = c->GetTarget()->CastToBot();
+ botStatStream
+ << b->GetName() << "<BR>"
+ << ClassIdToString(b->CastToBot()->GetClass()) <
< "<BR><BR>"
+ << "Hp: " << b->GetHP() << "/" << b->GetMaxHP()
<< "<BR>"
+ << "Mana: " << b->GetMana() << "/" << b->GetMaxM
ana() << "<BR>"
+ << "AC: " << b->GetAC() << "<BR>"
+ << "ATK: " << b->GetATK() << "<BR>"
+ << "STR: " << b->GetSTR() << "<BR>"
+ << "STA: " << b->GetSTA() << "<BR>"
+ << "AGI: " << b->GetAGI() << "<BR>"
+ << "DEX: " << b->GetDEX() << "<BR>"
+ << "INT: " << b->GetINT() << "<BR>"
+ << "WIS: " << b->GetWIS() << "<BR>"
+ << "CHA: " << b->GetCHA() << "<BR>"
+ << "<BR>"
+ << "Resists" << "<BR>"
+ << "Magic: " << b->GetMR() << "<BR>"
+ << "Fire: " << b->GetFR() << "<BR>"
+ << "Cold: " << b->GetCR() << "<BR>"
+ << "Poison: " << b->GetPR() << "<BR>"
+ << "Disease: " << b->GetDR() << "<BR>";
+ c->SendPopupToClient("Bot Statistics", botStatSt
ream.str().c_str());
+ }
+ else //bot does not belong to client
+ {
+ c->Message(15, "This bot does not belong to you.
");
+ }
+ }
+ else //no client target
+ {
+ c->Message(15, "You must target a bot first.");
+ }
+ }
if(!strcasecmp(sep->arg[1], "inventory") && !strcasecmp(sep->arg[2], "li
st"))
{
if(c->GetTarget() != NULL)
@@ -9125,6 +9169,7 @@
"Left Finger", "Right Finger", "Chest",
"Legs", "Feet", "Waist", "Ammo" };
const Item_Struct* item2 = NULL;
bool is2Hweapon = false;
+ std::stringstream botInventoryPopupString;
for(int i=0; i<22 ; i++)
{
if((i == 14) && is2Hweapon) {
@@ -9138,7 +9183,8 @@
return;
}
if(item2 == 0) {
- c->Message(15, "I need something
for my %s (Item %i)", equipped[i], i);
+ botInventoryPopupString << equip
ped[i] << "[SlotID: " << i << "]->empty<BR>";
+ //c->Message(15, "I need somethi
ng for my %s (Item %i)", equipped[i], i);
continue;
}
if((i == 13) && ((item2->ItemType == Ite
mType2HS) || (item2->ItemType == ItemType2HB) || (item2->ItemType == ItemType2HP
ierce))) {
@@ -9147,24 +9193,26 @@
if((i == 0) || (i == 11) || (i == 13) ||
(i == 14) || (i == 21)) {
if (c->GetClientVersion() == EQC
lientSoF)
{
- c->Message(15, "Using %c
%06X00000000000000000000000000000000000000000000%s%c in my %s (Item %i)", 0x12,
item2->ID, item2->Name, 0x12, equipped[i], i);
+ botInventoryPopupString
<< equipped[i] << "[SlotID: " << i << "]-><a WndNotify=" << '"' << "27,00" << '"
' << ">" << item2->Name << "</a><br>";
}
else
{
- c->Message(15, "Using %c
%06X000000000000000000000000000000000000000%s%c in my %s (Item %i)", 0x12, item2
->ID, item2->Name, 0x12, equipped[i], i);
+ botInventoryPopupString
<< equipped[i] << "[SlotID: " << i << "]-><a WndNotify=" << '"' << "27,00" << '"
' << ">" << item2->Name << "</a><br>";
}
}
else {
if (c->GetClientVersion() == EQC
lientSoF)
{
- c->Message(15, "Using %c
%06X00000000000000000000000000000000000000000000%s%c on my %s (Item %i)", 0x12,
item2->ID, item2->Name, 0x12, equipped[i], i);
+ botInventoryPopupString
<< equipped[i] << "[SlotID: " << i << "]-><a WndNotify=" << '"' << "27,00" << '"
' << ">" << item2->Name << "</a><br>";
+
}
else
{
- c->Message(15, "Using %c
%06X000000000000000000000000000000000000000%s%c on my %s (Item %i)", 0x12, item2
->ID, item2->Name, 0x12, equipped[i], i);
+ botInventoryPopupString
<< equipped[i] << "[SlotID: " << i << "]-><a WndNotify=" << '"' << "27,00" << '"
' << ">" << item2->Name << "</a><br>";
}
- }
- }
+ }
+ }
+ c->SendPopupToClient(b->CastToBot()->GetName(),
botInventoryPopupString.str().c_str());
}
else {
c->Message(15, "You must group your bot first.")
;
|
 |
|
 |
Thread Tools |
|
Display Modes |
Hybrid 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 07:55 PM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |