Advertisement
Guest User

Untitled

a guest
Sep 28th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.70 KB | None | 0 0
  1. --Hero
  2. if GetObjectName(GetMyHero()) ~= "Garen" then return end
  3.  
  4. --Load Libs
  5. require ("DamageLib")
  6.  
  7. --[[--Auto Update
  8. local ver = "0.01"
  9.  
  10. function AutoUpdate(data)
  11.     if tonumber(data) > tonumber(ver) then
  12.         print("<font color=\"#FE2EC8\"><b>[Garen]: </b></font><font color=\"#FFFFFF\"> New version found!</font>")
  13.         print("<font color=\"#FE2EC8\"><b>[Garen]: </b></font><font color=\"#FFFFFF\"> Downloading update, please wait...</font>")
  14.         DownloadFileAsync("https://raw.githubusercontent.com/BluePrinceEB/GoS/master/Swain.lua", SCRIPT_PATH .. "Swain.lua", function() print("<font color=\"#FF1493\"><b>[Garen]:</b></font><font color=\"#FFFFFF\"> Update Complete, please 2x F6!</font>") return end)
  15.     else
  16.        print("<font color=\"#FE2EC8\"><b>[Garen]: </b></font><font color=\"#FFFFFF\"> No Updates Found!</font>")
  17.     end
  18. end
  19.  
  20. GetWebResultAsync("https://raw.githubusercontent.com/BluePrinceEB/GoS/master/Swain.version", AutoUpdate)]]--
  21.  
  22. --Main Menu
  23. GMenu = Menu("G", "Garen")
  24.  
  25. --Combo Menu
  26. GMenu:SubMenu("c", "Combo")
  27. GMenu.c:Boolean("Q", "Use Q", true)
  28. GMenu.c:Slider("Qrange", "Min. range for use Q", 300, 0, 1000, 10)
  29. GMenu.c:Boolean("E", "Use E", true)
  30.  
  31. --Ultimate Menu
  32. GMenu:SubMenu("u", "Ultimate")
  33. GMenu.u:Boolean("R", "Use R")
  34. GMenu.u:SubMenu("black", "Ultimate Black List")
  35.  
  36. --Auto Menu
  37. GMenu:SubMenu("a", "Auto")
  38. GMenu.a:Boolean("W", "Use W", true)
  39. GMenu.a:Slider("Whp", "Use W if HP(%) <= X", 70, 0, 100, 5)
  40.  
  41. --LastHit Menu
  42. GMenu:SubMenu("l", "Last Hit")
  43. GMenu.l:Boolean("Q", "Use Q", true)
  44.  
  45. --Harass Menu
  46. GMenu:SubMenu("h", "Harass")
  47.  
  48. --Clear Menu
  49. GMenu:SubMenu("j", "Clear")
  50.  
  51. --Locals
  52. local LoL = "6.19"
  53. local _skin = 0
  54. local Enemies, C = { }, 0
  55.  
  56. --Spells
  57. local Garen_E = { range = 300 }
  58. local Garen_R = { range = 400 }
  59.  
  60. --Mode
  61. function Mode()
  62.     if _G.IOW_Loaded and IOW:Mode() then
  63.         return IOW:Mode()
  64.         elseif _G.PW_Loaded and PW:Mode() then
  65.         return PW:Mode()
  66.         elseif _G.DAC_Loaded and DAC:Mode() then
  67.         return DAC:Mode()
  68.         elseif _G.AutoCarry_Loaded and DACR:Mode() then
  69.         return DACR:Mode()
  70.         elseif _G.SLW_Loaded and SLW:Mode() then
  71.         return SLW:Mode()
  72.     end
  73. end
  74.  
  75. --Start
  76. OnTick(function (myHero)
  77.     if not IsDead(myHero) then
  78.         --Locals
  79.         local target = GetCurrentTarget()
  80.         --Functions
  81.         OnCombo(target)
  82.         OnLastHit()
  83.         CastR()
  84.     end
  85. end)
  86.  
  87. OnDraw(function(myHero)
  88.     --Text
  89.     for x,unit in pairs(GetEnemyHeroes()) do
  90.         if ValidTarget(unit,20000) then
  91.             if Ready(_R) then
  92.                 DrawText("R Damage: "..getdmg("R",unit,myHero), 16, GetHPBarPos(unit).x, GetHPBarPos(unit).y-58, GoS.Yellow)
  93.             end
  94.             if not Ready(_R) then
  95.                 DrawText("R Damage: Not Ready", 16, GetHPBarPos(unit).x, GetHPBarPos(unit).y-58, GoS.Yellow)
  96.             end
  97.             DrawText("Current HP:  "..math.round(GetCurrentHP(unit)), 16, GetHPBarPos(unit).x, GetHPBarPos(unit).y-43, GoS.Red)
  98.             if Ready(_R) and GetCurrentHP(unit) + GetDmgShield(unit) <  getdmg("R",unit,myHero) then
  99.                 DrawText("Finish Him!", 20, GetHPBarPos(unit).x, GetHPBarPos(unit).y+150, GoS.Red)
  100.             end
  101.         end
  102.     end
  103. end)
  104.  
  105. --Functions
  106. function OnCombo(target)
  107.     if Mode() == "Combo" then
  108.         --Q
  109.         if Ready(_Q) and GMenu.c.Q:Value() and ValidTarget(target, GMenu.c.Qrange:Value()) then
  110.             CastSpell(_Q)
  111.         end
  112.         --E
  113.         if Ready(_E) and GMenu.c.E:Value() and ValidTarget(target, Garen_E.range) and GetCastName(myHero, _E) == "GarenE" then
  114.             CastSpell(_E)
  115.         end
  116.     end
  117. end
  118.  
  119. function OnLastHit()
  120.     if Mode() == "LastHit" then
  121.         for _, minion in pairs(minionManager.objects) do
  122.             if GetTeam(minion) == MINION_ENEMY then
  123.                 if GMenu.l.Q:Value() and Ready(_Q) and ValidTarget(minion, 400) then
  124.                     if getdmg("Q",minion,myHero) > GetCurrentHP(minion) then
  125.                         CastSpell(_Q)
  126.                     end
  127.                 end
  128.             end
  129.         end
  130.     end
  131. end
  132.  
  133. function CastR()
  134.     for _,unit in pairs(GetEnemyHeroes()) do
  135.         GMenu.u.black:Boolean(unit.charName, "Don't use on :"..unit.charName)
  136.         if GMenu.u.R:Value() and Ready(_R) and ValidTarget(unit, Garen_R.range) and GetCurrentHP(unit) + GetDmgShield(unit) <  getdmg("R",unit,myHero) then
  137.             if GMenu.u.black[unit.charName]:Value() then
  138.                 CastTargetSpell(unit,_R)
  139.             end
  140.         end
  141.     end
  142. end
  143.  
  144. OnProcessSpell(function(unit,spellProc)    
  145.     if unit.isMe and spellProc.name:lower():find("attack") then    
  146.         if GMenu.a.W:Value() and Ready(_W) and GetPercentHP(myHero) < GMenu.a.Whp:Value() then
  147.             CastSpell(_W)  
  148.         end
  149.     end
  150. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement