Jump to content

blueboy

Members
  • Posts

    723
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by blueboy

  1. Hi, Glad you liked the last patch. I have now revised the patch as requested, to ignore config settings if the player is above a certain security level. You can manually edit PlayerbotMgr.cpp to change the preferred secuity threshold; Here is the gmconfig.patch diff --git a/src/game/PlayerbotMgr.cpp b/src/game/PlayerbotMgr.cpp index 63c37d3..8291b6b 100644 --- a/src/game/PlayerbotMgr.cpp +++ b/src/game/PlayerbotMgr.cpp @@ -465,12 +465,13 @@ void PlayerbotMgr::RemoveAllBotsFromGroup() bool ChatHandler::HandlePlayerbotCommand(const char* args) { - if(sConfig.GetBoolDefault("PlayerbotAI.DisableBots", false)) - { - PSendSysMessage("|cffff0000Playerbot system is currently disabled!"); - SetSentErrorMessage(true); - return false; - } + if(!(m_session->GetSecurity() > SEC_PLAYER)) + if(sConfig.GetBoolDefault("PlayerbotAI.DisableBots", false)) + { + PSendSysMessage("|cffff0000Playerbot system is currently disabled!"); + SetSentErrorMessage(true); + return false; + } if (! m_session) { @@ -530,13 +531,14 @@ bool ChatHandler::HandlePlayerbotCommand(const char* args) { Field *fields=resultchar->Fetch(); uint32 acctcharcount = fields[0].GetUInt32(); - if((acctcharcount > sConfig.GetIntDefault("PlayerbotAI.MaxNumBots", 9)) && (cmdStr == "add" || cmdStr == "login")) - { - PSendSysMessage("|cffff0000You cannot summon anymore bots, for this account."); - SetSentErrorMessage(true); - delete resultchar; - return false; - } + if(!(m_session->GetSecurity() > SEC_PLAYER)) + if((acctcharcount > sConfig.GetIntDefault("PlayerbotAI.MaxNumBots", 9)) && (cmdStr == "add" || cmdStr == "login")) + { + PSendSysMessage("|cffff0000You cannot summon anymore bots, for this account."); + SetSentErrorMessage(true); + delete resultchar; + return false; + } } delete resultchar; @@ -545,16 +547,17 @@ bool ChatHandler::HandlePlayerbotCommand(const char* args) { Field *fields=resultlvl->Fetch(); uint32 charlvl = fields[0].GetUInt32(); - if(charlvl > sConfig.GetIntDefault("PlayerbotAI.RestrictBotLevel", 80)) - { - PSendSysMessage("|cffff0000You cannot summon |cffffffff[%s]|cffff0000, it's level is too high.",fields[1].GetString()); - SetSentErrorMessage(true); - delete resultlvl; - return false; - } + if(!(m_session->GetSecurity() > SEC_PLAYER)) + if(charlvl > sConfig.GetIntDefault("PlayerbotAI.RestrictBotLevel", 80)) + { + PSendSysMessage("|cffff0000You cannot summon |cffffffff[%s]|cffff0000, it's level is too high.",fields[1].GetString()); + SetSentErrorMessage(true); + delete resultlvl; + return false; + } } delete resultlvl; - + // end of gmconfig patch if (cmdStr == "add" || cmdStr == "login") { if (mgr->GetPlayerBot(guid)) Hope you like it
  2. Hi, Thanks for the suggestion but I do not think that would work. Temporarily disabling the teleporation could be overly complicated things and cause more problems than it is worth. A short delay would be easier and less disruptive. Cheers
  3. Hi, Yes, I have a prototype command that is in the alpha stage at present (i.e no patch yet). It allows bots to complete collection type quests (i.e Milly's Harvest). The only issue is that the player has to be close to the bot and object (i.e interaction distance). If you try to direct the bot from a distance, the bot fails to retrieve the object. This maybe caused by the bot's need to teleport back to the player, if they stray too far away & in doing so are too far from the object. I think the solution will be to introduce a short time delay in the AI update, that will allow the bot to loot before returning. It should not be long before I publish a workable patch, for you guys to test. Hope this helps
  4. Hi, You say your cloning the blueboy repo. This is integrated with MaNGOS[9591] (see commit history). You then tell me very little. I need to know which versions of the software, you're trying to build your server with. MaNGOS[version] ? ScriptDev2[version]? I have looked at the guide for building MaNGOS on linux (wiki), and it is a little vague. If you follow their instructions you will always download the lastest version of ScriptDev2. This might not be what you want. ( When I update blueboy, I usually specify which versions of software, work) Blueboy code tested with MaNGOS[9591] ScriptDev2[1641] To obtain ScriptDev2[1641], use this Bash Script; #!/bin/bash unset VERSION unset DEST VERSION=$1 DEST="/home/mangos/compile/mangos/src/bindings/ScriptDev2" if [ -z "${VERSION}" ]; then echo "No ScriptDev2 VERSION specified, assume latest VERSION"; else VERSION="-r "${VERSION}; fi if [ -d "${DEST}" ]; then rm -R ${DEST}; fi mkdir ${DEST}; svn co [url]https://scriptdev2.svn.sourceforge.net/svnroot/scriptdev2/[/url] ${DEST} ${VERSION} NOTE You will need to change the path specified in variable DEST, to match your system at prompt ./scriptdev2.sh 1641 If you compile this with just the code from blueboy, it will work As I said in my last post, look at the' http link' and read the commit description. Compare your errors, with the description. Are you using MaNGOS[9603], or later? If you want to use the latest ScripDev2, you will need to merge the code from blueboy, with the latest version of MaNGOS. As I said in my last post, I believe your using the wrong versions of MaNGOS & ScriptDev2, and this is what causing the errors Hope this helps
  5. Hi, Any chance of some more information. Latest commit of what ? Playerbot, MaNGOS or ScriptDev2. I am presently using the code from blueboy with MaNGOS[9610] and ScriptDev2[1644], without issue. It is very important that you heed compatibility information given by ScriptDev2, or you will have issues. http://www.manground.org/sd2Changelog.html For instance, ScriptDev2[1644] says i.e It will not work with an earlier version of MaNGOS. Hope this helps
  6. Hi, 'Overloaded' is a term for functions that have the same name, but different parameters. On C and other languages, you can not do this. The compiler decides which version of the function to use, based solely on the parameter list, that must be different. I know 'overloaded' sounds like something bad, but it is quite a useful feature of C++. Oveloaded functions can operate recursively by calling each other, as 'HasAura' does. This inceases the scope of parameters that can be passed to any one function bool HasAura(uint32 spellId, const Unit& player) const; bool HasAura(const char* spellName, const Unit& player) const; bool HasAura(const char* spellName) const; Cheers
  7. Hi Guys, I have now successfully filtered out unwanted objects from the survey command. We can now look at developing commands to allow the bot(s) to interact with the objects. diff --git a/src/game/PlayerbotAI.cpp b/src/game/PlayerbotAI.cpp index 1922828..0676a5a 100644 --- a/src/game/PlayerbotAI.cpp +++ b/src/game/PlayerbotAI.cpp @@ -2229,6 +2229,75 @@ void PlayerbotAI::extractItemIds(const std::string& text, std::list<uint32>& ite } } +bool PlayerbotAI::extractGOinfo(const std::string& text, uint32 &guid, uint32 &entry, int &mapid, float &x, float &y, float &z) const +{ + + // Link format + // |cFFFFFF00|Hfound:" << guid << ':' << entry << ':' << x << ':' << y << ':' << z << ':' << mapid << ':' << "|h[" << gInfo->name << "]|h|r"; + // |cFFFFFF00|Hfound:5093:1731:-9295:-270:81.874:0:|h[Copper Vein]|h|r + + uint8 pos = 0; + + // extract GO guid + int i = text.find("Hfound:", pos); // base H = 11 + if (i == -1) // break if error + return false; + + pos = i + 7; //start of window in text 11 + 7 = 18 + int endPos = text.find(':', pos); // end of window in text 22 + if (endPos == -1) //break if error + return false; + std::string guidC = text.substr(pos, endPos - pos); // get string within window i.e guid 22 - 18 = 4 + guid = atol(guidC.c_str()); // convert ascii to long int + + // extract GO entry + pos = endPos + 1; + endPos = text.find(':', pos); // end of window in text + if (endPos == -1) //break if error + return false; + + std::string entryC = text.substr(pos, endPos - pos); // get string within window i.e entry + entry = atol(entryC.c_str()); // convert ascii to float + + // extract GO x + pos = endPos + 1; + endPos = text.find(':', pos); // end of window in text + if (endPos == -1) //break if error + return false; + + std::string xC = text.substr(pos, endPos - pos); // get string within window i.e x + x = atof(xC.c_str()); // convert ascii to float + + // extract GO y + pos = endPos + 1; + endPos = text.find(':', pos); // end of window in text + if (endPos == -1) //break if error + return false; + + std::string yC = text.substr(pos, endPos - pos); // get string within window i.e y + y = atof(yC.c_str()); // convert ascii to float + + // extract GO z + pos = endPos + 1; + endPos = text.find(':', pos); // end of window in text + if (endPos == -1) //break if error + return false; + + std::string zC = text.substr(pos, endPos - pos); // get string within window i.e z + z = atof(zC.c_str()); // convert ascii to float + + //extract GO mapid + pos = endPos + 1; + endPos = text.find(':', pos); // end of window in text + if (endPos == -1) //break if error + return false; + + std::string mapidC = text.substr(pos, endPos - pos); // get string within window i.e mapid + mapid = atoi(mapidC.c_str()); // convert ascii to int + pos = endPos; // end + return true; +} + // extracts currency in #g#s#c format uint32 PlayerbotAI::extractMoney(const std::string& text) const { @@ -2676,6 +2745,23 @@ void PlayerbotAI::HandleCommand(const std::string& text, Player& fromPlayer) EquipItem(**it); } + // find item in world + else if (text.size() > 2 && text.substr(0, 2) == "f " || text.size() > 5 && text.substr(0, 5) == "find ") + { + uint32 guid; + float x,y,z; + uint32 entry; + int mapid; + if(extractGOinfo(text, guid, entry, mapid, x, y, z)) + { // sLog.outDebug("find: guid : %u entry : %u x : (%f) y : (%f) z : (%f) mapid : %d",guid, entry, x, y, z, mapid); + m_bot->UpdateGroundPositionZ(x,y,z); + SetMovementOrder( MOVEMENT_STAY ); + m_bot->GetMotionMaster()->MovePoint( mapid, x, y, z ); + } + else + SendWhisper("I have no info on that object", fromPlayer); + } + else if (text == "quests") { bool hasIncompleteQuests = false; @@ -2803,6 +2889,65 @@ void PlayerbotAI::HandleCommand(const std::string& text, Player& fromPlayer) ch.SendSysMessage(out.str().c_str()); } + // Survey project: 19:30 17/03/10 rev.2 filter out event triggered objects + else if (text == "survey") + { + uint32 count = 0; + std::ostringstream detectout; + QueryResult *result; + GameEventMgr::ActiveEvents const& activeEventsList = sGameEventMgr.GetActiveEventList(); + + + std::ostringstream eventFilter; + eventFilter << " AND (event IS NULL "; + bool initString = true; + + for (GameEventMgr::ActiveEvents::const_iterator itr = activeEventsList.begin(); itr != activeEventsList.end(); ++itr) + { + if (initString) + { + eventFilter << "OR event IN (" <<*itr; + initString =false; + } + else + eventFilter << "," << *itr; + } + + if (!initString) + eventFilter << "))"; + else + eventFilter << ")"; + + result = WorldDatabase.PQuery("SELECT gameobject.guid, id, position_x, position_y, position_z, map, " + "(POW(position_x - %f, 2) + POW(position_y - %f, 2) + POW(position_z - %f, 2)) AS order_ FROM gameobject " + "LEFT OUTER JOIN game_event_gameobject on gameobject.guid=game_event_gameobject.guid WHERE map = '%i' %s ORDER BY order_ ASC LIMIT 10", + m_bot->GetPositionX(), m_bot->GetPositionY(), m_bot->GetPositionZ(), m_bot->GetMapId(),eventFilter.str().c_str()); + + if (result) + { + do + { + Field *fields = result->Fetch(); + uint32 guid = fields[0].GetUInt32(); + uint32 entry = fields[1].GetUInt32(); + float x = fields[2].GetFloat(); + float y = fields[3].GetFloat(); + float z = fields[4].GetFloat(); + int mapid = fields[5].GetUInt16(); + + GameObjectInfo const * gInfo = ObjectMgr::GetGameObjectInfo(entry); + + if(!gInfo) + continue; + + detectout << "|cFFFFFF00|Hfound:" << guid << ":" << entry << ":" << x << ":" << y << ":" << z << ":" << mapid << ":" << "|h[" << gInfo->name << "]|h|r"; + ++count; + } while (result->NextRow()); + + delete result; + } + SendWhisper(detectout.str().c_str(), fromPlayer); + } else { diff --git a/src/game/PlayerbotAI.h b/src/game/PlayerbotAI.h index 377dfaa..94ef634 100644 --- a/src/game/PlayerbotAI.h +++ b/src/game/PlayerbotAI.h @@ -3,6 +3,7 @@ #include "Common.h" #include "QuestDef.h" +#include "GameEventMgr.h" class WorldPacket; class WorldObject; @@ -129,6 +130,9 @@ class MANGOS_DLL_SPEC PlayerbotAI // extracts currency from a string as #g#s#c and returns the total in copper uint32 extractMoney(const std::string& text) const; + // extracts gameobject info from link + bool extractGOinfo(const std::string& text, uint32 &guid, uint32 &entry, int &mapid, float &x, float &y, float &z) const; + // finds items in bots equipment and adds them to foundItemList, removes found items from itemIdSearchList void findItemsInEquip(std::list<uint32>& itemIdSearchList, std::list<Item*>& foundItemList) const; // finds items in bots inventory and adds them to foundItemList, removes found items from itemIdSearchList Hope you like it. Warning Possible issue with MaNGOS There maybe an issue with the latest MaNGOS[9599]. When I shut the server down, it crashes, without info. I would be interested to hear if your getting the same. MaNGOS[9591] does not seem to cause issue so I advise you not to update until they sort it out.
  8. Hi Guys, No the survey patch is not in the offical repo, because it is a development in progress. I want to keep the main repo clean. The patch works, but not the way I want it to. I would like to filter out event triggered objects, and display only objects that exist. Cheers
  9. Hi, I am pleased that the survey patch is working. I'm hoping that it will encourage you guys to have a go developing the AI. I shouldn't worry too much about your test bed, compared to most users, my system is quite modest too Cheers
  10. Hi, Thanks for the info, I need all the help I can get with this issue. It also give me an opportunity to ask, whether you are experiening problems. This seems to only effect Windows systems, and it appears that VC 9.0 does not like the way 'std::allocator' is used in HasAura. I found several similar issues on the internet, and Microsoft blame the coding and not the compiler. VC 9.0 adheres strongly to C++ Standards. Apparently, earlier versions of VC were less fussy. They suggest rewritting the code to comply with C++ Standards :rolleyes: You will see that HasAura is an overloaded function that only differs in the parameters passed. I tried redirecting the program flow to the sister HasAura function, defined in Unit.cpp. /* bool PlayerbotAI::HasAura(uint32 spellId, const Unit& player) const { for (Unit::AuraMap::const_iterator iter = player.GetAuras().begin(); iter != player.GetAuras().end(); ++iter) { if (iter->second->GetId() == spellId) return true; } return false; } */ bool PlayerbotAI::HasAura(uint32 spellId, const Unit& player) const { return player.HasAura(spellId); } I hoped that this would bypass the offending HasAura function in PlayerbotAI.cpp, and solve the issue :rolleyes: No such luck. It continues to crash with code from the core. I took a look at the HasAura function; bool PlayerbotAI::HasAura(const char* spellName, const Unit& player) const { uint32 spellId = getSpellId(spellName); return (spellId) ? HasAura(spellId, player) : false; } This is not forcing a false condition. If spellId has a positive non zero value, it then calls HasAura(spellId, player) else it returns false. The logic is sound. But, thanks for the idea. Edit: Your getting signed/unsigned variable error/warning because getSpellId returns an unsigned integer value, that is then tested in a boolean expression. Cheers
  11. I think you must be doing something wrong when you create your patch mangos-9591-playerbot.patch I've just created a new patch from the code on blueboy and applied it the MaNGOS[9599]. It works perfectly. Your not applying anything, prior to playerbot are you. If you modify the MaNGOS code prior to playerbot, you might well break the patch. Apply playerbot first, then other mods Try using the script created by skinlayers in post #930, that works great. Let me know how you get on
  12. Hi Guys, I've updated the code on blueboy to be compatible with the latest MaNGOS[9591] and revised the survey patch to work. Revised survey patch diff --git a/src/game/PlayerbotAI.cpp b/src/game/PlayerbotAI.cpp index 1922828..5409da0 100644 --- a/src/game/PlayerbotAI.cpp +++ b/src/game/PlayerbotAI.cpp @@ -2229,6 +2229,75 @@ void PlayerbotAI::extractItemIds(const std::string& text, std::list<uint32>& ite } } +bool PlayerbotAI::extractGOinfo(const std::string& text, uint32 &guid, uint32 &entry, int &mapid, float &x, float &y, float &z) const +{ + + // Link format + // |cFFFFFF00|Hfound:" << guid << ':' << entry << ':' << x << ':' << y << ':' << z << ':' << mapid << ':' << "|h[" << gInfo->name << "]|h|r"; + // |cFFFFFF00|Hfound:5093:1731:-9295:-270:81.874:0:|h[Copper Vein]|h|r + + uint8 pos = 0; + + // extract GO guid + int i = text.find("Hfound:", pos); // base H = 11 + if (i == -1) // break if error + return false; + + pos = i + 7; //start of window in text 11 + 7 = 18 + int endPos = text.find(':', pos); // end of window in text 22 + if (endPos == -1) //break if error + return false; + std::string guidC = text.substr(pos, endPos - pos); // get string within window i.e guid 22 - 18 = 4 + guid = atol(guidC.c_str()); // convert ascii to long int + + // extract GO entry + pos = endPos + 1; + endPos = text.find(':', pos); // end of window in text + if (endPos == -1) //break if error + return false; + + std::string entryC = text.substr(pos, endPos - pos); // get string within window i.e entry + entry = atol(entryC.c_str()); // convert ascii to float + + // extract GO x + pos = endPos + 1; + endPos = text.find(':', pos); // end of window in text + if (endPos == -1) //break if error + return false; + + std::string xC = text.substr(pos, endPos - pos); // get string within window i.e x + x = atof(xC.c_str()); // convert ascii to float + + // extract GO y + pos = endPos + 1; + endPos = text.find(':', pos); // end of window in text + if (endPos == -1) //break if error + return false; + + std::string yC = text.substr(pos, endPos - pos); // get string within window i.e y + y = atof(yC.c_str()); // convert ascii to float + + // extract GO z + pos = endPos + 1; + endPos = text.find(':', pos); // end of window in text + if (endPos == -1) //break if error + return false; + + std::string zC = text.substr(pos, endPos - pos); // get string within window i.e z + z = atof(zC.c_str()); // convert ascii to float + + //extract GO mapid + pos = endPos + 1; + endPos = text.find(':', pos); // end of window in text + if (endPos == -1) //break if error + return false; + + std::string mapidC = text.substr(pos, endPos - pos); // get string within window i.e mapid + mapid = atoi(mapidC.c_str()); // convert ascii to int + pos = endPos; // end + return true; +} + // extracts currency in #g#s#c format uint32 PlayerbotAI::extractMoney(const std::string& text) const { @@ -2676,6 +2745,23 @@ void PlayerbotAI::HandleCommand(const std::string& text, Player& fromPlayer) EquipItem(**it); } + // find item in world + else if (text.size() > 2 && text.substr(0, 2) == "f " || text.size() > 5 && text.substr(0, 5) == "find ") + { + uint32 guid; + float x,y,z; + uint32 entry; + int mapid; + if(extractGOinfo(text, guid, entry, mapid, x, y, z)) + { // sLog.outDebug("find: guid : %u entry : %u x : (%f) y : (%f) z : (%f) mapid : %d",guid, entry, x, y, z, mapid); + m_bot->UpdateGroundPositionZ(x,y,z); + SetMovementOrder( MOVEMENT_STAY ); + m_bot->GetMotionMaster()->MovePoint( mapid, x, y, z ); + } + else + SendWhisper("I have no info on that object", fromPlayer); + } + else if (text == "quests") { bool hasIncompleteQuests = false; @@ -2803,6 +2889,45 @@ void PlayerbotAI::HandleCommand(const std::string& text, Player& fromPlayer) ch.SendSysMessage(out.str().c_str()); } + // Survey project: 09:50 09/03/10 + else if (text == "survey") + { + float distance = 100.0f; + uint32 count = 0; + std::ostringstream detectout; + + QueryResult *result = WorldDatabase.PQuery("SELECT guid, id, position_x, position_y, position_z, map, " + "(POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) AS order_ " + "FROM gameobject WHERE map='%u' AND (POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) <= '%f' ORDER BY order_", + m_bot->GetPositionX(), m_bot->GetPositionY(), m_bot->GetPositionZ(), + m_bot->GetMapId(), m_bot->GetPositionX(), m_bot->GetPositionY(), m_bot->GetPositionZ(), distance*distance); + + if (result) + { + do + { + Field *fields = result->Fetch(); + uint32 guid = fields[0].GetUInt32(); + uint32 entry = fields[1].GetUInt32(); + float x = fields[2].GetFloat(); + float y = fields[3].GetFloat(); + float z = fields[4].GetFloat(); + int mapid = fields[5].GetUInt16(); + + GameObjectInfo const * gInfo = ObjectMgr::GetGameObjectInfo(entry); + + if(!gInfo) + continue; + + if(count < 12) // count, limits number of links + detectout << "|cFFFFFF00|Hfound:" << guid << ":" << entry << ":" << x << ":" << y << ":" << z << ":" << mapid << ":" << "|h[" << gInfo->name << "]|h|r"; + ++count; + } while (result->NextRow()); + + delete result; + } + SendWhisper(detectout.str().c_str(), fromPlayer); + } else { diff --git a/src/game/PlayerbotAI.h b/src/game/PlayerbotAI.h index 377dfaa..fc19482 100644 --- a/src/game/PlayerbotAI.h +++ b/src/game/PlayerbotAI.h @@ -129,6 +129,9 @@ class MANGOS_DLL_SPEC PlayerbotAI // extracts currency from a string as #g#s#c and returns the total in copper uint32 extractMoney(const std::string& text) const; + // extracts gameobject info from link + bool extractGOinfo(const std::string& text, uint32 &guid, uint32 &entry, int &mapid, float &x, float &y, float &z) const; + // finds items in bots equipment and adds them to foundItemList, removes found items from itemIdSearchList void findItemsInEquip(std::list<uint32>& itemIdSearchList, std::list<Item*>& foundItemList) const; // finds items in bots inventory and adds them to foundItemList, removes found items from itemIdSearchList Hope it works this time
  13. Hi, are the dumps similar to the other dumps posted? If not, could you post an edited version of the crash dump? This useful info was taken from the last dumps posted, Without a machine to directly try ideas out on, it is very difficult to debug. I am pleased your only using one faction. Does the priest and magician run away as soon as they are summoned in dalaran? Does this happen with any other classes of bot? This might take awhile to sort out, please get back to me!
  14. Hi, I just do not know how to proceed with this. We need someone who runs MaNGOS on a windows server, to troubleshoot this. I haven't got a spare server and I have none of the problems you list on linux. Is there an event that triggers your priests and magicians to run away? Your not running with a dual faction mod, by any chance. I tried that and I found a mixed (horde/alliance) group to be unworkable. Please let me know
  15. Hi, I think the best thing would be for you to wait until I update blueboy next. I will remove the 'text formatting' myself from PlayerbotAI.cpp, and the original patch I posted should then work. Cheers
  16. Hi, Very nice! It works a treat. I'll be be using your scripts in future and If I get anymore requests for patch scripts, I'll definitely direct them to your posts, Thanks very much for your contributiion Cheers
  17. Hi, I did, that's partly why the patch ended up different from the code, but thanks for the info. I wish I had never heard of 'whitespaces':mad: I will create a new patch, and post it without using the '--whitespace=fix' preprocessing. Cheers
  18. Hi, I have found the problem, and it is an issue with whitespaces. I pasted the 'detection.patch' in this forum and it stripped out text formatting (Tabs etc ..) . Unfortunately the code in PlayerbotAI.cpp still contains this text formatting. So the 3 line pattern in the patch is different to the 3 line pattern in PlayerbotAI.cpp. I suggest you open up both PlayerbotAI.cpp and the detection.patch with you favourite editor. Then replace the pattern in the patch with the pattern from PlayerbotAI.cpp (copy and paste). 3 line pattern @ lines 102-104 in patch else if (text == "quests") { bool hasIncompleteQuests = false; replace this with the pattern @ lines 2679-2681 in PlayerbotAI.cpp. I know they look the same, but I assure you they are different. This should fix the patch. I will update blueboy presently, but I thought you might want an immediate fix Hope this helps
  19. Hi, If you patch did not apply properly to the core, this has probably damaged the parsing process of the .bot command. I will try to find what is going wrong. To save your time in the future, if the patch breaks do not continue. Cheers
  20. hi, That's not suprising. None of the code in the patch is vital to the core operation. However, find and or survey will not be recognised as .bot subcommands.. Cheers
  21. hi I will copy and paste the patch I posted, as you will have done. I will then attempt to patch a clone of MaNGOS. You did not say which version you were using, so I will try the latest. TIP: ( Use the '--dry-run' option with the patch utility. It will test the patch and save you time having to download the core again). I'll get back to you.
  22. Hi, Any details about the fail, so I can trace the source of the error? It works fine on my linux box. Cheers
  23. Hi, I haven't got much more to add to deviljohn 's answer. I agree from the code you cited, that ORDERS_TANK seems to be overlooked. However I did a simple search of the code grep -r "ORDERS_TANK" * and I get this You will see that this and other combat order flags are used throughtout the code. With your final question; unfortunately No News Is Good News . The original code only complains if the combat order is not understood. I agree that it would an improvement if the bot(s) responded with something like "SIR!" Hope this helps
  24. Hi mrelfire & Bramm, I've been looking at the HasAura issue, and have something I would like you to test. I have tried it on my linux box and it works with no ill effects. It might just work for you too. I have rewritten the HasAura function in PlayerbotAI.cpp to call on the sister (overloaded) function HasAura in Unit.cpp. I suggest you comment out the old function and replace it with the new prototype in PlayerbotAI.cpp /* bool PlayerbotAI::HasAura(uint32 spellId, const Unit& player) const { for (Unit::AuraMap::const_iterator iter = player.GetAuras().begin(); iter != player.GetAuras().end(); ++iter) { if (iter->second->GetId() == spellId) return true; } return false; } */ bool PlayerbotAI::HasAura(uint32 spellId, const Unit& player) const { return player.HasAura(spellId); } Please let me know if this works, Cheers
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use