Jump to content

Playerbot (archive)


Recommended Posts

Hi Guys,

Are any of you having issues compiling the core, after MaNGOS[9219]. I'm running linux (OpenSUSE 11.2) and the core build keeps failing, with the following error

checking for OPENSSL... ../configure: line 16209: syntax error near unexpected token `elif'
../configure: line 16209: `elif test $pkg_failed = untried; then'

My system uses openssl 0.9.8k, so I know that is correct. I have reported this issue, but would interested to know if it effects anyone else.

Cheers

Link to comment
Share on other sites

  • Replies 1.8k
  • Created
  • Last Reply

Top Posters In This Topic

ok guys... so whats the git for this project for now??

for Mangos you should use git://github.com/blueboy/mangos.git (master branch)

for evo-X-Core you should use : git://github.com/3raZar3/bahamut.git (playerbot branch)

these are the two most up to date repos for their respective cores.

Klunk let me know when you are ready to push a test repo or a complete one and we will merge it to the bahamut repo once we verify

Link to comment
Share on other sites

I have pushed my first change through to my git repository, please feel free to pull it down from there.

The change is denoted with the initials SJW. This change allows the player to select a vendor and whisper buy to the bot. The bot will then list the items available from the vendor and you can then whisper buy <itemlink> and the bot will purchase it if they have enough money and bag space. The bot needs to be close enough to the vendor to trade with it.

I wanted to give some feedback on the success of the trade, but other than checking the bag space before buying I cannot do it, the BuyItemFromVendor returns a boolean but it seems to always be false, regardless if the purchase worked or not, which was my problem last night. I was actually buying it (and filling my bag) but it kept telling me it couldn't buy. I am more than happy for people to give pointers on how to improve what I have done. The next step is to sell items and more importantly junk.

Link to comment
Share on other sites

I have pushed my first change through to my git repository, please feel free to pull it down from there.

The change is denoted with the initials SJW. This change allows the player to select a vendor and whisper buy to the bot. The bot will then list the items available from the vendor and you can then whisper buy <itemlink> and the bot will purchase it if they have enough money and bag space. The bot needs to be close enough to the vendor to trade with it.

I wanted to give some feedback on the success of the trade, but other than checking the bag space before buying I cannot do it, the BuyItemFromVendor returns a boolean but it seems to always be false, regardless if the purchase worked or not, which was my problem last night. I was actually buying it (and filling my bag) but it kept telling me it couldn't buy. I am more than happy for people to give pointers on how to improve what I have done. The next step is to sell items and more importantly junk.

I should also have mentioned, my repo is currently at Mangos [9183]. I need to bring it up to date.

Link to comment
Share on other sites

I have pushed my first change through to my git repository, please feel free to pull it down from there.

The change is denoted with the initials SJW. This change allows the player to select a vendor and whisper buy to the bot. The bot will then list the items available from the vendor and you can then whisper buy <itemlink> and the bot will purchase it if they have enough money and bag space. The bot needs to be close enough to the vendor to trade with it.

I wanted to give some feedback on the success of the trade, but other than checking the bag space before buying I cannot do it, the BuyItemFromVendor returns a boolean but it seems to always be false, regardless if the purchase worked or not, which was my problem last night. I was actually buying it (and filling my bag) but it kept telling me it couldn't buy. I am more than happy for people to give pointers on how to improve what I have done. The next step is to sell items and more importantly junk.

Great to see your 'bot buy' patch is ready for testing. I'll try out on my next build. I guess 'bot sell' will be the next challenge. I was thinking that it might be useful if we get the bots to warn when their bags are full. It would certainly prevent 'group loot rolls' from being messed up. Great work, thanks for your contribution.

Link to comment
Share on other sites

blue i wouldnt have the foggiest how to do this mind you but i had an idea i was sketchin out and was wondering how applicable it would be or if there was a similar method.

I was thinking of like "bot-Coins" then a player has to buy em, and sure they can be stackable, but when a coin is used it allows you to summon a bot.. then bot coins can be purchased here and there to keep people busy (not to mention make the bots a bit of a hassle to have :)

actually since you have to name bots or whatnot, perhaps the coins can be used to summon a botguy or whatever... just skethin out ideas to give some substance to the bots.. I would love to set a required level but all i can do is set a required access level... I dont want to give ppl higher than player access just to get a bot..

Link to comment
Share on other sites

Great to see your 'bot buy' patch is ready for testing. I'll try out on my next build. I guess 'bot sell' will be the next challenge. I was thinking that it might be useful if we get the bots to warn when their bags are full. It would certainly prevent 'group loot rolls' from being messed up. Great work, thanks for your contribution.

