Jump to content

Playerbot


Recommended Posts

blueboy can u implement some configs in mangos.conf... for example

1. to have a config through witch u can allow 0(players),1(GM rank 1+) to summon the bot from any account

- limit in this way a user to use someone else bot, or to be more specific to use a bot from a different account than his account

2. create a table with permssions similary to account table, in which u can set witch account can use playerbot

Thank you

Already created by BThallid: try the sharedbots branch:

https://github.com/blueboy/portal/tree/sharedbots

hey kennumen any ideas if this will get in master repo?

Thank you in advance

Link to comment
Share on other sites

  • Replies 799
  • Created
  • Last Reply

Top Posters In This Topic

@tyrael:

It's unlikely Sharedbots would be added to the main Playerbot code. By allowing players to use characters from other accounts, it opens a big security hole. There would be nothing to stop someone from using one of your characters as a bot and then ordering your toon to give up all their gear and loot, then travel to town and happily empty your bank vault. I suppose you could add additional code to place restrictions on which accounts are available to each player, according to a permissions list or by security level. Another way might be to create a "community" account where players can only use extra bots from that account.

Boy! Gitch, you sure jumped right into the deep end and came up swimming. :lol:

Maybe it's just me, but I like the idea of my bots reminding me when they need training. I have enough to keep up with managing my own affairs and barking orders to my slaves...uhh...bots! But, saying a reminder only once per skill-up would work best when the bot uses the auto-report feature previously suggested. No sense in them going on like a broken record, saying "Hey! I need to visit a <profession name> trainer", every single time they gather, mine, skin, etc.

To keep it from getting too monotonous, you might even have a short list that varies how they say it, stored as a database table, CSV text file, or an array.

As an example, here's clues that your party's herbalist has advanced beyond his training:

"Harvesting this plant isn't very difficult."

"My grandmother's cat can gather these herbs!"

"This is too easy!"

"I want to find plants more rare than this, to have a new challenge!"

"I've now mastered everything I've learned about herbs, so far."

You could do the same for when their skill isn't high enough.

Your engineer likely needs to study more for that next big project when you hear:

"I don't understand! Using a bigger hammer worked last time."

"That's too technical for me."

"Uh...How do you make that?"

"Of course I know what I'm doing! Umm...What am I doing?"

"My hair is on fire! My hair is on fire!" ( maybe this one should be reserved for alchemists. :P )

You could apply similar gossip choices to your bots in all kinds of situations. It won't make much difference in game play, but it certainly would help the bots feel more friendly and less like wooden target dummies. I just don't know how to do the code, but I could contribute some lists of dialog to be inserted into the proper places.

Link to comment
Share on other sites

"My hair is on fire! My hair is on fire!" ( maybe this one should be reserved for alchemists. tongue )

No I definitely want that one for my Paladin Blacksmith!

Yeah, I haven't ruled out adding the reminder UnkleNuke, just been taking a peek at a few other things.

Hrm maybe I should rename the Skillbot Branch to Chatbot lol. Anyway, all this is concerning skill infos basically so its all good.

These are some great ideas, hold the thought til I get back to it. I'm going outta town for the weekend, but when I get back I'll make some changes

and see what happens!

Btw, nice one liners. I'll put them into use.

Link to comment
Share on other sites

Hi Guys,

I've been working on extending pet management commands, primarily for hunter bots.

Background that led to this work.

I was messing with the revised 'use' command and wondered whether I could lead my hunter bot through it's taming quests. I was pleased to find that I could. One difference I noticed was that the bot has to own the tamed pets for the stipulated time period (~15 minutes - unless of course it dies), in order to progress to the next quest (There is currently no way for bots to abandon pets directly - Yet ;)) However, once the bot had the ability to tame, I found that simply casting the 'tame beast' spell (spellid - 1515) on a chosen creature would not work.

I have now created the 'tame' sub-command for the 'pet' command

/t botname or /p pet tame <player selected creature>

Initially tested with player and single hunter bot

The bot will travel to within casting range of the creature and begin taming. At this point the creature will begin attacking the bot. The trick was to allow the bot to tame the creature without it killing the creature first. So I needed to write code that would keep casting the 'tame beast' spell (should it fail) and prevent the bot from retaliating too much. To acheive this I have created a new BOTSTATE flag (BOTSTATE_TAME) that controls the taming code, located in the playerbot UpdateAI() function. So 'tame beast' will be cast again & again (should it fail), until the pet is tamed or until the hunter/creature is dead.

Taming is difficult for a player hunter, particularly for elite pets. I'm pleased that this command doesn't make it any easier. More often than not the bot or the creature will be killed. Tip: Use a healer for the player, this way you can at least ensure that the bot will survive.

Getting a hunter bot to tame a creature, while the remainng party looks on

