Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lua Execution #55

Open
Otacon-404 opened this issue Nov 17, 2020 · 5 comments
Open

Lua Execution #55

Otacon-404 opened this issue Nov 17, 2020 · 5 comments

Comments

@Otacon-404
Copy link

is there an example of how to use the Lua Execution

@hexvalid
Copy link

I am looking too. I have not seen any examples about this.

@LWSS
Copy link
Owner

LWSS commented Nov 17, 2020

#41

@Otacon-404
Copy link
Author

so will something like this works ?

for i = 1, Heroes.Count() do
        local hero = Heroes.Get(i)
        local name = NPC.GetUnitName(hero)
        if not heroList[name] and not NPC.IsIllusion(hero) then
            heroList[name] = hero
        end
    end

@LWSS
Copy link
Owner

LWSS commented Nov 17, 2020

    print( "[ ---> CHEAT SCRIPT LOAD SUCCESS <--- ]" )
     
    print( "[CHEAT]: MAP: " .. GetMapName() )
     
    if GameRules ~= nil then
    	print( "[CHEAT]: GameRules:GetGameTime: " .. GameRules:GetGameTime() )
    end
     
    if IsClient() then
    	print( "[CHEAT]: IsClient" )
    end
     
    if IsDedicatedServer() then
    	print( "[CHEAT]: IsDedicatedServer" )
    end
     
    if IsServer() then
    	print( "[CHEAT]: IsServer" )
    end
     
    if IsInToolsMode() then
    	print( "[CHEAT]: IsInToolsMode" )
    end
     
    if Entities ~= nil then
    	print( "[CHEAT]: Entities ok" )
    end
     
    if HeroList ~= nil then
    	print( "[CHEAT]: HeroList ok" )
    end
     
    if PlayerResource ~= nil then
    	print( "[CHEAT]: PlayerResource ok" )
    end
     
    if ParticleManager ~= nil then
    	print( "[CHEAT]: ParticleManager ok" )
    end
     
    if ConVars ~= nil then
    	print( "[CHEAT]: ConVars ok" )
    end
     
    if CustomGameEventManager ~= nil then
    	print( "[CHEAT]: CustomGameEventManager ok" )
    end
     
    if CustomNetTables ~= nil then
    	print( "[CHEAT]: CustomNetTables ok" )
    end
     
    if Tutorial ~= nil then
    	print( "[CHEAT]: Tutorial ok" )
    end
     
    function npc_spawned( event )
    	
    	if EntIndexToHScript ~= nil and event ~= nil then
    	
    		local spawnedUnit = EntIndexToHScript( event.entindex )
    		
    		if spawnedUnit ~= nil then
    			print( "[CHEAT]: npc_spawned:spawnedUnit" )
     
    			if spawnedUnit:IsHero() then
    				print( "[CHEAT]: npc_spawned:IsHero" )
    			end
    			
    			if spawnedUnit:IsRealHero() then
    				print( "[CHEAT]: npc_spawned:IsRealHero" )
    			end
    			
    		end
    		
    	end
    	
    	print( "[CHEAT]: npc_spawned" )
    end
     
    ListenToGameEvent("npc_spawned",npc_spawned,nil)
     
    DebugDrawScreenTextLine(150,50,1,"dota 2 easy hack",0,255,0,255,60.0)

Here is bazinga.lua from when I tested (not my lua code)

@Otacon-404
Copy link
Author

thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants