Jump to content

Playerbot (archive)


Recommended Posts

  • Replies 1.8k
  • Created
  • Last Reply

Top Posters In This Topic

I am trying to commit a patch to playerbot, without any success. Before you direct me to the first post http://wiki.github.com/playerbot/mangos, that is what I have been trying to use.

* request contributer access on the forum. Who do I ask?

I have examined other contributor profiles and they appear to use repos that fork off the main mangos branch, rather than playerbot. Yet they commit regularly to playerbot? I notice that most merge with the mangos branch prior to commiting to playerbot.

I would like to commit properly; can anyone give me an ' idiots guide' :rolleyes:

Thanks

Link to comment
Share on other sites

At last I have managed to get the hang of commiting work to github. Thanks to everyone for their help;) I can't count the number of times I have created and deleted forks. Anyway a slight change, the code is compatible with the latest MaNGOS commit [8965].

I have checked the repo on my server;

MaNGOS [8965] Latest version

SD2 [1513]

PSMDB [274]

auctionhousebot patch

autobroadcast patch

No problems compiling, and it is ready for you guys to test out before I get permission to pull to the main playerbot branch. You can get the code from my repo @

git pull git://github.com/blueboy/mangos.git

Link to comment
Share on other sites

About mounts I think it could be interessting to force bot speed (WALK) to same as master speed (FLIGHT)