Unfortunately, the normal AI will not allow this. Each bot has an it's own attackers list. If this list is empty the bot while not enter combat mode and thus react. To achieve this it will be necessary for you to order the bots to behave passively. I have created a new combat order (co) (ORDERS_PASSIVE). It's a little awkward, but if you use macros to toggle the combat orders then it's no biggie ;)

Example

Normal combat order macros

.bot co one tank // warrior bot

.bot co two heal // priest bot

.bot co three assist one // hunter bot

etc..

Taming combat order macros

.bot co one passive

.bot co two passive

Note that it's not necessary to make the hunter passive as it will be focused on taming, rather than fighting. The passive flag essentially prevents the bot attackers list from being updated.

If you should get tired of the pet, then I have now added an 'abandon' sub-command to the 'pet' command list.

/t botname or /p pet abandon

This will abandon the current hunter pet. Please note that 'tame' and 'abandon' will not work for warlock pets. The code checks whether the bot has the 'tame beast' spell in it's spellbook (i.e also not available for low level hunters) and as you know, warlock pets cannot be abandoned.

I will be pushing the code the the new-ai branch shortly. I would be grateful if you could provide feedback. I have only tested the code on low level pets so far. Not sure how it will perform with exotic pets?

Hope this helps

Link to comment
Share on other sites

@blueboy,

Wont get to test this new ai til tomorrow night, but one question that popped into my mind is:

have you looked into how the hunter bot will feed the pet? Just curious, I know this is just an initial phase!

The pet will start out unhappy. Will definitely test this out tomorrow. :D

Link to comment
Share on other sites

One difference I noticed was that the bot has to own the tamed pets for the stipulated time period (~15 minutes - unless of course it dies), in order to progress to the next quest (There is currently no way for bots to abandon pets directly - Yet ;))

Order the hunter's pet to stay, run out of range. Unlike a regular pet you will not be able to recall those pets but then that's half the point. No hunter worth his salt ever uses the 'dismiss pet' spell anyway, on account of it lowering the pets happiness.

Another helpful little nugget: Cast 'aspect of the monkey' before taming a beast. 8% dodge can actually mean the difference between a tamed beast and certain death...

But wow... nice work, blueboy :)

Link to comment
Share on other sites

@blueboy,

Wont get to test this new ai til tomorrow night, but one question that popped into my mind is:

have you looked into how the hunter bot will feed the pet? Just curious, I know this is just an initial phase!

The pet will start out unhappy. Will definitely test this out tomorrow. :D

Hi Gitch,

Hunter bot feeding was one of the first things I tackled after joining playerbot three years ago. It should be automatic. If your hunter bot has the right food in it's inventory for the pets diet, it will feed the pet until it is no longer unhappy. The pet does start out unhappy and if you watch the hunter bot will feed the pet.

One thing I have thought about was an option whereby the hunter replenishes it's larder with suitable food for it's pet. Definitely one for the 'todo' list which I also have to do :rolleyes:

Cheers

Link to comment
Share on other sites

Hi kennumen,

Good tip about the 'Aspect of the Monkey'. That will certainly improve the bot's chances of taming. I was a little puzzled by your comment

No hunter worth his salt ever uses the 'dismiss pet' spell anyway, on account of it lowering the pets happiness.

Sorry, I was not referring to temporary dismissal of the pet, but permanently abandoning the pet. You won't be able to tame a new pet until you either stable the old one or get rid of it. The 'dismiss pet' spell won't do. I know my son loves to acquire a more and more exotic pet and this patch was for him. I would be interested if someone with an 'Uber' hunter bot could test whether it can tame exotic pets. I have a feeling that a more advanced taming spell will be required.

Cheers

Link to comment
Share on other sites

Hi kennumen,

Good tip about the 'Aspect of the Monkey'. That will certainly improve the bot's chances of taming. I was a little puzzled by your comment

No hunter worth his salt ever uses the 'dismiss pet' spell anyway, on account of it lowering the pets happiness.

Sorry, I was not referring to temporary dismissal of the pet, but permanently abandoning the pet. You won't be able to tame a new pet until you either stable the old one or get rid of it. The 'dismiss pet' spell won't do. I know my son loves to acquire a more and more exotic pet and this patch was for him. I would be interested if someone with an 'Uber' hunter bot could test whether it can tame exotic pets. I have a feeling that a more advanced taming spell will be required.

Cheers

There are two ways to get [temporarily] get rid of a pet - you can dismiss it or you can command it to 'stay' and then run a certain distance (it might be 40 yards, probably a bit more). If you dismiss it you receive (or did) a penalty to the pets happiness so common practice was to simply have it stay and run away from it to get rid of it. On vanilla this worked to get rid of the 'temporary' pets from these quests but just tried it (with UDB and as self, not a bot) and no-go. If you run out of range you do lose control over the pet but it doesn't disappear... Must be a core issue.

