Jump to content

blueboy

Members
  • Posts

    723
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by blueboy

  1. Hi Guys, I have another flavour of playerbot, for development purposes. The file content is the same, it's just arranged differently. All the main playerbot files are now located in a sub-directory to the main 'game' source, called 'playerbot':rolleyes: Obvoiusly the modified core files will remain in 'game', but this was thought to be tidier. http://github.com/blueboy/portal I have also split the playerbot config info from 'mangosd.conf' to it's own standalone file. Again this has been done to avoid possible conflicts with core changes. If you like the changes, please let me know. This repo is presently only used for development purposes, but if like it I might consider changing the 'blueboy' repo to the same format. I have copies of my recent development patches, that have been adjusted to work with the 'portal' repo. If you require them, again let me know. Cheers
  2. Hi, Thanks for the info. It will certainly be a feature to consider, but probably won't be implemented for at while Cheers
  3. Hi, Be sure the visit the main branch of miniMANAGER, for the latest release http://github.com/minimanager/minimanager Cheers
  4. Hi Guys, I've been indulging myself :eek: If your interested, I have added a new repo to blueboy that attempts to address current 'miniManager' issues. I use this for my account management and it's a great project. I will be maintaining this fork for personal use, so do not request frequent updates. The code is working and the fixes are my way of saying thankyou to its developers, for their hard work. If you want to take a look, here is the Github link http://github.com/blueboy/minimanager hope this helps
  5. Hi, I seem to remember this happening sometime back, where occasionally the bot(s) and or it's pet would be 'Unknown'. I haven't noticed this on my server recently, but I'll keep a look out. A quick fix for this issue is to logout and delete the client 'cache' Thanks for the feedback
  6. Hi, I've just replied to your question on Github. This is what I found ....
  7. Hi, Done I have merged the code on blueboy with MaNGOS[9974]. Hope this helps
  8. No problems, I'll help if I can. Apply the patch I have included to your code, and rebuild. It's running on my server but I'm on linux and the server has a very low population, ME:rolleyes: Cheers
  9. Hi Guys, You may get a conflict between the botguy patches and core code [9938]+. They have changed the name of a boolean flag used with GOSSIP MENUS, to determine whether or not a menu contains an item. If any of you have problems, I will post revised patches. Let me know if they are required. I have been messing with the 'cast' command this week and revised it to allow the use of [string Links]. To get a bot to cast a spell like 'Shadow Bolt', you can now do it three ways 1: /w botname cast 705 // can be setup as a macro 2: /w botname cast shadow bolt // can be setup as a macro 3: /w botname cast [shadow Bolt] // can be setup as a macro I have included code (Methods 2 & 3) to ensure that the bot(s) use the highest rank of a spell from the spellbook. The [string Link] can be obtained by examining the bots spellbook; /w botname spells cast.patch diff --git a/src/game/PlayerbotAI.h b/src/game/PlayerbotAI.h index ef4383f..4d4a2a1 100644 --- a/src/game/PlayerbotAI.h +++ b/src/game/PlayerbotAI.h @@ -127,6 +127,9 @@ class MANGOS_DLL_SPEC PlayerbotAI // extracts item ids from links void extractItemIds(const std::string& text, std::list<uint32>& itemIds) const; + // extract spellid from links + bool extractSpellId(const std::string& text, uint32 &spellId) const; + // extracts currency from a string as #g#s#c and returns the total in copper uint32 extractMoney(const std::string& text) const; diff --git a/src/game/PlayerbotAI.cpp b/src/game/PlayerbotAI.cpp index 99852ea..912cc85 100644 --- a/src/game/PlayerbotAI.cpp +++ b/src/game/PlayerbotAI.cpp @@ -2377,6 +2377,34 @@ void PlayerbotAI::extractItemIds(const std::string& text, std::list<uint32>& ite } } +bool PlayerbotAI::extractSpellId(const std::string& text, uint32 &spellId) const +{ + + // Link format + // |cffffffff|Hspell:" << spellId << "|h[" << pSpellInfo->SpellName[loc] << "]|h|r"; + // cast |cff71d5ff|Hspell:686|h[shadow Bolt]|h|r"; + // 012345678901234567890123456 + // base = 16 >| +7 >| + + uint8 pos = 0; + + int i = text.find("Hspell:", pos); + if (i == -1) + return false; + + // DEBUG_LOG("extractSpellId first pos %u i %u",pos,i); + pos = i + 7; // start of window in text 16 + 7 = 23 + int endPos = text.find('|', pos); + if (endPos == -1) + return false; + + // DEBUG_LOG("extractSpellId second endpos : %u pos : %u",endPos,pos); + std::string idC = text.substr(pos, endPos - pos); // 26 - 23 + spellId = atol(idC.c_str()); + pos = endPos; // end + return true; +} + bool PlayerbotAI::extractGOinfo(const std::string& text, uint32 &guid, uint32 &entry, int &mapid, float &x, float &y, float &z) const { @@ -2856,19 +2884,44 @@ void PlayerbotAI::HandleCommand(const std::string& text, Player& fromPlayer) // handle cast command else if (text.size() > 2 && text.substr(0, 2) == "c " || text.size() > 5 && text.substr(0, 5) == "cast ") { - std::string spellStr = text.substr(text.find(" ") + 1); + // sLog.outErrorDb("Selected link : %s", text.c_str()); + + std::string spellStr = text.substr(text.find(" ") + 1); uint32 spellId = (uint32) atol(spellStr.c_str()); // try and get spell ID by name if (spellId == 0) - spellId = getSpellId(spellStr.c_str(), true); + { + spellId = getSpellId(spellStr.c_str(), true); + + // try link if text NOT (spellid OR spellname) + if (spellId == 0) + extractSpellId(text, spellId); + + QueryResult *result = WorldDatabase.PQuery("SELECT spell_id FROM spell_chain WHERE first_spell = '%u' ORDER BY rank DESC",spellId); + if (result) + { + do + { + Field *fields = result->Fetch(); + uint32 Id = fields[0].GetUInt32(); + // DEBUG_LOG("SPELLID %u",Id); + if(m_bot->HasSpell(Id)) // examine all spell ranks in decreasing order and select first that is in spellbook + { + spellId = Id; + break; + } + } while (result->NextRow()); + } + } - uint64 castOnGuid = fromPlayer.GetSelection(); + uint64 castOnGuid = fromPlayer.GetSelection(); if (spellId != 0 && castOnGuid != 0 && m_bot->HasSpell(spellId)) { m_spellIdCommand = spellId; m_targetGuidCommand = castOnGuid; } + } // use items Hope you find this useful
  10. Bravo! I could not put it better myself. The continued momentum of playerbot development will require a community effort, one person cannot hope to satisfy this. Playerbot is far from perfect at present, but together, I believe we can get very close Cheers
  11. Hi Guys, KiriX brought an important issue to my attention. The 'cast' command made no checks on whether bot(s) could use a particular spell or not. The following could be used to kill any NPC without restriction, as long as it could be selected. /w botname cast 5 // spellId 5 - 'Death Touch'. This would make it possible for players to run riot! :mad: I have now plugged the hole and inserted a check I advise you all to use the updated code on blueboy ASAP Cheers
  12. Hi Guys, As promised, here is the revision to the botguy.patch. You must apply the botguy.patch first (post #1141) to the code from blueboy, before applying the revision or you will get conflicts. botguyrev.patch diff --git a/src/game/Player.cpp b/src/game/Player.cpp index c24469a..095d5fe 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -65,6 +65,7 @@ // Playerbot mod: #include "PlayerbotAI.h" #include "PlayerbotMgr.h" +#include "Config/ConfigEnv.h" #include <cmath> @@ -12661,10 +12662,14 @@ void Player::PrepareGossipMenu(WorldObject *pSource, uint32 menuId) case GOSSIP_OPTION_AUCTIONEER: break; // no checks case GOSSIP_OPTION_BOT: - if(!pCreature->isInnkeeper()) - pCreature->LoadBotMenu(this); - bCanTalk = false; + { + std::string reqQuestIds = sConfig.GetStringDefault("PlayerbotAI.BotguyQuests",""); + uint32 cost = sConfig.GetIntDefault("PlayerbotAI.BotguyCost",0); + if((reqQuestIds == "" || requiredQuests(reqQuestIds.c_str())) && !pCreature->isInnkeeper() && this->GetMoney() >= cost) + pCreature->LoadBotMenu(this); + bCanTalk = false; break; + } default: sLog.outErrorDb("Creature entry %u have unknown gossip option %u for menu %u", pCreature->GetEntry(), itr->second.option_id, itr->second.menu_id); bCanTalk = false; @@ -12898,6 +12903,7 @@ void Player::OnGossipSelect(WorldObject* pSource, uint32 gossipListId, uint32 me { // DEBUG_LOG("GOSSIP_OPTION_BOT"); PlayerTalkClass->CloseGossip(); + uint32 cost = sConfig.GetIntDefault("PlayerbotAI.BotguyCost",0); if (!GetPlayerbotMgr()) SetPlayerbotMgr(new PlayerbotMgr(this)); @@ -12910,7 +12916,8 @@ void Player::OnGossipSelect(WorldObject* pSource, uint32 gossipListId, uint32 me else if(GetPlayerbotMgr()->GetPlayerBot(guidlo) == NULL) { GetPlayerbotMgr()->AddPlayerBot(guidlo); - } + this->ModifyMoney(-cost); + } break; } } diff --git a/src/game/Player.h b/src/game/Player.h index 5dab4e8..9bd303c 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -1437,6 +1437,10 @@ class MANGOS_DLL_SPEC Player : public Unit void AddTimedQuest( uint32 quest_id ) { m_timedquests.insert(quest_id); } void RemoveTimedQuest( uint32 quest_id ) { m_timedquests.erase(quest_id); } + void chompAndTrim(std::string& str); + bool getNextQuestId(const std::string& pString, unsigned int& pStartPos, unsigned int& pId); + bool requiredQuests(const char* pQuestIdString); + /*********************************************************/ /*** LOAD SYSTEM ***/ /*********************************************************/ diff --git a/src/game/PlayerbotMgr.cpp b/src/game/PlayerbotMgr.cpp index c3848df..d59b4a3 100644 --- a/src/game/PlayerbotMgr.cpp +++ b/src/game/PlayerbotMgr.cpp @@ -585,6 +585,64 @@ void Creature::LoadBotMenu(Player *pPlayer) delete result; } +void Player::chompAndTrim(std::string& str) +{ + while(str.length() >0) + { + char lc = str[str.length()-1]; + if(lc == '\\r' || lc == '\\n' || lc == ' ' || lc == '"' || lc == '\\'') + str = str.substr(0,str.length()-1); + else + break; + while(str.length() >0) + { + char lc = str[0]; + if(lc == ' ' || lc == '"' || lc == '\\'') + str = str.substr(1,str.length()-1); + else + break; + } + } +} + +bool Player::getNextQuestId(const std::string& pString, unsigned int& pStartPos, unsigned int& pId) +{ + bool result = false; + unsigned int i; + for(i=pStartPos;i<pString.size(); ++i) + { + if(pString[i] == ',') + break; + } + if(i>pStartPos) + { + std::string idString = pString.substr(pStartPos, i-pStartPos); + pStartPos = i+1; + chompAndTrim(idString); + pId = atoi(idString.c_str()); + result = true; + } + return(result); +} + +bool Player::requiredQuests(const char* pQuestIdString) +{ + if(pQuestIdString != NULL) + { + unsigned int pos = 0; + unsigned int id; + std::string confString(pQuestIdString); + chompAndTrim(confString); + while(getNextQuestId(confString, pos, id)) + { + QuestStatus status = GetQuestStatus( id ); + if ( status == QUEST_STATUS_COMPLETE ) + return true; + } + } + return false; +} + bool ChatHandler::HandlePlayerbotCommand(const char* args) { if(!(m_session->GetSecurity() > SEC_PLAYER)) diff --git a/src/mangosd/mangosd.conf.dist.in b/src/mangosd/mangosd.conf.dist.in index 93e00e8..f502d40 100644 --- a/src/mangosd/mangosd.conf.dist.in +++ b/src/mangosd/mangosd.conf.dist.in @@ -1519,6 +1519,17 @@ CharDelete.KeepDays = 30 # Restrict the allowed bot level (Current Max 80) # Default: 80 # +# PlayerbotAI.BotguyQuests +# List of Quest ids, any of which, once completed will enable botguy menu on NPCs +# List must be enclosed in double quotes ("") and multiple Quest Ids separated by a delimiter(,) +# Example: "805,54,2160" +# Default: "" no quest restriction, memu always displayed by NPCs +# +# PlayerbotAI.BotguyCost +# Cost (Copper coins) levied on summoning a bot +# If player has the cost, botguy menu will be displayed by NPCs +# Default: 0 - no cost, menu always displayed by NPCs +# ################################################################################################################### PlayerbotAI.DisableBots = 0 @@ -1527,3 +1538,5 @@ PlayerbotAI.FollowDistanceMin = 0.5 PlayerbotAI.FollowDistanceMax = 1.0 PlayerbotAI.MaxNumBots = 9 PlayerbotAI.RestrictBotLevel = 80 +PlayerbotAI.BotguyQuests = "" +PlayerbotAI.BotguyCost = 0 Hope you like it and find it useful
  13. Hmmm, The old HasAura crash is still rearing it's ugly head. I spent a week trying to debug this issue. Oh well thanks for the info and any further help, if you manage to re-create it. Thats the problem it seems to be triggered by a random event, and mainly effects windows servers. Cheers
  14. Hi Guys, I have now built in restrictions on using the botguy menu. These can be enabled/disabled in mangosd.conf, so used at the disrcretion of the server administrator. If you don't like them, don't enable them. PlayerbotAI.BotguyQuests (To disable, choose a very high level quest) A list of pre-requisite quests, any of which will display the botguy menu once completed by the player. These quests can be made as hard or as easy as you want. In my previous post, I cited "805,54". These were just examples. I think it would be a good idea to encourage your users to complete the trial quests available to all, in the individual start areas. I only gave these two as examples of a trial (horde) quest for ogres, and one for humans (alliance). It shouldn't be too difficult to compile an approriate list of quests. PlayerbotAI.BotguyCost (To disable, choose a very high cost) This is fairly self explanatory. A tax is placed on the ability to summon bot. If the player does not have enough money, the botguy menu will not be available. (Thanks to ckegg for his help with this). These features can be used in combination, on their own, or not at all. I will shortly submit a patch for you to test Hope this helps
  15. Hi UnkleNuke, Agreed. I thought that it might be best to make to bot summon requirement configurable in mangosd.conf. That way the server administartor could decide what would work for his/her users. QuestID 805 (Report to Sen'jin Village) 54 (Report to GoldShire) only available if player complete initial trial quests. An questid could be included for all races. (No questid feature disabled) Cost 50 (Say that the player must have at less 50s to be able to summon bots) (0 to disable feature) PlayerbotAI.BotguyQuests = 805 54 PlayerbotAI.BotgutCost = 50 bool function CheckQuest () { result = check character_queststatus for completed quests if result in sConfig list or sConfig = 0, return true else return false } if (CheckQuest() && HaveMoney()) { pCreature->LoadBotMenu(_Player) // Display bot menu on NPC } It could work very well
  16. Hi UnkleNuke, A very interesting suggestion, I too like the idea of earning the right to summon bot(s). I'll look into this. Cheers
  17. Hi, Why not try it first. It might not be as messy as you think. A filter can be applied if you only want certain NPC's to have the bot menu. I might even build in a config option to allow server administrators to enable/disable the feature. Cheers
  18. Hi Guys, History ======= The code for 'botguy' was broken, following changes to the 'Gossip Menu system' in the core. We then pulled the code after failing to find an adequate solution, compatible with all platforms. The code was made available, so interested parties could develop the code as a separate project. However, nothing was done and a recent request by petbat prompted me to take another look. I have always thought botguy to be awkward to use. It requires a GM (gamemaster) to spawn the botguy (AKA Pappy Looter) in an appropriate location, before anyone can use it. I personally prefer to use macros to summon/dismiss bots, as any player can do this, at any time, in any location. How do I make botguy easy to use? ================================ I have now completely rewritten the code, making it more flexible, and stable to use. The new code does not require a gm to spawn a special 'bot recruiter', rather it utilizes the vast network of NPCs already distributed throughout the world. A player just has to visit the nearest npc, capable of displaying menus (e.g Trainers) to be able to summon or dismiss bot(s) at will, from his or her account. I have tested the code on both linux and windows and it works without issue. I will post the patch here for you guys to test, before I consider merging it with the code on blueboy. Please let me know what you think and whether you experience any problems. Botguy patch (Please read the botguy_readme.txt file) diff --git b/botguy_readme.txt b/botguy_readme.txt new file mode 100644 index 0000000..1834a9b --- /dev/null +++ b/botguy_readme.txt @@ -0,0 +1,12 @@ +What it is: +=========== + +The new revised'botguy' utilizes NPCs already distributed throughout the world, to allow players to +summon and dismiss bots at will, from their own account. + +This is a revised (more stable) version that utilizes the new 'GOSSIP MENU SYSTEM' to modify the menus of existing NPCs +(e.g Trainers etc) to include the bot Recruit/Dismiss menu. (No GameMaster account necessary). + +Install (Server administrators only) +======= +Please apply 'mangos_botguy.sql' once to the world database to update the 'gossip_menu_option' table. diff --git b/mangos_botguy.sql b/mangos_botguy.sql new file mode 100644 index 0000000..fffcd2e --- /dev/null +++ b/mangos_botguy.sql @@ -0,0 +1 @@ +INSERT INTO `gossip_menu_option` VALUES('0','16','0','GOSSIP_OPTION_BOT','99','1','0','0','0','0','0',NULL,'0','0','0','0','0','0','0','0','0'); diff --git a/src/game/Creature.h b/src/game/Creature.h index 666c980..0c11d89 100644 --- a/src/game/Creature.h +++ b/src/game/Creature.h @@ -401,6 +401,9 @@ class MANGOS_DLL_SPEC Creature : public Unit bool isTotem() const { return m_subtype == CREATURE_SUBTYPE_TOTEM; } bool isTemporarySummon() const { return m_subtype == CREATURE_SUBTYPE_TEMPORARY_SUMMON; } + // Playerbot mod - adds functionality to load/unload bots from NPC, also need to apply SQL scripts + void LoadBotMenu(Player *pPlayer); + void SetCorpseDelay(uint32 delay) { m_corpseDelay = delay; } bool isRacialLeader() const { return GetCreatureInfo()->RacialLeader; } bool isCivilian() const { return GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_CIVILIAN; } diff --git a/src/game/GossipDef.h b/src/game/GossipDef.h index 68744db..14beb92 100644 --- a/src/game/GossipDef.h +++ b/src/game/GossipDef.h @@ -48,6 +48,8 @@ enum Gossip_Option GOSSIP_OPTION_ARMORER = 15, //UNIT_NPC_FLAG_ARMORER (4096) GOSSIP_OPTION_UNLEARNTALENTS = 16, //UNIT_NPC_FLAG_TRAINER (16) (bonus option for GOSSIP_OPTION_TRAINER) GOSSIP_OPTION_UNLEARNPETSKILLS = 17, //UNIT_NPC_FLAG_TRAINER (16) (bonus option for GOSSIP_OPTION_TRAINER) + // Playerbot mod + GOSSIP_OPTION_BOT = 99, //UNIT_NPC_FLAG_GOSSIP (1) UNUSED (just for bot system) GOSSIP_OPTION_MAX }; diff --git a/src/game/Player.cpp b/src/game/Player.cpp index fb84b34..8affc7e 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -12663,6 +12663,11 @@ void Player::PrepareGossipMenu(WorldObject *pSource, uint32 menuId) case GOSSIP_OPTION_TABARDDESIGNER: case GOSSIP_OPTION_AUCTIONEER: break; // no checks + case GOSSIP_OPTION_BOT: + if(!pCreature->isInnkeeper()) + pCreature->LoadBotMenu(this); + bCanTalk = false; + break; default: sLog.outErrorDb("Creature entry %u have unknown gossip option %u for menu %u", pCreature->GetEntry(), itr->second.option_id, itr->second.menu_id); bCanTalk = false; @@ -12803,12 +12808,12 @@ void Player::OnGossipSelect(WorldObject* pSource, uint32 gossipListId, uint32 me } } - GossipMenuItemData pMenuData = gossipmenu.GetItemData(gossipListId); - switch(gossipOptionId) { case GOSSIP_OPTION_GOSSIP: { + GossipMenuItemData pMenuData = gossipmenu.GetItemData(gossipListId); + if (pMenuData.m_gAction_poi) PlayerTalkClass->SendPointOfInterest(pMenuData.m_gAction_poi); @@ -12892,6 +12897,25 @@ void Player::OnGossipSelect(WorldObject* pSource, uint32 gossipListId, uint32 me GetSession()->SendBattlegGroundList(guid, bgTypeId); break; } + case GOSSIP_OPTION_BOT: + { + // DEBUG_LOG("GOSSIP_OPTION_BOT"); + PlayerTalkClass->CloseGossip(); + + if (!GetPlayerbotMgr()) + SetPlayerbotMgr(new PlayerbotMgr(this)); + + uint64 guidlo = PlayerTalkClass->GossipOptionSender(gossipListId); + if(GetPlayerbotMgr()->GetPlayerBot(guidlo) != NULL) + { + GetPlayerbotMgr()->LogoutPlayerBot(guidlo); + } + else if(GetPlayerbotMgr()->GetPlayerBot(guidlo) == NULL) + { + GetPlayerbotMgr()->AddPlayerBot(guidlo); + } + break; + } } } diff --git a/src/game/PlayerbotMgr.cpp b/src/game/PlayerbotMgr.cpp index c095eb1..c3848df 100644 --- a/src/game/PlayerbotMgr.cpp +++ b/src/game/PlayerbotMgr.cpp @@ -541,6 +541,50 @@ void PlayerbotMgr::RemoveAllBotsFromGroup() } } +void Creature::LoadBotMenu(Player *pPlayer) +{ + + if (pPlayer->GetPlayerbotAI()) return; + uint64 guid = pPlayer->GetGUID(); + uint32 accountId = sObjectMgr.GetPlayerAccountIdByGUID(guid); + QueryResult *result = CharacterDatabase.PQuery("SELECT guid, name FROM characters WHERE account='%d'",accountId); + do + { + Field *fields = result->Fetch(); + uint64 guidlo = fields[0].GetUInt64(); + std::string name = fields[1].GetString(); + std::string word = ""; + + if( (guid == 0) || (guid == guidlo) ) + { + //not found or himself + } + else + { + // if(sConfig.GetBoolDefault("PlayerbotAI.DisableBots", false)) return; + // create the manager if it doesn't already exist + if (! pPlayer->GetPlayerbotMgr()) + pPlayer->SetPlayerbotMgr(new PlayerbotMgr(pPlayer)); + if(pPlayer->GetPlayerbotMgr()->GetPlayerBot(guidlo) == NULL) // add (if not already in game) + { + word += "Recruit "; + word += name; + word += " as a Bot."; + pPlayer->PlayerTalkClass->GetGossipMenu().AddMenuItem((uint8)9, word, guidlo, GOSSIP_OPTION_BOT, word, false); + } + else if(pPlayer->GetPlayerbotMgr()->GetPlayerBot(guidlo) != NULL) // remove (if in game) + { + word += "Dismiss "; + word += name; + word += " from duty."; + pPlayer->PlayerTalkClass->GetGossipMenu().AddMenuItem((uint8)0, word, guidlo, GOSSIP_OPTION_BOT, word, false); + } + } + } + while (result->NextRow()); + delete result; +} + bool ChatHandler::HandlePlayerbotCommand(const char* args) { if(!(m_session->GetSecurity() > SEC_PLAYER)) EDIT: Not all NPCs get the menu, only those who use menu_id = 0, innkeepers are also excluded. Hope this helps
  19. Hi imetallica, Thanks very much for your contribution and yes this would certainly force the combat orders to either ORDERS_TANK or ORDERS_HEAL. However the code to do this is already in place. If I may explain. The choice of combat order (co) is passed to function SetCombatOrder from function SetCombatOrderByStr. Initially m_combatOrder will have no assigned orders and therfore will equal zero. At the tail end of function SetCombatOrder, missing from your code snippet; There's code to handle all combat orders. Example (ORDER enums in PlayerbotAI.h) m_combatOrder = 0; // ORDERS_NONE co = ORDERS_HEAL; // set in function SetCombatOrderByStr ORDERS_PRIMARY = 0x0F = 00001111 ORDERS_SECONDARY = 0xF0 = 11110000 if( (co&ORDERS_PRIMARY) ) Bitwise arithmetic &(AND) | (OR) m_combatOrder = (CombatOrderType)(((uint32)m_combatOrder&(uint32)O RDERS_SECONDARY)|(uint32)co); The bitwise arithmetic is used to increase the complexity of combat orders to allow for multiple orders (e.g A bot might have a dual role to assist one bot and HEAL all). Whether this actually works in practice is another question :rolleyes: Please do not be discouraged by this, I'm learning new things about the code everyday and would be glad to have help with the code development. Trust me, the guys who originally developed Playerbot, thought of virtually everything. Thanks again, speak with you soon.
  20. Hi Guys, I have a new revision for the 'get' command (ver.3). This allows bot(s) to loot almost all gameobjects, (i,e Water Barrels, Food Crates, Chests (locked, requiring lockpicking & unlocked) as well herbs and ore deposits. The exception are special locked chests that require specific keys (e.g Benedict's Chest in Durotar). I can't find a relationship in the database between the chest and the key. The item (Benedict's key) has reference to a spell (6529, Opening Benedict's chest), but it is of no help for the bots. You can of course open this particular chest if you have lockpicking (level 100). I will update the code on blueboy shortly. Hope this helps
  21. Hi, I have just updated the code on blueboy and corrected the error that was causing the compile issue. A recent change to 'RollType' in the core was the cause of the issue. It also reminded me to update the choice variable to allow for 'disenchant' rolls. The code has been merged with MaNGOS[9848] and now compiles without issue. Hope this helps
  22. Hi , mrefire & UnkleNuke It's certainly something to tackle. As you will appreciate, I am presently doing all the development/support and it can be difficult jump from one thing to the next, particularly as I am unfamiliar with the code as a whole. When I recently looked at the class AI files, I did notice quite a difference in the coding structure. If you say that spells casting works with Druids & Warriors, then perhaps we should use the general code structure of PlayerbotDruidAI.cpp & PlayerbotWarriorAI.cpp as templates for the rest. Cheers
  23. Hi, Yes, I'm not sure playerbot was designed to be used like this. Have you tried doing the same with ONE real player and 4 bots. The bot healer should only heal other bots and the botmaster, from the same account. The other human players are on their own. Bots only serve one master. Try setting the bot's command orders to only heal the botmaster or a specific bot. or Hopefully this should prevent the crash. I might need to introduce a condition to prevent bot(s) from casting spells on other human players and then you can safely use the following command order again Hope this helps
  24. Hi, That's great, I look forward to seeing your ideas Cheers
  25. Hi, Is this typical of the crash log? Is there some event that seems to trigger the crash, or are they just random? If possible, I want to be able to reproduce the crash on my server, so I can work on a fix. Is it just the healer that causes the crash? Describe your RAID group and area(s) where crash occurs? Thanks for the info on the merge conflict, I'll look into that. 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