Jump to content

Playerbot


Recommended Posts

With this help i got one of the errors solved, but now i forund another one:

9>..\\..\\src\\game\\playerbot\\PlayerbotAI.cpp(7555) : error C2660: 'Player::GetTrainerSpellState': Function doesn't accept 1 arguments

The error-message is freely translated, cause i'm german.

I hope you can help on this one.

I really love your work with the playerbot, and i really want it in my game :D

https://github.com/mangosR2/mangos/commit/9237a89346b09ae4a04830e47c675e423660a56a

Link to comment
Share on other sites

  • Replies 799
  • Created
  • Last Reply

Top Posters In This Topic

Thank you Blueboy, I finally understood how to do what you told me...

But know I have problems with Database updates, a lot of SQL errors, and I think I'm gonna throw myself out of the windows, or kill the cat. Isn't there any pure repack who does efficiently what I'm trying to do for two days, crying and screaming :) ?

Link to comment
Share on other sites

With this help i got one of the errors solved, but now i forund another one:

9>..\\..\\src\\game\\playerbot\\PlayerbotAI.cpp(7555) : error C2660: 'Player::GetTrainerSpellState': Function doesn't accept 1 arguments

The error-message is freely translated, cause i'm german.

I hope you can help on this one.

I really love your work with the playerbot, and i really want it in my game :D

https://github.com/mangosR2/mangos/commit/9237a89346b09ae4a04830e47c675e423660a56a

Thanks

But after testing I found a problem. I took a level 2 paladin to a trainer and was able to learn all spells upto 'Blessing of Kings', that requires level 22.

https://github.com/blueboy/portal/commit/ae1d5be88f6b3bd6a8bffbbee6d244d81c37c17c

I have pushed a revison to portal to test out. I checked my server and the paladin can now only learn 'Devotion of Aura' as expected.

Hope this helps

Link to comment
Share on other sites

ok i did a search for this and came up empty -

this command does not work

HASH=`git log --pretty=oneline | grep -m 1 '\\[z1[0-9]\\{3\\}]' | cut -d " " -f 1`

namely this part: "grep -m 1"

i did a grep --help

and no mention of -m

is that line required?

I dont know much about linux commands first glance looks like its cleaning up a log file

it fails. the rest of the playerbot works great. it just crashes when i do the HASH section

I am doing this in bash on win7

thanks.

edit:

forgot to mention: if I do the :

Playerbot for MaNGOS Zero (full patch)

section

that works to until the merge then there too many errors - cant overwrite files and such. (over 100 errors if i remember) i can rerun it for a screenshot if needed

Link to comment
Share on other sites

Why shouldn't there be more than one database project, or any other part of MaNGOS?

If one should close, the other will carry on. Both use slightly different approaches to development which can lead to better code and new ideas.

Competition drives innovation. Diversity breeds strength. :cool:

Link to comment
Share on other sites

OT:

that hash line can be skipped. It compiled fine.

only thing weird i am noticing now is if i have two hunters, neither has a pet and neither can summon one (i am one of the hunters), i cant summon mine, and the other hunter did, but it vanished

If your'e still referring to MaNGOS ZERO, this might be a deficiency in the core code. The playerbot code can not effect the actions of the player hunter, only the bot hunter. Many of the opcodes for this core are still quarantined.

Hope this helps

Link to comment
Share on other sites

Thanks

But after testing I found a problem. I took a level 2 paladin to a trainer and was able to learn all spells upto 'Blessing of Kings', that requires level 22.

https://github.com/blueboy/portal/commit/ae1d5be88f6b3bd6a8bffbbee6d244d81c37c17c

I have pushed a revison to portal to test out. I checked my server and the paladin can now only learn 'Devotion of Aura' as expected.

Hope this helps

Now i've got new errors:

10>..\\..\\src\\game\\playerbot\\PlayerbotAI.cpp(5134) : error C2660: 'MotionMaster::MovePoint': Function doesn't accept 5 Arguments

10>..\\..\\src\\game\\playerbot\\PlayerbotAI.cpp(7606) : error C2065: 'reqlevel': undeclared identifier

I'm using the latest Mangos-Rev with the portal-repo.

Link to comment
Share on other sites

Hi,

10>..\\..\\src\\game\\playerbot\\PlayerbotAI.cpp(5134) : error C2660: 'MotionMaster::MovePoint': Function doesn't accept 5 Arguments

I will check the MovePoint error. It looks like the have updated this function in the core too.

10>..\\..\\src\\game\\playerbot\\PlayerbotAI.cpp(7606) : error C2065: 'reqlevel': undeclared identifier

The 'reqlevel' was declared in the fix I pushed to portal last night.

diff --git a/src/game/playerbot/PlayerbotAI.cpp b/src/game/playerbot/PlayerbotAI.cpp

index 59e1c00..606464e 100644

--- a/src/game/playerbot/PlayerbotAI.cpp

+++ b/src/game/playerbot/PlayerbotAI.cpp

@@ -8073,13 +8073,16 @@ void PlayerbotAI::_HandleCommandSkill(std::string &text, Player &fromPlayer)

if (!tSpell)

break;

- if (!tSpell->learnedSpell && !m_bot->IsSpellFitByClassAndRace(tSpell->learnedSpell))

+ uint32 reqLevel = 0;

+ if (!tSpell->learnedSpell && !m_bot->IsSpellFitByClassAndRace(tSpell->learnedSpell, &reqLevel))

continue;

- if (sSpellMgr.IsPrimaryProfessionFirstRankSpell(tSpell->learnedSpell) && m_bot->HasSpell(tSpell->learnedSpell))

+ if (sSpellMgr.IsPrimaryProfessionFirstRankSpell(tSpell->learnedSpell) && m_bot->HasSpell(tSpell->learnedSpell))

