Jump to content

Playerbot (archive)


Recommended Posts

Hi LordPsyan,

Thanks, but I must point out that all the work done on playerbot isn't down to me. We have a small team of dedicated programmers who do excellent work, and contribute to the project when they can.

I'm glad you like playerbot and wish to broaden it's client base. We have no objections in anyone using the code (It's understood that credit should be given to the code originators) being an opensource community. It would be very useful if there was a mutual exchange of ideas between the two projects.

As far as your current issue is concerned, If you remember, we had similar issue with playerbot, here on MaNGOS. At that time, I found a solution to this teleport issue ('already being teleported'). Maybe this will be of some help with your project on TrinityCore.

http://getmangos.eu/community/post/92686/#p92686

Hope this helps

Link to comment
Share on other sites

  • Replies 1.8k
  • Created
  • Last Reply

Top Posters In This Topic

Hi LordPsyan,

Thanks, but I must point out that all the work done on playerbot isn't down to me. We have a small team of dedicated programmers who do excellent work, and contribute to the project when they can.

I'm glad you like playerbot and wish to broaden it's client base. We have no objections in anyone using the code (It's understood that credit should be given to the code originators) being an opensource community. It would be very useful if there was a mutual exchange of ideas between the two projects.

As far as your current issue is concerned, If you remember, we had similar issue with playerbot, here on MaNGOS. At that time, I found a solution to this teleport issue ('already being teleported'). Maybe this will be of some help with your project on TrinityCore.

http://getmangos.eu/community/post/92686/#p92686

Hope this helps

Unfortunately, this fix made the bot teleport the first time I brought him in, but when I ported to another city, he did not follow. I tried to summon him, and once again, "is already being teleported" dunno why.

So, how do I make a patch file from blueboy/portal ?

I tried: git --git-dir=../mangos/.git --work-tree=../portal diff > bots.patch

having latest mangos. it pulled the differences to files, and told me what files were deleted or added. the diff did not contain the files in the playerbot folder. dunno if this will work.

Link to comment
Share on other sites

Hi blueboy,i want to ask you something: is it possible to make a patch for arena/bg bots and that the bot logons in the world without a player/gm to add him ?(they do act in world by some points in sql by that way i was thinking if it is possible to make them actually play(programming them like to do quests kill hing by themselves)) the original idea belongs to yad,https://github.com/yad/easy-mangos,it isnt stable and it isnt compatible with your current branch can you make a suggestion for where is should look for modifications ?

Hi,

If I understand you right, you would like the bots to independently enter the world and play (a robot). This sound like something that paytheo was suggesting here

http://getmangos.eu/community/post/130817/#p130817

and beyond the present scope of playerbot. Maybe you could contact him, he was certainly keen on developing an autonomous AI system.

Cheers

Link to comment
Share on other sites

an update to flight: i forgot to mention that they all did have the things you mentioned, i did a server restart and then retryed , nothing happened

ill disable mmaps maybie that is what is causing the trouble.

another question : survey and get does not work (collect objects enabled,also collect quest enabled) except when i tell the bots to skin/herb/mine,it doesn't work on a chest or object quest item , and ideas why ?

Hmm,

Most peculiar why your bots are not flying. If they all possess the attribute I listed, they should work. The only thing I could suggest is that you clear the client cache, before loading the client. I posted a batch file that will do this for you.

http://getmangos.eu/community/post/131377/#p131377

Disabling mmaps shouldn't help. I always run with mmaps and it works perfectly on my server.

BThallid has just posted an update to the loot-fix-bt branch. I haven't had chance yet to test this, but it may well solve your issue with the collection of game objects (including quest items)

Let me know if it helps

Link to comment
Share on other sites

  • 39 years later...

Playerbot lets you login your other characters from your account as bots that can be controlled to automate combat, facilitate trade, accept quests, complete quests, handle movement, manage inventory, and much much more...

Active Repositories:

https://github.com/blueboy/portal

README:

https://github.com/blueboy/portal/blob/master/bot_readme.txt

The code:

https://github.com/blueboy/portal/tree/master/src/game/playerbot

Link to comment
Share on other sites

A way to load bots from other accounts not just the one you're playing on would be sweet :)

I don't think it is a good idea. As I stated in other thread, you have to take care of authorization like providing password of an account to call each bot, it may lead to a major security issue. You also have bot controlling issue if you are using different account bots.

Link to comment
Share on other sites

I think we should allow it. But there needs to be built in limitations such as:

Allow accounts to specify a macro with name "accounts.allow" that contains a list of account names that are allowed to log in characters from this account.

OR

Or always allow player bot logins from accounts matching current account name plus a fixed suffix such as "_EXTRA1", "_EXTRA2", "_EXTRA3", ... This option would probably be the easiest and completely controllable by account creators.

Anyone else have an opinion?

Link to comment
Share on other sites

I have some questions :

Does non enUS dbc are supported (for spell) ?

bool PlayerbotAI::IsInCombat() {
   bool inCombat = false;
   inCombat |= m_bot->isInCombat();
   inCombat |= m_master->isInCombat();
   if( m_bot->GetGroup() ) {
       GroupReference *ref = m_bot->GetGroup()->GetFirstMember();
       while( ref ) {
           inCombat |= ref->getSource()->isInCombat();
           ref = ref->next();
       }
   }
   return inCombat;
}

Does not better to verify if attackers list is empty (and get first attacker) ?

Can you replace tab char by four space and remove "() {" in fonction (to respect a little mangos standard) ? (just suggestion)

Link to comment
Share on other sites

I think we should allow it. But there needs to be built in limitations such as:

Allow accounts to specify a macro with name "accounts.allow" that contains a list of account names that are allowed to log in characters from this account.

OR

Or always allow player bot logins from accounts matching current account name plus a fixed suffix such as "_EXTRA1", "_EXTRA2", "_EXTRA3", ... This option would probably be the easiest and completely controllable by account creators.

Anyone else have an opinion?

I'm fully aware of the issue of having 40 bots following your character around causing potential crashes, and I agree that limitations need to be put in place to prevent that. I don't want to load a ton of bots and have them chase me around, but instead plop them down in one place and have them stay there. The only reason I'm suggesting a way to load multiple accounts from one admin character is to make it easier to test server stability. Being able to load up 60 bots instead of finding 60 real testers could help Mangos development.

As for security issues I don't think it's anymore of an issue than the security of normal player accounts. Aren't the account passwords encrypted? If they are or not it doesn't matter, a hacker would have to break into the db remotely to read them.

Here's an idea:

Have a field in a config file where you can name up to 5 extra accounts/passwords, much like databases, allowing you to load the characters from those accounts. Have a master "on/off" switch (0/1) for enabling bots from extra accounts. If it's enabled, bots will cease to have any AI and they will no longer follow you. All they'll do is stand in one place after you spawn them, therefore not causing any potential system crashes.

Link to comment
Share on other sites

Have a field in a config file where you can name up to 5 extra accounts/passwords, much like databases, allowing you to load the characters from those accounts. Have a master "on/off" switch (0/1) ...

Wouldn't be be easier to implement this feature by enforcing a convention? If my account is frank, and if an account creator has created my additional accounts with a suffix of extra1, extra2, .. I can also log these bots in?

So if I were allowed to have a maximum of 30 characters, an account creator would make accounts for: frank, frank_extra1, frank_extra2

This convention requires no extra configuration and is completely controllable by account creators. If possible, it would be nice if Playerbot could continue to have no database dependencies.

Link to comment
Share on other sites

Okay, about it another question, does spell sequence support non learn spell, for example if I take a priest bot level 1, does AI want to cast level 80 spell ?

The AI finds highest ranked spell by spell substring search. When multiple matches are found the spell ID returned is in the following precedence order: highest level, exact name match, spell requiring no reagents.

The AI classes cache the spell ID so it only looks it up once.

Link to comment
Share on other sites

Cheer

I am going to work on item locale problem

==== update =====

I just fixed the item locale problem,

here is the patch of my solution: http://filebeam.com/b4c81ab5b4cd198c8cc3d39bd7b88b10

I believe someone can simplify the code because there are 4 places using the same code.

.

Awesome, but can you commit it to our repo? I tried to add you as a collaborator, but I don't think you have a github account.

Link to comment
Share on other sites

How about this?

float angle = m_bot->GetAngle(target->GetPositionX(), target->GetPositionY());
m_bot->MoveChase(target, dist, angle);

or

m_bot->GetMotionMaster()->MovePoint(0, x ,y, z); // just go
while (!m_bot->IsWithinDistInMap(target, dist)) {  // then check if is in dist

 m_bot->GetMotionMaster()->Clear(false); // stop
 m_bot->GetMotionMaster()->MoveIdle();
 // call range / spells here ?
}

The first one is the correct way to do it, the second one isn't good because it is a loop, but it should work

for the finish moves, what about check for UNIT_FLAG_FLEEING and do Cheap Shot, Root, Hamstring or anything related spells?

Link to comment
Share on other sites

:confused:for distance and angle you can use

dist=sqrt((target_x_-mine_x)^2+(target_y-mine_y)^2)

angle=arcsin((target_y-mine_y)/dist

if (target_x-mine_x)<0) angle=pi-angle

of course this is for plane but since z is slow varying you have good approximation

If you need the real distance you need add the term (target_z-mine_z)^2

But for angle you ought use previus dist not z-term. Because the mangos implementation of angle is for x,y plane only, not for 3D (cosine directions)

Hope is usefull

Link to comment
Share on other sites

If the given movement generators don't do what we want maybe we can code our own. It might even be useful for the mangos base.

I just discovered and fixed a bug with bots improperly picking the wrong loot for quest turn ins. I still need to test it. Hopefully I'll have time to push it tonight.

It is my opinion that MoveFollow works fine for ranged attacking. The bots will follow their target at various angles, which could be a problem if you don't pull mobs to you. Once the bot is within range of its target the server should not add new points to the movement generator unless the range is exceeeded. This means the bot won't dance arround depending on the orientation of the target. At least this is how it worked in trinity. You need to tell your bots to face their target every so often however. Otherwise they cast spells backward. I think this might still be an issue.

Link to comment
Share on other sites

:confused:

the previous angle is the angle between target and bot

if you need to turn to target then you must set bot to angle

set_angle =mine_angle+angle

If mangos angle is between -pi ... pi or between 0 ... 2pi you need to correct the value

if set_angle > pi set_angle =set_angle - pi

else if set_angle < - pi set_angle =set_angle + pi

or

if set_angle < 0 set_angle =set_angle +2 pi

else if set_angle > 2pi set_angle =set_angle - 2 pi

Propably routine from Ckegg Getangle ( target ...) gives you the angle that i computed in last letter

so you need only the addition and correction i noteed here

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