Jump to content

Playerbot (archive)


Recommended Posts

  • Replies 1.8k
  • Created
  • Last Reply

Top Posters In This Topic

ok, thanks.

Can you make ".bot add" command like gm? This way you can disable or enable player bot for players by typing 0 or 1-3 access level in `commands` table without mangos core recompiling.

This patch is great, thanks a lot.

Link to comment
Share on other sites

From http://getmangos.ru:

This code

   if( pet )
   {
       if( ((float)pet->GetHealth()/(float)pet->GetMaxHealth()) < 0.5f )
       {
           // heal pet when health lower 50%
           if( PET_MEND>0 && !pet->HasAura(PET_MEND,0) && ai->CastSpell(PET_MEND,*m_bot) )
           {
               ai->TellMaster( "healing pet" );
               return;
           }
       }
   }

replace (It is better to replace it:):


   if(( pet ) 
   && ( ((float)pet->GetHealth()/(float)pet->GetMaxHealth()) < 0.5f )
   && ( PET_MEND>0 && !pet->HasAura(PET_MEND,0) && ai->CastSpell(PET_MEND,*m_bot) ))
   {
       ai->TellMaster( "healing pet" );
       return;
   }

Link to comment
Share on other sites

player bot break hunter's pet. 2 players - 2 clients - hunter and priest ( as example )

1. Hunter vision:

hunter tames beast, all ok, but when taiming is over hunter can not control his pet. pet always stand in one plase and hunter commands do not have any effect on pet.....

2. Another player ( priest ) vision:

Another player ( priest ) looking at hunter and see that pet running, attackind and etch. but this is not pet , this is hunter himself in pet skin for this another player ( priest ). Hunter ( pet in hunter skin for priest ) stands in one place and do nothing.

This is big problem. Can it be fixed somehow?

p.s. sorry for my english

Delete this post. Another character works normal....

Link to comment
Share on other sites

Reward taking is still buggy. Problem with choosing a reward, (e.g. at quest http://www.wowhead.com/?quest=10324 )

Hi, I fixed the problem, here's the patch:

diff --git a/src/game/PlayerbotAI.cpp b/src/game/PlayerbotAI.cpp
index ea3e00d..1270dd4 100644
--- a/src/game/PlayerbotAI.cpp
+++ b/src/game/PlayerbotAI.cpp
@@ -559,7 +559,16 @@ void PlayerbotAI::HandleMasterIncomingPacket(const WorldPacket& packet, WorldSes
                                    }
                                }
                                // just choose first reward if we cant use any of the rewards
-                                uint32 rewardItemId = (pRewardItem == NULL) ? pQuest->RewChoiceItemId[0] : pRewardItem->ItemId;
+                                uint32 rewardItemId;
+                                if (pRewardItem == NULL)
+                                {
+                                        rewardItemId = pQuest->RewChoiceItemId[0];
+                                        pRewardItem = objmgr.GetItemPrototype(rewardItemId);
+                                }
+                                else
+                                {
+                                        rewardItemId = pRewardItem->ItemId;
+                                }

                                if (bot->CanRewardQuest(pQuest, rewardItemId, false))
                                {

pRewardItem could be still null, so the line 'std::string itemName = pRewardItem->Name1;' crashed.

I have no github account, so feel free to upload this. ;)

Link to comment
Share on other sites

@KiriX i tryed your code but can not seem to make it work

if(( pet ) 
   && ( ((float)pet->GetHealth()/(float)pet->GetMaxHealth()) < 0.5f )
   && ( PET_MEND>0 && !pet->HasAura(PET_MEND,0) && ai->CastSpell(PET_MEND,*m_bot) ))
   {
       ai->TellMaster( "healing pet" );
       return;
   }

@walkofdoom i added and it works better thank you.

+                                uint32 rewardItemId;
+                                if (pRewardItem == NULL)
+                                {
+                                        rewardItemId = pQuest->RewChoiceItemId[0];
+                                        pRewardItem = objmgr.GetItemPrototype(rewardItemId);
+                                }
+                                else
+                                {
+                                        rewardItemId = pRewardItem->ItemId;
+                                }

                                if (bot->CanRewardQuest(pQuest, rewardItemId, false))
                                {

Np crashes at all :)

Also merged to mangos 8036

Link to comment
Share on other sites

@marry521 Maybe go into characters data base and delete any corpse's it might help.

this is problem. deliting corpses helps only for 20-30 min till next bot die.... alike problem was with "spirit of redemption" spell in core.

and can you make somehow to disable or anabe bot ( in mangosd.conf or database table ). This is not good to full recompile core if you want to disable bot.

+ when you calls out bot , all his archievements comes out in guild chat every time. It is good to disable it. thanks.^_^

p.s.very sorry for my english

added. Where in code i can set up maximum allowed bots for on player. Now we have 9, how can i set up 2 for exemple? thanks...

Link to comment
Share on other sites

@rrtn updated botguy thankyou

hunter: fix & update. also added ghostpast patch

druid: rewrite, group buff/heal

shaman: rewrite, fix totems, group buff/heal

warlock: implement summon demon w/ soul link

mangos_botguy.sql updated

http://filebeam.com/0a14b8e441e8957dcad91a55c9f29476

i spent too much time on AI for git...if you have some extra time winslow please push for me TIA :)

Link to comment
Share on other sites

@collinsp the quest reward is great but they just take the first one in the quest, Which is better then having it crash which it was not doing with the Quests. But i am not sure if we should have left it the other way. Because at least you can log out and log back in and turn in the quest and pick the one the bot needs.But yes you can still do that this way. Just my 2 cents. But i do thank you for your hard work and every one else that has been contributing. :)

Link to comment
Share on other sites

bots can now turn quests in even if master can't talk to NPC (master must target the quest rewarder)

if there is greater then 1 quest reward, bot asks master what reward to take. TO select a reward for your bot, send a tell to the bot and link the item.

Link to comment
Share on other sites

@collinsp Ok this is what everyone is having a problem with, they are in a party with the bots and they right click there portrait the master and select leave party it will crash the server. this is not the way to do it but you can't Explain this to all people. Give it a try .

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