Jump to content

Playerbot (archive)


Recommended Posts

can bots use items contained in objects ?

Here is a demo as i was thinking:

/w (botname) survey He reports (for example): [Milly's Harvest]

then i do /w (botname) find [Milly's Harvest] after he goes to that object , i do /w (botname) use

then he reports something like this : [Milly's Harvest] , then i do /w (botname) take [Milly's Harvest]

hope it can be done without problems

Link to comment
Share on other sites

  • Replies 1.8k
  • Created
  • Last Reply

Top Posters In This Topic

can bots use items contained in objects ?

Here is a demo as i was thinking:

/w (botname) survey He reports (for example): [Milly's Harvest]

then i do /w (botname) find [Milly's Harvest] after he goes to that object , i do /w (botname) use

then he reports something like this : [Milly's Harvest] , then i do /w (botname) take [Milly's Harvest]

hope it can be done without problems

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

Link to comment
Share on other sites

you could make the bots not to teleport and it should do

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

Link to comment
Share on other sites

can bots use items contained in objects ?

Here is a demo as i was thinking:

/w (botname) survey He reports (for example): [Milly's Harvest]

then i do /w (botname) find [Milly's Harvest] after he goes to that object , i do /w (botname) use

then he reports something like this : [Milly's Harvest] , then i do /w (botname) take [Milly's Harvest]

hope it can be done without problems

wow! what a lot of commands for so simple action ! why not "/w botname scan" or else and the bot scan and pick or use items in interaction range !

Link to comment
Share on other sites

Blueboy,here is another suggestion for the bot repair system:

Case I : Invite the bots into a party,when you repair ,they repair too,if they have money.

Case II(similar with case I): when the player repairs they repair 2 if they have money, without partying , they repair because your character repairs so it is somehow like a selection from the "human character" and then from the "computer players"

Sorry for overloading with suggestions, i would love to help unfortunetly i have no one to actually teach me gaming programming.

Link to comment
Share on other sites

Thanks for the very successful patch to limit the number of bots per account. I have another suggestion for you, blueboy.

How about upgrading the patch to remove the limiting of bots based on the account's security level? This way, ordinary players would still have the limit imposed but, a GM or Moderator could summon the full nine bots for testing purposes.

It may read something like this in the Playerbot section of mangosd.conf:

#
#  PlayerbotAI.GMNumBots
#  Allows accounts at or above the security level specified to bypass the MaxNumBots limit. 
#Default: 3 - GM/Administrator can always summon up to 9 bots.
#

Just a thought. :)

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;

SEC_PLAYER

SEC_MODERATOR

SEC_GAMEMASTER

SEC_ADMINISTRATOR

SEC_CONSOLE

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

Link to comment
Share on other sites

Blueboy,here is another suggestion for the bot repair system:

Case I : Invite the bots into a party,when you repair ,they repair too,if they have money.

Case II(similar with case I): when the player repairs they repair 2 if they have money, without partying , they repair because your character repairs so it is somehow like a selection from the "human character" and then from the "computer players"

Sorry for overloading with suggestions, i would love to help unfortunetly i have no one to actually teach me gaming programming.

Hi,

Thanks for the suggestions, keep them coming I will tackle them if and when I can. I will shortly post the get.patch which will update the survey.patch, to allow you to complete collection type quests. Eventually, I want the get command to also direct bots to mill, mine and loot game objects. I have not forgotten the suggestion to repair bots, I will now take a look at this

Thanks again

Link to comment
Share on other sites

Hi Guys,

As promised here is the initial release of the get.patch. This patch works in conjunction with the previous survey.patch, that must be applied to the playerbot code first. It is quite simple to use, allowing bot(s) to loot gameobjects for quest items (e.g Milly's Harvest).

/w <botname> get <link string>

item is retrieved for single bot.

/p get <link string>

item is retrieved for one bot at a time, in party.

I have now overcome the remote looting issue, that prevented bot(s) from looting the object, far from the player. The player can now remain a safe distance from the object (Like all good Generals), or go in close with the bot(s).

diff --git a/src/game/PlayerbotAI.cpp b/src/game/PlayerbotAI.cpp
index 091a14f..e915cce 100644
--- a/src/game/PlayerbotAI.cpp
+++ b/src/game/PlayerbotAI.cpp
@@ -2762,6 +2762,99 @@ void PlayerbotAI::HandleCommand(const std::string& text, Player& fromPlayer)
               SendWhisper("I have no info on that object", fromPlayer);
     }

+    // Get project: 15:40 22/03/10 rev.1 allows bots to loot gameobjects for quest items
+    else if (text.size() > 2 && text.substr(0, 2) == "g " || text.size() > 4 && text.substr(0, 4) == "get ")
+    {
+        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_lootCurrent = MAKE_NEW_GUID(guid, entry, HIGHGUID_GAMEOBJECT);
+            GameObject *go = m_bot->GetMap()->GetGameObject(m_lootCurrent);
+            if(!go)
+            {
+                m_lootCurrent = 0;
+                return;
+            }
+            SetState(BOTSTATE_LOOTING);
+            m_bot->UpdateGroundPositionZ(x,y,z);
+            m_bot->GetMotionMaster()->MovePoint( mapid, x, y, z );
+            m_bot->SetPosition(x, y, z, m_bot->GetOrientation());
+            m_ignoreAIUpdatesUntilTime = time(0) + 5;
+            m_bot->SendLoot( m_lootCurrent, LOOT_CORPSE );
+            Loot *loot = &go->loot;
+            uint32 lootNum = loot->GetMaxSlotInLootFor( m_bot );
+            //sLog.outDebug( "[PlayerbotAI]: GetGOType %u - %s looting: '%s' got %d items", go->GetGoType(), m_bot->GetName(), go->GetGOInfo()->name, loot->GetMaxSlotInLootFor( m_bot ));
+            for( uint32 l=0; l<lootNum; l++ )
+            {
+                QuestItem *qitem=0, *ffaitem=0, *conditem=0;
+                LootItem *item = loot->LootItemInSlot( l, m_bot, &qitem, &ffaitem, &conditem );
+                if( !item )
+                    continue;
+
+                if( !qitem && item->is_blocked )
+                {
+                    m_bot->SendLootRelease( m_lootCurrent );
+                    continue;
+                }
+
+                if( m_needItemList[item->itemid]>0 )
+                {
+                    ItemPosCountVec dest;
+                    if( m_bot->CanStoreNewItem( NULL_BAG, NULL_SLOT, dest, item->itemid, item->count ) == EQUIP_ERR_OK )
+                    {
+                        Item * newitem = m_bot->StoreNewItem( dest, item->itemid, true, item->randomPropertyId);
+
+                        if( qitem )
+                        {
+                            qitem->is_looted = true;
+                            if( item->freeforall || loot->GetPlayerQuestItems().size() == 1 )
+                                m_bot->SendNotifyLootItemRemoved( l );
+                            else
+                                loot->NotifyQuestItemRemoved( qitem->index );
+                        }
+                        else
+                        {
+                            if( ffaitem )
+                            {
+                                ffaitem->is_looted=true;
+                                m_bot->SendNotifyLootItemRemoved( l );
+                            }
+                            else
+                            {
+                                if( conditem )
+                                    conditem->is_looted=true;
+                                loot->NotifyItemRemoved( l );
+                            }
+                        }
+                        if (!item->freeforall)
+                            item->is_looted = true;
+                        --loot->unlootedCount;
+                        sLog.outDebug( "[PlayerbotAI]: %s looting: needed item UpdateAchievementCriteria", m_bot->GetName());
+                        m_bot->SendNewItem( newitem, uint32(item->count), false, false, true );
+                        m_bot->GetAchievementMgr().UpdateAchievementCriteria( ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM, item->itemid, item->count );
+                    }
+                }
+            }
+            // release loot
+            m_bot->GetSession()->DoLootRelease( m_lootCurrent );
+
+            // clear movement target, take next target on next update
+            m_bot->GetMotionMaster()->Clear();
+            m_bot->GetMotionMaster()->MoveIdle();
+            sLog.outDebug( "[PlayerbotAI]: %s looted target 0x%08X", m_bot->GetName(), m_lootCurrent );
+            SetState(BOTSTATE_NORMAL);
+            SetQuestNeedItems();
+            m_lootCurrent = 0;
+        }
+        else
+            SendWhisper("I have no info on that object", fromPlayer);
+    }
+
        else if (text == "quests")
        {
               bool hasIncompleteQuests = false;

Hope you like it, and please provide feedback

Link to comment
Share on other sites

Right, i have it compiled like this: mangos core last rev + playerbot + detection.patch + get.patch + vehicle(last update) + ahbot + dual spec and it somehow freezes ... dont know why , probably from the ahbot but im not sure

Yes you are right it freeze the client and not the server with "core" playerbot with some monsters

Link to comment
Share on other sites

Right, i have it compiled like this: mangos core last rev + playerbot + detection.patch + get.patch + vehicle(last update) + ahbot + dual spec and it somehow freezes ... dont know why , probably from the ahbot but im not sure

Hi,

When you say it freezes, is this as the server loads or when you try to logon?

I have had some issues myself with this recently, at logon; after creating a new build.

First issue

One thing I get is an issue loading the Blizzard addons. I occasionally get 'CRC' errors, and the mangosd daemon freezes. Close it down and follow my temporary fix.

How to fix. I delete the 'Cache' folder on the client and all the Blizzard Addons in 'Program Files\\World of Warcraft\\Interface\\AddOns'. Don't worry these are all rebuilt, when you succesfully login.

Restart the server, and it should be O.K.

Second Issue

Sometimes it takes awhile to logon. Nothing actually freezes, but it seems to go to sleep. This might be some kind of network lag between the server and client.

Hard to pinpoint what is causing these issues, particularly if your using many mods in combination.

Hope this helps

Link to comment
Share on other sites

I am using ahbot + playerbot (core) and no problems (except aura...)

Hi mrelfire,

I haven't forgotten your aura issue. I have now managed to build a server on Windows. I haven't had any problems yet, but then again I do not have much time to play :-( Your server probably has a higher population, to stress it out! The box I built the server on is quite modest (i.e 32bit), I know your using a 64bit box. This might have a bearing.

Everyone If any of you apart from mrelfire & Bramm are having issues with HasAura, please let me know.

Cheers

Link to comment
Share on other sites

Right, i have it compiled like this: mangos core last rev + playerbot + detection.patch + get.patch + vehicle(last update) + ahbot + dual spec and it somehow freezes ... dont know why , probably from the ahbot but im not sure

Yes it's from ahbot I have most of the same patches and I'm getting freeze up at ahbot try turning the buyer and seller off and you should be fine....I think we've narrowed the ahbot down to Windows and between 9606 and 9611 comits but I haven't heard anymore yet, I've also tried skinlayers repo and get the same thing.

Link to comment
Share on other sites

Hi,

When you say it freezes, is this as the server loads or when you try to logon?

I have had some issues myself with this recently, at logon; after creating a new build.

First issue

Second Issue

Hard to pinpoint what is causing these issues, particularly if your using many mods in combination.

Hope this helps

It is only the client who freeze not the server, but all the client at the same time: we play at 4 with 4 bots each

Link to comment
Share on other sites

It is only the client who freeze not the server, but all the client at the same time: we play at 4 with 4 bots each

O.K,

Thanks for clarifying. The original post did not make this clear. If all your clients are freezing at the same time, that does suggest that the server is not responding (unduly busy). If the server has not frozen, do the clients work again if left, or do they remain frozen?

Have you tried DaemonCantor's, suggestion of disabling auctionhousebot mod in 'mangosd.conf'?

Cheers

Link to comment
Share on other sites

O.K,

Thanks for clarifying. The original post did not make this clear. If all your clients are freezing at the same time, that does suggest that the server is not responding (unduly busy). If the server has not frozen, do the clients work again if left, or do they remain frozen?

Have you tried DaemonCantor's, suggestion of disabling auctionhousebot mod in 'mangosd.conf'?

Cheers

The server doesn' freeze at all, we kill our client, and we all are able to continue at the exact place before the freeze

Did you change something in the code ? since last wednesday

Link to comment
Share on other sites

The server doesn' freeze at all, we kill our client, and we all are able to continue at the exact place before the freeze

Did you change something in the code ? since last wednesday

Hi,

If your server doesn't freeze at all, I can't explain why all your clients are freezing at the same time. It certainly sounds like a network bottle neck. Nothing that I have changed with Playerbot would have such an effect. Have you tried disabling auctionhousebot like DaemonCantor suggests? I last updated the code on blueboy last Tuesday (16th March), and that was just a cosmetic change.

Cheers

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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