Jump to content

Gitch

Members
  • Posts

    126
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by Gitch

  1. Pushed to skillbot fix for sellable list; code cleaning. If any issues with current code, let me know. I had some issues here, but am not certain what caused it... one of my accounts is bugged it seems. With a new account, testing went fine, and autoequip worked as it should.
  2. @nightterror I see I'm not the only nightowl! I'll definitely try that out when I get my current crisis under control lol And thanks for adding that!
  3. Fix: for bot reporting sellable items when master sells. This was causing the sellables from other bags to NOT be listed. Patch: diff --git a/src/game/playerbot/playerbotai.cpp b/src/game/playerbot/playerbotai.cpp index 80542bc..dc5a2f8 100644 --- a/src/game/playerbot/playerbotai.cpp +++ b/src/game/playerbot/playerbotai.cpp @@ -6815,7 +6845,7 @@ void PlayerbotAI::SellGarbage(bool bListNonTrash, bool bDetailTrashSold, bool bV // and each of our other packs for (uint8 bag = INVENTORY_SLOT_BAG_START; bag < INVENTORY_SLOT_BAG_END; ++bag) { - std::ostringstream goods; + // std::ostringstream goods; const Bag* const pBag = static_cast<Bag *>(m_bot->GetItemByPos(INVENTORY_SLOT_BAG_0, bag)); if (pBag) { Still working on fix for autoequip- incoming shortly There HAS to be a gnome behind this... (if any of ya are wondering about all this activity I've been into lol, I have alot of time at home (possibly get to go back to work soon !) so This has given me something to put my idle hands to) Grandkids will be here this weekend, so I'll be scarce for a few days. :lol:
  4. Update: AutoEquip Pushed to branch skillbot Updates for melee weapon choice thanks to blueboy. Weapon choice according to item DPS. Updates to armor choice thanks again to blueboy. Cleaned up code... finally! Thanks for all the suggestions/changes and testing on this guys I like green! doh something got broken, pushing a fix asap. (its compiling now)
  5. @blueboy, Thanks! I'll add that in. And I've changed the conditions to as follows, and dropped the old variables to clean things up a bit: this doesn't include your changes, will add those in now.
  6. @Kreegoth, I LOVE the idea of being able to set type by a command like combat orders.... Would really help I think.. instead of trying to make the bots figure it out, YOU can set the type of gear they aim for... Really, thanks Kreegoth Am also going to play with auto settings, for autonomous bots for things like arena, mercs, etc. BTW I have the code in place for checking class at the moment, working on tweaks, new code, new checks.. Probably won't push again until I have a good stable version of the new checks in place. and now your ideas have tossed a whole new ball of wax into the soup.. This could get big haha. @Blueboy, I've added your code addition and am reformatting my own lol. Should have something ready to push later tonight with some new basic checks to try out.
  7. @blueboy, I want to thank ya again for posting that change, I can see so many changes I need to make in code, doing that now. all the variable definitions and conditions I've been doing from my scripting knowledge.. It can be sooo much simpler.. thanks for the lesson! and by all means, if any of you see changes that should be made, Please do. for me this is as much about working together as it is learning (and having a dance in the office when it works like it should!!) **Edit** Need some opinions... I'm looking at adding checks for item stats. I need input on what to check and what importance to put on that stat for caster/melee. I've posted the item stats list above in previous post. As blueboy has found out, DPS will rule mostly for weapons for melee(will check whether bot is melee or caster as casters dont need the DPS) I really don't want to check every single stat .. any ideas which ones would be good to focus on? @blueboy, Mind pushing what you have on this?
  8. @blueboy, I could only click the thank you button once, or I would have spammed it a few times! I've been working on the exact same thing, and I love the way you did it! I hope you don't keep that promise! 8) My C++ knowledge is very little. I need all the help I can get. Adding your code into mine. Working on some checks by class type (caster/melee) it will be basic to begin with. I've been digging through the itemstattypes and have some other ideas for tests as well. This list may not be very useful , if any use at all, but It helps me keep track ... thought I'd post it if anyone else might find use for it.
  9. Haha! Thats too funny. Thanks for sharing that! I laughed out loud :lol: Before last night, my hunters kept insisting they wear that robe with a higher itemlevel than their Leather Vests with higher armor level... Itemlevel is only the first check now, if its higher item level, it has to pass quality and armor check (yeah weapons can pass right through this one) I'll locate a few good basic comparisons for weps to start it off. (I like the suggestion of DPS.) One problem is deciding in which order to make certain checks.. it was pretty easy to come up with the basic especially for armor items. I'm going to setup a test server just for testing this stuff. **question** Along with autoequipping, I thought about looking at having bots auto *drop* certain trash if their inventory was full, to always have 1 or 2 slots open in case something they really could use dropped. Thoughts? I've noticed some odd choices too, but if this happened previous to the last push, then I know why it happened. The manner that I was setting, checking, and resetting variables was so wrong, I don't see how any decision was being made at all. It was (before last push) doing the following , and I think you'll recognize having seen this happening: if newitemlevel > olditemlevel equip new item set olditemlevel to newitemlevel ...okay, fine,, except I followed this with another check..Not thinking! if newitemlevel = olditemlevel but newitem is better than olditem equip new item There was more to it than this, just an example of what was happening. this , if I understand the function right, caused the item to meet two different conditions, and so the bot equipped the item, and then equipped the same item again, which UNequipped it. While it may not have happened every time, (and I can't see why it didn't) it happened sporadically. I removed the code which set the variables to equal after equipping.. there was no need as it would automatically recheck them in the loop and set them accordingly. Thanks for bringing this up, Weapons and possibly accessories, are going to need more in depth comparisons to figure out. You're both right in pointing out that some items have a higher itemlevel, yet are trash in all but maybe a tradeskill use (but not fit for combat ) @Kennumen, I'm still looking at gearscore too, to see if it might be useful in this. Things 'SHOULD' be more appropriate after last nights push, but I've already seen (and so have you obviously ) items that require a bit more stopgate work. Was hoping to have more checking included last night, but I got sidetracked figuring out the best places to call autoequip from for quest turnins and won item loot. Then got distracted because I realized the bots don't list all the items they could sell from their backpacks and I chased after a cure for that lol. Anyone else have an issue with that? If not, its the bags I use (huge brown sack). Okay, back to topic, due to storms yesterday, theres not much else I can do today than tinker, so I'm looking at the code now.
  10. Updated AutoEquip: Changed the way the comparisons were being made for better accuracy of choice. Bots will now autoequip after receiving quest rewards (still working on loot from winning a loot roll) Bots will now autoequip items if the equipment slot is currently empty (weren't before) Bots will also autoequip items given to them using the '.add [item]' command (could come in handy for autonomous bots?) Pushed to branch skillbot.
  11. I must have deleted that in changing things around last night.. Thanks for pointing it out! :8 For now, if a bot wins the roll on an item , or receive it as quest reward, it will not equip it (if its better) until he loots or is traded something. Minor issue, I'll look at it later. **Edit** Fixed this, and added some options for 'autoequip' command. I've made changes and will be pushing shortly as soon as I have it compiled/tested. Let me know guys which way you prefer to have this. At the moment we have the following options for using the 'autoequip' command: /t or /p 'autoequip' - toggles the bot or party to ON or OFF depending on their current setting. /t or /p 'autoequip on' - turns one bot, or all bots in party to definite ON setting. /t or /p 'autoequip off' - turns one bot, or all bots in party to definite OFF setting. If bot dies, autoequip resets to OFF **EDIT 3.0** Pushed these changes to branch skillbot @blueboy By the way, taxis are working fine for bots.. not sure what caused the problem I had before but was probably quest related (first time quest for night elves). **EDIT 4.0** Found a significant error in code, causing very random choices on equipping loot. Will push a fix soon.
  12. UPDATED: AutoEquip Pushed to branch skillbot Now works with loot AND trade. Bots will auto equip an item they loot, or that is given to them in trade, if its better than they have equipped. See below for the comparisons being made at the moment. 1.) type /t botname 'autoequip' - Sets That individual bot to autoequip when they loot OR TRADE with player, if the item is better than they have equipped already. 2.) type /p 'autoequip' - Same thing as above except it flips the switch for ALL bots. IF you have set bots individually, it will flip their switch to the opposite you already had it set to. (e.g. 1 bot had autoequip turned on by /t botname autoequip, and you then type /p autoequip, that bot will be turned off, while the others turned on.) 3.) Bots will whisper in reply to 'autoequip' command either saying its ON, or OFF. 4.) remember, typing it again, flips the switch to on or off, depending on previous setting. 5.) AutoEquip defaults to OFF if you log a bot out (or you log out) for that particular bot(or all bots if you log out the master character) 6.) Bots will use the following comparisons to decide if they should equip a new item: does the item have a higher itemlevel? if so, does it have an equal or higher armor rating?(for weapons, will be equally 0) Then equip it. Is the itemlevel equal? if so , does it have a higher quality rating? If so, does it have the same or higher armor rating? (IF it has NO armor rating (i.e. weapon or jewelry etc) it will be equal. if its less, we dont want to equip it, no warriors with robes on!) Equip it. thanks for your patience guys, please offer feedback. **Edit 1.0** Thanks Blueboy! - Added condition when calling autoequip from a trade. Autoequip was ON all the time for trades. Fixed. Also tidied up code somewhat, (thanks blueboy for sharing some tips on that as well!). Once we know this foundation is sound enough, we can add checks for stats/resists etc. for particular classes.
  13. No it doesn't, but I agree on editing header files.. Anyway, its looking up now, and I still have some hair left haha. Still debugging some problems
  14. @blueboy, "The item appears to be equipped and then unequipped. " Thank you!! Yes, That does help! Obviously they made another check that I didnt intend (checked twice like santa claus) I'll need to check the conditions. ***EDIT #2*** I've found the problem guys, sorry, its my coding. I've got a section of useless code thats causing issues. I'm working on it. Some of these functions I was guessing at.. I'm learning lol Oh and blueboy, your report about the item equipping and unequipping led me to it. Thanks! ***Edit again*** Okay, Last of the compile errors taken care of... sheesh (if it just didn't take so long to recompile heh) I scrapped the code I used initially, and rethought things.. I think for the better (and a whole lot simpler) The way it was, it was mere chance if it actually compared two items of the same slot type... geez running some more tests and looking at more comparisons. I keep running across functions and getting sidetracked with ideas lol. Will push when stable.
  15. @blueboy, Its buggy. After you type autoequip, the next time the bot loots an item it 'should' equip its best equipment from inventory. At the moment it doesnt do it imediately on trade etc. Just on 'looting'. The Item level comparison is just a temp one. There may also be a problem with calling it from loot_release_response, I'll take a look when I get home. I wound up adding a few more things last night after I pushed. Sorry for the buggyness . The code is only checking for can_equip, and itemlevel. Anything that shows up in the "I can equip the following items" during 'inspect', the bot should be able to autoequip. But again, for now, its only called when they loot, and the loot_release_response is triggered. Tonight I'll add a snippet to the bot trade w/player section and call it from there as well when the trade is over. Try killing some low level critter or something that has loot, and see if they equip it when they loot the corpse. I have a few minutes atm , so I'm adding some debug responses from the bot and will push this shortly after I test it: 1.) when you type 'autoequip' you SHOULD get a msg "autoequip is now ON" or if its on already, it will say its "...now OFF" 2.) when the bot loots a corpse it SHOULD now send a msg that "..AutoUpgradeEquipment is being called" 3.) If number 2 was sucessful, you SHOULD get a msg that says " Starting AutoUpgradeEquipment Function" This may help track down quite a few problems. going to test this quickly and push it. Will test more thoroughly tonight. Thanks guys for trying it out! p.s if you do look into the code, I'll warn you its not pretty yet, and It needs to be simplified still.
  16. @Kennumen, Heya guy, yup, I opted for proto->itemlevel for comparison atm. Sometimes they dont upgrade when it looks like an obvious choice lol, but it is working somewhat. I have to go through the code now and pretty it up and sort things better. I went through a lot of different things so I have some clean up to do. I agree on using a config file setting. Would have done that, but not clear on how to yet, so I'll look into more. I noticed 'gearscore' but didnt get in depth on it. It may be that it will help out. there is a long list of fields to check for so it should work out great, even if it takes quite a few checks to really make it more precise. (e.g. sellprice, armor, damages, stats(?), theres just a ton of diff checks that can be made. The problem is figuring out the simplest, yet most efficient way lol. anyway, I've had fun working on it, and learned a few things about the code in the process! ***Edit*** I also think this process will work for allowing/forcing the bots to sell more than just trash, like if they have a ton of items, allow them to sell everything but their highest 2 level items, and even make it so that you can set the level diff that they will keep etc.. I'd say probably include a setting that will prevent them from autoequipping rare items etc (of course lol) so you can decide that on your own (unless you want to let them have what they can ninja loot.. my priest is the ninja, hes always first with a full inventory)
  17. Updated: Pushed -> skillbot : Autoequip - new command, type /t botname or /p 'autoequip' . once to turn it on, again to turn it off if ya like. bots will automatically upgrade their gear from the items they loot, based on 'itemlevel'. the code is sloppy atm, I know enough about C++ to be dangerous.... thats about it. Pushed ->skillbot : Fixed issue with bots forgetting to loot corpses if they are interupted by combat. Please offer feedback, or even make changes to this if you see fit, just post your changes/ideas. I'm certain there will be issues with autoequip, one of which is that I forgot to add a reply from the bots telling you whether its ON or OFF atm.. Ill add that in tomorrow along with some other updates to it! Main focus: is it working at all for you. is it causing any major issues that need addressed? At the moment its not precise, the bots are only comparing item level to decide whether or not to equip an item. I'll tune that by adding some other conditions as it goes.
  18. AutoEquip, well sorta.. its a simple version at the moment that occurs when you inspect a bot. The current simple method i'm using at the moment is GetUInt32Value(ITEM_FIELD_MAXDURABILITY) I've never really thought about this, so I'm not certain what fields I'll wind up checking in the end, but for testing purposes I chose durability since for most armor and weapons, the durability is higher on a upgraded item.. Looking also at value, which might be better, I just haven't looked into it yet. Later tonight I should have a 'rough' test version of this to post, and I'll make an option to disable it. Again this will just be a rough test version, It wont (or probably wont) involve the 'inspect' option in the end. This was just the easiest section of code to begin testing with. I by no means am claiming this idea. When I saw it in the todo list Kennumen put together, I decided thats something I'd Like to have! If anyone has any particular ideas of how they think this should work, feel free to chime in. ***EDIT*** I have the code working automatically. When the bot loots anything it checks to see if its better than what he/she is currently wearing. (sort of) I'm comparing max durability and sell price at the moment (I knew the functions and it was easy to put together quickly for testing) The automatic part is working well. However, my hunters insist on wearing those fancy expensive dresses they just found! (robes) I'm testing more , and am going to compare(instead) armor class. It should work okay that way with minimal checks as if they 'can't' equip due to class etc, it won't even cue this code anyway. So if its better Armor than they are wearing, AND if they can equip it, they'll put it on. This WON'T include checks for +stats etc, this is just to see if the idea will work at all, and then build on it from there. I'm hoping this will be a good foundation. I may or may not have a test version up tonight as promised, but by tomorrow night I should have a beta ready.
  19. @Kennumen, Gotcha, that makes sense. Thanks! ***Edit*** Pushed to branch skillbot Still testing.
  20. @blueboy, so far so good with the taming system!
  21. Fix:(possibly!) Bots forgetting to loot an object when interupted by combat. They will still clear the loot target if the master gets too far away from it.(testing a few things regarding that as well) I'd appreciate feedback if someone wants to try it out. If no problems I'll push to skillbot. (I'll keep skillbot up to date with new-ai branch, and until i'm comfortable with the process, I'll push any of my updates to skillbot branch) Patch: diff --git a/src/game/playerbot/playerbotai.cpp b/src/game/playerbot/playerbotai.cpp index 0454ce0..008dd07 100644 --- a/src/game/playerbot/playerbotai.cpp +++ b/src/game/playerbot/playerbotai.cpp @@ -2172,7 +2172,9 @@ void PlayerbotAI::GetCombatTarget(Unit* forcedTarget) if (m_botState != BOTSTATE_COMBAT) { SetState(BOTSTATE_COMBAT); - m_lootCurrent = ObjectGuid(); + // m_lootCurrent = ObjectGuid(); This was clearing loot target, causing bots to leave corpses unlooted if interupted by combat. Needs testing. + // using this caused bot to remove current loot target, and add this new threat to the loot list. Now it remembers the loot target and adds a new one. + // Bot will still clear the target if the master gets too far away from it. m_targetCombat = 0; }
  22. @blueboy, ***concerning the druid quest*** You're right. its intended to basically 'solo' that section of the quest as far as I know, so, yeah, don't worry about it. Just now pulling the new code from new-ai, i'll let ya know if I run into any problems. I've got a bot squad holding the taming rods , ready to try it out! Also another quest that i found that is bugged for bots is in Sunstrider Isle (blood elves) its the shrine quest. You right click on it, it pops up a text window, and thats it. (It looks as if it should function just like a quest 'board' like the WANTED posters, but may have a different flag) The bots don't know what to do with it. "I can't use that!" or 'get'[link] = they just bounce around in a loop til you make them get away from it. If you need the exact quest info I'll get it later. I'm brain dead atm from looking into the "should be simple" issue of popping up the tradeskill window via a bots Hlink. I know you guys are busy with other areas atm, but wanted to mention it while it was on my mind lol. If I come up with something I'll post it.
  23. @blueboy, Gotcha! Haven't used a hunter bot yet as my main is a hunter =) I'll try a group full of em. Druid bots: Upon accepting the quest 'Moonglade', the bot should learn the spell "Tele: MoonGlade". Didnt work for my bot, had to log her in and get it manually. (tho it appears that quest is still realllllly buggy)
  24. @blueboy, Wont get to test this new ai til tomorrow night, but one question that popped into my mind is: have you looked into how the hunter bot will feed the pet? Just curious, I know this is just an initial phase! The pet will start out unhappy. Will definitely test this out tomorrow.
  25. No I definitely want that one for my Paladin Blacksmith! Yeah, I haven't ruled out adding the reminder UnkleNuke, just been taking a peek at a few other things. Hrm maybe I should rename the Skillbot Branch to Chatbot lol. Anyway, all this is concerning skill infos basically so its all good. These are some great ideas, hold the thought til I get back to it. I'm going outta town for the weekend, but when I get back I'll make some changes and see what happens! Btw, nice one liners. I'll put them into use.
×
×
  • 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