Jump to content

skinlayers

Members
  • Posts

    31
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by skinlayers

  1. is there a way to add more than 9 playerbots? i mean, adding characters from other (maybe locked/banned or sth) accounts would be nice!

    just imagine doing Temple of AhnQiraj with 39 Bots

    I think there would be a lot of problems with this. The current limit of 9 is because of a client-side limitation of only being allowed 10 toons per realm. I don't think pulling bots from other accounts would go over well at all. Imagine having someone summon your bot and then using trade to strip it of all its items. Or even just logging into a particular toon only to find it had previously been summoned by another player to a completely different part of the world.

    skinlayers

  2. BASH script to generate AHbot patch file. I originally wrote this for playerbot, but it works for AHbot as well with a couple of modifications.

    #!/bin/bash -x
    git clone git://github.com/mangos/mangos.git ahbot
    cd ahbot
    git fetch git://github.com/xeross/mangos.git ahbot:ahbot
    HASH=`git log ahbot --pretty=oneline | grep -m 1 '\\[9[0-9]\\{3\\}]' | cut -d " " -f 1`
    git diff $HASH ahbot > ../ahbot.patch

    skinlayers

  3. This has been a question of mine for a while now. I want to get into programming, but where to start? I taught myself BASIC when I was 9... A software engineer that I respect who use to work for Google told me to start with C as everything else (Java, C++, C#, Objective-C, etc) bows to it's syntax. Most people seems to say just skip C and dive into C++. Yet another person is telling me to skip C++ and head towards C#/mono. I want to be a wide-spectrum programmer, able to generate code for Windows, Linux, and Mac OS X. (Way off topic here) my eventual goal would be to create an open source software virtual instrument rack patterned after Propellerhead's Reason, since there really isn't any linux/open source equivalent. Thoughts?

    skinlayers

  4. Don't worry m8. I'll back you up. No one on the planet can convince me that this git stuff is easier than SVN. NO way in hell. In fact, Hell would have to freeze over before that would ever happen.

    Plus I'm bigger and more mature than most people to be able to be be-littled.

    Actually, I was refering to the need for a new AHbot dev. I, personally, AM a fan of git. ;)

    skinlayers

  5. Reposted from the AHbot thread as I think DaemonCantor & UnkleNuke are onto something, and I believe my testing with AHbot is relevant.

    Then maybe I'm having a different issue then the rest of you. I just did some extensive testing and my problem is without a doubt caused by ahbot being enabled. I compiled MaNGOS 9620 + SD2 1653 + Ahbot, and rebuilt my DBs from scratch using UDB and I'm still having hangs on login & logout as well as seg faults caused by the anti-freeze mechanism. If I disable ahbot in mangosd.conf the problem goes away. I also installed mytop so I can watch what the mysql server is doing. Sure enough, every time my hard drive thrashes, tables are being created/deleted in characters->auctionhouse or characters->item_instance. The hangs occur whenever you try to login/logout or quit mangos-worldd while its processing those queries. Using the default setting of processing 200 items at a time, which generates 600 items per minute (200 x 3 AHs), it takes ~25 sec for it to complete a cycle until it reaches the minimum number of items as set in characters->auctionhousebot. This is waaaaaaay longer that it has in the past. Since I started using AHbot, I've had it set to process 1000 items per cycle (3000 queries per minute). At that rate, with the slow sql processing, it doesn't have time to finish the previous cycle before starting a new one, so the queries get backed up, which after a while will cause anti-freeze to segfault mangos-worldd. I think UnkleNuke is right that the problem isn't with AHbot itself, but is a problem in MaNGOS being exposed by its heavy use of sql queries.
    
    On Ubuntu 9.10 32-bit test system (Core 2 Duo 3GHz 2GB RAM). I'm about to test it on my Debian Lenny 64-bit production machine and see if I get the same results. I'm guessing this problems was introduced a while back but since my AH was already stocked, I wasn't noticing it, where as with my testbed, the AH starts out empty..
    
    skinlayers

  6. Then maybe I'm having a different issue then the rest of you. I just did some extensive testing and my problem is without a doubt caused by ahbot being enabled. I compiled MaNGOS 9620 + SD2 1653 + Ahbot, and rebuilt my DBs from scratch using UDB and I'm still having hangs on login & logout as well as seg faults caused by the anti-freeze mechanism. If I disable ahbot in mangosd.conf the problem goes away. I also installed mytop so I can watch what the mysql server is doing. Sure enough, every time my hard drive thrashes, tables are being created/deleted in characters->auctionhouse or characters->item_instance. The hangs occur whenever you try to login/logout or quit mangos-worldd while its processing those queries. Using the default setting of processing 200 items at a time, which generates 600 items per minute (200 x 3 AHs), it takes ~25 sec for it to complete a cycle until it reaches the minimum number of items as set in characters->auctionhousebot. This is waaaaaaay longer that it has in the past. Since I started using AHbot, I've had it set to process 1000 items per cycle (3000 queries per minute). At that rate, with the slow sql processing, it doesn't have time to finish the previous cycle before starting a new one, so the queries get backed up, which after a while will cause anti-freeze to segfault mangos-worldd. I think UnkleNuke is right that the problem isn't with AHbot itself, but is a problem in MaNGOS being exposed by its heavy use of sql queries.

    On Ubuntu 9.10 32-bit test system (Core 2 Duo 3GHz 2GB RAM). I'm about to test it on my Debian Lenny 64-bit production machine and see if I get the same results. I'm guessing this problems was introduced a while back but since my AH was already stocked, I wasn't noticing it, where as with my testbed, the AH starts out empty..

    skinlayers

  7. Naicisum has disappeared, and his repo hasn't been updated in over a month. The current version of AHbot was built against MaNGOS 9400, which is now over 200 commits old. Now were starting to see segfaults, hanging on login/logout and other oddities when using AHbot with newer commits. This seems to be one of the most popular core mods, but its dying. We need a new dev. Someone who can fork the repo, and continue on. I've helped where I can (as with playerbot), but I'm not a programmer... yet.

    http://github.com/Naicisum/mangos

    Thanks!

    skinlayers

  8. Yup, its commit 9611. Not the sql update, but the actual code. I just compiled 9610 with AHbot +playerbot + ScriptDev2 and its not hanging. My hard drive is only active for a few seconds after I get "Player: channels cleaned up!"

    So, my advice for now it to build with 9610 or to cherry pick commits later than 9611 into 9610.

    skinlayers

    Update: spoke too soon. Its acting better, but ahbotoptions ahexpire will cause it to thrash and segfault. I'm giving up for now.

  9. I just updated to the latest evo-X (based on MaNGOS 9613) and now I'm seeing AHbot related hangs and seg faults as well.

    I noticed when I issue .ahbotoptions ahexpire it take about 30 - 60 seconds before the sql queries go out, and then the console is unresponsive for several minutes until its finished. The entire time, my hard drive activity light stays solid, so it doing *something*.

    I'm testing this on Ubuntu 32-bit, and this definitely wasn't happening before. One of the commits made since 9591 (the last time I updated) must be causing the issue. I'm thinking 9611 since it effects indexes in the character DB. Or 9602 as it affects mail.

    I really hope Naicisum comes back soon, or another dev is willing to step up.

    UPDATE: Looking at my log, I notice everytime right before mysql goes nuts:

    Player: channels cleaned up!

    I wonder if there is a connection.

    I also ran SHOW FULL PROCESSLIST on in mysql while my hard drive was grinding and saw a bunch of changes being made to auctionhouse and item_instance, so its definitely mysql related.

    UPDATE 2: I dropped the indexes that were added in 9611, but that didn't fix it. Maybe it was one of the code changes that went with 9611.

    skinlayers

  10. Latest commit causes gcc to fail:

    In file included from ../../../src/game/Unit.cpp:53:
    /usr/lib/gcc/i486-linux-gnu/4.4.1/include/varargs.h:4:2: error: #error "GCC no longer implements <varargs.h>."
    /usr/lib/gcc/i486-linux-gnu/4.4.1/include/varargs.h:5:2: error: #error "Revise your code to use <stdarg.h>."
    ../../../src/game/Unit.cpp: In member function ‘void Unit::SendMonsterMove(float, float, float, SplineType, SplineFlags, uint32, Player*, ...)’:
    ../../../src/game/Unit.cpp:372: warning: ‘float’ is promoted to ‘double’ when passed through ‘...’
    ../../../src/game/Unit.cpp:372: note: (so you should pass ‘double’ not ‘float’ to ‘va_arg’)
    ../../../src/game/Unit.cpp:372: note: if this code is reached, the program will abort
    ../../../src/game/Unit.cpp:373: warning: ‘float’ is promoted to ‘double’ when passed through ‘...’
    ../../../src/game/Unit.cpp:373: note: if this code is reached, the program will abort
    ../../../src/game/Unit.cpp:374: warning: ‘float’ is promoted to ‘double’ when passed through ‘...’
    ../../../src/game/Unit.cpp:374: note: if this code is reached, the program will abort
    ../../../src/game/Unit.cpp:381: warning: ‘float’ is promoted to ‘double’ when passed through ‘...’
    ../../../src/game/Unit.cpp:381: note: if this code is reached, the program will abort

    skinlayers

  11. Hi,

    Yes I agree, it works fine with the blueboy repo and it's alot sleeker, great work. :cool:

    Less important; I couldn't get it to work with the 'Tasssador' repo, but I can still use the old script for that :rolleyes:

    Thanks for your contribution

    valhalla in valhalla branch, current mangos commit in master branch:

    #!/bin/bash -x
    git clone git://github.com/mangos/mangos.git valhalla
    cd valhalla
    git fetch git://github.com/Tasssadar/Valhalla-Project.git master:valhalla
    HASH=`git log valhalla --pretty=oneline | grep -m 1 '\\[9[0-9]\\{3\\}]' | cut -d " " -f 1`
    git diff $HASH valhalla > ../valhalla.patch

    valhalla in master branch, current mangos commit in mangos branch:

    #!/bin/bash -x
    git clone git://github.com/Tasssadar/Valhalla-Project.git valhalla
    cd valhalla
    git fetch git://github.com/mangos/mangos.git master:mangos
    HASH=`git log --pretty=oneline | grep -m 1 '\\[9[0-9]\\{3\\}]' | cut -d " " -f 1`
    git checkout mangos
    git diff $HASH master > ../valhalla.patch

    I hope you find my scripts useful! Obviously they will have to be updated once MaNGOS is > [9999].

    skinlayers

  12. Yes,

    I was using the gethash.sh script to obtain the HASH from the commit History of two different repos. First the MaNGOS repo with version format [9XXX]. The http://github.com/Tasssadar/Valhalla-Project also uses square brackets to version the commits, in this format '[prXXX]'. So I needed a script that would filter out '[prXXX]' and search for a pattern, that contains two characters (i.e '[9'). If you can get your script to do this, that would be great. I will certainly give it go, thanks

    Cheers

    The '\\[1[0-9]\\{4\\}]' string is a regular expression that tells grep to search for [1XXXX] where X=0-9. However, I've done one better and integrated both pbot.sh and gethash.sh into on simplified script:

    #!/bin/bash -x
    git clone git://github.com/mangos/mangos.git playerbot
    cd playerbot
    git fetch git://github.com/blueboy/mangos.git master:Playerbot
    HASH=`git log playerbot --pretty=oneline | grep -m 1 '\\[1[0-9]\\{4\\}]' | cut -d " " -f 1`
    git diff $HASH playerbot > ../playerbot.patch

    This will result in the master branch being the current version of MaNGOS, and the playerbot branch the current blueboy repo.

    Or, if you really want playerbot to be in the master branch like your script:

    #!/bin/bash -x
    git clone git://github.com/blueboy/mangos.git playerbot
    cd playerbot
    git fetch git://github.com/mangos/mangos.git master:mangos
    HASH=`git log --pretty=oneline | grep -m 1 '\\[1[0-9]\\{4\\}]' | cut -d " " -f 1`
    git checkout mangos
    git diff $HASH master > ../playerbot.patch

    skinlayers

  13. P.S I have revised the gethash script in #394, and this will automatically get the HASH from the MaNGOS commit history.

    #!/bin/bash
    [ -f "hash.txt" ] && rm hash.txt
    git log --pretty=oneline > commit.txt
    {
    while read line
    do
       echo $line > line.txt
       index=0
       while read -r -n1 char;    do
          MYARRAY[$index]=$char
          let "index++"
           done < line.txt
    
       ELEMENTS=${#MYARRAY[@]}
    
       i=0;t=1;n=2
       while [ $n -lt $ELEMENTS ]
       do
           [ "${MYARRAY[$t]}" == "[" ] && [ "${MYARRAY[$n]}" == "9" ] && exit
           echo -n "${MYARRAY[$i]}" >> hash.txt
           let "i++";let "t++";let "n++"
       done
           rm hash.txt
    done
    } < commit.txt

    It looks for the pattern '[9' which is used on the MaNGOS branch, for versioning. I realise this might be different on Evo-X. I will check future commits for whitespaces, but try it without the 'whitespace=fix'.

    Cheers

    Any reason I can't reduce this down to:

    #!/bin/bash
    [ -f "hash.txt" ] && rm hash.txt
    git log --pretty=oneline | grep -m 1 '\\[1[0-9]\\{4\\}]' | cut -d " " -f 1 > hash.txt

    skinlayers

  14. Looks like MaNGOS commit [9575] broke playerbot. I'm guessing it has to the with the changes in ObjectAccessor...

    ../../../src/game/PlayerbotAI.cpp: In member function ‘void PlayerbotAI::HandleCommand(const std::string&, Player&)’:
    ../../../src/game/PlayerbotAI.cpp:2816: error: ‘GetObjectByTypeMask’ is not a member of ‘ObjectAccessor’

    skinlayers

    UPDATE: I tried editing line 2816 myself and changing the code based on the pattern of changes in commit 9575. Unforutnately, that didn't work. I think its time I look into going back to school to study C/C++.

  15. blueboy,

    I've been using the same method as you san the script to find the commit hash. I've just been manually looking them up via "git log" or surfing through the commits on github.com. I've been building with evo-X + ahbot + playerbot on both Ubuntu 9.10 (Karmic Koala) 32-bit and Debian Lenny 64-bit (Ubuntu for testing, Debian for my public server). Lenny and Karmic definately use different version of the compile tools, but I believe I get the same warnings on both. I'll double check next time I do a nwe build. I can also test with straight MaNGOS as well if you'd like, so we can take the evo-X changes out of the equation.

    mkdir playerbot
    cd playerbot
    git init
    git pull git://github.com/mangos/mangos.git master
    git checkout -b mangos HASH
    git remote add playerbot git://github.com/blueboy/mangos.git
    git pull playerbot master
    git diff HASH > playerbot.patch

    I replace HASH with the matching commit that playerbot is currently build off of.

    To fix the whitespaces I've been using:

    git apply --whitespace=fix playerbot.patch

    Output (from an older post I made in the evo-X forums):

    playerbot.patch:36: trailing whitespace.
    /t BOTNAME free (bot shows free empty space in its inventory)
    playerbot.patch:71: trailing whitespace.
    in its bags or be equipped and even be soulbound. By this you can cast spells/enchantments
    playerbot.patch:72: trailing whitespace.
    on soulbound items ('nt' stands for 'not trading').
    playerbot.patch:174: trailing whitespace.
    Hardcode lowest rank spellID, use function to get highest rank
    playerbot.patch:275: trailing whitespace.
    
    warning: squelched 159 whitespace errors
    warning: 163 lines applied after fixing whitespace errors.

    Then I'll git diff out a new patch with the whitespaces fixed. There's still usually 1 lingering whitespace error, so I'll go into the patch file and remove the spaces manually. It applies cleanly afterwards.

    I'm not concerned enough about the compile warnings to fix them manually, so I'll just wait until it ends up in the playerbot repo ;)

    Thanks again!

    skinlayers

×
×
  • 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