In fact if you are in flight, bot speed is flying mount WALK speed (Z isn't really supported)

And if bot haven't mount they are too often teleported

EDIT thank you blueboy

Link to comment
Share on other sites

hello bluboy

after 8900 mangos changed gossip

so when i tried to pull player bot errors arised in npchandler and somewhere else i do not remember

I was saw the source an i found that where some player bot source in that files. Since i do not know c it was difficult to understand where they are uesed. I suppose that that code is usfull only to the creature that gives bots (also with sql mangos_botguy)

Did you remove all the assosiate code from source?

I do not use that sql but if you left code then probably will have crases

Please find the code and remove all

Thanks:(:rolleyes::lol:

Link to comment
Share on other sites

hello bluboy

after 8900 mangos changed gossip

so when i tried to pull player bot errors arised in npchandler and somewhere else i do not remember

I was saw the source an i found that where some player bot source in that files. Since i do not know c it was difficult to understand where they are uesed. I suppose that that code is usfull only to the creature that gives bots (also with sql mangos_botguy)

Did you remove all the assosiate code from source?

I do not use that sql but if you left code then probably will have crases

Please find the code and remove all

Thanks:(:rolleyes::lol:

Hi,

The adjustment of playerbot in MY repo (address given in my last post) allows for the migration of GOSSIP functions from the Creature class to the Player class (after 8900). The code is on test. Do not pull from playerbot at present, but from blueboy. I have tested the code and it is compatible with MaNGOS[8965]. I would only use the code with this version of MaNGOS. If you try to merge with earlier code you will probably experience conflict. The problem is that they did not make the move in one go, but over several commits.

As far as I know the code for GOSSIP has been moved, nothing has been removed.

i.e a chunk of code was moved from Creature.h to GossipDef.h, and from Creature.cpp to Player.cpp. Some functions were renamed in the process and I had too compensate in the playerbot code.

I agree that mangos_botguy.sql needs updating. If you check the updates to the MaNGOS database (data/mangos/sql/updates) you will see that they have altered the creature_template. You will get a column count mismatch error. You could alter this yourself in mangos_botguy.sql.

8923_01_mangos_gossip.sql:ALTER TABLE creature_template ADD gossip_menu_id mediumint(8) unsigned NOT NULL default 0 AFTER IconName;

I must admit that I have never used this, but if there were issues with the sql file, the database server (MySQL) would not use it. It would not cause a crash:)

The sql update above tells us that a new column 'gossip_menu_id' has been added to 'creature_template' after field 'IconName'. IconName field is the 13th column from the start of the table, just add another VALUE after IconName. The default value is zero, so add

 '0',

after NULL,

mangos_botguy.sql

INSERT INTO `creature_template` VALUES
('99002','0','0','0','0','0','20','0','20','0','Pappy Looter','The Bot Recruiter',NULL,'59','61','6700','24000','5598','5875','20','35','35','1','1.48','0','0','181','189','0','158','1','1400','1900','0','0','0','0','0','0','0','0','0','0','100','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','1','3','1','1','0','0','0','0','0','0','0','0','1','0','0','0','bot_giver');

regards blueboy

Link to comment
Share on other sites

I have playerbots now working with 3.3.0a

however, for some reason, when using the botguy, (put the 0 where it belongs) it crashes the server. Just wanted to mention it. I removed him for now.

Hi,

* When your server crashes, are there any error messages?

* Does your server crash now you have stopped using botguy?

I do not normally use botguy, but I applied the sql files for test purposes, after I uploaded to my repo. Interesting my server also occasionally crashes, with no error messages.:huh:

Out of interest, what is his purpose? and where do you find the bot recruiter 'Pappy Looter' ?:confused:

I must apologise to policent, in reply to his last post.:rolleyes: He did refer to 'mangos_botguy.sql', but I couldn't fathom what his issue was. His post ended...

Please find the code and remove all

I was not about to chop out code without some justification. I gather from the recent commits associated with GOSSIP menus, that they will be handled differently in the future. GOSSIP menus that were controlled inline are being shifted to more towards the database, to allow flexibility in scripting. The botguy code may have to be rewritten.

Great to hear that playerbot works with the new wow client. I didn't think MaNGOS supported that yet?

* Did you modify it in anyway?

* Are you using the code from blueboy or playerbot?

Thanks for the feedback :)

Link to comment
Share on other sites

the sql code was already in the DB. the botguy is an npc that allows you to click to get your bot in or to remove your bot, instead of typing .bot add {charname}

Has not crashed since removing him. this is most likely caused by "loadgossip" stuffs that was changed. you talk to the botguy, and when you click to get a bot, poof instant crash. nothing in the db error logs, which currently are the only logs im keeping. I could compile with debugging options, and if requested I will do it and get some debugging info, or GDB it. either way, if anyone wants the info let me know.

as for the location of the botguy, you just gotta spawn him in game. I am assuming it has something to do with the core sending the bot add command when you click. I have not tried to have a bot removed, and I really havent looked into the code much.

I doubt this is related, but since using blueboy's botpatch (and also since updating to 3.3.0 and 3.3.0a. most likely something changed with flags on items) melee isnt working properly. abilities are non functioning. says "you must have a melee weapon equipped in your main hand". like I said, probably not related, havent tested without playerbots.

EDIT: retested, and it crashes when removing a bot using the bot guy as well.

Link to comment
Share on other sites

Policent also mentioned an error is NPCHandler.cpp

this is the error that returns during build after the mergefix

10>..\\..\\src\\game\\NPCHandler.cpp(317) : error C2065: 'pCreature' : undeclared identifier

10>..\\..\\src\\game\\NPCHandler.cpp(317) : error C2227: left of '->isBotGiver' must point to class/struct/union/generic type

how do i clear this up? build fails due to inability to create game.lib

Link to comment
Share on other sites

the sql code was already in the DB. the botguy is an npc that allows you to click to get your bot in or to remove your bot, instead of typing .bot add {charname}

Has not crashed since removing him. this is most likely caused by "loadgossip" stuffs that was changed. you talk to the botguy, and when you click to get a bot, poof instant crash. nothing in the db error logs, which currently are the only logs im keeping. I could compile with debugging options, and if requested I will do it and get some debugging info, or GDB it. either way, if anyone wants the info let me know.

as for the location of the botguy, you just gotta spawn him in game. I am assuming it has something to do with the core sending the bot add command when you click. I have not tried to have a bot removed, and I really havent looked into the code much.

I doubt this is related, but since using blueboy's botpatch (and also since updating to 3.3.0 and 3.3.0a. most likely something changed with flags on items) melee isnt working properly. abilities are non functioning. says "you must have a melee weapon equipped in your main hand". like I said, probably not related, havent tested without playerbots.

EDIT: retested, and it crashes when removing a bot using the bot guy as well.

Thanks for the replies,

It shouldn't be necessary to compile a debug version of MaNGOS, normally if there is a serious problem with the server, something is echoed to the server terminal at the time of the crash. I had nothing on mine:(

I guess the first step, as policent suggested would be to remove all code pertaining to botguy. Then monitor for any crashes.

I'm still running with 3.2.2a & MaNGOS [8965]. I am at present running as a druid, leading a group consisting of a paladin, shamen and a mage. I haven't had problems with melee, but the group loot is messed up, if you haven't got a free inventory slot. The client refuses to issue the item to the winner, saying that is is still being rolled for! and then the item is lost.

The server stability is the priority issue as always though and I will look into this.

@erazare

10>..\\..\\src\\game\\NPCHandler.cpp(317) : error C2065: 'pCreature' : undeclared identifier

10>..\\..\\src\\game\\NPCHandler.cpp(317) : error C2227: left of '->isBotGiver' must point to class/struct/union/generic type

Are you using the code from blueboy? I have examined NPCHandler.cpp and 'pCreature' pointer is definitely declared.

void WorldSession::HandleGossipHelloOpcode(WorldPacket & recv_data)
{
   sLog.outDebug("WORLD: Received CMSG_GOSSIP_HELLO");

   uint64 guid;
   recv_data >> guid;

   Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE);

   if (!pCreature)
   {
       sLog.outDebug("WORLD: HandleGossipHelloOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
       return;
   }

   // remove fake death
   if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))
       GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);

   // Playerbot mod
   if(pCreature->isBotGiver())
   {
       GetPlayer()->TalkedToCreature(pCreature->GetEntry(),pCreature->GetGUID());
       _player->PrepareGossipMenu(pCreature,GOSSIP_OPTION_BOT);
       _player->SendPreparedGossip(pCreature);
       pCreature->StopMoving();
   }
   else if (!pCreature->IsStopped())
       pCreature->StopMoving();

   if (pCreature->isSpiritGuide())
       pCreature->SendAreaSpiritHealerQueryOpcode(_player);

   if (!Script->GossipHello(_player, pCreature))
   {
       _player->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID());
       _player->PrepareGossipMenu(pCreature, pCreature->GetCreatureInfo()->GossipMenuId);
       _player->SendPreparedGossip(pCreature);
   }
}

