Jump to content

Playerbot (archive)


Recommended Posts

so heres an update, i have discovered 2 new flight paths, 1 of the bots still didn't learn that new path.

the bug with logging in a bot has dissappeared.

note : i am not using a clear core, i also have vehicles , ahbot and mmaps ,along with your portal branch +flight+loot-fix+sharedbots.

Hi,

The only thing you run that I do not run is vehicles. So lets get this straight, the player and a couple of bots (both invited to the player group) approach a new flightmaster. The player and one of the bots learn the new node and fly. The other bot does not. Hmm, this does make sense. The only conditions that would prevent a bot from learning a new start node would be if it isn't in the player group or can't interact with the flightmaster (not close enough, wrong faction). I assume that all the bots know the destination node.

If you could show me what is outputted at your server console when this issue occur, it would help enormously.

Cheers

Link to comment
Share on other sites

  • Replies 1.8k
  • Created
  • Last Reply

Top Posters In This Topic

ok i will , that bug returned again...same thing happened, http://www.youtube.com/watch?v=AOhReMuRiYI ,video is not speeded.

011-02-25 23:30:22 WORLD: World initialized
2011-02-25 23:30:22 SERVER STARTUP TIME: 1 minutes 9 seconds
2011-02-25 23:30:22 mangosd process priority class set to HIGH
2011-02-25 23:30:22 
2011-02-25 23:30:22 
2011-02-25 23:38:03 GameEvent 72 "Stormwind City - Stockades Jail Break" removed.
2011-02-25 23:40:03 GameEvent 27 "Leader of Jin'Alai, Kutube'sa" started.
2011-02-25 23:40:03 GameEvent 39 "Leader of Jin'Alai, Chulo" removed.
2011-02-25 23:42:36 ERROR:SESSION: received unexpected opcode CMSG_LOGOUT_CANCEL (0x004E) the player has not logged in yet
2011-02-25 23:42:36 ERROR:SESSION: received unexpected opcode CMSG_CANCEL_TRADE (0x011C) the player has not logged in yet and not recently logout
2011-02-25 23:42:36 ERROR:SESSION: received unexpected opcode CMSG_CANCEL_TRADE (0x011C) the player has not logged in yet and not recently logout
2011-02-25 23:42:36 ERROR:SESSION: received unexpected opcode CMSG_CANCEL_TRADE (0x011C) the player has not logged in yet and not recently logout
2011-02-25 23:43:32 ERROR:SESSION: received unexpected opcode CMSG_LOGOUT_CANCEL (0x004E) the player has not logged in yet
2011-02-25 23:43:32 ERROR:SESSION: received unexpected opcode CMSG_CANCEL_TRADE (0x011C) the player has not logged in yet and not recently logout
2011-02-25 23:43:32 ERROR:SESSION: received unexpected opcode CMSG_CANCEL_TRADE (0x011C) the player has not logged in yet and not recently logout
2011-02-25 23:43:32 ERROR:SESSION: received unexpected opcode CMSG_CANCEL_TRADE (0x011C) the player has not logged in yet and not recently logout
2011-02-25 23:48:03 GameEvent 62 "World's End Tavern - Perry Gatner Announce" started.
2011-02-25 23:50:03 GameEvent 27 "Leader of Jin'Alai, Kutube'sa" removed.
2011-02-25 23:50:03 GameEvent 33 "Leader of Jin'Alai, Gawanil" started.
2011-02-25 23:58:03 GameEvent 72 "Stormwind City - Stockades Jail Break" started.
2011-02-26 00:00:03 GameEvent 16 "Gurubashi Arena Booty Run" started.
2011-02-26 00:00:03 GameEvent 33 "Leader of Jin'Alai, Gawanil" removed.
2011-02-26 00:00:03 GameEvent 39 "Leader of Jin'Alai, Chulo" started.
2011-02-26 00:00:03 GameEvent 63 "World's End Tavern - Perry Gatner Standup Comedy" started.
2011-02-26 00:00:03 GameEvent 66 "Fishing (00.00-06.00)" started.
2011-02-26 00:00:03 GameEvent 69 "Fishing (18.00-00.00)" removed.
2011-02-26 00:01:14 ERROR:SESSION: received unexpected opcode CMSG_CANCEL_TRADE (0x011C) the player has not logged in yet and not recently logout
2011-02-26 00:01:14 ERROR:SESSION: received unexpected opcode CMSG_CANCEL_TRADE (0x011C) the player has not logged in yet and not recently logout
2011-02-26 00:01:14 ERROR:SESSION: received unexpected opcode CMSG_CANCEL_TRADE (0x011C) the player has not logged in yet and not recently logout
2011-02-26 00:05:06 GameEvent 63 "World's End Tavern - Perry Gatner Standup Comedy" removed.
2011-02-26 00:08:04 GameEvent 72 "Stormwind City - Stockades Jail Break" removed.
2011-02-26 00:10:02 GameEvent 27 "Leader of Jin'Alai, Kutube'sa" started.
2011-02-26 00:10:02 GameEvent 39 "Leader of Jin'Alai, Chulo" removed.
2011-02-26 00:11:59 ERROR:SESSION: received unexpected opcode CMSG_CANCEL_TRADE (0x011C) the player has not logged in yet and not recently logout
2011-02-26 00:11:59 ERROR:SESSION: received unexpected opcode CMSG_CANCEL_TRADE (0x011C) the player has not logged in yet and not recently logout
2011-02-26 00:11:59 ERROR:SESSION: received unexpected opcode CMSG_CANCEL_TRADE (0x011C) the player has not logged in yet and not recently logout
2011-02-26 00:12:03 GameEvent 62 "World's End Tavern - Perry Gatner Announce" removed.
2011-02-26 00:15:04 GameEvent 43 "Hammerfall Under Attack" started.
2011-02-26 00:20:06 GameEvent 27 "Leader of Jin'Alai, Kutube'sa" removed.
2011-02-26 00:20:06 GameEvent 33 "Leader of Jin'Alai, Gawanil" started.
2011-02-26 00:20:06 GameEvent 43 "Hammerfall Under Attack" removed.

Link to comment
Share on other sites

Hi vladex,

I've looked at the video and it appears the character actually flies through the mountain in the Barrens en route to Camp Taurajo. Is this the player flying or the bot after you log back in.

The server output tells me nothing (no debug info). Make sure you have

# LogLevel

# Server console level of logging

# 0 = Minimum; 1 = Basic&Error; 2 = Detail; 3 = Full/Debug

# Default: 3

set to 3 in mangosd.conf.

The code I use for bot flight has no influence on the flight path taken. The bots will only follow the flight path known to the player. This effect shown in your video is caused by something else. As I said in my last post the only mod that you use and I don't is vehicles. Try building your server without vehicles and see if it goes away. I have just looked at Tasssadar's github and see from a recent commit

EDIT: I've just looked at the date of this commit. Not so recent. Where are you getting your code from, mabe I can try it on my server see what happens.

https://github.com/Tasssadar/Valhalla-Project/commit/2f49a742b4c3f3401da78173659afacdeafb05fd

Your video does suggest that the windrider is flying very low, almost at groundlevel. Thus it appears to fly through the mountain rather than over it.

Hope this helps

Link to comment
Share on other sites

im using the last patch from zergtm and rsa, it was posted http://paste2.org/followup/1261591

my debug output is 3 .. i did notice that yesturday and was a bit confused why it doesn't show up all things in the logs.

"Is this the player flying or the bot after you log back in." this is the bot that didnt learned the new flight path, thats what is happening when i log into him.So this is what it is basicly happening , if the bot didnt learned the new fly path , you take a flight from Camp Tuarajo to the crossroads for example,all of the other bots follow you , 1 stays behind ,the bot that didn't learned the path, is being Teleported to his master when the flight is complete(all bots are there), if you log out and then log in as that bot he actually is being "mounted" and takes the straight path to his original point Camp Tuarajo then it begins the normal flight to Crossroads.

and the bug in the video shows what happens if i log on to the bot that didn't learn the new flight path,and its passing through everything.

i forgot to make a video about what happens when he arrives, i need to find something better than fraps.

Link to comment
Share on other sites

Hi vladex,

O.K I've built a server having all the mods you listed, including the vehicles from the patch you posted. I have tried everything to make it go wrong and it won't. I had a small group; a player knowing all nodes, one bot knowing Orgimmar , Camp Taurago and Thunder Bluff, and another who just knows Thunder Bluff.

If I fly from Orgrimmar to Camp Taurago, only the player and first bot flies. The last bot teleports to Camp Taurago, but has learnt the node for Orgrimmar. I tried logging out during the flight and then logging back in as the bot, and it worked as expected. The bot flew around the mountain, en route to Camp Taurago and not through it as your video show. I finally flew from Orgrimmar to Thunder Bluff and all flew.

I'm completely stumped why this happens on your server. I will continue to test the code and would welcome anyone elses comments, who may or may not be experiencing the same issues as vladex

Cheers

Link to comment
Share on other sites

Hey guys, blueboy.

Finaly i got the bot working, but now i have another problem... Every flighmaster, trainer or merchant wants me to add a bot. Anyone have seen this before? how do i loose it?

thx

Hi,

No, it's working as expected. The NPC's do not want you to summon/dismiss a bot, they are just giving you the option to do so. The NPC's menu should still provide the option to train, buy or sell, or fly. By the way, the bot menu is not added to every NPC, just those who meet certain criteria (For instance you will not find the menu with Inn Keepers and most flightmasters or merchants. Mainly trainers).

If you do not wish to use botguy menu, do not apply mangos_botguy.sql to your world database. If you have alreadly done so, remove the record that the sql file adds to the world database.

This does not effect summoning/dismissing bots from the command line

.bot add botname

.bot remove <botname> or <select bot>

Hope this helps

Link to comment
Share on other sites

Yes thx,

Later on in the game it make sence to me. I was a bit confused because it listed every toon i have. Maybe it is a idea to add them in a sub-menu? Anyway great work.

I still have some problems doh, Sometimes the bots disapear. There are not away, but it's like there under the floor. Same thing whit instance npc's. It's like they standing on quicksand. they disapear when i approach, and will return when i keep my distance. But i don't think it's anything to do with the playerbot. Maybe a UDB thing. Maybe you have a idea?

Link to comment
Share on other sites

I still have some problems doh, Sometimes the bots disapear. There are not away, but it's like there under the floor. Same thing whit instance npc's. It's like they standing on quicksand. they disapear when i approach, and will return when i keep my distance. But i don't think it's anything to do with the playerbot. Maybe a UDB thing. Maybe you have a idea?

Hi,

It sounds like a vmap issue to me. When did you create new vmaps last, and also make sure you have the vmap settings correct in mangosd.conf.

# vmap.enableLOS

# vmap.enableHeight

# Enable/Disable VMmap support for line of sight and height calculation

# Default: 0 (disable)

# 1 (enable)

#

# vmap.ignoreSpellIds

# These spells are ignored for LoS calculation

# List of ids with delimiter ','

#

# vmap.enableIndoorCheck

# Enable/Disable VMap based indoor check to remove outdoor-only auras (mounts etc.).

# Requires VMaps enabled to work.

# Default: 1 (Enabled)

# 0 (Disabled)

I use;

vmap.enableLOS = 1

vmap.enableHeight = 1

vmap.ignoreSpellIds = "7720"

vmap.enableIndoorCheck = 1

Hope this helps

Link to comment
Share on other sites

Hey Blueboy, have checked it out. And it is the same that you have. I think it's a prrblem in the cartesian coordinate system.

