Jump to content

Gitch

Members
  • Posts

    126
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by Gitch

  1. Okay, recap.. bots will now automatically unequip worn items if they get below 10% of their max durability. they will also check for worn items, and wont equip them. Once repaired, they'll use them again. They are more picky now, so if they have an item that has stats they cant use, they wont equip it, even if theres nothing else.. You can inspect them, and tell them to equip and they will, but if you don't turn off autoequip meanwhile, they will just take it off again =) I've had to manually edit a new pull from new-ai (won't merge automatically) but they are merged in this branch (finally!) so if you have any probs let me know. Ive compiled it 3 times, pulled it to 3 different local temp repos and compiled.. and its compiling fine, and after 2 hours of testing in game, everything seems to be working. Enjoy! **Edit** completely restructuring the ItemStatComparison() function.. its far too large and inefficient.. what I'm working on will effect only this function within playerbotai.cpp itself. It will do the same thing, just with more efficient coding (I hope!) This will make it easier to tweak class/style decisions for item stats. ***Current EDIT*** Pushed an update removing whitespaces * :8 * sorry about those, I'll be more careful AND the restructured ItemStatComparison() function. (still basic, will be adding stricter comparisons as it goes and probably have these decisions based somewhat on the talent specs/styles you choose for the bot) Dong Fui Chow!
  2. @macks, Just to clarify: skillbot is a branch of playerbot, not a new version. I've kept it merged with new-ai to make sure it stays compatible, but merging it with an existing playerbot code shouldn't add much size at all. if you're already using playerbot, (especially if you're already using new-ai code) i doubt you'll notice much size difference at all. It should merge fine what you have already. maybe 100 kb more tops? havent really paid attention. Other than the autoequip functions, it only adds a few minor fixes to existing stuff. Hope that helps!
  3. @macks Hey! Everything I've worked on I push to the skillbot branch of playerbot: Playerbot - skillbot branch git command would be (from your local repo): git pull [email protected]/blueboy/portal.git skillbot I've fixed a merge conflict, and it is up to date with the new-ai branch at the moment. If you are using the new-ai branch of code, just pull the skillbot branch and it should merge fine! If not, let me know and I'll try to help!
  4. I'm working on a conflict between new-ai and skillbot. will update the branch when I figure it out. I've been attempting to keep skillbot up to date with new-ai, but am getting a merge conflict atm. sorting it. ***Edit*** sorted! skillbot up to date with branch new-ai should merge fine now
  5. Update: Worn item UNequip- pushed to skillbot If your bots' equipped items get too worn (10% of max durability atm) they will automatically Unequip them IF they have the space in iventory to do so. They will then inform you of any worn items. Bots should not equip any worn items. If you find any problems, just turn off the bots AutoEquip , til it can be fixed. This is an integrated part of autoequip now, but could easily be made into a separate function if needed. I've tested this with two parties, for several hours.. I hope theres no major issues I haven't found. Let me know how it goes, and if any changes need to be made to anything. The percentage at which the bot UNequips the item, might need tweaked, so let me know if anything odd happens. Hope it works!
  6. Yay! Glad something is going right! I'm having a devil of a time with worn item code.. but working on it. between compile times, and REcompile times due to the silliest errors on my part, I'm almost bald :lol: VC++ 2008 needs a compile error that says: "okay look, I compiled this garbage for ya, but you told Bob to pick Dougs pocket... fine.. but you might want to make sure Doug has pockets, or there could be problems.." My forgetter works better than my rememberer **Edit** do you guys use any other forum for playerbot? Would be handy to be able to separate threads by topic/branch/updates etc. Just a thought! O:) Maybe we could kiss up to an admin and get a new category for playerbot development with a few sub categories for branch updates/ general discussion etc...
  7. Hi blueboy, appreciate that. sounds like more work than it'd b worth =) good to know about the debug tip! Fine tuning some things and looking for any loose ends with the unequip for worn items. ***Edit*** I've learned a hard lesson about digging into too many things at one time.. found a bunch of functions I was interested in, and was copy pasting, and.. my machine lagged a bit when I moused over the data base browser accidentally.. and I moved an entire section of code and had to straighten it out.. Right in the middle of code I've been working with since yesterday lol so no back up atm..(there will be now) I have chat response for worn items working great , and a 10% of max durability trigger working as well. Just fitting it all in. Going to test this a good bit before pushing anything. On a side note: has there been anything done for playerbot like.. well.. like chat between bots now and then, the occasional burn or just yakking? Was thinking what it would be like to give the bots a bit of personality (and let you pick their personality since its yer bots) Just a thought. (I'm a Morrowind Mod freak haha)
  8. Found a couple problem spots in AutoEquip. fixed them, and am working out some kinks in the worn equipment section. Going to do some more tidying up as well. Should have something later, including adjustments in the stat comparison code (had a few problems there as well). Bots were sending their "which reward should I take" quest text, twice... Looking at that too, anyone else notice it?
  9. nah its more than that really, the only way its worked was to actually send exact infos like.. the spell number, etc. it has to do with the way the client reads the dbc I think. making progress on unequipping worn items. I'm thinking unequip at between 5-10% of max.
  10. @blueboy, Lol, take a breather guy I know what you mean. I got up 2 hours early this morning because I had to be somewhere , and when I got there they were an hour late opening.... The day has followed suit haha. But yeah, I'm perfectly fine with the chat system, its flexible, and much more expandable than the UI itself (from a server stand point) I actually have the profession link working since its only a Hlink from the sender and operates on the receiving client, the prob is I have to have the bot force it with an explicit ID etc.. which is useless. anyway, hope yer day goes better. borrowed some ideas from repair expense function. ]
  11. @blueboy, right, I have all that down What I was attempting is the ability , like with real players, to click that profession link, which is supposed to open 'their' tradeskill window on your screen, so you can browse the recipes, etc using the UI. It's not a necessity, just something I was trying to figure out. And no i wasn't trying to out do your Crafting commands haha 8o I have all the crafting commands macro'd and I wear them out regularly :lol: It just bugged me that it seemed so simple to fix, yet... turned out its probably not doable anyway. Looking for a place to stick durability check atm. **Edit** Running a few checks to confirm I've got a good spot for the code. If it pans out, I'll insert the code to swap out/unequip worn items. cancel the new function, found a solution
  12. Thats a good idea macks. Hadn't thought of about it, but something could be added to the AutoEquip function to check durability levels, and maybe even have them swap out worn items until they are repaired. and then when you do repairs, have it check autoequip again to ensure the best items are back on again. that shouldn't be too hard add in.
  13. Htrade: or Tradeskill Hlink I've tried and tried to come up with a way to allow the bots to send a Profession Hlink that would allow you to open a tradeskill window and see their skills/recipes like it does between two real players.. no luck. I'll offer up what I've dug around and come up with if anyone else wants to have a go at it. Best I can tell: shift+click on spell icon (or click the make a link button in tradeskill window) Client runs a script producing an Hlink that contains the spell_id, current_skill, max_skill, player_guid, data including all the recipes that player knows. since bots dont have a "client" this may not be possible, since your client is looking for certain information, in a certain way, to interpret. Heres what I've found out so far. *BLUE* = my comments From Internet source: Hlink data trade (example: |cffffd000|Htrade:*spellId*45361:*currentSkill*339:*MaxSkill*375:*user_guid*60000000279E425:*UserData*Q/nPf6nprU3/n/fA8/Bw/PA+/B+/Aw/HA+/Bw/HA+5nfg////////P////HAAAQAA+DAAAAAAA|h[inscription]|h|r) - Represents the entire list of recipes for a character's trade skill or profession From Mangos code: Chat.cpp : // |color|Htrade:spell_id:cur_value:max_value:unk3int:unk3str|h[name]|h|r - client, spellbook profession icon shift-click |cffffd000|Htrade:4037:1:150:1:6AAAAAAAAAAAAAAAAAAAAAAOAADAAAAAAAAAAAAAAAAIAAAAAAAAA|h[Engineering]|h|r // number or [name] Shift-click form |color|Htrade:spell_id,skill_id,max_value,cur_value|h[name]|h|r I'm not sure if some of these examples are actually conflicting reports, or if the actual information needed for the link varies in how much is needed. The following, if typed in chat, will return an appropriate Hlink for this, however, I haven't been able to create this link using code.. /run SendChatMessage("text here"..select(2,GetSpellLink(spell_id)).."text here as well", "CHANNEL", NIL, 2) must be typed exactly as Ive put in blue here. Including all quotes, spaces(or lack thereof) and the text fields, even if they only contain a "." This is a Script recognized by the client itself NOT mangos. As far as I can tell, this exact format must be used to the letter. If used without the "select(2," section, it will only return the spell info. The second return is the one that makes the trade link. "CHANNEL", NIL, 2 = the chat channel it gets sent to. I used 2 for example (trade channel) there may be a simple solution. my knowledge of the code is minimal lol, so that accounts for alot. My hunch is that without the last field (player data) it won't work. I've been able to create a link, using the information , spellId, skill, maxskill, (even tried guid), spell name, but it doesn't work. Anyway, wanted to toss this out there in case anyone else had thoughts of messing with it.
  14. Update: AutoEquip - Pushed to branch skillbot The short and sweet of it: New function to judge Item stat types (e.g. str, int, spellpower). Initial TEST phase! Don't expect wonders from this. It's very basic atm. The rest of autoequip is still as it was, and you actually might not even know this code exists yet, unless you really watch!(especially in low level areas where items have NO stats) 1.) New boolean -ItemStatComparison(Proto, proto2)- takes itemprototype of two items and compares their item stat types (not values yet, just their type) It then takes the bots class, and the stat type, and determines the stats importance to that class (basic atm nothing too in depth). It scores the item based on this, and then compares the next item. If pProto2 scores higher, ItemStatComparison returns true, Else returns false. Needs testing so it can be pruned/tweaked/added to. Basically its like this atm: Warrior bot loots an item that has +5 Intellect. He will not equip this item, I explain below: Bot loots item. Function is called to check the item. (short version) function says warriors don't need intellect. The item doesn't get passed on to the remaining checks, saving processor time, Yay! Function tells bot, yer outta luck bot, try another item! However! If this had been a STR item, the item returns true, BUT it STILL has to pass the itemlevel, DPS, Quality, and Armor comparison checks. If you want the bot to equip it anyway, you can still just tell them to equip it the old fashioned way! :cool: this is just an example. At the moment the function looks for every stat type, on all 10 possible item stat slots. I'll do my best to tweak the list, but anyone that looks at it is welcome to make changes/suggestions. This section will take alot of testing/tweaking/hairpulling probably :lol: The new function is LONG, very long... I'll prune it as best I can (though not sure I can and keep flexibility/depth of possibilities). NOTE: One more thing I need to mention. If the new item, and the equipped item have the SAME itemlevel, and the SAME armor level and the SAME quality (LOL) but one has better stats, you will have to tell the bot to equip the one you want. It will not (YET) auto equip in this situation as theres not been a condition added yet for it. For good reason, the stat values aren't being checked yet, and until they are, I don't want bots to make hair splitting choices.
  15. @blueboy, Woke up and couldn't go back to sleep, so i started a new party as well, and so far, your patch is working fine. Thanks! I still haven't looked at autoequipping loot won from a loot_roll. I scanned it once, and wasn't really sure where to call autoequip heh. I called it from case smsg_loot_roll_won *or something like that* and nothing happened. I may look at it again, but over all, seems the autoequip is working *fairly* well. At least its not so random now. If you notice anything thing else holler. I'm piecing together info to start comparing item stats/class usefulness info.
  16. Hey neat! It works! Thanks Cyberium! I'll definitely feel better about posting code lol
  17. @blueboy, I'll add the patch now, and thanks for noting it and working with it! I do appreciate the help. **Edit** I've added the patch. Looks good to me! I'll continue to test autoequip. atm my party is about to reach level 20, and so far things are working well. I can confirm many uses of 'use' command on gameobjects/quest boards, inventory items (lady's necklace near tranquiell?) No issues there yet. just FYI. I want to add code to cause bots to not only auto sell trash, but at the same time, auto buy a certain amount of class items (e.g. arrows relevant to their level etc) Just looking at it atm, nothing coded. If any other suggestions, please post 'em!
  18. @Kenummen, It's not as big of a demon as it sounds haha, I made the Update notice as I went along, and in the process, removed some things, added.. etc.. In the end, I should have just stated... Features: 1.) Bots will auto sell ONLY weapons, armor, food, drink which have a level requirement 10 levels or lower than the bots current level. Only white items (other than food items they are considered by foodtype consumables) are checked for these conditions atm. and they'll ONLy do this IF you type /t botname or /p 'sell all' before you speak to the merchant. I guess it doesn't really do much, but in the end, I was so excited to be able to push it I made it sound more than it was lol. BUT I enjoyed it nonetheless, especially when I saw the outcome when my bots sold Its just that it took me so long to work out the thing in my head and find appropriate functions, I was tickled to be done haha. :lol: Originally it DID in fact include all items meeting the level conditions, and I weeded out those that slipped through the cracks.. It worked well, but I saw enough items that would slip through that shouldn't, I took it out. I may put together enough conditions to make it work when I get time. I'm testing some 'one time only' settings that allow bot to sell everything that isnt nailed down(easier to check for what NOT to get rid of sometimes lol) simply cause there are times I'd rather just see what they have, take what I want, and get rid of the rest. On the Side Note: While testing, I got quite frustrated because while trying to determine if 'drink' was definitely a foodtype item, I could NOT locate 'ice cold mink' in the DB !!!! I spent a good 30 minutes arguing with the DB before I noticed the spelling....
  19. Update: Auto Sell ->Pushed to branch skillbot New Subcommand: 'sell all' - type '.help sell' for details- /t botname or /p ; Use Before talking to vendor. Resets after sale, so have to give the command each time BEFORE you sell, IF you want the bots to auto sell low level white items. FUTURE: If tests work out, will make it automatic (or at least will set them to auto sell, and it stays until you change it) Fine tuning! (may reduce the level difference depending on feedback) NOTE: this update does not affect the auto sale of gray trash items. It will still function as usual. Features: 1.) Bot/bots will auto sell all white (normal quality) Weapons/Armor items that have a level requirement 10 levels or lower than the bots current level. 2.) Bot/bots will NOT auto sell items involved with quests, OR tradeskill tools (e.g. blacksmithing hammer, fishing pole, skinning knife etc) 3.) Bot/bots will auto sell all food items that have a level requirement 10 levels or lower than the bots current level.(so guard your pet food!) 4.) Bot/bots will NOT auto sell tradegoods (some tradegoods are involved in quests as well. Sell them manually if you wish til a better option) 5.) Fixed output text from bot to make the "I could sell" list prettier and more practical. I'm looking at all other items, and there are alot more than can be sold automatically, but requires some more in depth comparisons. (e.g. you dont want to sell your fishing lures etc lol) Hope this helps!
  20. @blueboy, Some handy modifications to IsItemUseful() would be: Just suggesting! For now I've added the necessary code to cover this from within _dosellitems() itself. Think it would be easier to call IsItemUseful() for the majority of the checks if possible. Getting close to a push I think, will up date when I do.
  21. Although personally I wouldn't go any further than all gray items, white armor/weapons of which you're wearing green or better, and perhaps under-levelled food (e.g. level 5 food when you're level 15+). Beyond this it's not easy to decide what may or may not be useful... I like this. Could probably use item comparison to assist with it. I especially like the idea of getting rid of outleveled food etc, and white items can easily ( I think) be weeded out by Itemlevel as well as quality. Thanks for the suggestions! ***EDIT*** The bots "I could also sell" list is terribly sloppy after fix... Have a fix for it that should look more like it was intended originally. Several other things in the works, so will push all together later tonight unless something major pops up that needs attention sooner. Tuning the auto sellable items. Blueboy's IsItemUseful() query is going to come in handy here. May need to add some further checks to it possibly? (hint hint! O:) )
  22. Update and Pushed to branch skillbot for consumption Finally :lol: AutoEquip updates: 1.) New function - PlayerbotAI::AutoEquipComparison(Item *pItem Item *pItem2) 2.) New command- 'autoequip now' - using this command with /t botname or /p will cause one, or all bots in party to ignore their autoequip setting and run the autoequip cycle just once for your pleasure, whether they need it or not. 3.) This made the code much neater and easier to follow. Outline: searches the backpack , one slot at a time for items. if it finds an item, it checks to see if equippable. If so, it gets the equipment slot, and checks to see if bot has anything equipped in that slot. if not, it equips this item(might be a robe!). If so, it sends equipped item, AND found item to the new function to be compared by itemlevel, armor, quality, and last but not least blueboy's isitemuseful function to determine if this bot wants to use the item. These checks will grow and get more complicated. It follows this process through backpack, and all equipped bags This is what it did before (kinda) except it was adding all the items to an array(list) first and THEN going back through the list and comparing.. thats nice for santa, but not for bots :lol: If you take a look at this and see a better way of doing it, by all means let me know. Bots sell List update: You'll notice some changes here. When you go to sell, the bot will list his/her backpack items first, then each bag that actually has something in it, be it 1 item or 10. They wont say anything about empty bags. I'm looking at a way to make it read out more like the way it was. Will update when I can test it out. Its not pretty, but for now you'll know everything they have to sell. I think at least one of the other item listing functions have this same problem (and one doesn't) Since these issues were similar, I made a minor change or two (mainly just changed where the itemLink gets output so that no links get missed we hope) This is in the SellGarbage() function. What led me to find this was when I noticed the bots weren't listing things that I KNEW they had.. I thought they had lost some items, or dropped them or something.. If you don't have extra bags on yer bots, you won't notice this. If I go too far in changes, honestly, let me know
  23. Found a fatal error with autoequip.. Its odd.. I was working on the bot's sellable list and when I found the problem with it.. Its the exact same problem autoequip runs into. Its an issue with using item lists to work from. If a bot has extra bags ( like mine, BIG bags) they get too many items and the list goes haywire. The bot essentially cant see whats in his extra bags(at least not all of them mine couldnt see the last bag where the good stuff was lol) if the list gets too full. Same thing happens with the "I can also sell" list. I've come up with what I "think" is a good solution. The code will check each Item at a time as it goes through the bags which will actually be more efficient because before, the code went through all the bags, made a list, and THEN compared each item which took twice as long as it should. I'm going to apply this same theory to the sellable list and try it if the author doesn't mind.. In fact I guess I've already taken too much liberty without checking first.. Hope I don't offend anyone with any of my messing around with code O:) New Function (used in conjunction with AutoUpgradeEquipment) is AutoEquipComparison(Item *pItem, Item *pItem2) Working on compile, and testing. If all goes well will have a push later. @Blueboy, Hope this doesnt mess up what you're doing with the code.. It shouldn't, as the section you've been working with is all situated in the new function pretty much as it was in the old. I think this makes coding this simpler, and sure looks like it will take a load off the server when 4 bots all decide to call the function at once =D Also, the new function will serve (I think) as a good item comparison function to call for just about anything (with a little work). This way, all the decision making(concerning weapons and armor etc for bots) we add to this function we can use for other purposes if needed. When I get ready to push I'll Outline what it does and how the information gets passed. Back to my corner! ***EDIT*** It works! Making some tweaks. Adding a command (temporary probably) to force your bot/bots to run through the autoequip cycle for whatever reason. (you forced them to equip a certain item etc or maybe changed their orders **future addon- command to set armor/weapon preferences**)
  24. @Kennumen, I'm the one that was being lazy Thanks for the links, and for looking it up. Have made some bookmarks, and when I'm done fixing the mess I made last night (when I thought something had gone haywire but wound up just one of my bots is on the blink) I'll dig into this! Skillbot branch should be fine, just have to reorganize on my end so I don't lose changes I made here. It's what I get for getting into too many things at one time lol. Still having fun. @blueboy, No luck with bugged bot.. will have to reroll a priest. If anyone else experiences any issues let me know. It might be the account itself thats bugged. New accounts work fine. 2 accounts not working, including gm account. running some tests, I want to make sure this isn't linked to autoequip. ***EDIT*** Cancel the 911 call... the bots are just being Extremely picky.. too picky mostly. One hunter is prefering a skinning knife over a very nice axe, and priest is choosing all sub par items. Anyway, just glad it wasn't 'broken'. Just needs tweaking! *whew* :lol: These issues may (probably will) vary from one level range to another.. will take alot of testing at various level ranges. Issue with bot sellable list found, and working on it: if bot has 4 large extra bags, and full... they won't list their items for sale, any items at all. for now, open the trade window with bot, get their list. use this list to choose from and do /t botname sell (items from that list) until its small enough to show up. Issue is I'm using 4 huge brown sacks on my bots lol.. and this bot was just too full of stuff for it to be listed. I'm working on a possible fix for this.
  25. I have an odd problem.. I have one bot that isnt working right .. He wont autoequip, and wont send me any message with his items for sale. The other bots do all the above, and they are all logged in at the same time. If I log all out but the one bot, he still does not work.. he follows, heals, buffs, fights... This bots been like this for no telling how long, so really don't know what caused it. Any ideas where to look?
×
×
  • 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