Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 29

Thread: Simple questions, Simple answers

  1. #1

    Simple questions, Simple answers

    Hi I dont think we have a thread like this?

    Basically questions for something simple enough, I could just boot up dota and test it...but Im lazy and someone probably knows it off the top of their head.

    I feel bad making a whole thread for the above type of query, but if we have one thread for lazy/should-be-obvious questions that would be cool
    https://github.com/ThePianoDentist/t...dentistdotabot Lina bot which pulls small camp when 'laning' (Aim to work on pulling and stacking bots initially)
    https://github.com/ThePianoDentist/dotabots-ml-tools Parsing data from bot games

  2. #2
    What is GetAttackRange() for melee heroes?

    is monkey king the only exception?
    https://github.com/ThePianoDentist/t...dentistdotabot Lina bot which pulls small camp when 'laning' (Aim to work on pulling and stacking bots initially)
    https://github.com/ThePianoDentist/dotabots-ml-tools Parsing data from bot games

  3. #3
    Tiny with Aghanim's Scepter has 235 range, he and Monkey King should be the only hero exceptions

  4. #4
    Basic Member
    Join Date
    Mar 2012
    Posts
    1,861
    Is the IsNightmared() function equivalent to checking for sleep effects? Such as Naga's Song, Titan's Echo Stomp or Bane's Nightmare?
    The name is confusing but I assume it's not strictly for Bane's ability
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  5. #5
    Quote Originally Posted by The Nomad View Post
    Is the IsNightmared() function equivalent to checking for sleep effects? Such as Naga's Song, Titan's Echo Stomp or Bane's Nightmare?
    The name is confusing but I assume it's not strictly for Bane's ability
    I'm not into coding, but I'm sure it is, since when under Naga's ult effect, bots will huddle around the target affected. I think echo stomp, they behave normally on occasion.

  6. #6
    Basic Member
    Join Date
    Oct 2016
    Posts
    219
    they will only huddle under naga song if they are confident of winning, otherwise they leave.

  7. #7
    Quote Originally Posted by Yavimaya View Post
    they will only huddle under naga song if they are confident of winning, otherwise they leave.
    Agreed.

  8. #8
    Basic Member
    Join Date
    Jan 2014
    Posts
    55
    Quote Originally Posted by The Nomad View Post
    Is the IsNightmared() function equivalent to checking for sleep effects? Such as Naga's Song, Titan's Echo Stomp or Bane's Nightmare?
    The name is confusing but I assume it's not strictly for Bane's ability
    Code:
    bool IsNightmared()
       Returns whether the unit is having bad dreams.
    Probably only for Bane?

    And for Naga's song I think you should use IsInvulnerable()

    P.N: I'm not a BoT developer. just expressing my idea

  9. #9
    Basic Member
    Join Date
    Oct 2016
    Posts
    219
    Edit: I found my answer, dumb question.
    Last edited by Yavimaya; 06-12-2017 at 06:05 AM.

  10. #10
    Basic Member
    Join Date
    Oct 2016
    Posts
    219
    Can anyone help me with working out how to access the item buy table of other team members please?

    this wont find any table, nor using the hashed out GetVarinTable:
    Code:
    function utilsModule.WillBuyScepter(hUnit)
    	local npcCourier = GetCourier(0);
    	
    	if hUnit:HasScepter() or utilsModule.HasItem(npcCourier, "item_ultimate_scepter") then
    		return true
    	end
    	
    	--if utilsModule.GetVarInTable( "item_ultimate_scepter", hUnit.tableItemsToBuy ) then
    	
    	for _, j in pairs(hUnit.tableItemsToBuy) do
    
    		if j == "item_ultimate_scepter" then
    			return true
    		end
    	end
    	
    	return false
    	
    end
    Code:
    function utilsModule.GetVarInTable(var, Table)
    		for k, variable in pairs(Table) do
    			if (variable == var) then
    				return k;
    			end
    		end
    	return 0;
    end

    I have also tried another approach where each bot inputs their name into a table if the appropriate item isnt in the list, but i cant get them to insert into a global table.

    Code:
    if DotaTime() < 0 then
    
    	if not string.find(npcBot:GetUnitName(), "npc_dota_hero_alchemist") then
    		if not HasSomeBuild("item_ultimate_scepter") then
    			_G.ScepterCount = _G.ScepterCount + 1;
    			table.insert(NeedsScepter, npcBot:GetUnitName())
    			print(npcBot:GetUnitName().. " - Needs Scepter -  ".. _G.ScepterCount.. "  Scepters needed")
    			utils.print_r(NeedsScepter)
    		else
    			print(npcBot:GetUnitName().. " -  Doesnt Need Scepter -  ".. _G.ScepterCount.. "  Scepters needed")
    			utils.print_r(NeedsScepter)
    		end
    	end
    end
    Code:
    function HasSomeBuild(build_name)
    
    	local npcCourier = GetCourier(0);
    	
    	if HasItem(npcBot, build_name) or 
    	   HasItem(npcCourier, build_name)
    	then
    		return true
    	end	
    	for _,item in pairs(npcBot.tableItemsToBuy)
    	do
    		if item == build_name then
    			return true
    		end
    	end
    	return false
    end
    even the global "scepter count" (?) isnt building, each guy just thinks scepter count is 1, they put their name into their own table, not a global table.

    argh, it should be so easy and probably is, but not for me.

Posting Permissions

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