Do you think the problem is in UDB or is it something else?

object guid is: player flemen (guid: 9)

You are OUTdoor map 624 (valut of archavon) Phase: 1

X:-212.491898 Y: 40.033222 Z: 0.000000

Orientation 5.401973 grid [31,32]cell[4.0]

InstanceID :3 ZoneX: 38.20.3850 ZoneY: 46.874535

GroundZ: 0.000000 FloorZ: 0.000000 Have height data (map: 1 VMap:1)

Link to comment
Share on other sites

Hi vladex,

O.K I've built a server having all the mods you listed, including the vehicles from the patch you posted. I have tried everything to make it go wrong and it won't. I had a small group; a player knowing all nodes, one bot knowing Orgimmar , Camp Taurago and Thunder Bluff, and another who just knows Thunder Bluff.

If I fly from Orgrimmar to Camp Taurago, only the player and first bot flies. The last bot teleports to Camp Taurago, but has learnt the node for Orgrimmar. I tried logging out during the flight and then logging back in as the bot, and it worked as expected. The bot flew around the mountain, en route to Camp Taurago and not through it as your video show. I finally flew from Orgrimmar to Thunder Bluff and all flew.

I'm completely stumped why this happens on your server. I will continue to test the code and would welcome anyone elses comments, who may or may not be experiencing the same issues as vladex

Cheers

sorry for bringing this in the front line again but did you try to reach your destination i.e Thunder Bluff, all bots ended the flight , then you log out and login with one of those bots ?

my bug is wierd, what OS are you using ?

Link to comment
Share on other sites

Hey Blueboy, have checked it out. And it is the same that you have. I think it's a prrblem in the cartesian coordinate system.

Do you think the problem is in UDB or is it something else?

object guid is: player flemen (guid: 9)

You are OUTdoor map 624 (valut of archavon) Phase: 1

X:-212.491898 Y: 40.033222 Z: 0.000000

Orientation 5.401973 grid [31,32]cell[4.0]

InstanceID :3 ZoneX: 38.20.3850 ZoneY: 46.874535

GroundZ: 0.000000 FloorZ: 0.000000 Have height data (map: 1 VMap:1)

Hi,

Thinking about it, you maybe quite right. I assume your running with the latest UDB update. Have you tried a different database, either psmdb

http://svn.assembla.com/svn/psmdb_wotlk/

or ytdbase

http://svn2.assembla.com/svn/ytdbase/

I currently use ytdbase as it includes some really nice features.

Hope this helps

Link to comment
Share on other sites

sorry for bringing this in the front line again but did you try to reach your destination i.e Thunder Bluff, all bots ended the flight , then you log out and login with one of those bots ?

my bug is wierd, what OS are you using ?

Don't apologise, I want to help resolve this matter if I can. I can't help feel that this issue maybe caused by some setting or other, that you have not mentioned. I try to run my server with the "*.conf" defaults whenever possible.

I run two servers;

Main: linux O.S based (openSUSE 11.3 diistro) 32 bit

Backup test: windows xp 32bit.

I have been testing this issue on my linux box up to now, but if your using windows I will try it on my XP box and see if there is a difference.

Speak with you soon

Link to comment
Share on other sites

ill install ubuntu in a bit of time, i anyways want to become my primary os , so ill try setting up the server on that and see if there is any difference.

currently the server was on windows .

Hi,

O.K, I have now tested it out on both linux and windows and it works as expected. Flying from Ogrimmar to Thunder Buff, logged out as player then logged back in as bot. It continues the flight from where it logged out.

I was wondering how you built your server on windows. I assume your using the existing (VC90,VC100) *.sln files. I know they have just added support for cmake builds and it is possible to create new *.sln files using cmake, but I haven't tested this out yet with MaNGOS.

Cheers

Link to comment
Share on other sites

some few suggestions:

"I could use a drink" => the bot has got everything in its bags : what is the condition for this question please ?

He has got potion to improve armors, ... can he takes automatically for example in dungeons ?

raids: "annoying" to teleport manually each bots of each people because only one is master of the raid, and only the master can teleport people, any news on this please ?

magician : level 74 specialisation cold then fire, full of mana and he is attaking with its wand :) strange

Link to comment
Share on other sites

Hi mrelfire

Thanks for the ideas. Several classes utilise the following code to quench a bot's thirst. The code is triggered by the bot's mana dropping below a certain level.

Warlock < 25

Paladin < 40

Hunter < 30

Mage < 30

Druid < 30

Priest < 30

    if (ai->GetManaPercent() < 25) // if thirsty
   {
       Item* pItem = ai->FindDrink();  // pItem points at the drink
       if (pItem) // if found
       {
           ai->TellMaster("I could use a drink."); // tell the client
           ai->UseItem(pItem); // drink
           return;
       }
   }

There is then a check in the bots bags for potential refreshments (Magi can conjure drinks, if they have the spell). At present, I do not believe potions are considered drink. I'm sure it would be possible to improve the code to also use specific potions if available.

Stretching playerbot beyond it supported scope.

I realise that people use or try to use playerbot in raid scenarios, but this is not currently supported.

No account is currently made for level 74 magicians with cold or fire specialization. I'm not suprised that it ignores these advanced abilities and uses it's wand. Kyle1 has done some excellent work improving bot AI, with respect to spell casting, but the AI is still by no means perfect, even for low level magicians.

For the AI to evolve beyond it's current state, will require more contribution from users who actively play the game (that excludes me, I haven't got the time :o ). The building blocks to create a more effective AI are already present in the playerbot code (e.g functions like FindDrink() or UseItem()), it just requires a little effort to put these ideas into patch form ("I could use a drink" code is a good example). If for instance you wanted help creating a new function (i.e FindPotion(name)), I can help you with this.

Hope this helps

Link to comment
Share on other sites

thanks it is working this morning, I am using your redepository, not the portal one.

Is the "portal" the reference ? or should I keep your redepository as reference ?

They're both mine.The code on blueboy is tested and most stable, but won't necessarily reflect the latest changes with playerbot or the core. The code on portal is better if you want to try new features from playerbot or the core.

Cheers

Link to comment
Share on other sites

Hi Guys,

Vendor Interaction for bots

I have been working on a new project, so bots can interact with vendors to sell and buy items. I created a new alpha branch called vendor. The initial patch I pushed provides the bots with the ability to sell gray or poor quality items, whenever the player activates a vendor. This code has been adapted from an old 'Playerbots for TC2' patch. I have scoured the internet and there is no history as to the original authors of this particular code, only recently revised standalone patches. Unfortunately, I have blundered :o I have mistakenly pushed a copy of this initial patch to portal master as well. All subsequent versions will be pushed to the vendor branch. I have included an option in 'playerbot.conf' to activate/deactivate this feature. Hopefully the code will work without issue, and as usual we would be grateful for your comments.

Hope this helps

Link to comment
Share on other sites

blueboy needs your help..please

I should have left things the way they were, but I have messed things up bigtime now. I thought I would get some advice from you guys before it gets any worse.

What I did wrong

I first cloned portal master to a local repository called vendor. I then did a merge with the core, but did not push. I then applied my changes to the local master (1st mistake). I then created the remote branch vendor from this. I thought my internet had glitched, because my commit did not show up in vendor. I continued (2nd mistake), to sync the remote/local branches (git fetch origin) and setup tracking (git checkout --track -b vendor origin/vendor) for vendor, so that all future pushes would go straight to the remote branch. The local branch still did not show my commit, so I applied it again to the vendor branch (3rd mistake) and pushed.

(4th mistake) I should left it alone, but it was suggested that I could correct this. I tried

just revert the changes and repush it to portal. should be git reset HEAD^ or something along that line
but it didn't work.

I did some further research and found several articles suggesting;

