Page 2 of 2 FirstFirst 1 2
Results 11 to 17 of 17

Thread: Bot pruchasing

  1. #11
    Basic Member
    Join Date
    Mar 2012
    Posts
    1,758
    Quote Originally Posted by ChrisC View Post
    I'm not seeing it do anything that looks expensive. Do you have simple examples of it being slow?
    Having small problems with the installation of the new laptop. If I can fix them without a format, I'll try to move the sources from the old one and give you an example, otherwise I'll do it in 2 or so weeks I have some work to do too in the following weeks (including WEs) so time is a luxury atm
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  2. #12
    Basic Member
    Join Date
    May 2014
    Posts
    245
    Is there any chance that the item purchasing that take to long to execute will fallback to C++ implementation? I have a Lion that buy tranquil boots and arcane boots in the game, meanwhile I only make him to buy tranquil boots on the item purchase table and I know that default Lion will buy arcane bots instead of tranquil boots.
    And do I need to add
    Code:
    if GetBot():IsInvulnerable() or not GetBot():IsHero() or not string.find(GetBot():GetUnitName(), "hero") or GetBot():IsIllusion() then
    	return;
    end
    in the beginning of the item_purchase_generic file or this
    Code:
    if npcBot:IsIllusion() or npcBot:IsInvulnerable() then
    		return;
    	end
    inside ItemPurchaseThink() to prevent illusions or invulnerable units like monkey king ult illusions from buying items?

    This is the screenshot of the end game result

    jqIgGl2.jpg

    On the enemy team only Leech and Razor that have double item purchasing.
    Last edited by arz_on4dt; 05-18-2017 at 04:55 AM.

  3. #13
    Basic Member
    Join Date
    Dec 2016
    Posts
    638
    I used to have the double purchasing issue until I realized that I didn't gut the default bot purchasing system. I fixed that by implementing an over-write of it all.

    FILE: item_purchase_generic.lua
    Code:
    function ItemPurchaseThink()
        return
    end
    That way it never fights my purchasing system. Also, I have no time-related warnings or issues, perhaps because I don't use the default system.

  4. #14
    Basic Member
    Join Date
    May 2014
    Posts
    245
    Quote Originally Posted by nostrademous View Post
    I used to have the double purchasing issue until I realized that I didn't gut the default bot purchasing system. I fixed that by implementing an over-write of it all.

    FILE: item_purchase_generic.lua
    Code:
    function ItemPurchaseThink()
        return
    end
    That way it never fights my purchasing system. Also, I have no time-related warnings or issues, perhaps because I don't use the default system.
    Emmmm....Why the default system still buying the item even though the mode have been override? I though it will completely take over the item purchase decision.
    Will this ever be fixed?
    Last edited by arz_on4dt; 05-18-2017 at 07:02 AM.

  5. #15
    Basic Member
    Join Date
    Dec 2016
    Posts
    638
    Quote Originally Posted by arz_on4dt View Post
    Emmmm....Why the default system still buying the item even though the mode have been override? I though it will completely take over the item purchase decision.
    Will this ever be fixed?
    I think it's a case of function naming in my case honestly and location of file. I put all item purchasing code in a subdirectory and thus it never "saw" it. Also, I named it something other than ItemPurchaseThink().

    But yes, the point is, I did a top-level "Think()" overload in the bot_<heroName>.lua file, but that is not sufficient to prevent default item purchasing.

  6. #16
    Basic Member
    Join Date
    Oct 2016
    Posts
    202
    Quote Originally Posted by nostrademous View Post
    I used to have the double purchasing issue until I realized that I didn't gut the default bot purchasing system. I fixed that by implementing an over-write of it all.

    FILE: item_purchase_generic.lua
    Code:
    function ItemPurchaseThink()
        return
    end
    That way it never fights my purchasing system. Also, I have no time-related warnings or issues, perhaps because I don't use the default system.
    hmm, it may have helped, but for most of us i dont think that is the problem, most scripts out there that arent full overwrites seem to have already taken over "item_purchase_generic.lua" with their own purchase think. :sad:

  7. #17
    Basic Member
    Join Date
    Dec 2016
    Posts
    163
    Does puchaseitem function work for upgrades too?

    i try to buy wraith band and the console print this:
    Code:
    npc_dota_hero_sniper attempted to purchase item_wraith_band, which is not a valid item.
    it seems there is a bug here, ActionImmidiate_purchaseitem does not trigger on upgraded items.
    anyone checked this before???

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •