Jump to content

Playerbot


Recommended Posts

Hi Guys,

A few weeks ago I mentioned that I was working on a revision to help complete 'source item' type quests.

http://getmangos.eu/community/post/134150/#p134150

These are quest where you are provided with an item (e.g empty bottle), with the quest objective to fill it. I have just pushed the patch to portal master

Example of use

[Three] quests

[Three] whispers: my incomplete quests are: [Zenn's Bidding] use [Jade Phial] on [Crown of the Earth]

Then travel to the objectives location with [Three] and

[Three] use [Jade Phial]

[Three] should then have a [Filled Jade Phial] in it's inventory and a completed quest.

Hope this helps

Link to comment
Share on other sites

  • Replies 799
  • Created
  • Last Reply

Top Posters In This Topic

can som1 plz help me with this .. i really dont know how to make a core with bots.......

can i git clone mangos then merge with new-ai branch then compile willl that work?if som1 have time plz make a fast mini tutorial how to have latest core with new-ai branch ...

thx alot and sorry for my english.... and blueboy you are doing awsome job: P

If you just want to try the bot code, you can start by just pulling the new-ai code to your hardrive and compile this;

mkdir mangos // create a directory, call it anything you want.

cd mangos

git init // create an empty local git repositoty

git pull http://github.com/blueboy/portal.git new-ai:master

Once your happy and wish to get more involved, I would suggest you

1) first create a standalone patch (see post #169 for bash scripts)

  • run the scripts either from linux or windows bash shell, to create the patches (new-ai.patch and or sharedbots.patch)

2) clone the latest MaNGOS to your harddrive and then copy the patches created in 1) to this directory.

3) From the local repository created in 2) apply the patch in the following order; (remove option --check to actually apply patch)

  1. git apply --check --whitespace=fix new-ai.patch
  2. git apply --check --whitespace=fix sharedbots.patch

4) If no errors in 3) you can proceed to build your server.

Note: If your using the windows bash shell (e.g msysgit) you will probably need to update your grep.exe utility, in the shell. I suggest you download version 2.5.4 from 'GnuWin'. Then copy the updated grep.exe & required dll files to your shell binary directory (The -m option should now work in the bash scripts supplied).

Hope this helps

Link to comment
Share on other sites

Hi kennumen,

I would like to add you to our collaborators list, if this is O.K with you. If it is, I will show you how to push your own work to the portal repo. I will clearly show you how to do this, but you will need to create a GitHub account for yourself, so I can add your name to our list and enable you to maintain your work from your hardrive securely.

I assume you will be running from windows. This link will get you started win-set-up-git

EDIT: You can create a patch and post it on the thread. I can then push it. However, if the patch is large this is impractical and pushing directly to GitHub is the best way.

Take a look at this post #101. This is how I create a local patch.

Let me know.

Link to comment
Share on other sites

Can u by any chance give me step by step (not really too detailed) info how u do it on linux?

I promise this will be the last time. I've explained how to build a MaNGOS server that many times to those who refuse to read through the threads.

http://getmangos.eu/community/topic/8238/playerbot-archive/

or

http://getmangos.eu/community/topic/16235/playerbot/

I will shortly update the first post as kennumen suggested and I hope no one will ask again. But once more for you ;)

These instructions will build a MaNGOS zero server, with playerbot code only (i.e no scripdev code). If your'e having issues, it's best to keep the build simple. Build again with scripdev code once your happy.

First you need to create a portal_zero standalone patch. Use this bash script

#!/bin/bash -x

git clone git://github.com/mangos/zero.git portal_zero_patch

cd portal_zero_patch

git fetch git://github.com/blueboy/portalzero.git master:portalzero

git checkout portalzero

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

git diff $HASH > playerbot_zero.patch

Now get a clean download of the MaNGOS zero core.

git clone git://github.com/mangos-zero/server.git

cd server

copy the playerbot_zero.patch to the server folder. Then apply

git apply --whitespace=fix playerbot_zero.patch

Then create the project by running this bash script

#!/bin/bash

unset OBJDIR

OBJDIR="path where you want to build your object files"

INSTDIR="path where the built server will reside"

if [ -d "${OBJDIR}" ]; then

rm -R ${OBJDIR};

fi

mkdir ${OBJDIR};

cd ${OBJDIR};

cmake .. -DPREFIX=$INSTDIR -DSYSCONFDIR=$INSTDIR/etc -DDATADIR=$INSTDIR -DTOOLS=1

Then build the server

make

and then

make install

You will need to copy playerbot.conf.dist.in and mods.conf.dist.in to the -DSYSCONFDIR folder. Rename all files in this folder, removing the '.dist.in' part. Then configure the files to access the dbc/vmap/map data, the database data and the playerbot data. If these are configured correctly then both daemons (realmd & mangosd) should load & run without issue.

botguy provides an alternative way to summon and dismiss your bots (apply the sql file to your mangos database and configure the option in playerbot.conf) Then you will find that many of the NPC (trainers etc...) will include an interactive menu for you to summon and dismiss your bots.

EDIT: @ensiferum can you edit post #234 and remove your server.log Cheers

Hope this helps

Link to comment
Share on other sites

Don't sweat it, you'd be surprised how easy it is to miss one line. It's getting to be a pretty big readme, but that just shows how much you can do with playerbot (which == awesome).

I'll give all the help I can, although honestly I'm still sorting out git myself. As for playerbot, I'm working on talentspecs (almost halfway which is when I'll start sharing), but work is crazy right now and for some reason personal life's chosen the previous and current weeks as well to go crazy. Someone up there does not want me to finish the talentspecs but darn it I will! ;)

Anyway, I've found it to be a very friendly and helpful community here. Take some effort to find what you need first (something I need to work on now and again), after that feel free to ask.

(pertaining to bots being invisible in instances)

... This process though brought forward a glitch that is in the core code to happen 100% of the time. The glitch in the core is when a you enter an instance with a group of other players, but some (or just one) of the other players are invisible to you. ...

I was browsing the forums the other day... Just out of curiosity, would you perchance be talking about this bug?

Link to comment
Share on other sites

I was browsing the forums the other day... Just out of curiosity, would you perchance be talking about this bug?

Yes, that would be the bug I was referring to. I recently made a change to fix the far teleport problem, which now results in the bots being invisible in an instance. The CMSG_AREATRIGGER packet is used for near and far teleports which gets intercepted in PlayerbotMgr.cpp and then resent from the bot. This is similar to how I had a work around set up, except I had a delay in the UpdateAI code with a new botstate. This immediate resend of the packet makes the bot teleport immediately. Since there is no load time for the bot, the bot appears in the instance first. Basically, the master is not getting the packet updates that tell the client that bots are there. The master will always be the slow computer in reference to the forum thread. May be a good way to test it and fix it. I'll work on getting a branch created for the delay work around I did.

The looting code you enjoy today also encompasses the automated collection of useful objects, is the hard work of BThallid who is a valued member of the playerbot team and contributes regularly. He has also added the excellent 'sharedbots' feature to playerbot.

Now, I'm feeling exceptionally guilty for not contributing as much recently. I'm still here though, just busier with RL.

Link to comment
Share on other sites

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 :) ?

Don't do anything too drastic, life's too short ;)

Which World Database are you using? I use ytdbase that has some nice features. Normally a full database sql is provided, with a few updates. Once these are applied, make sure you create a clean 'characters' database and 'realmd' database from provided sqls in <source root>/sql. Remember you also need to configure the 'realmlist' table in the 'realmd' database.

All further updates can be done automatically.

Yes, thanks to the excellent work of Patman128 you can update the Databases automatcally. Here's a link where you should be able to download the engine 'updates.py'.

Work by Patman128

One snag is that you need to have a working version of 'python' on your system. You should be able to get one for both linux and windows.

N.B You need to configure updates.py so it can access your SQL server.

# =============================================

# CHANGE THIS PART!

#

# path to mysql executable

# leave blank if mysql is in your system path (i.e. you can run it just by putting "mysql" in the prompt)

mysql_path = ''

# your mysql username

username = ''

# your mysql password

password = ''

# mangos/world database name

mangos_db = 'mangos'

# characters database name

char_db = 'characters'

# realmd database name

realm_db = 'realmd'

# wait when finished? 0 = don't wait, 1 = wait

wait = 1

# if waiting when finished, how many seconds to wait

wait_secs = 10

#

copy updates.py to your <source root>/sql/updates folder and execute it from there

python updates.py

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

Hi,

This is an old cookie and every so often someone asks the same question. The grep.exe utility in your 'git bash shell' is out-of-date.

http://getmangos.eu/community/post/137447/#p137447

The idea around this

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

is to search for the right commit (HASH) in the commit history. The grep utility looks in the commit header for a string of the type '[z1xxx]'. If you observe, all MaNGOS ZERO core commits (or they should ;)) are indexed as such. Once it finds the latest core commit, it then records the hash into the variable HASH that is used later in the script.

The problem with supporting a project on more than one core, is time. I rarely get any feedback (good or bad) and it is difficult for one person to be monitoring code for two servers at once (I only have one main serrver ;)). Thanks for the information, I will now take a look at playerbot for MaNGOS ZERO to see whether it is behaving itself. The chances are that you haven't created your full playerbot patch properly. If your having problems with grep.exe then the bash script won't operate properly and the patch will be dirty (i.e. contain core changes as well. Then, when you come to apply the patch the merge will complain bitterly that your trying to overite core files.

Download an updated version of grep.exe from GNU and replace the files in the shell (As I remember the grep.exe comes with a couple of 'dll' files as well that also need to be copied across). You need at least version 2.5.4 to recognise the '-m' option.

Hope this helps

Link to comment
Share on other sites

Hi,

Well I call it 'movement maps', often abreviated to 'mmaps' a project started by faramir118 that essentially controls 'unit' movement between points A to B. In the past, hostile creatures and bots would travel as the crow flies (shortest route) through solid objects, above & below ground level. Not nice. 'pathfinder' in mmaps calculates the most appropriate route between these points on the ground and not below it. The 'Deadmines' were nigh impossible before mmaps. I'm don't think they have an equivalent project for TrinityCore.

It will almost certainly be integrated into the core and I know mangosR2 already include it. If you want a better explanation and or wish to know more, take a look at the thread

mmaps thread

and you can get the code from

faramir118's github

If you decide to try it out, you will need to extract new maps/vmaps/dbc & of course mmaps, using the utilities you compile from faramir118's source (ad.exe, vmap_extractor_v3.exe, vmap_assembler.exe & movemapgen.exe) for your system. This process can take a couple of days, depending on your system. However the results are well worth it. Once you try it, you won't go back ;)

Hope this helps

Link to comment
Share on other sites

Wow... i'm cannot thank you enough, blueboy :) Thanks for all your efforts to give us a "perfect" bot :)

i've followed your post exactly, and now i only receive this:

fatal: corrupt patch at line 612

:D i've tried to compile the new-ai branch directly, without creating a patch, and also got the error mentioned in this post. After fixing it, i could compile.

Link to comment
Share on other sites

hi i did a fresh pull and merged with new-ai and mangos main and build failed

1>..\\..\\src\\mangosd\\Master.cpp(480): error C2065: 'REVISION_DB_PLAYERBOTAI' : undeclared identifier WheatyExceptionReport.cpp 1>Done Building Project "D:\\Server_stuff\\Mangos\\mangos_playerbot\\win\\VC100\\mangosd.vcxproj" (build target(s)) -- FAILED. Build FAILED.

When you did the merge, did you get any conflicts? The reference that appears to be undeclared, is declared in

Reference to REVISION_DB_PLAYERBOTAI

Merge conflicts cannot be ignored or the code won't compile.

If you want a trouble free build, follow the merge instructions on playerbot wiki

Hope this helps

Link to comment
Share on other sites

hi i did a fresh pull and merged with new-ai and mangos main and build failed

1>..\\..\\src\\mangosd\\Master.cpp(480): error C2065: 'REVISION_DB_PLAYERBOTAI' : undeclared identifier WheatyExceptionReport.cpp 1>Done Building Project "D:\\Server_stuff\\Mangos\\mangos_playerbot\\win\\VC100\\mangosd.vcxproj" (build target(s)) -- FAILED. Build FAILED.

When you did the merge, did you get any conflicts? The reference that appears to be undeclared, is declared in

Reference to REVISION_DB_PLAYERBOTAI

Merge conflicts cannot be ignored or the code won't compile.

If you want a trouble free build, follow the merge instructions on playerbot wiki

Hope this helps

ok so i figured out last night my issue while i was at work i think i ignored the revision_sql.h file :( teaching myself git lol but anyways added the file and rebuilt and all built fine.

please dont take this the wrong way lol but i no about the playerbot wiki i pretty much memorized it and got a server running well on that just wanted to new challenge and i have over come it and pretty happy now to get to testing it :P thanks for telling me my screw up so i could fix it

Link to comment
Share on other sites

The sharedbots branch in the portal repo is the official version for Playerbot.

Oh, I didn't know that. So I have to "pull" ...github... sharedbots instead of master ! I finally understood something about Github ! :)))

EDIT : all merged, nothing to edit and working fine ! Blueboy, why did you told me to get playerbot from playerbot/mangos.git ? :)

EDIT2 : hmm not working fine finally...

EDIT3 : is it possible to have an updated sharedbot ? or is there a way to do that without messing up

Link to comment
Share on other sites

Hi Guys,

I need more than

Btw. i've played with the master branch from the portal-repo, and my undead Warrior-Bot couldn't learn any skills from level 1 to 8. I've tried it a few times, and every time the server crashed.

and

blood elf rouge and warlock lock the server up as well when trying to train them at levels 1-6 this is on the new-ai portal branch

If any of these were common, I could debug them on my server, but they are not. I know you both had problems building your servers and I need to determine whether you built them correctly and or are using the commands properly.

1. You are adventuring as a player and not a GM. Playing the game as a GM, can cause problems with bots

2. Server lock ups and crashes. Is there sgnificant lag on your server generally? Describe exactly how you go about 'training' or 'skilling' your bots? If you do get lag without a crash, is there evidence of a 'bottle neck' in the 'mangosd' daemon output screen. If so can you copy and paste the later part and post it. If the server does crash, can you supply (Windows - crash log) or with linux (compiled with debug info - gdb log).

If you're not sure how to use gdb on linux, here is some info that I recently posted

Posts 244# to 248#

It might be a good idea to describe your system and whether you are running the server and client on the same machine, that can cause lag.

Please do not take any offense from these instructions. I have no way of know what your experience is and I need to get detailed information before I possibly solve these issues.

Hope this helps

Link to comment
Share on other sites

Hi,

It looks like the ChatHandler has received some communication not in it's vocabulary. Wow addons can cause this as, are you using any? If so, try to disable 'Party chat' or take a look at this and manually add a filter for your addon.

wow addon filters

It's the height of arrogance to write code only in English and I'm not proud that's the only language (apart from '1's and '0's ;) ) I can understand. I recently added some code to extend localization in playerbot, with your help I can improve it further.

Cheers

Link to comment
Share on other sites

I think vanilla bots are set up different, because I see lots of people running into issues I dont have. As you mentioned configuring bots. I never touch my bots.

I have a macro that summons them

macro that invites them

and im done

For the most part zero bots are just behind. The focus is on WotLK, and as it stands zero bots just get caught up when blueboy has the time and urge to port the updates to zero.

As for you macros, I would add combatorders to that list. I also do talentspecs in a macro but that's just polish.

I come again with my "invisibility bug" which is really annoying... It happens a lot when I enter into an instance, and bots never appear again, even if I exit. Strange thing : the pets are still visible.

On Trinity I had the same problem, but bots would appear when I entered in combat.

Also, in combat, bots are harassing me with "What? For a list of commands, ask for 'help'." I think it's related to an add-on, using Data Store or something like that. Does anyone had this problem before ?

Your invisibility bug is most likely related to this core bug. I believe BThallid has done his best to alleviate this problem (or some such), but basically it's a long-standing core bug that's just amplified with playerbots. Well, that's what I understood of it, anyway.

As for your "What? ..." spam, it's been discussed at length just yesterday, read up and let me know if that doesn't help.

Link to comment
Share on other sites

Hi Guys,

I been busy working on the 'instance invisibility issue' and I think I have a solution for playerbot at least ;)

Tested in Ragefire Chasm

I took a group of bots into this instance. Occasionslly I got all members through into the instance and all were visible. Other times only some bots teleported through with the player and these were invariably invisible to the player. I observed from the mangosd output that the teleportation was only successful (all visible) if the player arrived in the instance first, ahead of the bots.

I read the posts discussing this issue invisibility bug from a non-playerbot prospective. It's generally believed to be caused by a latency, where one player would be entering the instance (on a fast responding computer) and the other group player(s) enter on slower machines. BThallid observed that bots behavoiur could emulate a fast pc, with little or not load and the player would be effectivly the slow pc. Although the players teleportation action triggers the bots reaction (CMSG_AREATRIGGER) they respond quicker than the player.

I have revised the code to ensure the bots always teleport after the player and I will push a commit to portal and new-ai shortly for you to test.

Hope this helps

Link to comment
Share on other sites

@kennumen:

I thought to use it without "else if", check if there is enough rage for Heroic_Strike and other spells. Cast the Heroic_Strike and then Cast whatever Spell is next in the rotation or spellpriority.

hm.. Is there any "how to" for the code boxes?

Of course, I forgot Heroic Strike does not activate the global cooldown (and this can be cast anytime, simultaneously, etc...). You are correct.

As for code boxes, I assume you're referring to this? It's odd it's been broken so long, since it seems all it's missing is replacing '\\n' with "

", but then I'm lazing myself as far as mangos goes so I totally get that ;)

Link to comment
Share on other sites

Hi Gitch,

kennumen put together quite a comprehensive todo list, some time back http://getmangos.eu/community/post/138662/#p138662. Problem is if it isn't bookmarked it becomes forgetten, just little I did for the 'use item' issue. I'm going to gather together all ideas and update the todo list in the GitHub source. That way we will all have an oracle to go to.

Is there a particular method of getting your bots to follow you on say a hippogryph?

One bot does (first in group list) and other does not, but stays behind and I have to summon her.

Ideas?

There maybe a good reason for this. Do the bots who stay behind have the cost to fly? Also, do the bots know the destination node? As a player, if for any reason one or more of the bots are not within interaction distance of the flightmaster (bots maybe off-line at the time) when the player flies, they will not learn the route.

I can help you out creating patches and any other management of your code with regard to 'git', that's no problem.

To get you started, take a look at this

Creating a local git patch

Nice idea with the skill level, we'll definitely have that in the code..

Cheers

Link to comment
Share on other sites

kennumen put together quite a comprehensive todo list, some time back http://getmangos.eu/community/post/138662/#p138662. Problem is if it isn't bookmarked it becomes forgetten, just little I did for the 'use item' issue. I'm going to gather together all ideas and update the todo list in the GitHub source. That way we will all have an oracle to go to.

If not too difficult to do, add a column for "date last action taken". That way we know if e.g. someone's worked on it recently or if it's an old bug whose existence should be checked before worked on.

@Kennumen: I havent tried/looked at the autobot code yet, but want to when I get things more settled. Don't want to wind up with a mess on my end =)

If you do decide to check it out, know that everything is in order up to (but sadly, not including) the point where the bot gets his own WorldSession. I did have it working before and the autobots got added on the summoner's account but not only is that against the whole idea of it (security/cheat wise), but once you logged out you couldn't log back in --- It did however show the rest of the code was solid. I'll try and find some time for it this or next weekend - any progress here has been long overdue, in the meantime feel free to look.

Although personally I do agree it's a better idea to ease into it, getting your bearings in git, c++ and the playerbot code. Best of luck and welcome to the team :)

Link to comment
Share on other sites

Hi everybody !

I just want some help to understand why I can't compile correctly when I merge portal and mmaps.

I'm using Smartgit on Windows (don't think there is a Git.exe somewhere on my HD...) and merging causes lots of rewrites... It seems to be automatic.

What I do :

- I pull Portal from Blueboy's playerbot git

- I create a second remote (manage remotes) with Faramir118's git

- I merge Master with Faramir's

- Result : 6 files in conflict and lots of files added and auto modified.

- The conflicts : chat.cpp, level3.cpp, unit.cpp, movesplineinit.h, game.vcproj.filters and game.vcproj (deleted).

- I try to understand the problems, seems to be MoveTo multiple functions... but can't explain

- I tried Blueboy's git diff, but I didn't understand.

- I try I try, I finally try to compile on VC 2008, but have errors...

I'm French, and I write as I can ^^, but I want to keep Smartgit.

Can someone post the git diff in a comprehensive way ?

Thanks for the help !

Médiévalement !

I've never used Smartgit, but if it has a GUI only interface you will need something like 'GitBash' that does include all the commands & shell necessary to run the scripts and apply the patches.

It looks like you have not followed these instructions http://getmangos.eu/community/post/139809/#p139809 and they can't be anymore comprehensive The merge order is important

Stage 1. Use first script to merge mmaps_rewrite with the core

  • Starts by pulling mmaps_rewrite to your harddrive.
  • It then merges the latest core (MaNGOS) with this.
  • You apply the patch supplied (merge_mmap_into_core.patch - copy this to your source <root> where 'createprojects.bat' file exists) to fix these merge conflicts you mention.

git apply --whitespace=fix merge_mmap_into_core.patch

To finalize the merge (If you don't do this, the code will not be merged)

git commit -a

(This opens the default git editor to allow you to edit the commit header for the merge. Just save the file and exit).

Stage 2. You then merge the playerbot code with the code merged in Stage 1 above

Again use the script and patch supplied for the playerbot merge, as instructed in Stage 1.

If you try to compile the code without fixing the merge conflicts, it won't work. If you still have problems, wait until 'movemaps' is integrated into the core or learn more about git.

I have updated how the scripts and patches as displayed (Thanks to cyberium) in the above link, so you can read them better. Please note that lines beginning with '#' in the scripts are comments only.

Hope this helps

Link to comment
Share on other sites

Hi Guys,

I was asked to describe how to merge playerbot & movemaps with MaNGOS Zero, similar to the instructions previously posted for MaNGOS here

Please bear with me on this, because these scripts and patches wouldn't work when posted to PM. Specifying the display type for code tags as cyberium suggested is pretty to read, but a nightmare when you try to copy/paste. So I will post these in raw format.

1. Run the 'follow/movemaps' > MaNGOS Zero bash script

#!/bin/bash -x
mkdir portal
cd portal
git init
git pull git://github.com/mangos-zero/server.git feature/movemaps:master
git pull git://github.com/mangos-zero/server.git
#
# Apply merge_mmap_into_core.patch to fix conflicts
# Then it is most important to do the following within the portal folder <source root>
# git commit -a
#
# save the file to finalize the merge
# check that the merge has taken by viewing the commit history 'git log'

Then from the portal directory, fix the merge conflicts with this patch (Note: ignore the binary conflicts. All binaries should be re-built to be compatible with your system)

git apply --check --whitespace=fix mmap_merge.patch

(remove the --check option to actually apply patch)

diff --git a/src/game/CreatureAI.h b/src/game/CreatureAI.h
index 45aecec..851fc31 100644
--- a/src/game/CreatureAI.h
+++ b/src/game/CreatureAI.h
@@ -103,16 +103,11 @@ class MANGOS_DLL_SPEC CreatureAI
         */
        virtual void JustReachedHome() {}

-<<<<<<< HEAD
-        // Called at any heal cast/item used (call non implemented)
-        // virtual void HealBy(Unit * /*healer*/, uint32 /*amount_healed*/) {}
-=======
        /**
         * Called at any heal cast/item used
         * @param healer Unit* who healed the creature
         */
        virtual void HealBy(Unit* healer, uint32 amount_healed) {}
->>>>>>> 182b8438135d5e5a2c1cd404b005706ad788f262

        /**
         * Called at any Damage to any victim (before damage apply)
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index b8328ea..fdb40f1 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -3521,17 +3521,6 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
                    return;
                }
                case 28560:                                 // Summon Blizzard
-<<<<<<< HEAD
-                {
-                    if (!unitTarget)
-                        return;
-
-                    m_caster->SummonCreature(16474, unitTarget->GetPositionX(), unitTarget->GetPositionY(), unitTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 30000);
-                    return;
-                }
-                case 30918:                                 // Improved Sprint
-=======
->>>>>>> 182b8438135d5e5a2c1cd404b005706ad788f262
                {
                    m_caster->CastSpell(m_caster, 28561, true);
                    return;
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 6db1602..d57f534 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -7255,15 +7255,9 @@ void Unit::IncrDiminishing(DiminishingGroup group)
    m_Diminishing.push_back(DiminishingReturn(group,WorldTimer::getMSTime(),DIMINISHING_LEVEL_2));
}

-<<<<<<< HEAD
-void Unit::ApplyDiminishingToDuration(DiminishingGroup group, int32 &duration,Unit* caster,DiminishingLevels Level, bool isReflected)
-{
-    if(duration == -1 || group == DIMINISHING_NONE || (!isReflected && caster->IsFriendlyTo(this)) )
-=======
void Unit::ApplyDiminishingToDuration(DiminishingGroup group, int32 &duration, Unit* caster, DiminishingLevels Level, bool isReflected)
{
    if (duration == -1 || group == DIMINISHING_NONE || (!isReflected && caster->IsFriendlyTo(this)))
->>>>>>> 182b8438135d5e5a2c1cd404b005706ad788f262
        return;

    float mod = 1.0f;
diff --git a/src/game/Unit.h b/src/game/Unit.h
index 171f276..816d9f3 100644
--- a/src/game/Unit.h
+++ b/src/game/Unit.h
@@ -990,11 +990,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject

        DiminishingLevels GetDiminishing(DiminishingGroup  group);
        void IncrDiminishing(DiminishingGroup group);
-<<<<<<< HEAD
-        void ApplyDiminishingToDuration(DiminishingGroup  group, int32 &duration,Unit* caster, DiminishingLevels Level, bool isReflected);
-=======
        void ApplyDiminishingToDuration(DiminishingGroup  group, int32 &duration, Unit* caster, DiminishingLevels Level, bool isReflected);
->>>>>>> 182b8438135d5e5a2c1cd404b005706ad788f262
        void ApplyDiminishingAura(DiminishingGroup  group, bool apply);
        void ClearDiminishings() { m_Diminishing.clear(); }

diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h
index 888957d..4e00ba6 100644
--- a/src/shared/revision_nr.h
+++ b/src/shared/revision_nr.h
@@ -1,8 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
-<<<<<<< HEAD
- #define REVISION_NR "1789"
-=======
 #define REVISION_NR "1809"
->>>>>>> 182b8438135d5e5a2c1cd404b005706ad788f262
#endif // __REVISION_NR_H__

Then you need to finalize the merge by

git commit -a

This will open the default text editor to allow you to change the merge header. Just save the file and exit. You can check that the merge has taken by

git log

2. Next you will be merging the playerbot code (zeronew-ai branch) into your previous merge (1.). Run this script from the portal parent directory.

#!/bin/bash -x
cd portal
git pull git://github.com/blueboy/portalzero.git zeronew-ai:zeronew-ai
#
# Apply merge_pbot.patch to fix conflict
# Then it is most important to do the following within the portal folder <source root>
# git add win/VC100/game.vcxproj.filters
# git commit -a
#
# save file to finalize merge
# check that the merge has taken by viewing the commit history 'git log'

copy the following patch to portal and apply it to fix merge conflicts.

diff --git a/win/VC100/game.vcxproj.filters b/win/VC100/game.vcxproj.filters
index 2d2e52d..fbe2d09 100644
--- a/win/VC100/game.vcxproj.filters
+++ b/win/VC100/game.vcxproj.filters
@@ -836,12 +836,6 @@
    <ClInclude Include="..\\..\\src\\game\\Camera.h">
      <Filter>Object</Filter>
    </ClInclude>
-<<<<<<< HEAD
-    <ClInclude Include="..\\..\\src\\game\\MoveMap.h">
-      <Filter>World/Handlers</Filter>
-    </ClInclude>
-    <ClInclude Include="..\\..\\src\\game\\MoveMapSharedDefines.h">
-=======
    <ClInclude Include="..\\..\\src\\game\\playerbot\\PlayerbotAI.h">
      <Filter>World/Handlers</Filter>
    </ClInclude>
@@ -876,7 +870,12 @@
      <Filter>World/Handlers</Filter>
    </ClInclude>
    <ClInclude Include="..\\..\\src\\game\\playerbot\\PlayerbotWarriorAI.h">
->>>>>>> 25635d12680da625b0a297e535a6d2c4c9d4c553
+      <Filter>World/Handlers</Filter>
+    </ClInclude>
+    <ClInclude Include="..\\..\\src\\game\\MoveMap.h">
+      <Filter>World/Handlers</Filter>
+    </ClInclude>
+    <ClInclude Include="..\\..\\src\\game\\MoveMapSharedDefines.h">
      <Filter>World/Handlers</Filter>
    </ClInclude>
    <ClInclude Include="..\\..\\src\\game\\vmap\\BIH.h">

again finalize the merge (git commit -a) and save. The code is now ready to build.

@EDIT I have found the problem. You need to change the file format from PC to Unix. If you have a text editor that does this fine, if not I have found a link to a utility that convert CR/LF line endings into LF line endings to prepare files edited under windows for use on unix machines that does.

Hope this helps

Link to comment
Share on other sites

Okay, it's been a while and I'm a wordy sort so this could turn out to be a mammoth of a post. I'll try and keep it short.

... the test to see whether the bot can equip the item's armour class and not greater (i.e Paladin can wear mail; if the item is leather or cloth it will return false as it's not the best armour for the bot).

Yes and no. Of course, at level 40 paladins and warriors can wear plate (and hunters and shamans can wear mail). But that is a complicated area. It's not as if at level 40 a warrior is suddenly clad in plate only. It's not as if a plate item is suddenly better than a mail one (and the issue is even more clouded for e.g. hunters who even later on often prefer a great rogue item (leather) over a -possibly lowerlevel- mail one). As a general rule, you want some plate items by 45 (ish) and to more or less be full-plate by level 50. More or less the same for melee shamans. Hunters, healer-paladins, spell/healer shamans are again more difficult. If they're in a group, they're never really meant to be hit, in which case it could be well worth it to exchange a bit of 'useless' armor for better stats.

It's a cloudy issue and I haven't (and probably can't) explain it fully, but it's not always clear-cut (depending on class+function) that a lower armor class means the item is automatically 'unfit'. That said, it does enrage some people when e.g. hunters roll on leather, so if nothing else it's certainly a good option to have.

bots will now automatically unequip worn items if they get below 10% of their max durability.

Just a silly question - upon death you lose 10% of the item dura (although it used to be 25% and I can't for the life of me remember if that was before or after the latest 1.x patch). Actually, never mind. With your setting of 10%, death could never break an item before it's unequipped, non-issue. And I felt so smart thinking of it, too. Darn fever ><

@Kreegoth

No quote, but I'll look at those AI you posted and see if I can't add them in. Played around with clothies quite a bit in my time so I should be a fair judge... Should have some time (and a distinct lack of fever) this weekend. Of course, that's assuming none of these busy orc workers beat me to it - Zug zug.

this is working out rather well at the moment.. Ive added a sub command for follow (follow dist) may change that but for now.. thats what it is..

You type it, and bot(s) will increment their follow distance by a set number, up to three times.. I'll explain,

/p follow dist

Bot whispers -"my follow distance is now set to medium"

/p follow dist

bot whispers -"my follow distance is now set to high"

/p follow dist

bot whispers -"my follow distance is now set to highest"

/p follow dist

bot whispers -"my follow distance is now set to Normal"

Why not a mixed command?

/p follow dist [distance]

where [distance] is (e.g.) a number between 5 and MAX_FOLLOW_DISTANCE (which I believe is a config setting and/or a declared constant in playerbot/playerbotmgr).

OR [distance] is (e.g.) close (say 5), normal (default or 10), far (15), further (25), furthest (MAX_...).

bot whispers "I'm now trailing you by # yards" unless it's exactly the value of one of the string variables (regardless of whether a # or string was the actual command), then (e.g.):

/p follow dist 10

bot whispers "I'm now trailing you by 10 (normal) yards"

Something like that. Just an idea.

config file setting for "levels lower than bot" to tell bot how low level of a white item he/she should auto sell when told to. Default will be 10 levels lower than bot. (I like 5!)

I've been thinking about this for a while (how many of you have actually gone 1-80 at least once - just a question out of curiosity with no intended condescension), but shouldn't the white-item selling be dynamic? At level 1-6 you barely ever want to sell a white. Hell, you barely ever get a white. At levels 12-20 you're starting to get a fair amount of greens, and with quest rewards should be starting to equip quite a few greens(assuming, of course, the player does quests and wants to take the time to complete his bots' quests as well - easy for kill quests, time consuming for collection quests). Past level 20 you're not going to want many whites, excepting the shoulder position where grays are even acceptable until level 30 (or even higher if no replacement has been found yet). It's pretty much guaranteed by level 40 whites are useless - but I can't for the life of me remember if they even still drop by then.

Excepted by this are of course tabards and shirts, but those probably aren't classified as armor anyway.

Anyway, just thinking out loud as to whether one setting is enough. On the other hand, if it's not auto-equipped, is a white really worth the effort?

@Kennumen,

hey guy, Looking over the autobot code, and trying to wrap my head around what you were doing with it .

I have some ideas for independent bots. Not sure if you want anything added to autobot, but anything I

might come up with you're welcome to. I may just create a separate alternative branch as what I have in

mind may not fit the main goal of the main code.

Do you mind if I gather ideas from autobot?

The code is out there, as per the licensing it should be pretty obvious nobody has any issues with someone else reusing their code. I certainly don't :) You're free to toy with autobot as you see fit, or branch off it, or ignore it. I do still plan to work on it myself, but hey, if you get it working first, perhaps I will and perhaps I won't.

You mention you might prefer a different method to developing independent bots. Perhaps you'd rather have a look-see at Arena-bg-bots. I took a few looks, couldn't really directly copy code (*sigh* nope, that would've been too easy wouldn't it) but he got it working so there's some good info there. The code is dirty though (not based on mangos but it's a mix of several core modifications), so clear your head, go in knowing things may look and work a bit different and you should be fine. I wouldn't mention it if there wasn't something there :)

Seriously, don't be afraid to create a seperate branch for this. With the idea above, it's generally best to keep things seperate. That way it's clean, it can easily be merged into it's parent tree when it's been confirmed working (and more or less bug-free), and you can easily test that one feature. Of course, we all have our preferences. Some people prefer to keep small changes in a single test branch (although that's what new-ai was created for, if perhaps somewhat mis-named for the purpose - it's probably short for "new playerbotAI code"). In any case, I feel this is a project big enough to warrant it's own branch.

Oh, and your chatty bots suggestion sounds great for immersion. Thumbs up :)

Some of you guys have been having fun with github haven't you...

"Merge branch 'new-ai' into new-ai"

0.o :)

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