git rebase -i HEAD~<number of commits>

or

git revert HEAD~<number of commits> -m <parent-number >

(5th mistake) I eventually used the following, that is supposed to reverse the last push made.

git push -f origin HEAD^:master

Because I didn't push the original core merge before I made my changes, the merge was counted as part of my push. As you can see from portal it didn't remove my commit, but updated all commits since my previous push (core commits included) with me as the committer :mad:

Any ideas. I need to remove all commits from portal since my previous merge (i.e the one before last).

EDIT: All fixed now :D If anyone is interested, here is what I did to repair portal

I first removed the vendor branch

git push origin :heads/vendor

Then, inside my local portal master (that I know to be clean), I forced an update.

git push origin +master

I then recreated the vendor branch and pushed my changes correctly

Cheers

Link to comment
Share on other sites

Fix for the bot flight.

Bots will automatically learn the new flight places when master goes to speek to the flight guy.

Currently bots will automatically learn the new flight places only when master start flying.

diff --git a/src/game/playerbot/PlayerbotMgr.cpp b/src/game/playerbot/PlayerbotMgr.cpp
index f55d2c2..d56d39f 100644
--- a/src/game/playerbot/PlayerbotMgr.cpp
+++ b/src/game/playerbot/PlayerbotMgr.cpp
@@ -398,9 +398,67 @@ void PlayerbotMgr::HandleMasterIncomingPacket(const WorldPacket& packet)
            }
        }
        break;
+        
+        case CMSG_TAXIQUERYAVAILABLENODES:
+        {
+            WorldPacket p(packet);
+            p.rpos(0);    // reset reader
+            ObjectGuid npcGUID;
+            p >> npcGUID;
+            
+            Creature *pNpc = m_master->GetNPCIfCanInteractWith(npcGUID, UNIT_NPC_FLAG_FLIGHTMASTER);
+            if (pNpc)
+            {
+                for (PlayerBotMap::const_iterator it = GetPlayerBotsBegin(); it != GetPlayerBotsEnd(); ++it)
+                {
+                    Player* const bot = it->second;
+                    if (!bot)
+                        return;
+            
+                    Creature *unit = bot->GetNPCIfCanInteractWith(npcGUID, UNIT_NPC_FLAG_FLIGHTMASTER);
+                    if (!unit)
+                    {
+                        DEBUG_LOG("PlayerbotAI: talk to FLIGHTMASTER - %s not found or you can't interact with it.", npcGUID.GetString().c_str());
+                        continue;
+                    }

+                    bot->GetSession()->SendLearnNewTaxiNode(unit);
+                }
+                return;
+           }
+           return;
+        }
+        
        // if master talks to an NPC
        case CMSG_GOSSIP_HELLO:
+        {
+            WorldPacket p(packet);
+            p.rpos(0);    // reset reader
+            ObjectGuid npcGUID;
+            p >> npcGUID;
+            
+            Creature *pNpc = m_master->GetNPCIfCanInteractWith(npcGUID, UNIT_NPC_FLAG_FLIGHTMASTER);
+            if (pNpc)
+            {
+                for (PlayerBotMap::const_iterator it = GetPlayerBotsBegin(); it != GetPlayerBotsEnd(); ++it)
+                {
+                    Player* const bot = it->second;
+                    if (!bot)
+                        return;
+            
+                    Creature *unit = bot->GetNPCIfCanInteractWith(npcGUID, UNIT_NPC_FLAG_FLIGHTMASTER);
+                    if (!unit)
+                    {
+                        DEBUG_LOG("PlayerbotAI: talk to FLIGHTMASTER - %s not found or you can't interact with it.", npcGUID.GetString().c_str());
+                        continue;
+                    }
+
+                    bot->GetSession()->SendLearnNewTaxiNode(unit);
+                }
+                return;
+           }
+          
+        }
        case CMSG_QUESTGIVER_HELLO:
        {
            WorldPacket p(packet);

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