<edit> woops, spent too much time testing I forgot: As for exotic pets they're just the same as regular ones with the sole exception that you need a talent to be able to tame them: Beast Mastery -> Beast Mastery (the talent is somewhat confusingly named the same)</edit>

Link to comment
Share on other sites

@blueboy,

Gotcha! Haven't used a hunter bot yet as my main is a hunter =)

I'll try a group full of em.

Druid bots: Upon accepting the quest 'Moonglade', the bot should learn the spell "Tele: MoonGlade". Didnt work for my bot, had to log her in and get it manually. (tho it appears that quest is still realllllly buggy)

Link to comment
Share on other sites

Hi Gitch,

Druid bots: Upon accepting the quest 'Moonglade', the bot should learn the spell "Tele: MoonGlade". Didnt work for my bot, had to log her in and get it manually. (tho it appears that quest is still realllllly buggy)

I had that problem, the druid has the quest but not the spell 'Teleport: MoonGlade'. I did visit wowhead and apparently this spell is only available to druids at level 15. Mine is only at level 12. If this is so, surely they should prevent the druid from getting the quest until it reaches level 15.

I have taken kennumen advice and revised the tame code to apply the aura "Aspect of the Monkey". As the bot never enters BOTSTATE_COMBAT (i.e so combat AI never used) during the taming process it was necessary to apply it (if available) as the command starts. I tested it with and without the aura and it certainly helps. I was able to tame a creature at the same level as the bot, with the aura. I'll be posting the revision shortly

EDIT@ O.K There is no mechanism in the playerbot code to receive the spell 'Teleport: MoonGlade', once your druid accepts the quest 'Heeding the Call'. It works for the player druid. As this is a druid only quest, only druids should really ever go to MoonGlade. It just so happens that playerbot allows party members to be teleported to the player's location. So it seems a pointless exercise to fix this to allow the druid bot to receive the teleport spell. If you get the bot to cast the spell, it teleports to MoonGlade and then is immediately summoned to the master's location. No way around this guys, for druids they will need to learn the shapshifting abilities as the player. You can of course continue as the druid bot once all the party has reached MoonGlade.

Hope this helps

Link to comment
Share on other sites

Hi blueboy thanks for your work.

When i enter with my bot in a raid instance (Molten Core for example) the bot not enter in the instance, how i can solve this ?

Thanks again.

Hi,

Although this is off the topic of playerbot.

I seem to remember sometime back, someone asked the same question. I believe there is a condition in the game itself. You need to complete the following quest,

Attunement to the Core

Presumably you will need to get all the bots to complete this quest too

Hope this helps

Link to comment
Share on other sites

@blueboy,

***concerning the druid quest***

You're right. its intended to basically 'solo' that section of the quest as far as I know, so, yeah, don't worry about it.

Just now pulling the new code from new-ai, i'll let ya know if I run into any problems. I've got a bot squad holding the taming rods , ready to try it out!

Also another quest that i found that is bugged for bots is in Sunstrider Isle (blood elves) its the shrine quest.

You right click on it, it pops up a text window, and thats it. (It looks as if it should function just like a quest 'board' like the WANTED posters, but may have a different flag)

The bots don't know what to do with it.

"I can't use that!"

or

'get'[link] = they just bounce around in a loop til you make them get away from it.

If you need the exact quest info I'll get it later. I'm brain dead atm from looking into the "should be simple" issue of popping up the tradeskill window via a bots Hlink.

I know you guys are busy with other areas atm, but wanted to mention it while it was on my mind lol. If I come up with something I'll post it.

Link to comment
Share on other sites

Hi blueboy thanks for your work.

When i enter with my bot in a raid instance (Molten Core for example) the bot not enter in the instance, how i can solve this ?

Thanks again.

Hi,

Although this is off the topic of playerbot.

I seem to remember sometime back, someone asked the same question. I believe there is a condition in the game itself. You need to complete the following quest,

Attunement to the Core

Presumably you will need to get all the bots to complete this quest too

Hope this helps

OMG.

I will try the bots in anothers raid instances and comment you.

Thanks for your response.

PD : Confirmed, i can visit with bots other instances, ej : Karazhan.

Thanks for all BlueBoy

Link to comment
Share on other sites

FYI, a great website for info on pets is petopia. It has been updated for cataclysm but most of the pet stuff hasn't changed (aside from a few extra pet families and starter pets). I also found the following while browsing so my previous suggestion (pet stay + character running out of range - instead of dismissal) still stands, assuming the core supports it:

Note: This is actually true for all pets: a pet that is level 9 or below will always be completely happy no matter what; a pet that is level 10 or above will lose happiness from death, dismissal, and the passage of time.

<edit> Keep in mind, of course, that tamed pets are at most 5 levels below the player. </edit>

Link to comment
Share on other sites

Hi kennumen,

Thank for the information. I have revised the pet tame code to force the application of 'Aspect of the Monkey' if available, as you suggested.

https://github.com/blueboy/portalone/commit/5dc8a56a131a26ffb6913ce9f3f0d7358f6dcc4b

I have also taken the liberty of pushing a patch to portalone that you authored back in November for portal - "Minimize impact on World.cpp". When I created the code for MaNGOS One I used the PlayerbotMgr.cpp from the MaNGOS code. This only contains only part of the code you originally pushed. It was 'nightterror' who drew this to my attention recently. I have now remedied this ;)

Cheers

Link to comment
Share on other sites

Fix:(possibly!)

Bots forgetting to loot an object when interupted by combat. They will still clear the loot target if the master gets too far away from it.(testing a few things regarding that as well)

I'd appreciate feedback if someone wants to try it out. If no problems I'll push to skillbot.

(I'll keep skillbot up to date with new-ai branch, and until i'm comfortable with the process, I'll push any of my updates to skillbot branch)

Patch:

diff --git a/src/game/playerbot/playerbotai.cpp b/src/game/playerbot/playerbotai.cpp index 0454ce0..008dd07 100644 --- a/src/game/playerbot/playerbotai.cpp +++ b/src/game/playerbot/playerbotai.cpp @@ -2172,7 +2172,9 @@ void PlayerbotAI::GetCombatTarget(Unit* forcedTarget)      if (m_botState != BOTSTATE_COMBAT)      {          SetState(BOTSTATE_COMBAT); -        m_lootCurrent = ObjectGuid(); +         // m_lootCurrent = ObjectGuid(); This was clearing loot target, causing bots to leave corpses unlooted if interupted by combat. Needs testing. +        // using this caused bot to remove current loot target, and add this new threat to the loot list.  Now it remembers the loot target and adds a new one. +        // Bot will still clear the target if the master gets too far away from it.          m_targetCombat = 0;      }

Link to comment
Share on other sites

Good job on that fix.

They will still clear the loot target if the master gets too far away from it.(testing a few things regarding that as well)

They're supposed to, to increase chances the bots are standing next to you (not off looting 200 yards away) when you wish to enter combat.

As for commits / branches, I'll let blueboy handle that, but don't be afraid to post code even (potentially) broken code. It's why we have branches...

Link to comment
Share on other sites

AutoEquip,

well sorta.. its a simple version at the moment that occurs when you inspect a bot. The current simple method i'm using at the moment is

GetUInt32Value(ITEM_FIELD_MAXDURABILITY)

I've never really thought about this, so I'm not certain what fields I'll wind up checking in the end, but for testing purposes I chose durability

since for most armor and weapons, the durability is higher on a upgraded item.. Looking also at value, which might be better, I just haven't looked

into it yet.

Later tonight I should have a 'rough' test version of this to post, and I'll make an option to disable it.

Again this will just be a rough test version, It wont (or probably wont) involve the 'inspect' option in the end.

This was just the easiest section of code to begin testing with.

I by no means am claiming this idea. When I saw it in the todo list Kennumen put together, I decided thats something I'd

Like to have!

If anyone has any particular ideas of how they think this should work, feel free to chime in.

***EDIT***

I have the code working automatically. When the bot loots anything it checks to see if its better than what he/she is currently wearing.

(sort of) I'm comparing max durability and sell price at the moment (I knew the functions and it was easy to put together quickly for testing)

The automatic part is working well. However, my hunters insist on wearing those fancy expensive dresses they just found! (robes)

I'm testing more , and am going to compare(instead) armor class. It should work okay that way with minimal checks as if they 'can't' equip

due to class etc, it won't even cue this code anyway. So if its better Armor than they are wearing, AND if they can equip it, they'll put it on.

This WON'T include checks for +stats etc, this is just to see if the idea will work at all, and then build on it from there.

I'm hoping this will be a good foundation.

I may or may not have a test version up tonight as promised, but by tomorrow night I should have a beta ready.

Link to comment
Share on other sites

AutoEquip

Nice! But if you were to use any one attribute for a simplified test version (aside from armor class and can_i_equip_this (level, weapon, ...)) why not check for the item level (note: i'm not talking about level requirement which as a variable is probably named very similar)? If I'm not mistaken, blizzard even made this value for simple item comparison. It's not a final solution but it should be the best available from any one variable.

Of course you've already indicated this will never work properly without a per-class detailed evaluation (note: is 'gearscore' useful for this or not?).

As for optionals, I would hope for a config file setting (server-wide disable) and a per-bot setting which (for obvious reasons) defaults to 'off' upon login.

Great job though. This was fairly high on my list of 'coolness' :)

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