SHARE
TWEET

Untitled

a guest Apr 23rd, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. C_DOTABaseAbility.GetToggleState = function(self)
  2.     local function NumberToBool(value)
  3.         if value == 1 then
  4.             return true
  5.         end
  6.         return false
  7.     end
  8.  
  9.     local table = CustomNetTables:GetTableValue("anime_toggle_items", tostring(self:GetEntityIndex()))
  10.  
  11.     if table ~= nil and table.ToggleState ~= nil then
  12.         return NumberToBool(table.ToggleState)
  13.     end
  14.    
  15.     return false
  16. end
  17. ------------------------------------------------------------------------------------------------------------------------------------------------------------
  18. local oldGetStrength = C_DOTA_BaseNPC_Hero.GetStrength
  19. C_DOTA_BaseNPC_Hero.GetStrength = function(self, bRealStrenght)
  20.     if bRealStrenght == nil or bRealStrenght == false then
  21.         local table = CustomNetTables:GetTableValue("anime_control", tostring(self:GetEntityIndex()))
  22.         if table ~= nil and table.strenght ~= nil then
  23.             return table.strenght
  24.         end
  25.         return oldGetStrength(self)
  26.     end
  27.     return oldGetStrength(self)
  28. end
  29. ------------------------------------------------------------------------------------------------------------------------------------------------------------
  30. local oldGetAgility = C_DOTA_BaseNPC_Hero.GetAgility
  31. C_DOTA_BaseNPC_Hero.GetAgility = function(self, bRealAgility)
  32.     if bRealAgility == nil or bRealAgility == false then
  33.         local table = CustomNetTables:GetTableValue("anime_control", tostring(self:GetEntityIndex()))
  34.         if table ~= nil and table.agility ~= nil then
  35.             return table.agility
  36.         end
  37.         return oldGetAgility(self)
  38.     end
  39.     return oldGetAgility(self)
  40. end
  41. ------------------------------------------------------------------------------------------------------------------------------------------------------------
  42. local oldGetIntellect = C_DOTA_BaseNPC_Hero.GetIntellect
  43. C_DOTA_BaseNPC_Hero.GetIntellect = function(self, bRealIntellect)
  44.     if bRealIntellect == nil or bRealIntellect == false then
  45.         local table = CustomNetTables:GetTableValue("anime_control", tostring(self:GetEntityIndex()))
  46.         if table ~= nil and table.intellect ~= nil then
  47.             return table.intellect
  48.         end
  49.         return oldGetIntellect(self)
  50.     end
  51.     return oldGetIntellect(self)
  52. end
  53. ------------------------------------------------------------------------------------------------------------------------------------------------------------
  54. function C_DOTA_BaseNPC:HasTalent(talentName)
  55.     talentName = string.lower(talentName)  
  56.     if self:HasModifier("modifier_"..talentName) then
  57.         return true
  58.     end
  59.     return false
  60. end
  61. ------------------------------------------------------------------------------------------------------------------------------------------------------------
  62. function C_DOTA_BaseNPC:FindTalentValue(talentName, key)
  63.     talentName = string.lower(talentName)
  64.     if self:HasModifier("modifier_"..talentName) then
  65.         local value_name = key or "value"
  66.         local specialVal = AbilityKV[talentName]["AbilitySpecial"]
  67.         for l,m in pairs(specialVal) do
  68.             if m[value_name] then
  69.                 return m[value_name]
  70.             end
  71.         end
  72.     end  
  73.     return 0
  74. end
  75. ------------------------------------------------------------------------------------------------------------------------------------------------------------
  76. function AnimeCreateEmptyTalents(hero)
  77.     for i=10,25,5 do
  78.         local r = "r"
  79.         --print("ROFL_client",i.."R")
  80.  
  81.         LinkLuaModifier("modifier_special_bonus_anime_"..hero.."_"..i..r, "heroes/anime_hero_"..hero, LUA_MODIFIER_MOTION_NONE)  
  82.         local class = "modifier_special_bonus_anime_"..hero.."_"..i..r.." = class({IsHidden = function(self) return true end, IsPurgable = function(self) return false end, RemoveOnDeath = function(self) return false end, AllowIllusionDuplicate = function(self) return true end, GetTexture = function(self) return 'naga_siren_mirror_image' end})"  
  83.         load(class)()
  84.        
  85.         --print("ROFL_client",i.."L")
  86.  
  87.         local l = "l"
  88.         LinkLuaModifier("modifier_special_bonus_anime_"..hero.."_"..i..l, "heroes/anime_hero_"..hero, LUA_MODIFIER_MOTION_NONE)  
  89.         local class2 = "modifier_special_bonus_anime_"..hero.."_"..i..l.." = class({IsHidden = function(self) return true end, IsPurgable = function(self) return false end, RemoveOnDeath = function(self) return false end, AllowIllusionDuplicate = function(self) return true end, GetTexture = function(self) return 'naga_siren_mirror_image' end})"  
  90.         load(class2)()
  91.  
  92.         --print("CLIENT")
  93.     end
  94. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top