continue;

- TrainerSpellState state = m_bot->GetTrainerSpellState(tSpell);

+ reqLevel = tSpell->isProvidedReqLevel ? tSpell->reqLevel : std::max(reqLevel, tSpell->reqLevel);

+

+ TrainerSpellState state = m_bot->GetTrainerSpellState(tSpell,reqlevel);

if (state != TRAINER_SPELL_GREEN)

continue;

P.S. Your error say 'reqlevel', it's spelt wrong. You obviously applied the changes manually and it's a typo. It should be 'reqLevel'

EDIT: Sorry my bad. I've just glanced at the patch I used again and saw that I spelt it wrong. I will amend this shortly, once I've got back from the dentist :(

Hope this helps

Link to comment
Share on other sites

P.S. Your error say 'reqlevel', it's spelt wrong. You obviously applied the changes manually and it's a typo. It should be 'reqLevel'

Hey :)

Thanks for the reply, but i didn't apply the canges manually... i've used the wiki you provided to apply the Bot to mangos.

The only thing i had to correct was the revision_sql.h-error.

Edit: Damn, yoou were faster with your Edit :D

Edit 2: It seems i got it to work. I just removed the last argument in this line:

m_bot->GetMotionMaster()->MovePoint(wo->GetMapId(), x, y, z, false);

so that it suits the definition of MovePoint:

void MotionMaster::MovePoint(uint32 id, float x, float y, float z)

and it compiled without error. Now it should work again.

Link to comment
Share on other sites

@blueboy.. if you need constant feedback, me an my son have been heavy with mangos since 06-07', I am mostly vanilla if not 100%, he is wotlk and vanilla. we would be happy to give you feed back on anything you need. we, as usual push mango past its limits. and we both use vanilla and 3.3.5

thanks for the update on the hunter issue. another issue (I now spawned a level 60 hunter i made to travel with my lowbie) is that when we are both melee, the bot do almost no damage, i'll get the exact figure, but under normal circumstance (ranged) its a one shot. I'll shoot back the exact figures.

glad to be of help

Link to comment
Share on other sites

Edit 2: It seems i got it to work. I just removed the last argument in this line:

m_bot->GetMotionMaster()->MovePoint(wo->GetMapId(), x, y, z, false);

so that it suits the definition of MovePoint:

void MotionMaster::MovePoint(uint32 id, float x, float y, float z)

and it compiled without error. Now it should work again.

I have to correct myself... it only seems to compile, but mangosd.exe isn't generated. Oo

Link to comment
Share on other sites

btw did the upgrade worked like a charm.

for window users, that are stuck here is the steps I took to get grep to mix with git.

pick up the new version of grep here

[== link ==]
[url]http://gnuwin32.sourceforge.net/packages/grep.htm[/url]

just install it anywhere

go to your newly created grep installation folder (you will see sub folders bin,contrib,doc,info,man etc....)

copy all (you only need a couple, but for simplicity just get them all - if you know what your doing. grab the ones you need)

go to your git folder (C:\\Program Files (x86)\\Git is the default)

paste you folders there

it will overwrite 2 folders.

overwrite any files

done.

to verify you can open a gitbash window and type "grep --help" and you will see the new "-m" command.

cheers .

hope that helps with the windows side of compilation

edit:

in hind site, i forgot, you can just install it to the git folder :-) (this is for those like me that installed it, thinking it would either do that automatically or git would just "pick it up via path")

Link to comment
Share on other sites

But after testing I found a problem. I took a level 2 paladin to a trainer and was able to learn all spells upto 'Blessing of Kings', that requires level 22.

https://github.com/blueboy/portal/commit/ae1d5be88f6b3bd6a8bffbbee6d244d81c37c17c

I have pushed a revison to portal to test out. I checked my server and the paladin can now only learn 'Devotion of Aura' as expected.

Hope this helps

checked without bot - same problem. not need big code rewrite after changes like this - problem in another place.

Link to comment
Share on other sites

Hi,

Yes my mistake again. I use 'movement maps' on my server and the fifth parameter enables/disables 'getpath'. The default is true (enabled) and this feature was not required. Or at least it seemed pointless for bots to calculate the best route to a vendor when they are stand close by. I will do as you have done and just remove it.

EDIT: I have now updated portal with the type fixes

Cheers

Link to comment
Share on other sites

Hi,

I'm a little puzzled :/

checked without bot - same problem. not need big code rewrite after changes like this - problem in another place.

I thought the issue was with the use of GetTrainerSpellState(tSpell,reqLevel); in playerbot following core changes. I fail to see how disabling the bots proves that the problem is in another place. My fix should work now that I have fixed the typos.

Or, are you referring to other issue that led to a crash in Unit::IsHostileTo(), originally posted by mosst. In this case, I would agree that the problem is in another place.

Link to comment
Share on other sites

Problem : bots are invisible in instances :( (it also occurs on Trinity but just for a few seconds, till I engage the combat)

I've heard others refer to this 'invisibility of bots' in instances, but never experienced it myself. Which instances does this occur in and I'll give it a try. Oh, are you sure it's genuine invisiblity or are the bots passing through wall and floors (e.g Deadmines in Westfall with narrow tunnels & corridors) If so, and your not using 'movement maps' that would explain it.

Let me know.

Link to comment
Share on other sites

It happened twice but I don't know why. I tried to activate and deactivate GM mode and GM invisibility, but it's not related to that.

There is a way to prevent bots from passing through walls ?! What is movement maps ? I only know Vmaps, which I deactivate with bots (and it's really annoying...)

EDIT : It happens frequently sadly :( Bots are shown out of a map (little green arrow on minimap), but I can make them visible if I ".recall" them

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