

blueboy
Members-
Posts
723 -
Joined
-
Last visited
Never -
Donations
0.00 GBP
Content Type
Bug Tracker
Wiki
Release Notes
Forums
Downloads
Blogs
Events
Everything posted by blueboy
-
Certainly not with playerbot at present!. One of these days I hope to form a RAID group with my boys. Each has his own GUILD of 9 bots + player. These GUILDs can be then converted into one large RAID group, but I am sure you are already aware of this
-
Hi Guys, I normally use MaNGOS on my server, but I was intrigued to find out how trinitycore compares. Particualrly with reference to the 'Death comes from on high' quest. Yes it works perfectly on trinitycore with all AURAS & spells, Attack Shroud Siphon of Acherus Summon Ghouls on Scarlet Crusade Recall Eye of Acherus I also thumbed through the changelog to see when it was fixed, and I found this; http://code.google.com/p/trinitycore/source/detail?r=6981b44a5149ba7cfc80a07c599ba7e84d429fe1 Hope this helps
-
Hi Hanpuch Where have you got your playerbot code from ? If you read my recent posts you will see that 'botguy' has been removed from the playerbot code. I see in the Creature.cpp.rej file that there is reference to 'botguy' code. + // Playerbot mod + if(isBotGiver()) + SetUInt32Value(UNIT_NPC_FLAGS, 1); + else + SetUInt32Value(UNIT_NPC_FLAGS, cinfo->npcflag); + // End Playerbot mod This was removed from Creature.cpp ages ago. It looks like your still trying to use the code on the http://github.com/playerbot/mangos github. That is well out of date and only supports MaNGOS upto [8898]. I'm not suprised you are having issues with the later versions of MaNGOS. If you read the posts on this thread from early December onwards you will see that we are now using code on the follow github repo; http://github.com/blueboy/mangos Hope this helps
-
Hi, Sorry that's the acronym I use for the 'Project Silvermoon Database'. You can obtain it from this link http://svn.assembla.com/svn/psmdb_wotlk/ as a subversion repo (e.g to get revision 279) svn co [url]http://svn.assembla.com/svn/psmdb_wotlk[/url] -r 279 I noticed you on the 'Eye of Acherus' thread. I'm also looking into that at present. I've just compiled the latest 'trinitycore' but it won't let me logon. Its less friendly than MaNGOS, telling me that my SSL library is too old. My Opensuse box runs openssl 0.9.8k, so it should work. Got any ideas, blueboy
-
Hi Judging by the version of MaNGOS used in the repack, it wouldn't be a bad idea to update. There have been alot of changes since [8876]. Repacks are great, but if you have issues they can be a nightmare to debug. I can confirm that the current version of playerbot on blueboy is stable with the following, MaNGOS [9106] SD2 [1526] PSMDB [279] AuctionHouseBot from Naicisum's github repo Autobroadcast by Xeross (old version) If you require all these mods (from the repack) then I advise that you add them one by one and check for any server instabilities. Please note: The current version of playerbot does not contain the 'botguy' code, which was found to be causing problems with server stablity. If you use 'botguy' to summon bots, then perhaps you can use the patch I posted. I recommend you check out Stillhards & yad02s fix as this seems to work well with Windows servers. I have not seen rrtn online for a while, perhaps he may have an update on his repack:) Hope this helps
-
When bots die they are resurrected in stages. 1. BOTSTATE_DEAD where the bot becomes a ghost, a corpse is created, and the ghost is relocated in the nearest graveyard. 2. BOTSTATE_DEADRELEASED where the bots ghost is teleported to it's corpse, and then resurrected. 3. BOTSTATE_NORMAL bot is alive. Occasionally bots die in the wrong state (I have noticed that the bot's avatar on the client turns blue). They are neither BOTSTATE_DEAD or BOTSTATE_DEADRELEASED. The bot is actually teleported to the players location without a ghost. It appears on the minimap, but is invisible. The only way to then resurrect the bot (prior to the fix) was to login as the bot, and then get the bot to search for it's corpse. This could be difficult, particularly if you not sure where his corpse is. PlayerbotAI:UpdateAI() handles resurrection events. NOT BOTSTATE_DEAD AND NOT BOTSTATE_DEADRELEASED It first clears relevant flags and sets the bot status to BOTSTATE_DEAD. BOTSTATE_DEAD Unfortunately, these bots already possess a corpse and the condition causes a code loop. I added a state change to BOTSTATE_DEADRELEASED, to bypass creating another corpse. BOTSTATE_DEADRELEASED bots are now teleported to the corpse and resurrected as normal. I have uploaded the fix to github
-
Yes, each account is limited to nine bots maximum
-
Hi, The short answer to your question is yes. The guys who normally look after the 'playerbot' repo are otherwise engaged. I have created 'blueboy' to keep playerbot going. I am pleased it works for you. You get an inventory of your bots by asking them to 'trade'. Right click on the bot avatar and a menu will drop down. Select trade and an exchange dialog will popup. In the background the bot will also list money and all the items it is carrying. Each item listed can be used as an 'item link' by holding the shift key down and selecting it with your mouse. e.g /w [botname] <item link> item will then appear in the trade dialog To exchange money /w [botname] 1g 1 gold piece will be offered by the bot, if it has it to trade, in the exchange dialog (g - gold, s - silver, c - copper). Note 'soulbound' items can not be traded. There is no graphical 'inventory' dialog, like the 'inspect' dialog. Bot will only loot items that are necessary for them to complete quests (Exception: They will participate in group loot rolls for special items). If you wish, you can ask the bots to inform you of items they require, For individual bots, whisper /w [botname] report For groups of bots, party /p report For more info on using your bots look at 'bot_readme.txt' in the source or this link http://wiki.github.com/playerbot/mangos Hope this helps
-
Hi, Look inside 'user.h.rej' and see where the conflict occurs. When the patch is applied the computer searches the files for a 'pattern' in the code. If the pattern is not found a conflict is flagged and it Fails producing a '.rej' file. If the core MaNGOS code changes or changes as a result of a previously applied patch * The patch suceeds if the pattern exists, but offset from original location. * The patch fails if the pattern nolonger exists before or after patch mod Look at the patterns shown in the patch file, and look at the code your trying to patch. See if there are differences. Look carefully, the slightest difference will break the patch (Info inside '.rej' file). Example Hope this helps
-
As promised, here is the botguy patch I created. Only apply this if and when 'botguy' has been removed from blueboy. I'll wait a day or so before I do this, should anyone object. diff --git a/dev/null b/mangos_botguy.sql new file mode 100644 index 0000000..82b8945 --- /dev/null +++ b/mangos_botguy.sql @@ -0,0 +1,2 @@ +INSERT INTO `creature_template` VALUES('99002','0','0','0','0','0','20','0','20','0','Pappy Looter','The BotRecruiter',NULL,'0','59','61','6700','24000','5598','5875','20','35','35','1','1.48','0','0','181','189','0','158','1','1400','1900','0','0','0','0','0','0','0','0','0','0','100','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','1','3','1','1','0','0','0','0','0','0','0','0','1','0','0','0','bot_giver'); + diff --git a/dev/null b/mangos_command_bot.sql new file mode 100644 index 0000000..fdd594b --- /dev/null +++ b/mangos_command_bot.sql @@ -0,0 +1 @@ +INSERT INTO `command`(`name`,`security`,`help`) values ('bot',0,'Syntax: .bot [$command] [$playername]\\r\\n\\r\\nadd [$playername] or remove [$playername]'); diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index e0a7c6b..0ab4315 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -287,7 +287,12 @@ bool Creature::UpdateEntry(uint32 Entry, uint32 team, const CreatureData *data ) else setFaction(GetCreatureInfo()->faction_A); - SetUInt32Value(UNIT_NPC_FLAGS,GetCreatureInfo()->npcflag); + // Playerbot START + if(isBotGiver()) + SetUInt32Value(UNIT_NPC_FLAGS, 1); + else + SetUInt32Value(UNIT_NPC_FLAGS,GetCreatureInfo()->npcflag); + // Playerbot END SetAttackTime(BASE_ATTACK, GetCreatureInfo()->baseattacktime); SetAttackTime(OFF_ATTACK, GetCreatureInfo()->baseattacktime); @@ -1248,7 +1253,12 @@ void Creature::setDeathState(DeathState s) RemoveFlag (UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE); AddMonsterMoveFlag(MONSTER_MOVE_WALK); - SetUInt32Value(UNIT_NPC_FLAGS, cinfo->npcflag); + // Playerbot mod + if(isBotGiver()) + SetUInt32Value(UNIT_NPC_FLAGS, 1); + else + SetUInt32Value(UNIT_NPC_FLAGS, cinfo->npcflag); + // End Playerbot mod Unit::setDeathState(ALIVE); clearUnitState(UNIT_STAT_ALL_STATE); diff --git a/src/game/Creature.h b/src/game/Creature.h index f7082f9..fda3371 100644 --- a/src/game/Creature.h +++ b/src/game/Creature.h @@ -392,6 +392,10 @@ class MANGOS_DLL_SPEC Creature : public Unit bool isRacialLeader() const { return GetCreatureInfo()->RacialLeader; } bool isCivilian() const { return GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_CIVILIAN; } + // Playerbot mod - adds functionality to load/unload bots from NPC, also need to apply SQL scripts + bool isBotGiver(); + void LoadBotMenu(Player *pPlayer); + bool canWalk() const { return GetCreatureInfo()->InhabitType & INHABIT_GROUND; } bool canSwim() const { return GetCreatureInfo()->InhabitType & INHABIT_WATER; } bool canFly() const { return GetCreatureInfo()->InhabitType & INHABIT_AIR; } diff --git a/src/game/GossipDef.h b/src/game/GossipDef.h index 36c4435..2192e21 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, //UNUSED (just for bot system) GOSSIP_OPTION_MAX }; diff --git a/src/game/NPCHandler.cpp b/src/game/NPCHandler.cpp index a489f8b..5ad72f1 100644 --- a/src/game/NPCHandler.cpp +++ b/src/game/NPCHandler.cpp @@ -33,6 +33,7 @@ #include "Creature.h" #include "Pet.h" #include "Guild.h" +#include "PlayerbotMgr.h" void WorldSession::HandleTabardVendorActivateOpcode( WorldPacket & recv_data ) { @@ -268,7 +269,15 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket & recv_data) if (GetPlayer()->hasUnitState(UNIT_STAT_DIED)) GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH); - if (!pCreature->IsStopped()) + // Playerbot mod + if(pCreature->isBotGiver()) + { + _player->TalkedToCreature(pCreature->GetEntry(),pCreature->GetGUID()); + _player->PrepareGossipMenu(pCreature,GOSSIP_OPTION_BOT); + _player->SendPreparedGossip(pCreature); + pCreature->StopMoving(); + } + else if (!pCreature->IsStopped()) pCreature->StopMoving(); if (pCreature->isSpiritGuide()) @@ -304,6 +313,28 @@ void WorldSession::HandleGossipSelectOptionOpcode( WorldPacket & recv_data ) if (GetPlayer()->hasUnitState(UNIT_STAT_DIED)) GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH); + // Playerbot mod + Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE); + + if(pCreature->isBotGiver() && !_player->GetPlayerbotAI()) + { + if (!_player->GetPlayerbotMgr()) + _player->SetPlayerbotMgr(new PlayerbotMgr(_player)); + + WorldSession * m_session = _player->GetSession(); + uint64 guidlo = _player->PlayerTalkClass->GossipOptionSender(gossipListId); + if(_player->GetPlayerbotMgr()->GetPlayerBot(guidlo) != NULL) + { + _player->GetPlayerbotMgr()->LogoutPlayerBot(guidlo); + } + else if(_player->GetPlayerbotMgr()->GetPlayerBot(guidlo) == NULL) + { + _player->GetPlayerbotMgr()->AddPlayerBot(guidlo); + } + _player->PlayerTalkClass->CloseGossip(); + return; + } + // TODO: determine if scriptCall is needed for GO and also if scriptCall can be same as current, with modified argument WorldObject* // can vehicle have gossip? If so, need check for this also. diff --git a/src/game/Player.cpp b/src/game/Player.cpp index c7bc990..a8746e1 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -12257,6 +12257,12 @@ void Player::PrepareGossipMenu(WorldObject *pSource, uint32 menuId) GossipMenuItemsMapBounds pMenuItemBounds = sObjectMgr.GetGossipMenuItemsMapBounds(menuId); + // Playerbot mod + Creature *pCreature = (Creature*)pSource; + + if (pCreature->isBotGiver()) + pCreature->LoadBotMenu(this); + // if default menuId and no menu options exist for this, use options from default options if (pMenuItemBounds.first == pMenuItemBounds.second && menuId == GetDefaultGossipMenuForSource(pSource)) pMenuItemBounds = sObjectMgr.GetGossipMenuItemsMapBounds(0); @@ -12555,6 +12561,10 @@ void Player::OnGossipSelect(WorldObject* pSource, uint32 gossipListId, uint32 me GetSession()->SendBattlegGroundList(guid, bgTypeId); break; } + // Playerbot START + case GOSSIP_OPTION_BOT: + break; + // Playerbot END } } diff --git a/src/game/PlayerbotMgr.cpp b/src/game/PlayerbotMgr.cpp index 0abd67d..a1d4b95 100644 --- a/src/game/PlayerbotMgr.cpp +++ b/src/game/PlayerbotMgr.cpp @@ -580,4 +580,56 @@ bool ChatHandler::HandlePlayerbotCommand(const char* args) } return true; +} + +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, guidlo, 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, guidlo, word, false); + } + } + } + while (result->NextRow()); + delete result; +} + +bool Creature::isBotGiver() +{ + std::string scriptname = GetScriptName(); + if( scriptname == "bot_giver" ) + return true; + return false; } \\ No newline at end of file Inside source root; To test patch patch --dry-run -p1 < botguy.patch To apply patch patch -p1 < botguy.patch
-
Sorry, I don't. Ebon Hold definitely need work, particularly the 'Death Comes From On High' quest. Perhaps you could leave him a message. Cheers blueboy
-
Hi Guys, If it is acceptable to everyone I will remove 'botguy' code from playerbot. I will then create an installable 'botguy.patch' that I will post on this forum. If you can do the same with your patches, then members can choose which patch they prefer. In the long run, it wouldl be prudent to create a separate fork off playerbot for botguy, so the public can access the code from github. The preferred solution can be upload there. Perhaps a volunteer can then managing this. Please get back to me
-
Oh Boy, I have provoked a great deal of discussion between you guys, and thats good. Believe it or not I have carefully read all of your posts and agree with virtually all that has been said. Sorry to erazare; if you think your reply was a story, here's the trilogy. It would help if members briefly described their systems, when posting new issues. @yad02 Thanks for your Druid tank fix. I have installed it on my server, but have not had chance to test it. My Druid has not yet got 'Dire Bear Form', but your code looks good. Your botguy fix is different again, and I will certainly try it out. I believe that all systems are unique in their own way, and all fixes are valid, and non should be discounted. @policent I understand your concerns and agree that in the long term it might be better to separate 'playerbot' from 'botguy'. Change the value of GOSSIP_OPTION_BOT to a smaller value would reduce the iterations in a 'for loop', but thats another story. If I understand you right, your working on a new AI for priests. It worth looking at the AI's already written to glean ideas. Use flags in the code, to test your logic. @erazare I agree that 'botguy' is diverting our attention away from the AI. I prefer not to use 'botguy' myself. Macros allow ordinary players to summon and dismiss bots at will, without the need of a 'GM' and without the overhead of additional code. I support the suggestion that we should separate 'botguy' from 'playerbot'. If there is a desire to use 'botguy' in the future, then a fork off 'playerbot' (sub-thread) would be a good idea. Then we can concentrate on supporting 'playerbot' AI. In the meantime I suggest we join forces and create installable git patches for those who wish to use it. I will create one that works on my system, and perhaps we can get patches for the other approaches. Then it is upto the individual to choose which patch they prefer. When I started on this forum, about a month ago I wanted to devote my attention to developing the AI of playerbot. However it seem that I have been left holding the baby. I like to help people and as issues have arisen, I have tried to address these. It has been difficult. I was so pleased by ckegg's recent submission to resolve the 'player already has a corpse'problem. There are still issues with handling bots at player logoff. Your suggestion touches on an issue I believe exists in 'playerbot', and must be resolved Bots become permanently dead. I have noticed that if a bot dies and the player logs out before it has time to resurrect. When the player logs in again, the summoned bot will not resurrect. The only way to revive it is by logging in as the bot, resurrecting it, and then logging out again. It can then be summoned as a useful bot again. The short term solution would be to ensure that all bots are alive before the player logsout. Online help in the use of playerbot, sounds nice. Perhaps you can share the mod, when it is ready. Auctionhousebot should stock the auctionhouse automatically. I use code from http://github.com/Naicisum/mangos, and it works well. This is what i did; 1. created an account solely for the auctionhousebot. 2. created a character in this account using the wow client. 3. configure 'mangosd.conf' with account id, bot character id, and items you wish to appear in the auctionhouse. 4. Log in at least once with the auctionhousebot character. Make sure that 'auctionhousebot' table in the Character database is configure correctly. The default value of 'maxitems' field is zero. Don't be suprised if nothing appears in the auctionhouse. Change this to something real like '500' and you can then leave auctionhousebot to run itself. @Stillhard Thanks for your comments, and I fully agree. @KiriX It is difficult for one guy to support all systems. As I stated in my last post, I think this present issue is one of system compatibility. What works on my system would not necessarily work on yours. No one is suggesting that we should ignore Windows in preference for linux. If you run Windows, we would welcome your input. I agree with erazare in separating 'botguy' and 'playerbot', we can focus on their individual development. Cheers to you all, blueboy
-
Hi All, I can see that this is turning into a 'Mine is better than yours' arguement. I am glad that Stillhard fix works for those who have recently wished to contribute. However I disagree with the comments, If you actually look at the code on http://github.com/playerbot/mangos you will see this is not so In the original function prepareGossipMenu() located in Creature.cpp, you will see that void Creature::PrepareGossipMenu( Player *pPlayer,uint32 gossipid ) { PlayerMenu* pm=pPlayer->PlayerTalkClass; pm->ClearMenus(); // lazy loading single time at use LoadGossipOptions(); // Playerbot mod if(isBotGiver()) LoadBotMenu(pPlayer); for( GossipOptionList::iterator i = m_goptions.begin( ); i != m_goptions.end( ); ++i ) { GossipOption* gso=&*i; if(gso->GossipId == gossipid) { bool cantalking=true; if(gso->Id==1) { uint32 textid=GetNpcTextId(); GossipText const* gossiptext=sObjectMgr.GetGossipText(textid); if(!gossiptext) cantalking=false; } else { switch (gso->Action) { case GOSSIP_OPTION_QUESTGIVER: pPlayer->PrepareQuestMenu(GetGUID()); //if (pm->GetQuestMenu()->MenuItemCount() == 0) cantalking=false; //pm->GetQuestMenu()->ClearMenu(); break; case GOSSIP_OPTION_ARMORER: cantalking=false; // added in special mode break; case GOSSIP_OPTION_SPIRITHEALER: if( !pPlayer->isDead() ) cantalking=false; break; case GOSSIP_OPTION_VENDOR: { VendorItemData const* vItems = GetVendorItems(); if(!vItems || vItems->Empty()) { sLog.outErrorDb("Creature %u (Entry: %u) have UNIT_NPC_FLAG_VENDOR but have empty trading item list.", GetGUIDLow(),GetEntry()); cantalking=false; } break; } case GOSSIP_OPTION_TRAINER: if(!isCanTrainingOf(pPlayer,false)) cantalking=false; break; case GOSSIP_OPTION_UNLEARNTALENTS: if(!isCanTrainingAndResetTalentsOf(pPlayer)) cantalking=false; break; case GOSSIP_OPTION_UNLEARNPETSKILLS: if(!pPlayer->GetPet() || pPlayer->GetPet()->getPetType() != HUNTER_PET || pPlayer->GetPet()->m_spells.size() <= 1 || GetCreatureInfo()->trainer_type != TRAINER_TYPE_PETS || GetCreatureInfo()->trainer_class != CLASS_HUNTER) cantalking=false; break; case GOSSIP_OPTION_TAXIVENDOR: if ( pPlayer->GetSession()->SendLearnNewTaxiNode(this) ) return; break; case GOSSIP_OPTION_BATTLEFIELD: if(!isCanInteractWithBattleMaster(pPlayer,false)) cantalking=false; break; case GOSSIP_OPTION_SPIRITGUIDE: case GOSSIP_OPTION_INNKEEPER: case GOSSIP_OPTION_BANKER: case GOSSIP_OPTION_PETITIONER: case GOSSIP_OPTION_STABLEPET: case GOSSIP_OPTION_TABARDDESIGNER: case GOSSIP_OPTION_AUCTIONEER: break; // no checks default: sLog.outErrorDb("Creature %u (entry: %u) have unknown gossip option %u",GetDBTableGUIDLow(),GetEntry(),gso->Action); break; } } //note for future dev: should have database fields for BoxMessage & BoxMoney if(!gso->OptionText.empty() && cantalking) { std::string OptionText = gso->OptionText; std::string BoxText = gso->BoxText; int loc_idx = pPlayer->GetSession()->GetSessionDbLocaleIndex(); if (loc_idx >= 0) { NpcOptionLocale const *no = sObjectMgr.GetNpcOptionLocale(gso->Id); if (no) { if (no->OptionText.size() > (size_t)loc_idx && !no->OptionText[loc_idx].empty()) OptionText=no->OptionText[loc_idx]; if (no->BoxText.size() > (size_t)loc_idx && !no->BoxText[loc_idx].empty()) BoxText=no->BoxText[loc_idx]; } } pm->GetGossipMenu().AddMenuItem((uint8)gso->Icon,OptionText, gossipid,gso->Action,BoxText,gso->BoxMoney,gso->Coded); } } } ///some gossips aren't handled in normal way ... so we need to do it this way .. TODO: handle it in normal way ;-) if(pm->Empty()) { if(HasFlag(UNIT_NPC_FLAGS,UNIT_NPC_FLAG_TRAINER)) { isCanTrainingOf(pPlayer,true); // output error message if need } if(HasFlag(UNIT_NPC_FLAGS,UNIT_NPC_FLAG_BATTLEMASTER)) { isCanInteractWithBattleMaster(pPlayer,true); // output error message if need } } } prepareGossipMenu() is only called once each time a NPC is selected, and LoadBotMenu once if the NPC is 'Pappy Looter'. Stillhard has moved the playerbot mod inside an iterative loop in the new function PrepareGossipMenu() located in Player.cpp. Now, LoadBotMenu is called 16 times, each time 'Pappy Looter' is selected. LoadBotMenu contains all the code necessary to display menu options for all available bots. It only needs to be called ONCE! 'Pound to a penny' that this is a Windows 2003 vs Linux compatiblity issue. I know that KiriX uses Windows, and I suspect that Stillhard does too. It might be necessary to write conditional code, depending on which system is used. I hope this is clear to you all
-
Hi KiriX, Glad you got your crash sorted out although I can't see how Stillhard's fix can possibly work. The only real difference between your system and mine is that I run a linux server, while you run a Windows 2003 server. I run the code as is on blueboy, and it has never crashed. Regards blueboy
-
1. Can you give me any more details? :rolleyes: i.e Describe your system, which version of ScriptDev2 are you using, any other mods used. 2. Did it crash during compilation or runtime? 3. What were you doing when it crashed? i.e were you trying to use 'Pappy Looter' for instance 4. How did you apply playerbot to MaNGOS [9044], the code was adjusted for MaNGOS [9043]. i.e Did you try merging or did you create a 'patch' and apply this to a fresh MaNGOS [9044]? Please get back to me, blueboy
-
The new playerbot code has now been uploaded to blueboy. This is compatible with MaNGOS [9043], and compiles without error. The new code incorporates my 'botguy' code fix, and so far seems to work well without server crashes. If you would like to use 'botguy' with playerbot, 1. Apply both sql files to the mangos database, 2. You will need to logon with a 'gamesmaster' account to use .npc command 3. To summon 'Pappy Looter', whisper 4. Select 'Pappy Looter' to add and remove bots at will. 5. To dismiss 'Pappy Looter', select him with mouse and then whisper, Merry Christmas to you all, blueboy
-
I tried to use botguy with your positioning of code in Player.cpp, i.e for(GossipMenuItemsMap::const_iterator itr = pMenuItemBounds.first; itr != pMenuItemBounds.second; ++itr) { bool bCanTalk = true; if (itr->second.cond_1 && !sObjectMgr.IsPlayerMeetToCondition(this, itr->second.cond_1)) continue; if (itr->second.cond_2 && !sObjectMgr.IsPlayerMeetToCondition(this, itr->second.cond_2)) continue; if (itr->second.cond_3 && !sObjectMgr.IsPlayerMeetToCondition(this, itr->second.cond_3)) continue; if (pSource->GetTypeId() == TYPEID_UNIT) { Creature *pCreature = (Creature*)pSource; uint32 npcflags = pCreature->GetUInt32Value(UNIT_NPC_FLAGS); if(pCreature->isBotGiver()) pCreature->LoadBotMenu(this); if (!(itr->second.npc_option_npcflag & npcflags)) and I got an assertion error in GossipDef.cpp @ line 40: Error: Assertion in AddMenuItem failed: m_gItems.size() <= 64. I looked at the link you provided to prove you had solved the problem and all it said was, I do not see how you got it to work, as is. I however have got it to work 100% with some adjustment, and if anyone is interested I will post the code to blueboy. Regards blueboy
-
Hi Stillhard, I see what you did. I added a declaration of 'pCreature' pointer, to retain position of the playerbot mod in the function 'PrepareGossipMenu()'. You moved the playerbot mod. Interesting, can you tell me, * Do you use the 'mangos botguy' ? // everyone who replied at the time told me that the code was redundant. * Did your move stop the server crashes ? // crash occured when spawned 'botguy' was selected. Sorry for missing your post to 'Windows Crash Dumps', I am not notified of posts from that thread. Regards blueboy
-
Can you be more specific? Which versions of NPCHandler.cpp are you comparing (i.e MaNGOS version & blueboy version). Give examples of lines that are missing, line numbers if possible I have recently removed all playerbot mods from NPCHandler.cpp in blueboy. This was by request to resolve server crash issues, believed to be caused by 'mangos botguy'. Nothing else has been removed. Please get back to me
-
Hi LordPsyan, (I'm running 3.2.2a, MaNGOS[8965] & SD2 1513) You say you get a compiler error, can you provide error details. I have looked at the code and MOVEMENTFLAG_FL YING & MOVEMENTFLAG_FL YING2 are both valid flags (declared in Player.h). Regards blueboy
-
Hi, Did you see the edited version of my last post. With your fix, you swapped the NPCHandler.cpp from a clone of the MaNGOS branch with that of blueboy. As I pointed out the modified blueboy (without botguy code) has no playerbot mod code in NCPHandler.cpp, so I am not suprised it worked. I uploaded this to blueboy several hours ago, (root = blueboy, forgot to switch user :rolleyes: ) and checked that it merges this with MaNGOS [9015]. The code is still on test, as there are still issues to be resolved. Hope this helps
-
Hi KiriX, Your English is a much better than my Russian We are testing playerbot code from blueboy, with MaNGOS [8965]. Unitil we have resolved existing issues I do not think it wise to try merging with MaNGOS [9014]. I am sure this will create it's own problems. If you want to merge the code with MaNGOS [9014] take a look inside NPCHandler.cpp and see where conflicts occur. As I suggested in my previous post, look at MaNGOS changelog to see what has altered and maybe you can resolve the conflict yourself. We will update the patch as soon as we can. Just a thought! The code I am testing at present has no playerbot code in NPCHandler.cpp, so it should work with MaNGOS [9014]. I will be uploading this code to blueboy in a few hours. Hope this helps
-
Hi, Thanks for your post. I think I have removed all of the code pertaining to botguy, NPCHandler.cpp all playerbot mods Player.cpp @ 12188 mods inside PrepareGossipMenu() @ 12487 mods inside OnGossipSelect() Creature.cpp @287 mods inside UpdateEntry() @1247 mods inside setDeathState() Creature.h @391 isBotGiver() & LoadBotMenu() prototypes GossipDef.h @48 GOSSIP_OPTION_BOT declaration PlayerbotMgr.cpp isBotGiver() & LoadBotMenu() declarations from my local code. If it O.K & the server stops crashing, I will upload the changes to blueboy. The differences between blueboy and playerbot are as follows, 1. blueboy http://github.com/blueboy/mangos is my personal fork off the main playerbot branch http://github.com/playerbot/mangos. 2. I do not have authority to upload to playerbot. I want to share my code with you guys so I created blueboy as a test bed. If the code checks out, then the owners of playerbot can pull my code. Anyone with a github account can do what I have done & create a repo of their own, to share ideas. 3. Playerbot is seriously out of date. Playerbot is compatible with MaNGOS [8898] whilst blueboy is compatible with MaNGOS [8965] Setting a series of options for your healer I presume you use macros at the wow client? Press Esc and select 'Macros' from the popup menu. I have macros to summon the bots and macros to give the bots command orders, .bot add hewy .bot add dewy .bot add lewy .bot co hewy tank // group tank .bot co dewy heal // heals all bots & player .bot co lewy assist donald // help just the player I even have one to get all your (group bots) to attack a selected target /point I hope this helps
-
By going through the same headache as I did. Essentially follow the instructions suggested by collinsp in the first post of the forum i.e http://wiki.github.com/playerbot/mangos 1. Create fork repo off playerbot or a branch of your choosing 2. clone this to your harddrive. // git clone <repo address>. git branch, should be labelled 'master' 3. add the MaNGOS branch as a remote repo. // git remote add mangos <repo address> I believe you can only merge with the HEAD of the MaNGOS branch, i.e latest version. 4 merge by pulling the 'mangos' branch into your local repo 'master' // git pull mangos master It will most probably complain bitterly about conflicts at this stage. It suggests you fix the issues manually and then commit. Best of luck One good thing is it marks each file where a conflict has been found. Examine changes that have been made to the MaNGOS branch. http://www.manground.org/mangosChangelog.html This should point you in the right direction. If all goes well, 5. git status // lists all files that have been modified 6. git add <each modified file> 7. git commit -a -m "commit description" // prime the code ready to upload 8. git push // upload to your repo online Hope this helps
Contact Us
To contact us
click here
You can also email us at [email protected]
Privacy Policy | Terms & Conditions

You can also email us at [email protected]
Privacy Policy | Terms & Conditions
Copyright © getMaNGOS. All rights Reserved.
This website is in no way associated with or endorsed by Blizzard Entertainment®
This website is in no way associated with or endorsed by Blizzard Entertainment®