I do check the bags can store the item in my [atch and if it cannot I give an error message. To be honest though, I didnt test this by filling up my bots bag.

Link to comment
Share on other sites

I do check the bags can store the item in my [atch and if it cannot I give an error message. To be honest though, I didnt test this by filling up my bots bag.

I attempted to run your code( saw the section that checked the bags). However I could not run it. Not the fault of your code, but I believe there might be a memory leak in MaNGOS[9232]. When I try to summon one or more bots, the server goes down like a brick, and there are absolutely no warnings. Very difficult to trace, I have tested MaNGOS[9218] and that is O.K. I will have to test them one by one up to MaNGOS[9232], until I find the offending commit. If any of you guys find issues yourselves, let me know, it might save me some time.

Edit: I have now tested,

MaNGOS[9224] O.K

MaNGOS[9229] O.K // Need to add #include "ObjectAccessor.h" to Guild.h

MaNGOS[9231] O.K // Need to add #include "ObjectAccessor.h" to Guild.h

MaNGOS[9232] O.K // Need to add #include "ObjectAccessor.h" to Guild.h

MaNGOS[9239] O.K

What can I say. It looks like the crash, must have been a glitch in my system. I have now tested playerbot, auctionhousbot & autobroadcast up to the latest MaNGOS commit, without any faults.

Link to comment
Share on other sites

Hi Guys,

I propose to work on an inventory feature for the bots, which I feel is lacking from the present code. At anytime you will be able to determine the bot inventory, and available space, simply by using the command 'bag'. I will start this as soon as I have resolved the present issues that I have mentioned.

Cheers

Link to comment
Share on other sites

Hi Guys,

I propose to work on an inventory feature for the bots, which I feel is lacking from the present code. At anytime you will be able to determine the bot inventory, and available space, simply by using the command 'bag'. I will start this as soon as I have resolved the present issues that I have mentioned.

Cheers

Sounds like a good idea to me. Its something I would have liked last week when I was playing about with bots, its only really an extension of the trade functionality that lists the bag contents isnt it?

Link to comment
Share on other sites

know what would be REALLY nice? if someone could design an LUA or whatever it takes, so that when you are looking in your bots bags you can at least SEE, if not actually affect, the items it has... (would be even better if you could affect them but no need to be pushy *lmao*

Link to comment
Share on other sites

Sounds like a good idea to me. Its something I would have liked last week when I was playing about with bots, its only really an extension of the trade functionality that lists the bag contents isnt it?

More or less. When I added the 'group loot roll' feature to playerbot, there was an annoying glitch that caught me out a few times, during play. If bots have full bags, they may still take part in rolls. If they win and can't collect their reward, the item is lost. If you as the player try to pick up the item from the corpse, the system will teases you ' item is still being rolled for'. As Sods Law dictates, the item will be just what you wanted.

The trade feature just lists items that are tradable, and not all the items. You have no way to determine how full the bags are. I'm hoping that this 'bag' feature will give you enough warning, so you can visit a vendor, and that's where your 'buy' & 'sell' feature will come into its own.

Cheers

Link to comment
Share on other sites

know what would be REALLY nice? if someone could design an LUA or whatever it takes, so that when you are looking in your bots bags you can at least SEE, if not actually affect, the items it has... (would be even better if you could affect them but no need to be pushy *lmao*

There are addons (arkinventory for example) that will show you the bags of othe characters, however this relies on cached information and you having logged on to the caracter to fill the cache. I am sure something could be done along the same lines.

Link to comment
Share on other sites

Not related to the current discussion but do have a question.....

This might or might not be related to playerbot, could very well be related to AHBot or Mangos it self.. or even my server's capabilities, but..

Sometimes , when i .tele my group (myself and 4 bots) to a place within the world, mangos-worldd stops with a Segmentation Fault (don't have to log available @ the moment) and i have to restart it.

Does this happen to more ppl or is this my individual problem ?

Currently running MaNGOS 9224 + AHBot + PlayerBot + Scriptdev2 1551 on Fedora Linux 10.

Link to comment
Share on other sites

More or less. When I added the 'group loot roll' feature to playerbot, there was an annoying glitch that caught me out a few times, during play. If bots have full bags, they may still take part in rolls. If they win and can't collect their reward, the item is lost. If you as the player try to pick up the item from the corpse, the system will teases you ' item is still being rolled for'. As Sods Law dictates, the item will be just what you wanted.

The trade feature just lists items that are tradable, and not all the items. You have no way to determine how full the bags are. I'm hoping that this 'bag' feature will give you enough warning, so you can visit a vendor, and that's where your 'buy' & 'sell' feature will come into its own.

Cheers

The following code snippet will list the items that the bot has, as you say it gives no indication of how many empty slots the bot has but it does list their invetory. I took this from the trade functionality, removing the tradeable check, for the sell function. It also lists the item level (0 for junk) and once I figure out how to actually sell an item I will write a sell junk command.

    else if (text == "sell") { 
       // list out items available for trade
       std::ostringstream out;

       // list out items in main backpack
       for (uint8 slot = INVENTORY_SLOT_ITEM_START; slot < INVENTORY_SLOT_ITEM_END; slot++)
       {
           const Item* const pItem = m_bot->GetItemByPos(INVENTORY_SLOT_BAG_0, slot);
           if (pItem)
           {
               const ItemPrototype* const pItemProto = pItem->GetProto();

               std::string itemName = pItemProto->Name1;
               const uint32 itemQuality = pItemProto->Quality;
               ItemLocalization(itemName, pItemProto->ItemId);

               out << " " << itemQuality << " |cffffffff|Hitem:" << pItemProto->ItemId
                   << ":0:0:0:0:0:0:0" << "|h[" << itemName << "]|h|r";
               if (pItem->GetCount() > 1)
                   out << "x" << pItem->GetCount() << ' ';
           }
       }
       // list out items in other removable backpacks
       for (uint8 bag = INVENTORY_SLOT_BAG_START; bag < INVENTORY_SLOT_BAG_END; ++bag)
       {
           const Bag* const pBag = (Bag*) m_bot->GetItemByPos(INVENTORY_SLOT_BAG_0, bag);
           if (pBag)
           {
               for (uint8 slot = 0; slot < pBag->GetBagSize(); ++slot)
               {
                   const Item* const pItem = m_bot->GetItemByPos(bag, slot);
                   if (pItem)
                   {
                       const ItemPrototype* const pItemProto = pItem->GetProto();
                       std::string itemName = pItemProto->Name1;
                       const uint32 itemQuality = pItemProto->Quality;
                       ItemLocalization(itemName, pItemProto->ItemId);

                       // item link format: [url]http://www.wowwiki.com/ItemString[/url]
                       // itemId, enchantId, jewelId1, jewelId2, jewelId3, jewelId4, suffixId, uniqueId
                       out << " " << itemQuality << " |cffffffff|Hitem:" << pItemProto->ItemId
                           << ":0:0:0:0:0:0:0" << "|h[" << itemName
                           << "]|h|r";
                       if (pItem->GetCount() > 1)
                           out << "x" << pItem->GetCount() << ' ';
                   }
               }
           }
       }

Link to comment
Share on other sites

OK, my repository now includes the functionality to sell junk items to the vendor selected by the player. Whisper sell junk to the bot and they will sell all junk items. Buyback items will then be available to the player, not the bot, however this does not work quite right as the icon and item name do not appear for the player. The player can buy the item back though without any problems. This is not tested for BoP items. If I can I will change this to add it to the bots buyback and give a buyback function to the bot.

latest repo, merged with [9254] from core and latest ScriptDev2 available at http://github.com/klunk/mangos.git

[9524] builds on Linux (Ubuntu 9.04 64bit and 9.10 32 bit)

Link to comment
Share on other sites

im currently in the long process of moving across the country(US) from brooklyn to los angeles...yikes biggrin.gif

playerbot is not abandoned by me (however, i have no idea where the other members are). i have not be able to work on/update playerbot...why? just life in general(holidays, family, travel, moving, new work, ect.) sorry i know 3.3.0a is out frown.gif

and a big thanks to all the people that help out on this thread, especially blueboy...i will have to take a look at this new branch smile.gif

im excited about my move...yay but, (i have a car)not so much about the drive

Link to comment
Share on other sites

lol @ rrtn... think of it this way, you get out of this really annoying cold (I live in massachusetts)... dont worry overly about playerbot its in good hands... Blueboy keeps it clean and klunk is developing a great addition to the system

Personally I (as well as many others) think we need to address the placement of the bots... stop them from grouping together to stand in the same exact place, find some way to optimize the code so they arent as laggy, get them to walk on the ground like regular toons... use elevators instead of teleporting from top to bottom and back... more or less... beautifcation

Link to comment
Share on other sites

Hi Guys,

Sorry for my absence. I have been busy with my inventory project.

I was intrigued with erasure's suggestion that it would be nice if we could get the client to display graphically, the inventory for bots. I did find an opcode 'SMSG_OPEN_CONTAINER', but at present there is very little information about its use (format of the worldpacket). After scouring the internet, I did find the following,

0x113 SMSG_OPEN_CONTAINER
   GUID container                    // player GUID for backpack

However, after many hours without success, I discounted this as a possibility. But feel free to explore this yourselves.

My original intention was to display all inventory items for bot(s), and also display a summary of empty space remaining. I did create a patch to do this, but it was very messy.

As you are aware, the scrolling feature of the 'General history log' on the client, is jerky to say the least. If you list all items for a particular bot, the information displayed will cease to be useful. There's far too much! I decided to only display the summary inventory information, for empty space. This will provide useful information about the bots free space, without the need for player/bot swapping.

The new command is called 'free', info is included in 'bot_readme.txt' file.

Essentially you have two options.

1. Display empty space for one bot.

/w <bot name> free

2. Display empty space for bot party/group.

/p free

The command displays empty space in the main backpack, and all general purpose bags. It does not display space in specialist bags (e.g mining or herb bags).

I have also added a function Item* PlayerbotAI::FindItem(uint32 ItemId) , that maybe useful for future developments.

I have uploaded modified code to blueboy, and merged it with the latest MaNGOS. Hope you find it useful.

Cheers

Link to comment
Share on other sites

Blueboy, I don't know if this is your's or if it's one of the new updates but heres a trouble spot I found and thought you should know, it comes from:

Mangos rev: 9261 with (all pulls as of today 20 mins ago) Playerbot, Ahbot, Dual Spec patch for 9260,Valhalla's Vehicle repo, and this is the error location and what I did to get out of it.

- case ITEM_MOD_FERAL_ATTACK_POWER:

- ApplyFeralAPBonus(int32(val), apply);

- break;

+ // case ITEM_MOD_FERAL_ATTACK_POWER:

+ // ApplyFeralAPBonus(int32(val), apply);

+ // break;

The errors in the compliler was 1) Undeclaered Identifier, and 2) inconsistent case. If you can plaese eather let me know if your errorr and how to fix or who's error it is so I can tell them and leran how to fix,

Thank you for all the work.

Edit:

I found it and it's one of tomrus88's commits and heres the pastbin link for the patch which is just like what I did but better formatted. http://pastebin.com/m1dbcf999

Link to comment
Share on other sites

is there a way to apply on the latest mangos ?

when I :

git clone git://github.com/mangos/mangos.git
cd mangos
git pull git://github.com/playerbot/mangos.git master

i get :

From git://github.com/playerbot/mangos
* branch            master     -> FETCH_HEAD
Auto-merging src/game/CharacterHandler.cpp
CONFLICT (content): Merge conflict in src/game/CharacterHandler.cpp
Auto-merging src/game/Chat.cpp
CONFLICT (content): Merge conflict in src/game/Chat.cpp
Auto-merging src/game/Chat.h
CONFLICT (content): Merge conflict in src/game/Chat.h
Auto-merging src/game/ChatHandler.cpp
CONFLICT (content): Merge conflict in src/game/ChatHandler.cpp
Auto-merging src/game/Creature.cpp
CONFLICT (content): Merge conflict in src/game/Creature.cpp
Auto-merging src/game/Creature.h
CONFLICT (content): Merge conflict in src/game/Creature.h
Auto-merging src/game/Group.cpp
Auto-merging src/game/Makefile.am
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
CONFLICT (content): Merge conflict in src/game/Player.h
Auto-merging src/game/QuestHandler.cpp
Auto-merging src/game/WorldSession.cpp
Auto-merging win/VC90/game.vcproj
Automatic merge failed; fix conflicts and then commit the result.

Link to comment
Share on other sites

is there a way to apply on the latest mangos ?

when I :

git clone git://github.com/mangos/mangos.git
cd mangos
git pull git://github.com/playerbot/mangos.git master

i get :

From git://github.com/playerbot/mangos
* branch            master     -> FETCH_HEAD
Auto-merging src/game/CharacterHandler.cpp
CONFLICT (content): Merge conflict in src/game/CharacterHandler.cpp
Auto-merging src/game/Chat.cpp
CONFLICT (content): Merge conflict in src/game/Chat.cpp
Auto-merging src/game/Chat.h
CONFLICT (content): Merge conflict in src/game/Chat.h
Auto-merging src/game/ChatHandler.cpp
CONFLICT (content): Merge conflict in src/game/ChatHandler.cpp
Auto-merging src/game/Creature.cpp
CONFLICT (content): Merge conflict in src/game/Creature.cpp
Auto-merging src/game/Creature.h
CONFLICT (content): Merge conflict in src/game/Creature.h
Auto-merging src/game/Group.cpp
Auto-merging src/game/Makefile.am
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
CONFLICT (content): Merge conflict in src/game/Player.h
Auto-merging src/game/QuestHandler.cpp
Auto-merging src/game/WorldSession.cpp
Auto-merging win/VC90/game.vcproj
Automatic merge failed; fix conflicts and then commit the result.

Yes, your using the wrong github repo. The main playerbot repo is out-of-date, we are presently using blueboy which works with the latest MaNGOS. Try this

git clone git://github.com/mangos/mangos.git
cd mangos
git pull git://github.com/blueboy/mangos.git master

Cheers

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