Like I said in my previous post it is necessary to ONLY use the playerbot patch with MaNGOS [8965] from blueboy. They are shifting code around with every commit. (e.g in Player.cpp PrepareGossipMenu() @ 12221, I had to add a declaration of 'pCreature' just for the playerbot mod. They had moved the original declaration further on down the function, presumably to optimise the code)

You should not get any compiler issues if you use the code as is

Hope this helps, blueboy

Link to comment
Share on other sites

oh oka I get you... how would one go about attempting to merge this to the current (say 8993 for example)

By going through the same headache as I did. Essentially follow the instructions suggested by collinsp in the first post of the forum i.e http://wiki.github.com/playerbot/mangos

1. Create fork repo off playerbot or a branch of your choosing

2. clone this to your harddrive. // git clone <repo address>.

git branch, should be labelled 'master'

3. add the MaNGOS branch as a remote repo. // git remote add mangos <repo address>

I believe you can only merge with the HEAD of the MaNGOS branch, i.e latest version.

4 merge by pulling the 'mangos' branch into your local repo 'master' // git pull mangos master

It will most probably complain bitterly about conflicts at this stage. It suggests you fix the issues manually and then commit. Best of luck ;) One good thing is it marks each file where a conflict has been found. Examine changes that have been made to the MaNGOS branch. http://www.manground.org/mangosChangelog.html This should point you in the right direction. If all goes well,

5. git status // lists all files that have been modified

6. git add <each modified file>

7. git commit -a -m "commit description" // prime the code ready to upload

8. git push // upload to your repo online

Hope this helps

Link to comment
Share on other sites

The esiest way to remove botguy is to search all files for the following words:)

GOSSIP_OPTION_BOT

LoadBotMenu

isBotGiver

and remove the related code

then there is no need to use sql file

Since nobody takes care of gossip I think it is better to remove this option from playerbot

I'm confused about the git - code version

What is the differences between playerbot and blueboy playerbot

Why do not use only one git or two one test and one the current?

And another question how can set preferent actions ( a series of action) to a bot?

I have a healer and i prefer as first option, bot checks if anybody in group needs healling.

Thanks to everybody (speccial to programmers)

Link to comment
Share on other sites

The esiest way to remove botguy is to search all files for the following words:)

GOSSIP_OPTION_BOT

LoadBotMenu

isBotGiver

and remove the related code

then there is no need to use sql file

Since nobody takes care of gossip I think it is better to remove this option from playerbot

I'm confused about the git - code version

What is the differences between playerbot and blueboy playerbot

Why do not use only one git or two one test and one the current?

And another question how can set preferent actions ( a series of action) to a bot?

I have a healer and i prefer as first option, bot checks if anybody in group needs healling.

Thanks to everybody (speccial to programmers)

Hi,

Thanks for your post. I think I have removed all of the code pertaining to botguy,

NPCHandler.cpp all playerbot mods
Player.cpp @ 12188 mods inside PrepareGossipMenu()
              @ 12487 mods inside OnGossipSelect()
Creature.cpp @287 mods inside UpdateEntry()
                  @1247  mods inside setDeathState()
Creature.h @391 isBotGiver() & LoadBotMenu() prototypes
GossipDef.h @48 GOSSIP_OPTION_BOT declaration
PlayerbotMgr.cpp isBotGiver() & LoadBotMenu() declarations

from my local code. If it O.K & the server stops crashing, I will upload the changes to blueboy.

The differences between blueboy and playerbot are as follows,

1. blueboy http://github.com/blueboy/mangos is my personal fork off the main playerbot branch http://github.com/playerbot/mangos.

2. I do not have authority to upload to playerbot. I want to share my code with you guys so I created blueboy as a test bed. If the code checks out, then the owners of playerbot can pull my code. Anyone with a github account can do what I have done & create a repo of their own, to share ideas.

3. Playerbot is seriously out of date. Playerbot is compatible with MaNGOS [8898] whilst blueboy is compatible with MaNGOS [8965]

Setting a series of options for your healer

I presume you use macros at the wow client? Press Esc and select 'Macros' from the popup menu.

I have macros to summon the bots and macros to give the bots command orders,

.bot add hewy
.bot add dewy
.bot add lewy

.bot co hewy tank  // group tank
.bot co dewy heal    // heals all bots & player
.bot co lewy assist donald // help just the player

I even have one to get all your (group bots) to attack a selected target

/point

I hope this helps

Link to comment
Share on other sites

MaNGOS rev.9014

$ git pull git://github.com/blueboy/mangos.git master
remote: Counting objects: 1489, done.
remote: Compressing objects: 100% (280/280), done.
emote: Total 1367 (delta 1132), reused 1316 (delta 1087)Receiving objects: 100%
Receiving objects: 100% (1367/1367), 530.90 KiB | 111 KiB/s, done.

Resolving deltas: 100% (1132/1132), completed with 38 local objects.
From git://github.com/blueboy/mangos
* branch            master     -> FETCH_HEAD
Auto-merging src/game/GossipDef.h
Auto-merging src/game/NPCHandler.cpp
CONFLICT (content): Merge conflict in src/game/NPCHandler.cpp
Auto-merging src/game/Player.cpp
Auto-merging src/game/Player.h
Automatic merge failed; fix conflicts and then commit the result.

You will update the patch?

Link to comment
Share on other sites

Hey there, I just wanted to say I merged playerbot with 9007 successfully... if you want to do it I did something extremely sneaky that i didnt think would work but it does:

git clone git://github.com/mangos/mangos.git rape-me

git clone git://github.com/blueboy/mangos.git pbot

go to the rape-me/src/game directory and copy NPCHandler.cpp

paste the file into pbot/src/game

open git bash

cd pbot

git add src/game/NPCHandler.cpp

git commit -a -m "mergefix pbot [ Latest_Mangos ]"

git pull git://github.com/mangos/mangos.git master

there ya go now just build it and ... god knows why, but it builds successfully and works perfectly fine. I realize this is NOT the suggested way to fix things I just did it on a whim and it worked...

Link to comment
Share on other sites

MaNGOS rev.9014

$ git pull git://github.com/blueboy/mangos.git master
remote: Counting objects: 1489, done.
remote: Compressing objects: 100% (280/280), done.
emote: Total 1367 (delta 1132), reused 1316 (delta 1087)Receiving objects: 100%
Receiving objects: 100% (1367/1367), 530.90 KiB | 111 KiB/s, done.

Resolving deltas: 100% (1132/1132), completed with 38 local objects.
From git://github.com/blueboy/mangos
* branch            master     -> FETCH_HEAD
Auto-merging src/game/GossipDef.h
Auto-merging src/game/NPCHandler.cpp
CONFLICT (content): Merge conflict in src/game/NPCHandler.cpp
Auto-merging src/game/Player.cpp
Auto-merging src/game/Player.h
Automatic merge failed; fix conflicts and then commit the result.

You will update the patch?

Hi KiriX,

Your English is a much better than my Russian ;)

We are testing playerbot code from blueboy, with MaNGOS [8965]. Unitil we have resolved existing issues I do not think it wise to try merging with MaNGOS [9014]. I am sure this will create it's own problems.

If you want to merge the code with MaNGOS [9014] take a look inside NPCHandler.cpp and see where conflicts occur. As I suggested in my previous post, look at MaNGOS changelog to see what has altered and maybe you can resolve the conflict yourself.

We will update the patch as soon as we can.

Just a thought!:D The code I am testing at present has no playerbot code in NPCHandler.cpp, so it should work with MaNGOS [9014]. I will be uploading this code to blueboy in a few hours.

Hope this helps

Link to comment
Share on other sites

Hey there, I just wanted to say I merged playerbot with 9007 successfully... if you want to do it I did something extremely sneaky that i didnt think would work but it does:

git clone git://github.com/mangos/mangos.git rape-me

git clone git://github.com/blueboy/mangos.git pbot

go to the rape-me/src/game directory and copy NPCHandler.cpp

paste the file into pbot/src/game

open git bash

cd pbot

git add src/game/NPCHandler.cpp

git commit -a -m "mergefix pbot [ Latest_Mangos ]"

git pull git://github.com/mangos/mangos.git master

there ya go now just build it and ... god knows why, but it builds successfully and works perfectly fine. I realize this is NOT the suggested way to fix things I just did it on a whim and it worked...

Does the botguy work with your magic fix?

Link to comment
Share on other sites

Does the botguy work with your magic fix?

like a charm

hoever, I just compiled 9015, playerbot, ahbot, valhalla's vehicle and sdx2. all without any errors and without magic fixes and it runs just dandy... will have it on our private server within the next couple hrs if you would like me to PM a link to show u

Link to comment
Share on other sites

like a charm

hoever, I just compiled 9015, playerbot, ahbot, valhalla's vehicle and sdx2. all without any errors and without magic fixes and it runs just dandy... will have it on our private server within the next couple hrs if you would like me to PM a link to show u

Hi,

Did you see the edited version of my last post. With your fix, you swapped the NPCHandler.cpp from a clone of the MaNGOS branch with that of blueboy. As I pointed out the modified blueboy (without botguy code) has no playerbot mod code in NCPHandler.cpp, so I am not suprised it worked. I uploaded this to blueboy several hours ago, (root = blueboy, forgot to switch user :rolleyes: ) and checked that it merges this with MaNGOS [9015]. The code is still on test, as there are still issues to be resolved.

Hope this helps

Link to comment
Share on other sites

I noticed an error during compile. simple enough to fix. dunno how to commit it. but in PlayerbotAI.cpp 2 lines give an error. not sure if my fix is correct, and I am running 3.3.0a so it may not even apply to current rev.

+ // handle flying acknowledgement

+ case SMSG_MOVE_SET_CAN_FLY:

+ {

+ WorldPacket p(packet);

+ uint64 guid = extractGuid(p);

+ if (guid != m_bot->GetGUID())

+ return;

+ m_bot->m_movementInfo.AddMovementFlag(MOVEMENTFLAG_FLYING2);

+ //m_bot->SetSpeed(MOVE_RUN, GetMaster()->GetSpeed(MOVE_FLIGHT) +0.1f, true);

+ return;

+ }

+

+ // handle dismount flying acknowledgement

+ case SMSG_MOVE_UNSET_CAN_FLY:

+ {

+ WorldPacket p(packet);

+ uint64 guid = extractGuid(p);

+ if (guid != m_bot->GetGUID())

+ return;

+ m_bot->m_movementInfo.RemoveMovementFlag(MOVEMENTFLAG_FLYING2);

+ //m_bot->SetSpeed(MOVE_RUN,GetMaster()->GetSpeedRate(MOVE_RUN),true);

+ return;

+ }

the FLYING2 gives the error. I removed the 2 and made it

+ // handle flying acknowledgement

+ case SMSG_MOVE_SET_CAN_FLY:

+ {

+ WorldPacket p(packet);

+ uint64 guid = extractGuid(p);

+ if (guid != m_bot->GetGUID())

+ return;

+ m_bot->m_movementInfo.AddMovementFlag(MOVEMENTFLAG_FLYING);

+ //m_bot->SetSpeed(MOVE_RUN, GetMaster()->GetSpeed(MOVE_FLIGHT) +0.1f, true);

+ return;

+ }

+

+ // handle dismount flying acknowledgement

+ case SMSG_MOVE_UNSET_CAN_FLY:

+ {

+ WorldPacket p(packet);

+ uint64 guid = extractGuid(p);

+ if (guid != m_bot->GetGUID())

+ return;

+ m_bot->m_movementInfo.RemoveMovementFlag(MOVEMENTFLAG_FLYING);

+ //m_bot->SetSpeed(MOVE_RUN,GetMaster()->GetSpeedRate(MOVE_RUN),true);

+ return;

+ }

{/CODE]

dunno if this helps anyone, but it wasn't declared so I did this to "fix" it. pbots seem to work fine.

Link to comment
Share on other sites

I just compared your rep NPChandler.cpp with the official MaNGOS one...

Yours missed many lines there...

Can you be more specific? Which versions of NPCHandler.cpp are you comparing (i.e MaNGOS version & blueboy version). Give examples of lines that are missing, line numbers if possible

I have recently removed all playerbot mods from NPCHandler.cpp in blueboy. This was by request to resolve server crash issues, believed to be caused by 'mangos botguy'. Nothing else has been removed.

Please get back to me

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