Guest User

Untitled

a guest
Sep 19th, 2015
509
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 118.64 KB | None | 0 0
  1. _G.UPDATE_RIVEN_BME = false
  2.  
  3. if myHero.charName ~= "Riven" then return end
  4.  
  5. _G.version               = "1.53"
  6. local version = "1.53"
  7.  
  8. local menu = nil
  9. -------Variables-------
  10. local myPlayer                                               =  GetMyHero()
  11. local Passive, temUltimate, UsandoHP                         =  false, false, false
  12. local TickTack, qTick, lTick, rTick, jTick, shieldTick       =  0, 0 ,0, 0, 0, 0
  13. local Target                                                 =  nil
  14. local lastAttack, lastWindUpTime, lastAttackCD, lastAniQ     =  0, 0, 0, 0
  15. local IgniteSpell                                            =  {spellSlot = "SummonerDot", slot = nil, range = 600, ready = false}
  16. local BarreiraSpell                                          =  {spellSlot = "SummonerBarrier", slot = nil, range = 0, ready = false}
  17. local SmiteSpell                                             =  {spellSlot = "Smite", slot = nil, range = 0, ready = false}
  18. local qCount, countTick                                      =  0, 0
  19. local lockIgnite                                             =  false
  20. -------BENCHMARK Variables-------
  21. local PassiveIndicator, temSlow                              =  0, false
  22. local tock                                                   =  0
  23. local vp, Jungle, enemyMinions                               =  nil, nil, nil
  24. local teveAA                                                 =  false
  25. local Jungle                                                  = nil
  26. local JungleLaneMinion                                       = nil
  27. --------------------------------
  28. local LOADED                                                 = false
  29. local ts                                                     = nil
  30. local enemyMinions1      =   minionManager(MINION_ENEMY, 875, myPlayer, MINION_SORT_HEALTH_ASC)
  31. local Jungle                 = minionManager(MINION_JUNGLE, 550, myPlayer, MINION_SORT_MAXHEALTH_DEC)
  32. local minionLane         =    nil
  33. --------------------------------
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40. -----Combos
  41. local lockE = false
  42.  
  43.  
  44. function OnLoad()
  45.  LoadFullMenu()
  46. end
  47. --------------------------
  48.  
  49. function _AutoupdaterMsg(msg)
  50.     print("<font color=\"#00F7EC\"><b>Riven, Boost My Elo:</b></font> <font color=\"#FFFFFF\">"..msg..".</font>")
  51. end
  52.  
  53. function UpdateScript()
  54. -- this is easily overridden just fyi, make sure you have important init stuff in kek4
  55. --if not LOADED then return end
  56. local UPDATE_HOST           = "jus-bol.com"
  57. local UPDATE_PATH           = "/scripts/RivenPaid/script/rivenmyelo.lua".."?rand="..math.random(1,10000)
  58. local UPDATE_FILE_PATH      = SCRIPT_PATH.."rivenmyelo.lua"
  59. local UPDATE_URL            = "http://"..UPDATE_HOST..UPDATE_PATH
  60.  
  61. if UPDATE_RIVEN_BME then
  62.  
  63.     local ServerData = GetWebResult(UPDATE_HOST, "/scripts/RivenPaid/version/RivenPaid.version")
  64.     if ServerData then
  65.         ServerVersion = type(tonumber(ServerData)) == "number" and tonumber(ServerData) or nil
  66.         if ServerVersion then
  67.             if tonumber(version) < ServerVersion then
  68.                 _AutoupdaterMsg("New version available"..ServerVersion)
  69.                 _AutoupdaterMsg("Updating from jus-bol.com, please dont press F9")
  70.                 DelayAction(function() DownloadFile(UPDATE_URL, UPDATE_FILE_PATH, function () _AutoupdaterMsg("Successfully updated. ("..version.." => "..ServerVersion.."), press F9 twice to load the updated version.") end) end, 3)
  71.             else
  72.                _AutoupdaterMsg("You have got the latest version ("..ServerVersion..")")
  73.             end
  74.         end
  75.     else
  76.         _AutoupdaterMsg("Error downloading version info! (jus-bol.com)")
  77.     end
  78. end
  79. end
  80.  
  81. -- local x, y, y2  = 0 ,0, 0
  82. -- function GetPositionToText()
  83. --   if not _ENV[r({107,101,107,118,97,108,56,51,52})] then return end -- this is easily overridden just fyi, make sure you have important init stuff in kek4
  84. --   local gameSettings  = GetGameSettings()
  85. --   local x             = gameSettings.General.Width  
  86. --   local y             = gameSettings.General.Height
  87. --   local realY         = nil      
  88. --   local hud           = ReadIni(GAME_PATH .. "DATA\\menu\\hud\\hud" .. x .. "x" .. y .. ".ini")
  89. --   local hudScale      = hud.Globals.GlobalScale
  90. --     if hud and hudScale then
  91. --       realY = (y/1080)*hudScale
  92. --     else
  93. --       realY = (y/1080)
  94. --     end
  95. --     return x, realY, y
  96. -- end
  97.  
  98. function LoadFullMenu()
  99. --if not _G[c({106,100,107,110,109,118})] then return end    
  100.     menu = scriptConfig("Riven by Jus", "RivenOmfg")    
  101.     MenuCombo() --skills and combo key
  102.     --MenuSpell() --multi skill / OnProcessSpell settings
  103.     MenuExtraCombo()    --NoAACombo, items in combo, ignite if killable
  104.     MenuExtraComboOthers()
  105.     MenuExtraComboRange()
  106.     MenuExtraComboBuff()
  107.     MenuFarm()  --farm sttuff      
  108.     MenuExtra() --potions/barrier
  109.     MenuDraw()  --draw ranges  
  110.     MenuSystem()--orbwalk/sida/mma
  111.     Others()    --others
  112.     PermaMenu()
  113.     --x, y, y2 = GetPositionToText()
  114.     --GetTargetTable()    
  115.     LOADED = true  
  116.     UpdateScript()
  117. end
  118.  
  119.  
  120. function Spell()
  121.   local summonerTable = {SUMMONER_1, SUMMONER_2}
  122.   local spells_   = {IgniteSpell, BarreiraSpell, SmiteSpell}
  123.   for i=1, #summonerTable do
  124.     for a=1, #spells_ do
  125.       if myPlayer:GetSpellData(summonerTable[i]).name:find(spells_[a].spellSlot) then
  126.         spells_[a].slot = summonerTable[i]
  127.       end
  128.     end
  129.   end
  130. end
  131.  
  132. function Others()  
  133.     menu:addParam("Version", "Version Info:", SCRIPT_PARAM_INFO, version)
  134.     Spell()
  135.     --vp                     = VPrediction()    
  136.     menu.combo.key         = false
  137.     menu.combo.skills.r    = true
  138.     ts                     = TargetSelector(TARGET_LOW_HP, 1000 , DAMAGE_PHYSICAL)
  139.    
  140.     ts.name                = "Riven TS"
  141.     menu:addTS(ts)
  142.     PrintChat("<font color=\"#00F7EC\"><b>Riven, Boost My Elo by</b></font><font color=\"#FFFFFF\"><b> Jus </b></font><font color=\"#00F7EC\"><b> loaded.</b></font> ")
  143. end
  144.  
  145. function MenuCombo()
  146.     menu:addSubMenu("[Combo System]", "combo")
  147.     menu.combo:addSubMenu("[Skills Settings]", "skills")
  148.     menu.combo.skills:addParam("q", "Use (Q) in Combo", SCRIPT_PARAM_ONOFF, true)
  149.     menu.combo.skills:addParam("w", "Use (W) in Combo", SCRIPT_PARAM_ONOFF, true)
  150.     menu.combo.skills:addParam("e", "Use (E) in Combo", SCRIPT_PARAM_ONOFF, true)
  151.     menu.combo.skills:addParam("r", "Use (R) in Combo", SCRIPT_PARAM_ONKEYTOGGLE, true, string.byte("S"))  
  152.     menu.combo:addParam("key", "Combo Key", SCRIPT_PARAM_ONKEYDOWN, false, 32)
  153.     --menu.combo:addParam("key2", "test", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("J"))
  154. end
  155.  
  156. -- function MenuSpell()
  157. --     menu.combo:addSubMenu("[Multi-Skill System]", "multi")
  158. --     menu.combo.multi:addParam("qe", "Try (Q-E) in Combo", SCRIPT_PARAM_ONOFF, true)
  159. --     menu.combo.multi:addParam("ew", "Try (E-W) in Combo", SCRIPT_PARAM_ONOFF, true)
  160. --     menu.combo.multi:addParam("qr", "Try (Q-R) in Combo", SCRIPT_PARAM_ONOFF, true)
  161. --     menu.combo.multi:addParam("er", "Try (E-R) in Combo", SCRIPT_PARAM_ONOFF, true)
  162. -- end
  163.  
  164. function MenuExtraCombo()
  165.   menu:addSubMenu("[Extra Combo System]", "comboextra")
  166.   -- menu.comboextra:addParam("", "[Triple Q-AA Settings]", SCRIPT_PARAM_INFO, "")
  167.   -- --menu.comboextra:addParam("mode", "Delay Mode:", SCRIPT_PARAM_LIST, 2, { "Manual", "Auto"})
  168.   -- --menu.comboextra:addParam("delay", "Manual Mode Delay:", SCRIPT_PARAM_SLICE, 1, 0, 4, 0)
  169.   -- menu.comboextra:addParam("speed", "Try Speed up Q-AA", SCRIPT_PARAM_ONOFF, true)
  170.   menu.comboextra:addParam("", "", SCRIPT_PARAM_INFO, "")
  171.   menu.comboextra:addParam("", "[(W) Settings]", SCRIPT_PARAM_INFO, "")
  172.   menu.comboextra:addParam("items", "Use Items after (W)", SCRIPT_PARAM_ONOFF, true)
  173.   menu.comboextra:addParam("autow", "Auto (W) if # enemys >=", SCRIPT_PARAM_SLICE, 2, 1, 4, 0)
  174.   menu.comboextra:addParam("", "", SCRIPT_PARAM_INFO, "")
  175.   menu.comboextra:addParam("", "[Ultimate Settings]", SCRIPT_PARAM_INFO, "")
  176.   menu.comboextra:addParam("", "-First (R) Settings-", SCRIPT_PARAM_INFO, "")
  177.   menu.comboextra:addParam("firstRmode", "Settings mode:", SCRIPT_PARAM_LIST, 2, {"# Enemys", "Main Health", "Range", "ALL"})
  178.   menu.comboextra:addParam("autostartRnumber", "(R) if enemys # >=", SCRIPT_PARAM_SLICE, 1, 1, 4, 0)    
  179.   menu.comboextra:addParam("autostartRhealth", "Main Target Health", SCRIPT_PARAM_SLICE, 65, 10, 100, 0)    
  180.   menu.comboextra:addParam("autostartRrange", "Range to Main Target", SCRIPT_PARAM_SLICE, 400, 125, 550, 0)
  181.   menu.comboextra:addParam("", "-Second (R) Settings-", SCRIPT_PARAM_INFO, "")
  182.   menu.comboextra:addParam("secondRmode", "Mode:", SCRIPT_PARAM_LIST, 2, {"Max Damage", "To Kill"} )
  183.   menu.comboextra:addParam("ksultimate", "Try KS with (R)", SCRIPT_PARAM_ONOFF, true)
  184.   --menu.comboextra:addParam("nKsultimate", "Use KS (R) if # enemys >=", SCRIPT_PARAM_SLICE, 2, 1, 4, 0)
  185.   --menu.comboextra:addParam("ultlogic", "Use (R) Team fight logic", SCRIPT_PARAM_ONOFF, true)
  186.   -- menu.comboextra:addParam("", "", SCRIPT_PARAM_INFO, "")    
  187.   -- menu.comboextra:addParam("", "[Force Passive Settings]", SCRIPT_PARAM_INFO, "")
  188.   -- menu.comboextra:addParam("q", "Packet Passive with (Q)", SCRIPT_PARAM_ONOFF, false)
  189.   -- menu.comboextra:addParam("w", "Packet Passive with (W)", SCRIPT_PARAM_ONOFF, false)
  190.   -- menu.comboextra:addParam("e", "Packet Passive with (E)", SCRIPT_PARAM_ONOFF, false)
  191. end
  192.  
  193. function MenuExtraComboOthers()
  194.     menu.comboextra:addSubMenu("[Others Settings]", "others")
  195.     menu.comboextra.others:addParam("", "[General Settings]", SCRIPT_PARAM_INFO, "")
  196.     menu.comboextra.others:addParam("smart", "Use Smart Combo", SCRIPT_PARAM_ONOFF, false)    
  197.     menu.comboextra.others:addParam("ignite", "Use Smart Ignite", SCRIPT_PARAM_ONOFF, true)
  198.     menu.comboextra.others:addParam("targetrange", "Range to Auto Target", SCRIPT_PARAM_SLICE, 820, 550, 1000, 0)
  199.     --menu.comboextra.others:addParam("aarange", "Advanced Calc to AA", SCRIPT_PARAM_ONOFF, true)
  200.     menu.comboextra.others:addParam("combatAssist", "Use Combat Assist", SCRIPT_PARAM_ONOFF, false)
  201.     menu.comboextra.others:addParam("evadeeE", "Try Evade with (E)", SCRIPT_PARAM_ONOFF, false)
  202. end
  203.  
  204. function MenuExtraComboRange()
  205.     menu.comboextra:addSubMenu("[Custom Ranges]", "range")    
  206.     menu.comboextra.range:addParam("useNew", "Range Mode (gap closer)", SCRIPT_PARAM_LIST, 1, { "E", "Q", "Custom" })
  207.     menu.comboextra.range:addParam("", "- (Q) Settings -", SCRIPT_PARAM_INFO, "")
  208.     menu.comboextra.range:addParam("startq", "Range to Engage", SCRIPT_PARAM_SLICE, 550, 275, 825, 0)
  209.     menu.comboextra.range:addParam("", "- (W) Settings -", SCRIPT_PARAM_INFO, "")  
  210.     menu.comboextra.range:addParam("startw", "Range to Stun", SCRIPT_PARAM_SLICE, 280, 150, 285, 0)
  211.     menu.comboextra.range:addParam("", "- (E) Settings -", SCRIPT_PARAM_INFO, "")
  212.     menu.comboextra.range:addParam('starte1', "Range to Engage", SCRIPT_PARAM_SLICE, 425, 250, 500, 0)
  213. end
  214.  
  215. function MenuExtraComboBuff()
  216.   menu.comboextra:addSubMenu("[Custom Delays to Buff]", "buff")
  217.   menu.comboextra.buff:addParam("use", "Use Custom Delays", SCRIPT_PARAM_ONOFF, false)
  218.   menu.comboextra.buff:addParam("q", "(Q) delay (s) to next cast", SCRIPT_PARAM_SLICE, 1, 1, 4, 0)  
  219.   menu.comboextra.buff:addParam("r", "(R) delay (s) to second cast", SCRIPT_PARAM_SLICE, 13, 1, 14, 0)
  220. end
  221.  
  222. function MenuFarm()
  223.     menu:addSubMenu("[Farm System]", "farm")
  224.     menu.farm:addParam("lasthit", "Last Hit Key", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("C"))
  225.     menu.farm:addParam("lineclear", "Lane/Jungle Clear Key", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("X"))
  226.     --menu.farm:addParam("clearjungle", "Jungle Clear Key", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("Z"))
  227.     --menu.farm:addParam("shieldfarm", "Last hit with Shield", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("G"))
  228.     menu.farm:addSubMenu("[Extra Settings]", "extrafarm")
  229.     menu.farm.extrafarm:addParam("lanesettings", "[Lane/JungleClear]", SCRIPT_PARAM_INFO, "")
  230.     menu.farm.extrafarm:addParam("lanemode", "Lane/Jungle Mode", SCRIPT_PARAM_LIST, 2, { "Free Walk", "Auto Walk"})
  231.     menu.farm.extrafarm:addParam("qlane", "Use (Q)", SCRIPT_PARAM_ONOFF, true)
  232.     menu.farm.extrafarm:addParam("wlane", "Use (W)", SCRIPT_PARAM_ONOFF, true)
  233.     menu.farm.extrafarm:addParam("elane", "Use (E)", SCRIPT_PARAM_ONOFF, true)    
  234.     -- menu.farm.extrafarm:addParam("junglemode", "Jungle Mode:", SCRIPT_PARAM_LIST, 2, { "Free Walk", "Auto Walk"})
  235.     -- menu.farm.extrafarm:addParam("jungles", "[Jungle Skills]", SCRIPT_PARAM_INFO, "")
  236.     -- menu.farm.extrafarm:addParam("q", "Use (Q) in Jungle", SCRIPT_PARAM_ONOFF, true)
  237.     -- menu.farm.extrafarm:addParam("w", "Use (w) in Jungle", SCRIPT_PARAM_ONOFF, true)
  238.     -- menu.farm.extrafarm:addParam("e", "Use (E) in Jungle", SCRIPT_PARAM_ONOFF, true)
  239.     menu.farm.extrafarm:addParam("smiteJ", "Use Smite", SCRIPT_PARAM_ONOFF, true)
  240.     menu.farm.extrafarm:addParam("", "", SCRIPT_PARAM_INFO, "")
  241.     -- menu.farm.extrafarm:addParam("", "[Delay To Cast]", SCRIPT_PARAM_INFO, "")
  242.     -- menu.farm.extrafarm:addParam("qdelay", "(Q) delay", SCRIPT_PARAM_SLICE, 0, 0, 1, 1)
  243.     -- menu.farm.extrafarm:addParam("wdelay", "(W) delay", SCRIPT_PARAM_SLICE, 0, 0, 1, 1)
  244.     -- menu.farm.extrafarm:addParam("edelay", "(E) delay", SCRIPT_PARAM_SLICE, 1, 0, 1, 1)
  245.     menu.farm.extrafarm:addParam("delay", "Extra Delay to Hit Minions", SCRIPT_PARAM_SLICE, 360, -300, 2000, 0)
  246. end
  247.  
  248. function MenuExtra()
  249.     menu:addSubMenu("[Others System]", "extra")
  250.     menu.extra:addParam("systemextra", "Use Extra System", SCRIPT_PARAM_ONOFF, true)
  251.     menu.extra:addParam("hp", "Auto HP Potion if Health < %", SCRIPT_PARAM_SLICE, 70, 0, 90, 0)
  252.     menu.extra:addParam("elixirhp", "Auto Elixir if Health < %", SCRIPT_PARAM_SLICE, 70, 0, 90, 0)
  253.     menu.extra:addParam("barrier", "Auto Barrier if Health < %", SCRIPT_PARAM_SLICE, 40, 0, 90, 0)
  254.     menu.extra:addParam("eTurret", "Auto (E) if get Aggro by Turret", SCRIPT_PARAM_ONOFF, true)
  255.     menu.extra:addParam("", "", SCRIPT_PARAM_INFO, "")    
  256.     menu.extra:addParam("jump", "Jump Key", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("V"))
  257.     menu.extra:addParam("run", "Run Key", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("T"))
  258.     menu.extra:addParam("", "[Harass Settings]", SCRIPT_PARAM_INFO, "")
  259.     menu.extra:addParam("harassMode", "Harass Mode:", SCRIPT_PARAM_LIST, 1, {"Q", "E"})  
  260.     menu.extra:addParam("hQ", "Use (Q) in Harass", SCRIPT_PARAM_ONOFF, true)
  261.     menu.extra:addParam("hW", "Use (W) in Harass", SCRIPT_PARAM_ONOFF, true)
  262.     menu.extra:addParam("hE", "Use (E) in Harass", SCRIPT_PARAM_ONOFF, true)
  263.     menu.extra:addParam("harass", "Harass Key", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("M"))
  264. end
  265.  
  266. function MenuDraw()
  267.     menu:addSubMenu("[Draw System]", "draw")        
  268.     menu.draw:addParam("Q", "Draw (Q) range", SCRIPT_PARAM_ONOFF, false)
  269.     menu.draw:addParam("W", "Draw (W) range", SCRIPT_PARAM_ONOFF, true)
  270.     menu.draw:addParam("E", "Draw (E) range", SCRIPT_PARAM_ONOFF, true)
  271.     menu.draw:addParam("R", "Draw (R) range", SCRIPT_PARAM_ONOFF, false)  
  272.     menu.draw:addParam("spots", "[Draw Jump Spots]", SCRIPT_PARAM_ONOFF, false)
  273.     menu.draw:addParam("castpos", "Cast Position Circle", SCRIPT_PARAM_ONOFF, false)
  274.     menu.draw:addParam("from", "Destination Circle", SCRIPT_PARAM_ONOFF, false)  
  275.     menu.draw:addParam("", "[Others]", SCRIPT_PARAM_INFO, "")
  276.     menu.draw:addParam("passivecount", "Draw Passive Count", SCRIPT_PARAM_ONOFF, false)
  277.     menu.draw:addParam("qtimer", "(Q) Timer", SCRIPT_PARAM_ONOFF, true)
  278.     menu.draw:addParam("", "- Target Draw -", SCRIPT_PARAM_INFO, "")
  279.     menu.draw:addParam("target", "Draw Target", SCRIPT_PARAM_ONOFF, true)
  280.     menu.draw:addParam("targeteng", "(Q) Engage Range", SCRIPT_PARAM_ONOFF, true)
  281.     menu.draw:addParam("targettext", "Draw Text in Target", SCRIPT_PARAM_ONOFF, true)
  282.     --menu.draw:addParam("damageWithR", "Advanced Calc with (R) bonus", SCRIPT_PARAM_ONOFF, false)
  283.     menu.draw:addParam("refreshtime", "Refresh Time (s) Text", SCRIPT_PARAM_SLICE, 1, 1, 5, 0)
  284.     menu.draw:addParam("", "- Minions Draw -", SCRIPT_PARAM_INFO, "")
  285.     menu.draw:addParam("minionL", "Draw Last Hit Minion", SCRIPT_PARAM_ONOFF, true)
  286.     menu.draw:addParam("minionJ", "Draw Jungle Minion", SCRIPT_PARAM_ONOFF, true)
  287.     menu.draw:addParam("minionC", "Draw Lane Minion", SCRIPT_PARAM_ONOFF, true)
  288. end
  289.  
  290.  
  291. function MenuSystem()
  292.   menu:addSubMenu("[General System]", "system")
  293.   menu.system:addParam("", "[Orbwalk Settings]", SCRIPT_PARAM_INFO, "")
  294.   menu.system:addParam("orb", "Enable Jus Orbwalk", SCRIPT_PARAM_ONOFF, true)
  295.   --menu.system:addParam("orbsens", "Jus's Orb Sensitivity", SCRIPT_PARAM_SLICE, 1, 1, 5, 0)
  296.   menu.system:addParam("sida", "Enable Reborn/MMA support", SCRIPT_PARAM_ONOFF, true)
  297.   --menu.system:addParam("evadeee", "Use Evadeee support", SCRIPT_PARAM_ONOFF, true)
  298.  -- menu.system:addParam("selector", "Use Selector support (need Reload)", SCRIPT_PARAM_ONOFF, false)
  299.   menu.system:addParam("tsMode", "Target Mode:", SCRIPT_PARAM_LIST, 2 , { "Built In", "Target Selector"} )
  300.   menu.system:addParam("", "[Packet Settings]", SCRIPT_PARAM_INFO, "")
  301.   menu.system:addParam("packet", "Use Packet", SCRIPT_PARAM_ONOFF, true)
  302.   menu.system:addParam("pType", "Animation Cancel Mode", SCRIPT_PARAM_LIST, 3, {"Dance", "Laugh", "Movement"})
  303.   --menu.system:addParam("autoPacket", "Detect (AA) with Packet", SCRIPT_PARAM_ONOFF, false)
  304.   --menu.system:addParam('mov', "Use Movement", SCRIPT_PARAM_ONOFF, false)
  305.   menu.system:addParam("noface", "Try exploit (Q) in Smart Combo", SCRIPT_PARAM_ONOFF, false) -- add packet cast in Q in smart combo.
  306.   --menu.system:addSubMenu("[VPrediction Settings]", "vpred")
  307.   -- menu.system.vpred:addParam("use", "Use VPrediction", SCRIPT_PARAM_ONOFF, false)
  308.   -- --menu.system.vpred:addParam("qpred", "(Q) with VPrediction", SCRIPT_PARAM_ONOFF, true)
  309.   -- --menu.system.vpred:addParam("qhitchance", "(Q) Hit Chance", SCRIPT_PARAM_SLICE, 2, 0, 5, 0)
  310.   -- menu.system.vpred:addParam("rpred", "(R) with VPrediction", SCRIPT_PARAM_ONOFF, false)
  311.   -- menu.system.vpred:addParam("rhitchance", "(R) Hit Chance", SCRIPT_PARAM_SLICE, 2, 0, 5, 0)
  312.   -- menu.system.vpred:addParam("rlogic", "Use (R) VPred Teamfight Logic", SCRIPT_PARAM_ONOFF, false)    
  313. end
  314.  
  315. -- function OnUnload()
  316. --  --if not _ENV[r({107,101,107,118,97,108,56,51,52})] then return end -- this is easily overridden just fyi, make sure you have important init stuff in kek4
  317. --   if menu.system.selector then useSelector = true end
  318. --   if not menu.system.selector then useSelector = false end
  319. -- end
  320.  
  321. function PermaMenu()
  322.     menu.combo.skills:permaShow("r")
  323. end
  324.  
  325. function GetCustomRange(spell)
  326.   local userange  = menu.comboextra.range.useNew
  327.   local nQ    = 550
  328.   local nW    = 125
  329.   local nE    = 425
  330.   if userange == 3 then
  331.     -- local startq_  = menu.comboextra.range.startq
  332.     -- local startw_  = menu.comboextra.range.startw
  333.     -- local starte_  = menu.comboextra.range.starte
  334.     if spell == _Q then return menu.comboextra.range.startq end
  335.     if spell == _W then return menu.comboextra.range.startw end
  336.     if spell == _E then return menu.comboextra.range.starte1 end
  337.   elseif userange == 2 then  
  338.     if spell == _Q then return nQ end
  339.     if spell == _W then return nW end
  340.     if spell == _E then return nE end  
  341.   elseif userange == 1 then
  342.     if spell == _Q and myPlayer:CanUseSpell(_E) == NOTLEARNED or myPlayer:CanUseSpell(_E) == COOLDOWN or not menu.combo.e then return nQ elseif spell == _Q then return 275 end
  343.     if spell == _W then return nW end
  344.     if spell == _E and myPlayer:CanUseSpell(_Q) == COOLDOWN then return nQ elseif spell == _E and myPlayer:CanUseSpell(_Q) == READY then return nE end
  345.   end
  346. end
  347.  
  348. function GetBuffDelay(spell)
  349.   local use_  = menu.comboextra.buff.use
  350.   if use_ then
  351.     if spell == _Q then return (menu.comboextra.buff.q*1000) + GetLatency()/2 end
  352.     if spell == _R then return (menu.comboextra.buff.r*1000) + GetLatency()/2 end
  353.   else
  354.     if spell == _Q then return 1000 + GetLatency()/2 end
  355.     if spell == _R then return 13000 + GetLatency()/2 end
  356.   end
  357. end
  358.  
  359. function getTrueRange()
  360.      return myPlayer.range + GetDistance(myPlayer.minBBox)
  361. end
  362.  
  363. function EnemyInRange(enemy, range)
  364.          if ValidBBoxTarget(enemy, range) then
  365.                 return true
  366.         end
  367.     return false
  368.  end
  369.  
  370. function getHitBoxRadius(hero_)
  371.     return GetDistance(hero_.minBBox, hero_.maxBBox)/2
  372. end
  373.  
  374. function ThisIsReal(myTarget) -- < myPlayer.range    
  375.     local range = GetDistance(myTarget) - getHitBoxRadius(myTarget) - getHitBoxRadius(myPlayer)
  376.     return range
  377. end
  378.  
  379. function RangeWithUltimate()
  380.     local myRange = myPlayer.range
  381.     if temUltimate then
  382.         return myRange + 75
  383.     else
  384.         return myRange
  385.     end
  386.     return myRange
  387. end
  388.  
  389. -- local function DelayCalc()
  390. --  local mode    = menu.comboextra.mode
  391. --  local mDelay  = menu.comboextra.delay
  392. --  if mode == 1 then
  393. --    return mDelay
  394. --  end
  395. --  if mode == 2 then
  396. --    local Total = (1/myPlayer.attackSpeed) - GetLatency()/2000 --seconds
  397. --    return Total
  398. --  end
  399. -- end
  400.  
  401. local packetTick = 0
  402. local lockPacket = false
  403.  
  404. function PacketCast(spell, param1, param2)
  405.         if spell ~= nil then
  406.                
  407.                 if param1 ~= nil and param2 ~= nil then
  408.                         Packet("S_CAST", {spellId = spell, toX = param1, toY = param2, fromX = param1, fromY = param2}):send()
  409.                 elseif param1 ~= nil and param2 == nil then
  410.                         Packet("S_CAST", {spellId = spell, targetNetworkId = param}):send()
  411.                 elseif param1 == nil and param2 == nil then
  412.                         Packet("S_CAST", {spellId = spell}):send()
  413.                 end
  414.                 --Animation Cancel
  415.                 -- if spell == _Q or spell == _W or spell == _E or spell == _R then
  416.                 --         DelayAction(function() Emote() end, 0)
  417.                 -- end
  418.                 -- if spell == hydraslot or spell == tiaslot then
  419.                 --         if wready then DelayAction(function() PacketCast(_W) end, 0) end
  420.                 -- end
  421.         end
  422. end
  423. local newPos = nil
  424. function SendQ()
  425.  
  426.         -- if Target ~= nil and ThisIsReal(Target) <= myPlayer.range then
  427.         --   PacketCast(_Q, myPlayer.x, myPlayer.z)
  428.         --   print("me")
  429.         if Target ~= nil then
  430.           CastSpell(_Q, Target.visionPos.x, Target.visionPos.z)
  431.           --lastAttackCD = 0
  432.           Packet('S_MOVE', { type = 3, x = Target.visionPos.x, y = Target.visionPos.z, targetNetworkId = Target.networkID}):send()
  433.  
  434.                 --local delay = .22 + GetLatency()/2000
  435.                 --local pos = vp:GetPredictedPos(Target, 0.21)
  436.                 --newPos    =   Target + (Vector(myPlayer) - Target):normalized()* ((ThisIsReal(Target)+myPlayer.range)*-1)
  437.                --print('teste vector')
  438.                 --PacketCast(_Q, Target.visionPos.x, Target.visionPos.z)
  439.                 --print(' Send Q')
  440.  
  441.                 --newPos = nil
  442.  
  443.         end
  444. end
  445.  
  446.  
  447. --_G.Packet.headers.S2C_PlayVOAudioEvent = 0x44
  448. function OnRecvPacket(p)
  449.  
  450.   --if p.header == Packet.headers.S2C_PlayVOAudioEvent then p:Block() end
  451.   if not menu.combo.key or not menu.system.packet or not Target then return end
  452.  
  453.   if p.header == 0x64 then
  454.     --print(DumpPacketData(p))    
  455.     p.pos = 1
  456.     if p:DecodeF() ~= Target.networkID then return end -- target
  457.    -- print(DumpPacketData(p))
  458.  
  459.     local type = p:Decode1() -- type
  460.     p.pos = p.pos + 4
  461.     if p:DecodeF() ~= myHero.networkID then return end -- source
  462.    
  463.     if type == 0x0C then SendQ()
  464.     elseif type == 0x04 and menu.extra.systemextra then CastCommonItem(Target)
  465.     end
  466.     return -- I do this because multiple if statement for p.header looks better then if/elseif/elseif...
  467.   end
  468.  
  469.   --if p.header == 0x86 and GetDistance(Target) <= myPlayer.range then Packet('S_MOVE', { type = 3, x = Target.visionPos.x, y = Target.visionPos.z, targetNetworkId = Target.networkID}):send() return end
  470.  
  471. end
  472.  
  473. -- function OnRecvPacket(p)
  474. --   if not _G[c({106,100,107,110,109,118})] then return end
  475. --   if not menu.system.packet or not menu.combo.key or not Target then return end
  476. --   local dumpP = Packet(p)
  477. --   if p.header == 0x64 then
  478. --     print(DumpPacketData(p))
  479. --     p.pos = 1
  480. --     if p:DecodeF() ~= Target.networkID then print('no Target ID') return end -- target
  481. --     local type = p:Decode1() -- type
  482. --     if p:DecodeF() ~= myHero.networkID  then print('no myHero ID') return end -- source
  483.    
  484. --     if type == 0x0C then SendQ()
  485. --     elseif type == 0x04 and menu.extra.systemextra then CastCommonItem(Target)
  486. --     end
  487. --     return -- I do this because multiple if statement for p.header looks better then if/elseif/elseif...
  488. --   end
  489.  
  490. --   if p.header == 0x86 and ThisIsReal(Target) <= myPlayer.range then Packet('S_MOVE', { type = 3, x = Target.visionPos.x, y = Target.visionPos.z, targetNetworkId = Target.networkID}):send() return end
  491.  
  492. -- end
  493.  
  494. -- function OnRecvPacket(p)
  495.  
  496. -- if not _G[c({106,100,107,110,109,118})] then return end
  497. -- if not menu.system.packet then return end
  498.  
  499. -- --local dp = Packet(p)
  500. -- --   if minionLane ~= nil then
  501. -- --    if p.header == 0x64 then
  502. -- --     print(DumpPacket(p))
  503. -- --   end
  504. -- -- end
  505. --   if menu.combo.key and Target ~= nil then
  506. --     if dp:containsFloat(myPlayer.networkID) then
  507. --       if dp.header == 0x64 then
  508. --         --print(DumpPacket(p))   -- pos 4 == 40, pos 5 = 0x0C(12)    
  509. --         dp.pos = 5
  510. --         --print('teste')
  511. --         --local Source = p:DecodeF() -- go to pos 5, because DecodeF get 4 pos
  512. --         local AaPacket = dp:Decode1()
  513. --         --if Source == myPlayer.networkID then
  514. --           --p.pos = 5   -- ok
  515. --           --local AaPacket = p:Decode1() --ok      
  516. --           if AaPacket == 0x0C then
  517. --             SendQ()
  518.  
  519. --           elseif AaPacket == 0x04 then
  520. --             if menu.extra.systemextra then CastCommonItem(Target) end
  521. --           end
  522. --         --end
  523.  
  524.      
  525. --     --end
  526.  
  527. --       elseif p.header == 0x56 then          
  528. --         if ThisIsReal(Target) <= myPlayer.range then
  529. --           Packet('S_MOVE', { type = 3, x = Target.networkID, y = Target.networkID, targetNetworkId = Target.networkID}):send()
  530. --           --print('teste AA send')
  531. --         end
  532. --       end
  533. --     end
  534. --   end
  535.  
  536. -- end
  537.  
  538.  -- if ValidTarget(Target) and dp:containsFloat(myPlayer.networkID) and
  539.  --   dp:containsFloat(Target.networkID) and p.header ~= 0xC3 and p.header ~= 0x60 and p.header ~= 0xFE and p.header ~= 0x86 and p.header ~= 0xBF and p.header ~= 0xB4 and p.header ~= 0xB6 then
  540.  --     print("1) DumpPacket")
  541.  --     print(DumpPacket(p))
  542.  -- end
  543. --and dp:containsFloat(myPlayer.networkID)
  544.  
  545.  --   local p = CLoLPacket(0x64)
  546.  -- p:EncodeF(myHero.networkID)
  547.  -- p:Encode1(12) -- 2 dodge, 3 crit, 4 phys, 5 miss, 6 phys?, 7 phys?, 8 invunerable, 9, 10 dodge, 11 crit
  548.  -- p:EncodeF(myHero.networkID)
  549.  -- p:EncodeF(myHero.networkID)
  550.  -- p:EncodeF(100)
  551.  -- RecvPacket(p)
  552.  
  553.  
  554.  
  555.  --  if ValidTarget(Target) and dp:containsFloat(myPlayer.networkID) and dp:containsFloat(Target.networkID) and
  556.  --  p.header == 0x64 then
  557.  -- -- print('header found')
  558.  --  --print(DumpPacket(p))  
  559.  
  560.  --    --  print('pos 1 found')
  561.  --     --  p.pos = 1
  562.  --     -- if p:Decode1() == 0x0C then
  563.  --     --   --print('pos 3 found:spell')
  564.  --     --   myPlayer:Attack(Target)
  565.  --     -- end          
  566.  --     --  if p:Decode1() == 0x04 or p:Decode1() == 0x14 then
  567.  --     --      --print(DumpPacket(p))          
  568.  --     --      SendQ()
  569.  --     --  end
  570.  --     --  --if p:Decode1() ~= 0x0C then
  571.  --     --    print(DumpPacket(p))
  572.  --     --  --end
  573.  --     p.pos = 5
  574.  --     if p:Decode1() == 0x0C then
  575.  --        SendQ()        
  576.  --      end  
  577.    
  578.  --  --print(DumpPacket(p)) -- 0xFE --0x64 -- 0xC3
  579.  --  --print('teste')
  580.   --CastQ(Target)
  581.   --end
  582.  
  583.  
  584.  
  585. blackTick = 0
  586.  
  587. local myBuff = 0
  588. function OnSendPacket(p)
  589.  
  590. if not menu.system.packet then return end
  591. --if not Target ~= nil then return end
  592. local pType_  =   menu.system.pType
  593. --if p:DecodeF() == myHero.networkID then print(DumpPacket(p)) end
  594.  
  595.  --    local dp = Packet(p)
  596.  -- if ValidTarget(Target) and dp:containsFloat(myPlayer.networkID) and dp:containsFloat(Target.networkID) then print(DumpPacket(p)) end
  597.    
  598.   -- if p.header == 0xC0 then print("OnRecvPacket: 0xC0") end
  599.   -- if p.header == 0x33 then print("OnRecvPacket: 0x33") end
  600.   --if p.header == 0x71 or p.header == 0x9A then print("hum") end
  601.   --   if p.header == Packet.headers.PKT_Basic_Attack_Pos then print("RECV: Packet.headers.PKT_Basic_Attack") end
  602.   -- if p.header ==Packet.headers.PKT_Basic_Attack then print("RECV: Packet.headers.PKT_Basic_Attack") end
  603.   --   local isJump_   =   menu.extra.jumpif not _ENV[r({107,101,107,118,97,108,56,51,52})] then return end
  604.     --if isJump_ then return end
  605.     --local myPacket  =   Packet(p)
  606.  
  607.     -- if menu.combo.key and Target ~= nil and myPlayer:CanUseSpell(_Q) ~= READY and ThisIsReal(Target) <= myPlayer.range then
  608.     --       --if myPacket:get('name') == 'S_MOVE' and myPacket:get('type') == 2 then myPacket:Block() print('blocking') end
  609.     --       myPlayer:Attack(Target)
  610.     --     end
  611.     --local delay_  =   menu.combo.extracombo.smart
  612.     -- local qForce  =   menu.comboextra.q
  613.     -- local wForce  =   menu.comboextra.w
  614.     -- local eForce  =   menu.comboextra.e
  615.    -- local useP_   =   menu.system.packet
  616.         --myPacket:get('name') == 'S_CAST' and myPacket:get('spellId') == _Q
  617.     --local table   =   {_Q, _W, _E}    
  618.     --local pTick   =   qTick
  619.     --print(DumpPacket(p))
  620.     if p.header == 0x99 then
  621.       p.pos = 1
  622.       if not p:DecodeF() == myHero.networkID then return end
  623.       local spell = p:Decode1()
  624.       if not spell == 0x00 then return end
  625.       --print('test p 1')
  626.       --if myPacket:get('spellId') == _Q then
  627.         --print('test p 2')
  628.         qTick = GetTickCount() - GetLatency() / 2
  629.  
  630.         if pType_ == 3 and Target ~= nil then
  631.           local newPos = Target + (Vector(myPlayer) - Target):normalized()*(GetDistance(Target)+50)
  632.           Packet('S_MOVE', {toX = newPos.x, toY = newPos.z, fromX = newPos.x, fromY = newPos.z }):send() --spell.startPos.x
  633.           --if menu.combo.key then Packet('S_MOVE', { type = 3, x = Target.visionPos.x, y = Target.visionPos.z, targetNetworkId = Target.networkID}):send() end
  634.         elseif pType_ == 1 then
  635.             DelayAction(function()                
  636.             p = CLoLPacket(0x65)
  637.             p:EncodeF(myPlayer.networkID)
  638.             p:Encode1(0)
  639.             p.dwArg1 = 0
  640.             p.dwArg2 = 0
  641.             SendPacket(p) end,
  642.             0.15)
  643.         elseif pType_ == 2 then
  644.             DelayAction(function()
  645.             p = CLoLPacket(0x47)
  646.             p:EncodeF(myPlayer.networkID)
  647.             p:Encode1(2)
  648.             p.dwArg1 = 1
  649.             p.dwArg2 = 0
  650.             SendPacket(p) end,
  651.             0.1)
  652.         end
  653.  
  654.  
  655.  
  656.        
  657.          --DelayAction(function()
  658.                        -- if ValidTarget(Target) and TargetIsValid(Target) and ThisIsReal(Target) <= myPlayer.range then
  659.                        --   myPlayer:Attack(Target)
  660.                        -- end
  661.                    --  end,
  662.                    -- (1/myPlayer.attackSpeed) + GetLatency()/2000)        
  663.       --end
  664.       -- for i=1, #table do        
  665.       --     if myPacket:get('spellId') == table[i] and ValidTarget(Target) and TargetIsValid(Target) then          
  666.       --       if table[i] == _Q and qForce then                          
  667.       --           --local del   = DelayCalc()                                          
  668.       --               if ThisIsReal(Target) <= myPlayer.range and GetTickCount() + GetLatency()/2 < pTick - (lastWindUpTime - GetLatency()/2) then  --700                                              
  669.       --                   myPacket:block()
  670.       --                   --myPlayer:Attack(Target)                    
  671.       --               end
  672.       --         end
  673.       --         if table[i] == _W and wForce and Passive then
  674.       --           if ThisIsReal(Target) <= myPlayer.range then                                                
  675.       --                 myPacket:block()                    
  676.       --             end
  677.       --         end
  678.       --         if table[i] == _E and eForce and Passive then
  679.       --           if ThisIsReal(Target) <= myPlayer.range then                                                
  680.       --                 myPacket:block()                    
  681.       --             end
  682.       --         end
  683.       --       end
  684.       --   end
  685.     end
  686.   -- packetTable = {Packet.headers.PKT_Basic_Attack, Packet.headers.PKT_Basic_Attack_Pos, "0xC0", "0x33"}
  687.   -- for i=1, #packetTable do
  688.   --   if p.header == packetTable[i] then
  689.   --     print("OnSendPacket: "..tostring(packetTable[i]))
  690.   --   end
  691.   -- end
  692.   -- if p.header == Packet.headers.PKT_Basic_Attack_Pos then print("SEND: Packet.headers.PKT_Basic_Attack") end
  693.   -- if p.header ==Packet.headers.PKT_Basic_Attack then print("SEND: Packet.headers.PKT_Basic_Attack") end
  694.   --  if p.header == 0xC0 and ValidTarget(Target) then print("OnSendPacket: 0xC0") end
  695.   -- if p.header == 0x33 and ValidTarget(Target) then print("OnSendPacket: 0x33") end
  696.  -- if ValidTarget(Target) and GetDistance(Target) <= myPlayer.range then print("RECV: "..tostring(p.header)) end
  697.  
  698. end
  699.  
  700. function OnGainBuff(unit, buff)
  701.     if unit ~= nil and unit.isMe then
  702.       --print(buff.name)
  703.         if buff.name:lower():find("rivenpassiveaaboost") then Passive       = true PassiveIndicator = 1 if myBuff == 0 then myBuff = 1 end end --passives = passives + 1 end
  704.         if buff.name:lower():find("rivenwindslashready") then temUltimate   = true end
  705.         if buff.name:lower():find("regenerationpotion")  then UsandoHP      = true end
  706.         --if buff.type == 14 then temSlow = true end
  707.     end
  708. end
  709.  
  710. function OnUpdateBuff(unit, buff)    
  711.     if unit ~= nil and unit.isMe then
  712.       --print(buff.name)
  713.         if buff.name:lower():find("rivenpassiveaaboost") then
  714.           PassiveIndicator = buff.stack
  715.           myBuff = myBuff + 1
  716.          -- print(myBuff)
  717.         end
  718.     end
  719. end
  720.  
  721. function OnLoseBuff(unit, buff)
  722.     if unit ~= nil and unit.isMe then
  723.      -- print(buff.name)
  724.         if buff.name:lower():find("rivenpassiveaaboost") then Passive       = false myBuff = 0      
  725.             if buff.stack == 0 or buff.stack == nil then PassiveIndicator = 0 end end
  726.         if buff.name:lower():find("rivenwindslashready") then temUltimate   = false end
  727.         if buff.name:lower():find("regenerationpotion")  then UsandoHP      = false end
  728.         --if buff.type == 14 then temSlow = false end
  729.     end
  730. end
  731.  
  732. -- items
  733. local Items = {
  734. ["Brtk"]        =       {ready = false, range = 450, SlotId = 3153, slot = nil},
  735. ["Bc"]          =       {ready = false, range = 450, SlotId = 3144, slot = nil},
  736. ["Rh"]          =       {ready = false, range = 385, SlotId = 3074, slot = nil},
  737. ["Tiamat"]      =       {ready = false, range = 385, SlotId = 3077, slot = nil},
  738. ["Hg"]          =       {ready = false, range = 385, SlotId = 3146, slot = nil},
  739. ["Yg"]          =       {ready = false, range = 450, SlotId = 3142, slot = nil},
  740. ["RO"]          =       {ready = false, range = 400, SlotId = 3143, slot = nil},
  741. ["SD"]          =       {ready = false, range = 275, SlotId = 3131, slot = nil},
  742. ["MU"]          =       {ready = false, range = 200, SlotId = 3042, slot = nil} }
  743.  
  744. local HP_MANA     = { ["Hppotion"] = {SlotId = 2003, ready = false, slot = nil}, ["Elixir"] = {SlotId = 2037, ready = false, slot = nil} }
  745. local FoundItems  = {}
  746.  
  747. -- cast items
  748. local function CheckItems(tabela)
  749.     for ItemIndex, Value in pairs(tabela) do
  750.         Value.slot = GetInventorySlotItem(Value.SlotId)
  751.             if Value.slot ~= nil and (myPlayer:CanUseSpell(Value.slot) == READY) then
  752.             FoundItems[#FoundItems+1] = ItemIndex
  753.         end
  754.     end
  755. end
  756.  
  757. function CastCommonItem(myTarget)
  758.  
  759.     local items_suv =   menu.extra.systemextra
  760.     if not items_suv then return end
  761.     CheckItems(Items)
  762.     if #FoundItems ~= 0 then
  763.         for i, Items_ in pairs(FoundItems) do
  764.             if myTarget ~= nil and TargetIsValid(myTarget) then                                      
  765.                 if GetDistance(myTarget) <= Items[Items_].range then                    
  766.                     if Items_ == "Brtk" or Items_ == "Bc" then
  767.                        CastSpell(Items[Items_].slot, myTarget)
  768.                     end
  769.                     if (Items_ == "Yg") or (Items_ == "SD") or (Items_ == "RO") or (Items_ == "MU") or Items_ == "Rh" or Items_ == "Tiamat" then
  770.                         CastSpell(Items[Items_].slot)                    
  771.                     end                    
  772.                 end
  773.             elseif myTarget ~= nil and myTarget.type == 'obj_AI_Minion' and Items_ == "Rh" or Items_ == "Tiamat" and GetDistance(myTarget) <= Items[Items_].range then
  774.               CastSpell(Items[Items_].slot)
  775.             end
  776.             FoundItems[i] = nil
  777.         end    
  778.     end
  779. end
  780.  
  781. function CastSurviveItem()
  782.  
  783.     local items_suv =   menu.extra.systemextra
  784.     if not items_suv then return end
  785.     CheckItems(HP_MANA)    
  786.     local hp_                       = menu.extra.hp  
  787.     local barrier_                  = menu.extra.barrier
  788.     local elixirhp_                 = menu.extra.elixirhp
  789.     local myPlayerhp_               = (myPlayer.health / myPlayer.maxHealth *100)
  790.     if #FoundItems ~= 0 then        
  791.         for i, HP_MANA_ in pairs(FoundItems) do
  792.             if HP_MANA_ == "Hppotion" and myPlayerhp_ <= hp_ and not InFountain() and not UsandoHP then
  793.                CastSpell(HP_MANA[HP_MANA_].slot)
  794.             end
  795.             if HP_MANA_ == "Elixir" and myPlayerhp_ <= elixirhp_ and not InFountain() then
  796.                CastSpell(HP_MANA[HP_MANA_].slot)
  797.             end
  798.             FoundItems[i] = nil
  799.         end
  800.         if BarreiraSpell.slot ~= nil and myPlayerhp_ <= barrier_ and not InFountain() then
  801.             CastSpell(BarreiraSpell.slot)
  802.         end
  803.     end
  804. end
  805.  
  806. -- E.   Q. W A  Q .A. Q leave
  807. -- E+Q get near the target
  808. -- W
  809. -- stun
  810. -- A Q A
  811. -- harass
  812. -- Q leave there
  813.  
  814. local function HarassEnemy(myTarget)
  815.   local myOrb          =    menu.system.orb
  816.   if myOrb then OrbWalk(myTarget) end
  817.   if not ValidTarget(myTarget) then return end    
  818.   local hQ_            =    menu.extra.hQ
  819.   local hW_            =    menu.extra.hW
  820.   local hE_            =    menu.extra.hE
  821.   local harassMode_    =    menu.extra.harassMode
  822.   if hQ_ then CastQ(myTarget) end
  823.   if hW_ then CastW(myTarget) end
  824.   if hE_ then CastE(myTarget) end
  825.   -- if harassMode_ == 1 then
  826.   --   if hQ_ and GetDistance(myTarget) <= 550 then
  827.   --     CastSpell(_Q, myTarget.x, myTarget.z)    
  828.   --   elseif hW_ and ThisIsReal(myTarget) <= myPlayer.range then      
  829.   --     CastSpell(_W)
  830.   --   elseif hQ_ then
  831.   --     CastSpell(_Q, myTarget.x, myTarget.z)
  832.   --   end      
  833.   -- --if hQ_ then CastSpell(_Q, myTarget.x, myTarget.z) end
  834.   --   if hE_ then CastSpell(_E, myTarget.x, myTarget.z) end
  835.   -- elseif harassMode_ == 2 then
  836.   --   if hE_ and GetDistance(myTarget) <= 425 and CastSpell(_E, myTarget.x, myTarget.z) then
  837.   --   elseif hQ_ and GetDistance(myTarget) <= 275 and CastSpell(_Q, myTarget.x, myTarget.z) then
  838.   --   elseif hW_ and GetDistance(myTarget) <= 282 then
  839.   --     CastSpell(_W)      
  840.   --   end    
  841.   -- end        
  842. end
  843.  
  844. --local LockQ = false
  845.  
  846. -- function PredCastQ(myTarget)
  847. -- if lockQ then return end
  848. --   local useq      =   menu.combo.skills.q
  849. --   local mode_     =   menu.comboextra.mode  
  850. --   local qpred_  = menu.system.vpred.qpred
  851. --   local qChance_  = menu.system.vpred.qhitchance
  852. --   if useq and qpred_ then  
  853. --     if GetDistance(myTarget) <= GetCustomRange(_Q) then    
  854. --       local AOECastPosition, MainTargetHitChance, nTargets = vp:GetCircularAOECastPosition(myTarget, 0.21, 120, GetCustomRange(_Q), 1000, myPlayer)
  855.      
  856.  
  857.  
  858. --       if menu.comboextra.range.useNew == 2 or 3 then
  859.  
  860.        
  861. --         if ThisIsReal(myTarget) > myPlayer.range then
  862. --           if MainTargetHitChance >= qChance_ and GetTickCount() + GetLatency()/2 > qTick + GetBuffDelay(_Q) then
  863. --            CastSpell(_Q, AOECastPosition.x, AOECastPosition.z)
  864. --           end
  865. --            --print('teste')
  866. --           -- elseif MainTargetHitChance >= 1 and not temParticula then
  867. --           --   CastSpell(_Q, AOECastPosition.x, AOECastPosition.z)
  868. --         -- elseif myPlayer:CanUseSpell(_E) ~= READY or myPlayer:CanUseSpell(_E) == NOTLEARNED and not lockQ then
  869. --         --     CastSpell(_Q, AOECastPosition.x, AOECastPosition.z)
  870. --         --     if ThisIsReal(myTarget)  <= myPlayer.range then
  871. --         --       lockQ = true
  872. --         --     else
  873. --         --       lockQ = false
  874. --         --     end  
  875. --         end
  876.  
  877. --       elseif menu.comboextra.range.useNew == 1 then
  878.  
  879.      
  880. --         if ThisIsReal(myTarget) > myPlayer.range then
  881. --           if MainTargetHitChance >= qChance_ and GetTickCount() + GetLatency()/2 > qTick + GetBuffDelay(_Q) then
  882. --            CastSpell(_Q, AOECastPosition.x, AOECastPosition.z)
  883.  
  884. --           end
  885. --            --print('teste')
  886. --           -- elseif MainTargetHitChance >= 1 and not temParticula then
  887. --           --   CastSpell(_Q, AOECastPosition.x, AOECastPosition.z)
  888. --         -- elseif myPlayer:CanUseSpell(_E) ~= READY or myPlayer:CanUseSpell(_E) == NOTLEARNED and not lockQ then
  889. --         --     CastSpell(_Q, AOECastPosition.x, AOECastPosition.z)
  890. --         --     if ThisIsReal(myTarget)  <= myPlayer.range then
  891. --         --       lockQ = true
  892. --         --     else
  893. --         --       lockQ = false
  894. --         --     end    
  895. --         end
  896. --       end
  897.  
  898. --       --end
  899. --     -- elseif myPlayer:CanUseSpell(_E) ~= READY and GetDistance(myTarget) <= 550 then
  900. --     --   local AOECastPosition, MainTargetHitChance, nTargets = vp:GetCircularAOECastPosition(myTarget, 0.21, 120, GetCustomRange(_Q), math.huge, myPlayer)
  901. --     --   if MainTargetHitChance >= 1 then
  902. --     --     CastSpell(_Q, AOECastPosition.x, AOECastPosition.z)
  903. --     --   end
  904. --     -- elseif temUltimate and GetDistance(myTarget) <= 550 then
  905. --     --   local AOECastPosition, MainTargetHitChance, nTargets = vp:GetCircularAOECastPosition(myTarget, 0.21, 120, GetCustomRange(_Q), math.huge, myPlayer)
  906. --     --   if MainTargetHitChance >= 1 then
  907. --     --     CastSpell(_Q, AOECastPosition.x, AOECastPosition.z)
  908. --     --   end
  909. --     end
  910. --   end
  911. -- end
  912.  
  913. function CastQ(myTarget)  
  914.   local useq      =   menu.combo.skills.q
  915.   local mode_     =   menu.comboextra.mode  
  916.   --if lockQ then return end
  917.   --local qpred_  = menu.system.vpred.qpred    
  918.   --if qpred_ then PredCastQ(myTarget) return end
  919.   if useq then
  920.  
  921.     if GetDistance(myTarget) > myPlayer.range and GetDistance(myTarget) <= GetCustomRange(_Q) then      
  922.     --if GetDistance(myTarget) <= GetCustomRange(_Q) then
  923.       --if menu.comboextra.range.useNew == 2 or 3 then
  924.         --qTick = GetTickCount() + GetLatency() / 2        
  925.         if GetTickCount() + GetLatency()/2 > qTick + GetBuffDelay(_Q) and myTarget ~= nil then
  926.           CastSpell(_Q, myTarget.visionPos.x, myTarget.visionPos.z)
  927.           --Packet('S_MOVE', { type = 3, x = myTarget.visionPos.x, y = myTarget.visionPos.z, targetNetworkId = myTarget.networkID}):send()    
  928.         end
  929.     elseif GetDistance(myTarget) <= myPlayer.range and myTarget ~= nil then
  930.       Packet('S_MOVE', { type = 3, x = myTarget.visionPos.x, y = myTarget.visionPos.z, targetNetworkId = myTarget.networkID}):send()
  931.       -- if not Passive then
  932.       --   SendQ()
  933.       -- end
  934.     end
  935.  
  936.       --elseif menu.comboextra.range.useNew == 1 then
  937.         -- if GetTickCount() + GetLatency()/2 > qTick + GetBuffDelay(_Q) then
  938.         --   CastSpell(_Q, myTarget.visionPos.x, myTarget.visionPos.z)                
  939.         -- end
  940.       --end
  941.  
  942.       --end
  943.     -- elseif myPlayer:CanUseSpell(_E) ~= READY and GetDistance(myTarget) <= 550 then      
  944.     --   CastSpell(_Q, myTarget.visionPos.x, myTarget.visionPos.z)
  945.     --    if ThisIsReal(myTarget)  <= myPlayer.range then
  946.     --           lockQ = true
  947.     --         else
  948.     --           lockQ = false
  949.     --         end  
  950.     --end
  951.   end
  952. end
  953.  
  954.  
  955. function CastW(myTarget)  
  956.   local usew      =   menu.combo.skills.w  
  957.   local useItems_ =   menu.comboextra.items
  958.  
  959.   if usew and PassiveIndicator <= 2 then      
  960.     if GetDistance(myTarget) <= GetCustomRange(_W) then
  961.       if CastSpell(_W) then CastCommonItem(myTarget) end    
  962.     end
  963.   elseif usew and myPlayer:CanUseSpell(_Q) == COOLDOWN and myPlayer:CanUseSpell(_E) == COOLDOWN then
  964.     if GetDistance(myTarget) <= GetCustomRange(_W) then
  965.       if CastSpell(_W) then CastCommonItem(myTarget) end    
  966.     end
  967.   end
  968.  
  969. end
  970.  
  971. local function AutoStun()
  972.     local CombON = menu.combo.key
  973.     if CombON then return end
  974.     local autow_    =   menu.comboextra.autow
  975.     --local range_3   = GetCustomRange(_W)      
  976.     if CountEnemyHeroInRange(GetCustomRange(_W)) >= autow_ then
  977.          CastSpell(_W)
  978.       --Packet('S_CAST', {spellId = _W}):send()
  979.       if useItems_ then CastCommonItem(myTarget) end          
  980.     end
  981.     --if ThisIsReal(myTarget) <= myPlayer.range and Passive then myPlayer:Attack(myTarget) end
  982. end
  983.  
  984. function CastE(myTarget)
  985.   --if lockE then return end  
  986.   local usee      =   menu.combo.skills.e      
  987.   if usee and PassiveIndicator <= 2 then
  988.     if GetDistance(myTarget) <= GetCustomRange(_E) and IsWall(D3DXVECTOR3(myTarget.visionPos.x, myTarget.visionPos.y, myTarget.visionPos.z)) == false then
  989.       CastSpell(_E, myTarget.visionPos.x, myTarget.visionPos.z)
  990.     -- elseif GetDistance(myTarget) <= GetCustomRange(_E) and qCount >=2 then
  991.     --   CastSpell(_E, myTarget.x, myTarget.z)
  992.     elseif myPlayer:CanUseSpell(_Q) ~= READY or temUltimate then
  993.       CastSpell(_E, myTarget.visionPos.x, myTarget.visionPos.z)
  994.     elseif GetDistance(myTarget) <= GetCustomRange(_E) and getDmg("P", myTarget, myPlayer) + getDmg("AD", myTarget, myPlayer) >= myTarget.health then
  995.       CastSpell(_E, myTarget.visionPos.x, myTarget.visionPos.z)
  996.       myPlayer:Attack(myTarget)
  997.     end
  998.   end  
  999. end
  1000.  
  1001. local function UltimateKS()
  1002.     local useksR_     =   menu.comboextra.ksultimate
  1003.     local ComboON     =   menu.combo.key
  1004.     local nKs_        =   menu.comboextra.nKsultimate  
  1005.     local Enemys      =   nil
  1006.     if not useksR_ then return end
  1007.     --if ComboON then return end
  1008.     --if CountEnemyHeroInRange(900) < nKs_ then return end  
  1009.     for i, Enemys in pairs(GetEnemyHeroes()) do
  1010.         if ValidTarget(Enemys) and TargetIsValid(Enemys) and GetDistance(Enemys) <= 900 and (Enemys.health/Enemys.maxHealth)*100 <= 24 then
  1011.         --local rDmg = getDmg("R", Enemys, myPlayer,2)          
  1012.             --if (myTarget.health/myTarget.maxHealth*100) <= 25 then
  1013.               rTick = GetTickCount() + GetLatency() / 2
  1014.               CastSpell(_R)
  1015.               if temUltimate and GetDistance(Enemys) <= 900 then              
  1016.                 if (Enemys.health/Enemys.maxHealth*100) <= 24 then
  1017.                   CastSpell(_R, Enemys.x, Enemys.z)
  1018.                 elseif GetTickCount() + GetLatency() / 2 - rTick> GetBuffDelay(_R) then
  1019.                   CastSpell(_R, Enemys.x, Enemys.z)
  1020.                 end
  1021.               end
  1022.             --end
  1023.         end
  1024.     end
  1025. end
  1026.  
  1027. local lockUltimate = false
  1028. local function CheckfirstRmode(myTarget)
  1029.   --if not ValidTarget(myTarget) then return end
  1030.       local rRange  = menu.comboextra.autostartRrange
  1031.       local HealthE = menu.comboextra.autostartRhealth    
  1032.       local rEnemys = menu.comboextra.autostartRnumber
  1033.       local eMode   = menu.comboextra.firstRmode
  1034.       if eMode == 1 then -- # enemys
  1035.         --if CountEnemyHeroInRange(900, myPlayer) == 0 then return end        
  1036.         --if CountEnemyHeroInRange(900, myPlayer) >= rEnemys then
  1037.           return GetDistance(myTarget) <= 850 and CountEnemyHeroInRange(850) >= rEnemys
  1038.       end      
  1039.       if eMode == 2 then -- main health
  1040.         return GetDistance(myTarget) <= 850 and (myTarget.health / myTarget.maxHealth * 100) <= HealthE
  1041.       end
  1042.       if eMode == 3 then  -- Range
  1043.         return GetDistance(myTarget) <= rRange
  1044.       end
  1045.       if eMode == 4 then -- ALL
  1046.         return GetDistance(myTarget) <= 850 and CountEnemyHeroInRange(rRange) >= rEnemys and (myTarget.health / myTarget.maxHealth * 100) <= HealthE and GetDistance(myTarget) <= rRange
  1047.       end
  1048. end
  1049.  
  1050.  
  1051. function GetBestCircularFarmPosition(range, radius, objects)
  1052.     local BestPos
  1053.     local BestHit = 0
  1054.     for i, object in ipairs(objects) do
  1055.         local hit = CountObjectsNearPos(object.visionPos or object, radius, objects)
  1056.         if hit > BestHit then
  1057.             BestHit = hit
  1058.             BestPos = Vector(object)
  1059.             if BestHit == #objects then
  1060.                break
  1061.             end
  1062.          end
  1063.     end
  1064.     return BestPos, BestHit
  1065. end
  1066.  
  1067.  
  1068. local temFirstR = false
  1069. function NewCastR(myTarget)
  1070.   if menu.extra.harass then return end
  1071.   local user       =  menu.combo.skills.r  
  1072.   if user and CheckfirstRmode(myTarget) then            
  1073.     if not temUltimate then CastSpell(_R) end
  1074.  
  1075.     if temUltimate and GetDistance(myTarget) <= 850 then
  1076.  
  1077.       -- Damage
  1078.       local rDmg = getDmg("R", myTarget, myPlayer)
  1079.       if rDmg ~= 0 and menu.comboextra.secondRmode == 2 and rDmg > myTarget.health and GetTickCount() + GetLatency()/2 - rTick < GetBuffDelay(_R) then
  1080.         CastSpell(_R, myTarget.visionPos.x, myTarget.visionPos.z)      
  1081.  
  1082.       -- Max damage (25%)
  1083.       elseif menu.comboextra.secondRmode == 1 and (myTarget.health/myTarget.maxHealth*100) <= 25 and GetTickCount() + GetLatency()/2 - rTick < GetBuffDelay(_R) then
  1084.         CastSpell(_R, myTarget.visionPos.x, myTarget.visionPos.z)
  1085.      
  1086.       -- Timeout ultimate buff
  1087.       elseif rTick ~= 0 and GetTickCount() + GetLatency()/2 - rTick > GetBuffDelay(_R) then
  1088.         CastSpell(_R, myTarget.visionPos.x, myTarget.visionPos.z)
  1089.      
  1090.       -- Avoid loose ultimate by range
  1091.       elseif GetDistance(myTarget) >= 780 then
  1092.         CastSpell(_R, myTarget.visionPos.x, myTarget.visionPos.z)
  1093.       end
  1094.  
  1095.     end
  1096.   end
  1097. end
  1098.  
  1099.  
  1100. --     if rPred and temUltimate and GetDistance(myTarget) <= 850 then
  1101. --       local mainCastPosition, mainHitChance = vp:GetConeAOECastPosition(myTarget, 0.5,  45,  850,  1200, myPlayer)
  1102. --       if mainCastPosition and mainHitChance >= rChance then
  1103. --         if menu.comboextra.secondRmode == 1 and (myTarget.health/myTarget.maxHealth*100) <= 25 then
  1104. --           CastSpell(_R, mainCastPosition.x, mainCastPosition.z)
  1105. --           --if not myTarget.dead then lockIgnite = false end
  1106. --           temFirstR = false
  1107. --         elseif menu.comboextra.secondRmode == 2 and getDmg("R", myTarget, myPlayer) -1 >= myTarget.health then
  1108. --           CastSpell(_R, mainCastPosition.x, mainCastPosition.z)
  1109. --           --if not myTarget.dead then lockIgnite = false end
  1110. --           temFirstR = false
  1111. --         end
  1112. --         elseif rTick ~= 0 and GetTickCount() + GetLatency() / 2 - rTick > GetBuffDelay(_R) then
  1113. --         CastSpell(_R, mainCastPosition.x, mainCastPosition.z)
  1114. --         --if not myTarget.dead then lockIgnite = false end
  1115. --         temFirstR = false
  1116. --         elseif GetDistance(myTarget) >850 and GetDistance(myTarget) <= 900 then
  1117. --           CastSpell(_R, mainCastPosition.x, mainCastPosition.z)
  1118. --           --if not myTarget.dead then lockIgnite = false end
  1119. --           temFirstR = false
  1120. --         end
  1121. --       end
  1122. --     else
  1123. --       if temUltimate and GetDistance(myTarget) <= 850 then
  1124. --         if menu.comboextra.secondRmode == 1 and (Enemys.health/Enemys.maxHealth*100) <= 24 then
  1125. --           CastSpell(_R, myTarget.visionPos.x, myTarget.visionPos.z)
  1126. --           temFirstR = false
  1127. --           --if not myTarget.dead then lockIgnite = false end
  1128. --         elseif menu.comboextra.secondRmode == 2 and getDmg("R", myTarget, myPlayer)-10 >= myTarget.health then
  1129. --           CastSpell(_R, myTarget.visionPos.x, myTarget.visionPos.z)
  1130. --           temFirstR = false
  1131. --           --if not myTarget.dead then lockIgnite = false end
  1132. --         elseif rTick ~= 0 and GetTickCount() + GetLatency() / 2 - rTick > GetBuffDelay(_R) then
  1133. --           CastSpell(_R, myTarget.visionPos.x, myTarget.visionPos.z)
  1134. --           --if not myTarget.dead then lockIgnite = false end
  1135. --           temFirstR = false
  1136. --         elseif GetDistance(myTarget) > 850 and GetDistance(myTarget) <=900 then
  1137. --           CastSpell(_R, myTarget.visionPos.x, myTarget.visionPos.z)
  1138. --       end
  1139. --     end
  1140. --   end
  1141. -- end
  1142.  
  1143. -- function CheckEnemiesHitByW()
  1144. --   local enemieshit = {}
  1145. --   for i, enemy in ipairs(GetEnemyHeroes()) do
  1146. --     local position = VP:GetPredictedPos(enemy, Wdelay)
  1147. --     if ValidTarget(enemy) and GetDistance(position, BallPos) <= Wradius and GetDistance(enemy.visionPos, BallPos) <= Wradius then
  1148. --       table.insert(enemieshit, enemy)
  1149. --     end
  1150. --   end
  1151. --   return #enemieshit, enemieshit
  1152. -- end
  1153.  
  1154. -- function CheckEnemiesHitByUltimate()
  1155. --   local enemieshit = {}
  1156. --   for i, enemy in ipairs(GetEnemyHeroes()) do
  1157. --     local position = vp:GetPredictedPos(enemy, 0.25)
  1158. --     if ValidTarget(enemy) and GetDistance(position, myPlayer) <= 900 and GetDistance(enemy.visionPos, myPlayer) <= 900 then
  1159. --       table.insert(enemieshit, enemy)
  1160. --     end
  1161. --   end
  1162. --   return #enemieshit, enemieshit
  1163. -- end
  1164.  
  1165. -- function CastSecondR(myTarget)
  1166. --   --if lockUltimate then return end
  1167. --   local user       =  menu.combo.skills.r    
  1168. --   local rPred      =  menu.system.vpred.rpred
  1169. --   local rChance    =  menu.system.vpred.rhitchance
  1170. --   local DamageR   =   getDmg("R", myTarget, myPlayer)      
  1171. --   if user and temUltimate then
  1172. --     if rPred and GetDistance(myTarget) <= 850 then
  1173. --       local mainCastPosition, mainHitChance, MaxHit  = vp:GetConeAOECastPosition(myTarget, 0.5,  45,  850,  1200, myPlayer)
  1174.      
  1175. --         if menu.system.vpred.rlogic and MaxHit > 1 then          
  1176.  
  1177. --           local hitcount, hit = CheckEnemiesHitByUltimate()
  1178.  
  1179. --           if mainHitChance >= 1 and getDmg("R", myTarget, myPlayer) -1 >= myTarget.health and hitcount >= 2 then
  1180. --             CastSpell(_R, mainCastPosition.x, mainCastPosition.z)
  1181. --               if not myTarget.dead then lockIgnite = false end
  1182. --               temFirstR = false
  1183. --           elseif rTick ~= 0 and GetTickCount() + GetLatency() / 2 - rTick > GetBuffDelay(_R) then
  1184. --             CastSpell(_R, mainCastPosition.x, mainCastPosition.z)
  1185. --             if not myTarget.dead then lockIgnite = false end
  1186. --             temFirstR = false
  1187. --           end
  1188.  
  1189. --         else
  1190. --         if mainHitChance >= rChance and getDmg("R", myTarget, myPlayer) -1 >= myTarget.health then
  1191. --           CastSpell(_R, mainCastPosition.x, mainCastPosition.z)
  1192. --               if not myTarget.dead then lockIgnite = false end
  1193. --               temFirstR = false
  1194. --         elseif rTick ~= 0 and GetTickCount() + GetLatency() / 2 - rTick > GetBuffDelay(_R) then
  1195. --           CastSpell(_R, mainCastPosition.x, mainCastPosition.z)
  1196. --           if not myTarget.dead then lockIgnite = false end
  1197. --           temFirstR = false
  1198. --         end
  1199. --       end
  1200. --     else
  1201. --       if temUltimate and GetDistance(myTarget) <= 850 then      
  1202. --         if getDmg("R", myTarget, myPlayer) -1 >= myTarget.health then
  1203. --           CastSpell(_R, myTarget.x, myTarget.z)
  1204. --           if not myTarget.dead then lockIgnite = false end
  1205. --           temFirstR = false
  1206. --         elseif rTick ~= 0 and GetTickCount() + GetLatency() / 2 - rTick > GetBuffDelay(_R) then
  1207. --           CastSpell(_R, myTarget.x, myTarget.z)
  1208. --           if not myTarget.dead then lockIgnite = false end
  1209. --           temFirstR = false
  1210. --         end
  1211. --       end
  1212. --     end
  1213. --   end
  1214. -- end
  1215.  
  1216. -- function OnApplyParticle(unit, particle)
  1217. --  if not _ENV[r({107,101,107,118,97,108,56,51,52})] then return end -- this is easily overridden just fyi, make sure you have important init stuff in kek4
  1218. --   local particleTable = {
  1219. --   ["Riven_Base_Q_01_Wpn_Trail.troy"] = true,
  1220. --   ["Riven_Base_Q_02_Wpn_Trail.troy"] = true,
  1221. --   ["Riven_Base_Q_03_Wpn_Trail.troy"] = true,
  1222. --   ["Riven_Base_P_Buff.troy"] = true,
  1223. --   ["RivenSwordBlue.troy"] = true}
  1224. --   if menu.combo.key then
  1225. --     if ValidTarget(unit) and ValidTarget(Target) then
  1226. --       if unit.networkID == Target.networkID then
  1227. --         if particle.name == "globalhit_bloodslash.troy" then CastSpell(_Q, Target.x, Target.z) end
  1228. --       end    
  1229. --     end
  1230. --     if unit ~= nil and unit.isMe then
  1231. --       if particleTable[particle.name] then myPlayer:Attack(Target) end
  1232. --     end
  1233. --   end
  1234. --   --if unit ~= nil and unit.isMe then print(particle.name) end
  1235. -- end
  1236.  
  1237. function OnAnimation(unit, animationname)
  1238.  
  1239.     local ComboON       =   menu.combo.key        
  1240.     local animaT        =   { "spell1a", "spell1b", "spell1c" } --, "spell2"}
  1241.     if unit.isMe then
  1242.       --if animationname:lower():find("attack") then  end
  1243.       -- if ComboON and ValidTarget(Target) and ThisIsReal(Target) <= myPlayer.range then  
  1244.       --   for i=1, #animaT do
  1245.       --     if animationname:lower():find(animaT[i]) then
  1246.       --       myPlayer:Attack(Target)
  1247.       --       --lastAttack = 0
  1248.       --     end
  1249.       --   end      
  1250.       -- end
  1251.  
  1252.       if animationname:lower():find("spell1a") then qCount = 1 end
  1253.       if animationname:lower():find("spell1b") then qCount = 2 end
  1254.       if animationname:lower():find("spell1c") then qCount = 3 countTick = GetTickCount() + GetLatency()/2 end  
  1255.  
  1256.     end
  1257. end
  1258.  
  1259.  
  1260. -- local function ComboByChampion(myTarget)
  1261. --   local anti_over = menu.comboextra.others.smart  
  1262. --   if not ValidTarget(myTarget) and TargetIsValid(myTarget) then return end
  1263. --   lockE = true
  1264. --   local championsT = {"Aatrox", "Darius", "Jax", "Shyvana", "Jayce", "Renekton", "Malphite", "Kayle", "MonkeyKing", "Volibear",
  1265. --                       "Yasuo"}
  1266. --   --local TargetHealth = (myTarget.health/myTarget.maxHealth)*100
  1267. --   for i=1, #championsT do
  1268. --     if myTarget.charName:find(championsT[i]) and GetDistance(myTarget) <= GetCustomRange(_Q) then
  1269. --       -- Jax
  1270. --       if championsT[i] == "Jax" then
  1271. --         local JaxQcd = myTarget:GetSpellData(_Q).currentCd
  1272. --         local JaxEcd = myTarget:GetSpellData(_E).currentCd        
  1273. --         --local JaxRcd = myTarget:GetSpellData(_R).currentCd
  1274. --         if JaxQcd ~= nil and JaxQcd > 1 then lockE = false CastE(myTarget) end
  1275. --         if JaxEcd ~= nil and JaxEcd > 1 then CastW(myTarget) end
  1276.        
  1277.        
  1278. --       -- Shyvana
  1279. --       elseif championsT[i] == "Shyvana" then
  1280. --         local shyWcd = myTarget:GetSpellData(_W).currentCd
  1281. --         if shyWcd ~= nil and shyWcd > 1 then lockE = false CastE(myTarget) end
  1282.        
  1283. --       -- Jayve
  1284. --       elseif championsT[i] == "Renekton" then
  1285. --         local rekEcd = myTarget:GetSpellData(_E).currentCd
  1286. --         if rekRcd ~= nil and rekRcd > 2 then lockE = false CastE(myTarget) end
  1287.        
  1288. --       --Malphite
  1289. --       elseif championsT[i] == "Malphite" then
  1290. --         local mapQcd = myTarget:GetSpellData(_Q).currentCd
  1291. --         if mapQcd ~= nil and mapQcd > 1 then lockE = false CastE(myTarget) end
  1292.        
  1293. --         -- Darius
  1294. --       elseif championsT[i] == "Darius" then
  1295. --         local darEcd = myTarget:GetSpellData(_E).currentCd
  1296. --         if darEcd ~= nil and darEcd > 1 then lockE = false CastE(myTarget) end
  1297.        
  1298. --         --Chogath
  1299. --       elseif championsT[i] == "Chogath" then
  1300. --         local choQcd = myPlayer:GetSpellData(_Q).currentCd
  1301. --         if choQcd ~= nil and choQcd > 1 then lockE = false CastE(myTarget) end
  1302.        
  1303. --         --Aatrox
  1304. --       elseif championsT[i] == "Aatrox" then
  1305. --         local aaEcd = myTarget:GetSpellData(_E).currentCd
  1306. --         if aaEcd ~= nil and aaEcd > 1 then lockE = false CastE(myTarget) end
  1307.        
  1308. --         --Kayle
  1309. --       elseif championsT[i] == "Kayle" then
  1310. --         local kayQcd = myPlayer:GetSpellData(_Q).currentCd
  1311. --         if kayQcd ~= nil and kayQcd > 1 then lockE = false CastE(myTarget) end
  1312.        
  1313. --         --Jayce
  1314. --       elseif championsT[i] == "Jayce" then
  1315. --         local jayQcd = myPlayer:GetSpellData(_Q).currentCd
  1316. --         if jayQcd ~= nil and jayQcd > 1 then lockE = false CastE(myTarget) end
  1317.        
  1318. --         --Wukong
  1319. --       elseif championsT[i] == "MonkeyKing" then
  1320. --         local wuEcd = myPlayer:GetSpellData(_E).currentCd
  1321. --         if wuEcd ~= nil and wuEcd > 1 then lockE = false CastE(myTarget) end
  1322.        
  1323. --       -- volibear
  1324. --       elseif championsT[i] == "Volibear" then
  1325. --         local voRcd = myPlayer:GetSpellData(_R).currentCd
  1326. --         if voRcd ~= nil and voRcd > 1 then lockE = false CastE(myTarget) end
  1327.        
  1328. --       -- yasuo
  1329. --       -- elseif championsT[i] == "Yasuo" then
  1330. --       --   local yaQcd = myPlayer:GetSpellData(_Q).currentCd
  1331. --       --   if yaQcd ~= nil and yaQcd > 1 then lockE = false CastE(myTarget) end
  1332.        
  1333. --       end
  1334. --     else
  1335. --       lockE = false
  1336. --     end
  1337. --   end
  1338. -- end
  1339.  
  1340. -- function Combo(myTarget)
  1341. --   local anti_over = menu.comboextra.others.smart
  1342. --   if anti_over then
  1343. --     if temUltimate then CastSecondR(myTarget) end
  1344. --     lockE = false
  1345. --     DamageCombo(myTarget)                        
  1346. --   else
  1347. --     lockE = false
  1348. --   if temUltimate then CastSecondR(myTarget) end
  1349. --     CastQ(myTarget)
  1350. --     CastE(Target)  
  1351. --     NewCastR(myTarget)
  1352. --   end
  1353. -- end
  1354.  
  1355.  
  1356. local qTimeStart = 0
  1357. local qWind, qAnima = 0
  1358. function OnProcessSpell(unit, spell)
  1359.  
  1360.   --------use---------
  1361.         local useq          =   menu.combo.skills.q
  1362.         local usew          =   menu.combo.skills.w
  1363.         local usee          =   menu.combo.skills.e
  1364.         local user          =   menu.combo.skills.r
  1365.         -------multi skill-------
  1366.         -- local qe_           =   menu.combo.multi.qe
  1367.         -- local ew_           =   menu.combo.multi.ew
  1368.         -- local qr_           =   menu.combo.multi.qr
  1369.         -- local er_           =   menu.combo.multi.er
  1370.         local useItems_     =   menu.comboextra.items
  1371.         local ComboON       =   menu.combo.key
  1372.         local mov_          =   menu.system.mov
  1373.         --local qPacket       =   menu.system.noface
  1374.         local useEvadeee_   =   menu.system.evadeee
  1375.  
  1376.     if unit.isMe then      
  1377.        
  1378.         -------new-----------------
  1379.         --local speed_    = menu.comboextra.speed      
  1380.         if spell.name:lower():find("attack") then
  1381.  
  1382.           --if ComboON and ValidTarget(Target) then CastQ(Target) end
  1383.         --print("PROCESS: AA")          
  1384.             --[[orbwalk]]            
  1385.             lastAttack      = GetTickCount() - GetLatency() / 2
  1386.             lastWindUpTime  = spell.windUpTime * 1000 -- can move
  1387.             lastAttackCD    = spell.animationTime * 1000 -- can attack
  1388.             --print("Wind: "..tostring(spell.windUpTime).." - animation: "..tostring(spell.animationTime).." - Ping: "..tostring(GetLatency() / 2000).."Total: "..tostring((spell.windUpTime/2) + spell.animationTime - GetLatency() / 2000))
  1389.             DelayAction(function() if spell.Target ~= nil then SendQ() end end, (spell.windUpTime/2) + spell.animationTime - GetLatency() / 2000)
  1390.           --print("3) AA")
  1391.           --if ValidTarget(Target) and TargetIsValid(Target) and menu.combo.key and not menu.farm.lasthit then CastQ(Target) end
  1392.             --if ValidTarget(Target) and ComboON and GetDistance(Target) <= 550 and GetDistance(Target) > myPlayer.range then CastSpell(_Q, Target.x, Target.z) end      
  1393.         end      
  1394.         if ComboON and Target ~= nil then
  1395.  
  1396.           if spell.name:lower():find("riventricleave") then
  1397.             --qWind, qAnima = spell.windUpTime, spell.animationTime
  1398.             --print("Q    -     Wind: "..tostring(spell.windUpTime).." - animation: "..tostring(spell.animationTime).." - Ping: "..tostring(GetLatency() / 2000).."Total: "..tostring((spell.windUpTime/2) + spell.animationTime - GetLatency() / 2000))
  1399.             if user then
  1400.               NewCastR(Target)            
  1401.             end
  1402.            
  1403.             if usew then
  1404.               CastW(Target)
  1405.               --if useItems_ then CastCommonItem(Target) end
  1406.             end
  1407.             if usee and not menu.comboextra.others.smart then
  1408.               CastE(Target)
  1409.             end          
  1410.            
  1411.  
  1412.           elseif spell.name:lower():find("rivenmartyr") then
  1413.             if useItems_ then CastCommonItem(Target) end
  1414.          
  1415.           elseif spell.name:lower():find("rivenfeint") then
  1416.             if user and not menu.comboextra.others.smart then
  1417.               --CastSecondR(Target)
  1418.               NewCastR(Target)                
  1419.             end
  1420.             if usew and not menu.comboextra.others.smart then
  1421.                 CastW(Target)
  1422.                 --if useItems_ then CastCommonItem(Target) end
  1423.             end
  1424.           end
  1425.       end
  1426.  
  1427.       if spell.name:lower():find("rivenfengshuiengine") then
  1428.           rTick = GetTickCount() + GetLatency() / 2            
  1429.           if usee and not menu.comboextra.others.smart then
  1430.             CastE(Target)
  1431.           end
  1432.       end
  1433.     end
  1434.  
  1435.     if spell.name:lower():find("riventricleave") then        
  1436.       qTimeStart = GetTickCount()
  1437.     end
  1438.     -- if ComboON and Target ~= nil and not Target.dead and Target.visible and ThisIsReal(Target) <= myPlayer.range then
  1439.     -- myPlayer:Attack(Target)
  1440.     -- end
  1441.     local autoE     = menu.extra.eTurret
  1442.     if autoE and unit.type == "obj_AI_Turret" and spell.target.networkID == myPlayer.networkID and GetDistance(spell.endPos) <= 1000 then
  1443.       lockE = false
  1444.       CastSpell(_E, mousePos.x, mousePos.z)
  1445.       lockE = true
  1446.     end
  1447.       -- champion name and spell name
  1448.     spellsTable = {
  1449.     ["Aatrox"] = "AatroxE", ["Caitlyn"] = "CaitlynAceintheHole", ["Chogath"] = "Rupture" ,["Darius"] = "DariusAxeGrabCone", ["Elise"] = "EliseHumanE",
  1450.     ["Garen"] = "GarenE", ["Jax"] = "JaxLeapStrike", ["Kayle"] = "JudicatorReckoning", ["Nasus"] = "NasusW",
  1451.     ["Renekton"] = "RenektonSliceAndDice", ["Tryndamere"] = "slashCast", ["Trundle"] = "trundledesecrate", ["MonkeyKing"] = "MonkeyKingDoubleAttack", ["MonkeyKing"] = "MonkeyKingNimbus",
  1452.     ["Fiddlesticks"] = "Crowstorm", ["Fiddlesticks"] = "DrainChannel", ["Galio"] = "GalioIdolOfDurand", ["Katarina"] = "KatarinaR", ["MissFortune"] = "MissFortuneBulletTime", ["Nunu"] = "AbsoluteZero", ["Malzahar"] = "AlZaharNullZone"}
  1453.   if menu.comboextra.others.evadeeE then
  1454.     if useEvadeee_ and myPlayer:CanUseSpell(_E) == READY and _G.Evadeee or _G.Evadeee_impossibleToEvade then
  1455.       if ValidTarget(unit) then
  1456.         for ChampionName, Spell_Champs in pairs(spellsTable) do -- E delay = -0.101
  1457.           if unit.charName == ChampionName and spell.name == Spell_Champs and spell.endPos == myPlayer.pos and GetDistance(unit) <= 700 then
  1458.             CastSpell(_E, mousePos.x, mousePos.z)
  1459.           end
  1460.         end
  1461.       end
  1462.     else
  1463.        if myPlayer:CanUseSpell(_E) == READY and ValidTarget(unit) then
  1464.         for ChampionName, Spell_Champs in pairs(spellsTable) do -- E delay = -0.101
  1465.           if unit.charName == ChampionName and spell.name == Spell_Champs and spell.endPos == myPlayer.pos and GetDistance(unit) <= 700 then
  1466.             CastSpell(_E, mousePos.x, mousePos.z)
  1467.           end
  1468.         end
  1469.       end
  1470.     end
  1471.    end
  1472. end
  1473.  
  1474. function JumpQ()
  1475.     local From, To, CastPos = ReturnDrawPoint()
  1476.     if qCount == 0 then  
  1477.      CastSpell(_Q, mousePos.x, mousePos.z)
  1478.        qTick = GetTickCount() + GetLatency()/2
  1479.     elseif (From and To and CastPos ~= nil) and GetDistance(myPlayer, CastPos) <= 100 then
  1480.         myPlayer:MoveTo(CastPos.x, CastPos.z)
  1481.         if myPlayer.pos.x == CastPos.x and myPlayer.pos.z == CastPos.z then        
  1482.           CastSpell(_Q, CastPos.x, CastPos.z)
  1483.         end
  1484.     end
  1485.     if qCount == 2 and GetTickCount() + GetLatency() / 2 - qTick > 4000 then
  1486.         CastSpell(_Q, mousePos.x, mousePos.z)
  1487.     end
  1488.     if GetDistance(mousePos) > 150 then
  1489.     local moveToPos = myPlayer + (Vector(mousePos) - myPlayer):normalized()* 150
  1490.       myPlayer:MoveTo(moveToPos.x, moveToPos.z)
  1491.   end    
  1492. end
  1493.  
  1494. function BurnYouShit(myTarget)  
  1495.     local useI  =   menu.comboextra.others.ignite
  1496.     local slot_ =   IgniteSpell.slot
  1497.     if useI and slot_ ~= nil and myPlayer:CanUseSpell(slot_) == READY and GetDistance(myTarget, myPlayer) <= IgniteSpell.range and not TargetHaveBuff(IgniteSpell.spellSlot, myTarget) then
  1498.         local iDmg  =   getDmg("IGNITE", myTarget, myPlayer, myPlayer.level)
  1499.         if myTarget.health <= iDmg then
  1500.             CastSpell(slot_, myTarget)
  1501.         end
  1502.     end
  1503. end
  1504.  
  1505. function LineFarm()  
  1506.     local delay_         =   menu.farm.extrafarm.delay
  1507.     local myOrb          =   menu.system.orb    
  1508.     local items_0        =   menu.comboextra.items
  1509.     local mode_          =   menu.farm.extrafarm.lanemode
  1510.     local qLane_         =   menu.farm.extrafarm.qlane
  1511.     local wLane_         =   menu.farm.extrafarm.wlane
  1512.     local eLane_         =   menu.farm.extrafarm.elane  
  1513.     --local enemyMinions      =   minionManager(MINION_ENEMY, 875, myPlayer, MINION_SORT_HEALTH_ASC)
  1514.    
  1515.     --if JungleLaneMinion == nil then
  1516.       enemyMinions1:update()
  1517.       Jungle:update()
  1518.     --end
  1519.  
  1520.     JungleLaneMinion = enemyMinions1.objects[1] or Jungle.objects[1]
  1521.    
  1522.  
  1523.    
  1524.     if JungleLaneMinion ~= nil and not JungleLaneMinion.dead then
  1525.      if mode_ == 2 and GetTickCount() + GetLatency() / 2 > lTick then myPlayer:Attack(JungleLaneMinion) CastCommonItem(JungleLaneMinion) end                  
  1526.         if qLane_ and GetDistance(JungleLaneMinion, myPlayer) <= 550 and not Passive then
  1527.             tock = GetTickCount() + GetLatency()/2
  1528.             CastSpell(_Q, JungleLaneMinion.visionPos.x, JungleLaneMinion.visionPos.z)
  1529.             --CastSpell(_Q, JungleLaneMinion.visionPos.x, JungleLaneMinion.visionPos.z)        
  1530.         elseif qLane_ and GetTickCount() + GetLatency()/2 - tock > 1250 then
  1531.             tock = GetTickCount() + GetLatency()/2
  1532.             CastSpell(_Q, JungleLaneMinion.visionPos.x, JungleLaneMinion.visionPos.z)        
  1533.         end
  1534.         if eLane_ then
  1535.             CastSpell(_E, JungleLaneMinion.visionPos.x, JungleLaneMinion.visionPos.z)
  1536.         end
  1537.         if wLane_ and GetDistance(JungleLaneMinion, myPlayer) <= 280 then CastSpell(_W) end
  1538.         --CastCommonItem(minionLane)      
  1539.          --if mode == 2 then myPlayer:Attack(minionLane) end
  1540.     end
  1541.     if mode_ == 2 and GetTickCount() + GetLatency() / 2 > lTick and myOrb and JungleLaneMinion == nil then
  1542.       myPlayer:MoveTo(mousePos.x, mousePos.z)
  1543.     end
  1544.     if JungleLaneMinion ~= nil and menu.farm.extrafarm.smiteJ then SmiteBuffMob() end
  1545.       -- if mode == 2 and ValidTarget(minionLane) and GetTickCount() + GetLatency() / 2 > lTick then
  1546.       --        myPlayer:Attack(minionLane)
  1547.       --        lTick = GetTickCount() + GetLatency() / 2  + 360 + delay_
  1548.       --    end
  1549.     if myOrb and mode_ == 1 then OrbWalk(JungleLaneMinion) end    
  1550. end
  1551.  
  1552. -- local function FarmWithShield()
  1553. --     local delay_        =   menu.farm.extrafarm.delay
  1554. --     local myOrb       = menu.system.orb
  1555. --     local enemyMinions      =   minionManager(MINION_ENEMY, 550, myPlayer, MINION_SORT_HEALTH_ASC)
  1556. --     enemyMinions:update()
  1557. --     minion = enemyMinions.objects[1]
  1558. --     if GetTickCount() + GetLatency() / 2 > TickTack and myOrb == true then
  1559. --         myPlayer:MoveTo(mousePos.x, mousePos.z)
  1560. --     end    
  1561. --     if ValidTarget(minion) then
  1562. --         local aDmg = getDmg("AD", minion, myPlayer)
  1563. --         if ValidTarget(minion) and minion.health <= aDmg  and EnemyInRange(minion, getTrueRange()) and GetTickCount() + GetLatency() / 2 > TickTack then
  1564. --             CastSpell(_E, minion.x, minion.z)
  1565. --             myPlayer:Attack(minion)
  1566. --             TickTack = GetTickCount() + GetLatency() / 2 + 360 + delay_
  1567. --         end
  1568. --     end
  1569. -- end
  1570.  
  1571. local enemyMinions      =   minionManager(MINION_ENEMY, 550, myPlayer, MINION_SORT_HEALTH_ASC)
  1572. local minion            =   nil
  1573. function FarmChicken()
  1574.     local delay_         =   menu.farm.extrafarm.delay
  1575.     local myOrb          =  menu.system.orb
  1576.     --local enemyMinions      =   minionManager(MINION_ENEMY, 550, myPlayer, MINION_SORT_HEALTH_ASC)
  1577.     enemyMinions:update()
  1578.     minion = enemyMinions.objects[1]
  1579.     if GetTickCount() + GetLatency() / 2 > TickTack and myOrb == true then
  1580.         myPlayer:MoveTo(mousePos.x, mousePos.z)
  1581.     end
  1582.    
  1583.     if ValidTarget(minion) then
  1584.         local aDmg = getDmg("AD", minion, myPlayer)
  1585.         if ValidTarget(minion) and minion.health <= aDmg  and EnemyInRange(minion, getTrueRange()) and GetTickCount() + GetLatency() / 2 > TickTack then
  1586.             myPlayer:Attack(minion)
  1587.             TickTack = GetTickCount() + GetLatency() / 2 + 360 + delay_
  1588.         end
  1589.     end
  1590. end
  1591.  
  1592. function SmiteBuffMob()
  1593.   local slot_   = SmiteSpell.slot
  1594.   if slot_ == nil then return end
  1595.  
  1596.   local Mobs    = {"worm", -- Baron
  1597.           "dragon", -- Dragon
  1598.           "ancientgolem",
  1599.           "lizardelder",
  1600.           "giantwolf",
  1601.           "greatwraith",
  1602.           --"wraith",
  1603.           "golem",
  1604.           "spiderboss",
  1605.           "ngolem",
  1606.           "nwolf",
  1607.           "nwraith"}
  1608.   local jungle  = minionManager(MINION_JUNGLE, 750, myPlayer, MINION_SORT_MAXHEALTH_DEC)
  1609.   jungle:update()
  1610.   local mob     = jungle.objects[1]
  1611.   if ValidTarget(mob) then
  1612.     for i=1, #Mobs do
  1613.       if mob.charName:lower():find(Mobs[i]) then
  1614.         local smiteDmg  = math.max(20*myPlayer.level+370,30*myPlayer.level+330,40*myPlayer.level+240,50*myPlayer.level+100)
  1615.         if mob.health <= smiteDmg and GetDistance(mob) <= 750 and not mob.dead then
  1616.           CastSpell(slot_, mob)
  1617.         end
  1618.       end
  1619.     end
  1620.   end
  1621. end
  1622.  
  1623. -- local Jungle        = minionManager(MINION_JUNGLE, 550, myPlayer, MINION_SORT_MAXHEALTH_DEC)
  1624. -- local Minion        = nil
  1625. -- function JungleBitch()
  1626. --   local KillMobs      =   menu.farm.clearjungle
  1627. --   if not KillMobs then return end
  1628. --   --local Jungle        = minionManager(MINION_JUNGLE, 550, myPlayer, MINION_SORT_MAXHEALTH_DEC)
  1629.    
  1630. --     local mode_         =   menu.farm.extrafarm.junglemode
  1631. --     local useq          =   menu.farm.extrafarm.q
  1632. --     local usew          =   menu.farm.extrafarm.w
  1633. --     local usee          =   menu.farm.extrafarm.e  
  1634. --     local delay_        =   menu.farm.extrafarm.delay    
  1635. --     local myOrb         =   menu.system.orb
  1636. --     local qDelay_       =   menu.farm.extrafarm.qdelay
  1637. --     local wDelay_       =   menu.farm.extrafarm.wdelay
  1638. --     local eDelay_       =   menu.farm.extrafarm.edelay
  1639.    
  1640. --     Jungle:update()
  1641. --     -- if GetTickCount() + GetLatency() / 2 > jTick and myOrb == true then
  1642. --     --     myPlayer:MoveTo(mousePos.x, mousePos.z)
  1643. --     -- end
  1644. --     Minion = Jungle.objects[1]
  1645. --     if ValidTarget(Minion) then
  1646. --       if mode_ == 2 then myPlayer:Attack(Minion) end
  1647. --         if useq and not Passive then
  1648. --            DelayAction(function() if ValidTarget(Minion) then CastSpell(_Q, Minion.x, Minion.z) end end, qDelay_)
  1649. --         end
  1650. --         if usee then
  1651. --             DelayAction(function() if ValidTarget(Minion) then CastSpell(_E, Minion.x, Minion.z) end end, eDelay_)
  1652. --         end
  1653. --         if usew and GetDistance(Minion, myPlayer) <= 282 and not Passive then
  1654. --             DelayAction(function() CastSpell(_W) end, wDelay_)
  1655. --         end
  1656. --         CastCommonItem(Minion)                    
  1657. --     end
  1658. --     if GetTickCount() + GetLatency() / 2 > jTick and myOrb == true and mode_ == 2 and not ValidTarget(Minion) then
  1659. --       myPlayer:MoveTo(mousePos.x, mousePos.z)
  1660. --     end  
  1661. --     if myOrb and mode_ == 1 then OrbWalk(Minion) end  
  1662. -- end
  1663.  
  1664. function SidaMMA()
  1665.   local ComboON          =    menu.combo.key
  1666.   local FarmChicken_     =    menu.farm.lasthit
  1667.   local LineFarm_        =    menu.farm.lineclear
  1668.   --local farmShiels       =    menu.farm.shieldfarm
  1669.   local Integration      =    menu.system.sida
  1670.   local myOrb            =    menu.system.orb
  1671.   local sac              =    _G.AutoCarry
  1672.   local mma              =    _G.MMA
  1673.   --if ComboON or FarmChicken_ or LineFarm_ or farmShiels then
  1674.     if Integration and menu.system.orb then
  1675.       if mma_Loaded then
  1676.         --myOrb = false
  1677.         mma_Orbwalker = false
  1678.         mma_AbleToMove = false
  1679.         mma_AttackAvailable = false
  1680.       elseif sac then
  1681.         if sac.Keys.AutoCarry then
  1682.           sac.CanMove = false
  1683.           sac.CanAttack = false
  1684.         else
  1685.           sac.CanMove = true
  1686.           sac.CanAttack = true
  1687.         end
  1688.         --myOrb = false
  1689.         --if _G.AutoCarry.Combo then _G.AutoCarry.CanAttack = false _G.AutoCarry.CanMove = false else _G.AutoCarry.CanAttack = true _G.AutoCarry.CanMove = true end    
  1690.       end
  1691.     else
  1692.       myOrb = true
  1693.       if mma_Loaded then              
  1694.        myOrb = true
  1695.       elseif sac then
  1696.        myOrb = true
  1697.       end
  1698.     end
  1699.   --end  
  1700. end
  1701.  
  1702. function TargetIsValid(myTarget)
  1703.     return myTarget.type == "obj_AI_Hero" and myTarget.type ~= "obj_AI_Turret" and myTarget.type ~= "obj_AI_Minion" and not TargetHaveBuff("UndyingRage", myTarget) and not TargetHaveBuff("JudicatorIntervention", myTarget)
  1704. end
  1705.  
  1706. function F5Target()
  1707. -- if not _ENV[r({107,101,107,118,97,108,56,51,52})] then return end -- this is easily overridden just fyi, make sure you have important init stuff in kek4
  1708.  
  1709.   local range_                = menu.comboextra.others.targetrange
  1710.   local integration_ = menu.system.sida
  1711.  
  1712.   if Selector_menu and _G.Selector_Enabled then return Selector.GetTarget(nil, nil, range_) end
  1713.  
  1714.   if integration_ then
  1715.     if _G.MMA_Loaded or _G.AutoCarry then
  1716.       if _G.MMA_Target and _G.MMA_Target.type == myPlayer.type then return _G.MMA_Target end
  1717.       if _G.AutoCarry and _G.AutoCarry.Crosshair and _G.AutoCarry.Attack_Crosshair and _G.AutoCarry.Attack_Crosshair.target and _G.AutoCarry.Attack_Crosshair.target.type == myPlayer.type then return _G.AutoCarry.Attack_Crosshair.target end
  1718.     end
  1719.   end
  1720.  
  1721.  
  1722.     local found                 = false    
  1723.     local inimigos              = nil
  1724.     local Enemy                 = nil  
  1725.     local selectedTarget        = GetTarget()
  1726.     if range_ == 0 then range_  = 850 end
  1727.  
  1728.    
  1729.     --if CountEnemyHeroInRange(range_) == 0 or Enemy ~= nil then return end
  1730.   if menu.system.tsMode == 1 then
  1731.     if selectedTarget == nil then
  1732.         local menor = 0
  1733.         local basedmg   = 100
  1734.         for i, Targets in pairs(GetEnemyHeroes()) do
  1735.             if ValidTarget(Targets, range_) and TargetIsValid(Targets) then        
  1736.                 local myDmg     = (myPlayer:CalcDamage(Targets, 200) or 0)
  1737.                 local finalDmg  = Targets.health / myDmg
  1738.                 if finalDmg < basedmg then
  1739.                   basedmg = finalDmg
  1740.                   menor = i      
  1741.                   Enemy = Targets
  1742.                 end
  1743.                              
  1744.                  --  local distancMouse = GetDistanceSqr(mousePos, Targets)
  1745.                   -- if distancMouse <= 150*150 then
  1746.                  --    Enemy = Targets
  1747.                  --  end                
  1748.               --end
  1749.             end    
  1750.         end
  1751.     end
  1752.  
  1753.     if ValidTarget(selectedTarget) and TargetIsValid(selectedTarget) and GetDistance(selectedTarget) <= range_ then
  1754.       Enemy = selectedTarget
  1755.     end
  1756.   elseif menu.system.tsMode == 2 then
  1757.     ts:update()
  1758.     return ts.target
  1759.   end
  1760.  
  1761.   return Enemy
  1762. end
  1763.  
  1764. local ComboPerDamage  = {}
  1765. local KillText        = nil
  1766. local TextTick        = 0
  1767.  
  1768. function TextDamage(myTarget)
  1769.   local rangeToTarget     =   menu.comboextra.others.targetrange
  1770.   local refres_ = menu.draw.refreshtime
  1771.   if GetTickCount() - GetLatency()/2 - TextTick < (refres_*1000)/200 then return end
  1772.   ------------------------------Get Table with ignite or not
  1773.   if IgniteSpell.slot ~= nil then
  1774.     skillTable  = { "Q", "W", "R", "IGNITE"}
  1775.     skills    = { _Q, _W, _R, IgniteSpell.slot}
  1776.   else
  1777.     skillTable  = { "Q", "W", "R"}
  1778.     skills    = { _Q, _W, _R}
  1779.   end
  1780.   ----------------------------------------------------------
  1781.  
  1782.   --------------------------------------Find spell not in CD
  1783.   local qDmg, wDmg, rDmg, iDmg  = 0, 0 ,0 ,0
  1784.   local TotalDamage         = 0
  1785.   local possible          = {}  
  1786.   for i=1, #skillTable do
  1787.    for a=1, #skills do
  1788.      if i==a and myPlayer:CanUseSpell(skills[a]) == READY then
  1789.        table.insert(possible, skillTable[i])
  1790.      end
  1791.    end
  1792.   end
  1793.   ----------------------------------------------------------
  1794.  
  1795.   ----------------ONLY CALCULATE WHAT IS NOT IN COOLDDOWN
  1796. if ValidTarget(myTarget) and TargetIsValid(myTarget) and GetDistance(myTarget) <= rangeToTarget then
  1797.    if #possible >= 1 then
  1798.     for b=1, #possible do
  1799.       if possible[b] == "Q" then
  1800.         qDmg = (getDmg("Q", myTarget, myPlayer, 1) or 0)
  1801.       end
  1802.       if possible[b] == "W" then
  1803.         wDmg = (getDmg("W", myTarget, myPlayer, 1)  or 0)  
  1804.       end
  1805.       if possible[b] == "R" then      
  1806.         rDmg = (getDmg("R", myTarget, myPlayer, 2) or 0)        
  1807.       end  
  1808.       if possible[b] == "IGNITE" then
  1809.         iDmg = (getDmg("IGNITE", myTarget, myPlayer, myPlayer.level)  or 0)  
  1810.       end
  1811.       possible[b] = nil --clear table  
  1812.     end
  1813.    end
  1814.     --if Items["Tiamat"].slot ~= nil then
  1815.       tDmg = (getDmg("TIAMAT", myTarget, myPlayer) or 0)
  1816.    -- elseif Items["Hg"].slot ~= nil then
  1817.       hDmg = (getDmg("HYDRA", myTarget, myPlayer) or 0)
  1818.    -- end
  1819.  
  1820.   --------------------------------------------------------
  1821.   --pDmg = getDmg("P", myTarget, myPlayer)
  1822.   ----------------- DAMAGE TABLE-----------------------------------------------------
  1823.  
  1824.   -- E -> Hydra or Tiamat -> W -> Q
  1825.   -- E -> Second R -> Q
  1826.   -- E -> Hydra or Tiamat -> Second R -> Q
  1827.  
  1828.   --if ValidTarget(myTarget) and TargetIsValid(myTarget) then
  1829.  
  1830.   ------------SPELLS SOZINHAS------------------
  1831.       if qDmg ~= 0 and wDmg == 0 and rDmg == 0 then
  1832.         if qDmg >= myTarget.health then KillText = "1x(Q) can kill"
  1833.         elseif qDmg*2 >= myTarget.health then KillText = "2x(Q) can kill"
  1834.         elseif qDmg*3 >= myTarget.health then KillText = "3x(Q) can kill" end
  1835.       elseif wDmg ~= 0 and qDmg == 0 and rDmg == 0 then
  1836.         if wDmg >= myTarget.health then KillText = "(W) can kill" end
  1837.       elseif rDmg ~= 0 and qDmg == 0 and wDmg == 0 then
  1838.         if rDmg >= myTarget.health then KillText = "(R) can kill" end
  1839.  
  1840.   -----------------------------------------------
  1841.  
  1842.       elseif qDmg ~= 0 and wDmg ~= 0 and rDmg == 0 then
  1843.         if qDmg + wDmg >= myTarget.health then KillText = "(Q) + (W) can kill" end
  1844.  
  1845.  
  1846.       elseif qDmg ~= 0 and wDmg ~= 0 and rDmg ~= 0 then
  1847.         if qDmg + wDmg + rDmg >= myTarget.health then KillText = "(Q) + (W) + (R)"
  1848.         elseif qDmg + rDmg >= myTarget.health then KillText = "(Q) + (R) can kill" end
  1849.  
  1850.  
  1851.       elseif qDmg ~= 0 and wDmg ~= 0 and rDmg ~= 0 and myPlayer:CanUseSpell(_E) == READY and Items["Tiamat"].slot ~= nil or Items["Hg"].slot ~= nil then
  1852.         if tDmg + hDmg + wDmg + qDmg >= myTarget.health then KillText = "(E) + Item + (W) + (Q)"
  1853.         elseif tDmg + hDmg + rDmg + qDmg >= myTarget.health then KillText = "(E) + Item + (R) + (Q)" end
  1854.  
  1855.      
  1856.       elseif qDmg ~= 0 and iDmg ~= 0 and wDmg == 0 and rDmg == 0 then
  1857.          if qDmg + iDmg >= myTarget.health then KillText = "(Q) + (I) can kill" end
  1858.  
  1859.  
  1860.       elseif qDmg ~= 0 and wDmg ~= 0 and iDmg ~= 0 then
  1861.         if qDmg + wDmg + iDmg >= myTarget.health then KillText = "(Q) + (W) + (I)" end
  1862.  
  1863.  
  1864.       elseif qDmg ~= 0 and rDmg ~= 0 and iDmg ~= 0 and wDmg == 0 then
  1865.         if qDmg + rDmg + iDmg >= myTarget.health then KillText = "(Q) + (R) + (I)"
  1866.         elseif rDmg + iDmg >= myTarget.health then KillText = "(R) + (I) can kill" end
  1867.        
  1868.        
  1869.       elseif qDmg ~= 0 and wDmg ~= 0 and rDmg ~= 0 then      
  1870.         if qDmg + wDmg + rDmg + iDmg >= myTarget.health then KillText = "(All IN)" end
  1871.       else    
  1872.         KillText = "Harass"
  1873.       end
  1874.      
  1875.              
  1876.      
  1877.       -- if wDmg + rDmg >= myTarget.health then KillText = "(W) + (R) can kill"
  1878.       -- elseif wDmg + iDmg >= myTarget.health then KillText = "(W) + (I) can kill" end
  1879.        
  1880.      
  1881.  
  1882.       -- elseif wDmg + rDmg + iDmg >= myTarget.health then KillText = "(W) + (R) + (I) can kill"      
  1883.      
  1884.    
  1885.   --end if myTarget.health == myTarget.maxHealth then KillText = "Harass"
  1886.  
  1887. end
  1888.   ------------------------------------------------------------------------------------
  1889.  
  1890.   --if qDmg+wDmg+rDmg+iDmg < myTarget.health then KillText = "H" end
  1891.   --if iDmg >= myTarget.health and myPlayer:GetSpellData(_Q).currentCd > 1.5 and myPlayer:GetSpellData(_W).currentCd > 1.5 and myPlayer:GetSpellData(_R).currentCd > 1.5 then lockIgnite = false KillText = "(I) can kill" BurnYouShit(myTarget) end
  1892.   TextTick = GetTickCount() - GetLatency()/2
  1893. end
  1894.  
  1895. -- local TextTest = 0
  1896. -- function DamageWithFirstR(myTarget)
  1897. --   if not ValidTarget(myTarget) and not TargetIsValid(myTarget) then return end
  1898. --   local qDamage                       = {30, 90, 150, 210, 270} -- q damage per level
  1899. --   local qRatio                        = {0.4, 0.45, 0.5, 0.55, 0.6} -- q ratio per level %ad
  1900. --   local wDamage                       = {50, 80, 110, 140, 170} -- w damage per level
  1901. --   local wRatio                        = myPlayer.totalDamage -- 100% of attack damage
  1902. --   local r1DamageRatio                 = 0.2*myPlayer.totalDamage -- 20% of attack damage
  1903. --   --local skillTable                    = {"Q", "W", "R"}
  1904. --   local abilityTable                  = {_Q, _W, _R}
  1905. --   local canUseAbility                 = {}
  1906. --   local qDmg, wDmg, rDmg, finalDamage = 0, 0, 0, 0
  1907. --   --for a=1, #skillTable do
  1908. --     for b=1, #abilityTable do
  1909. --       if a==b and myPlayer:CanUseSpell(abilityTable[b]) then
  1910. --         table.insert(canUseAbility, skillTable[b])
  1911. --       end
  1912. --     end
  1913. --   --end
  1914.  
  1915. --   --if #canUseAbility > 0 then
  1916. --     for a=1, #canUseAbility do
  1917. --       if canUseAbility[a] == _Q then -- base(ratio) + ultimate buff
  1918. --         -- local firstDamage = myPlayer:CalcDamage(myTarget, qDamage[myPlayer:GetSpellData(canUseAbility[a]).lvl]) -- base spell damage X
  1919. --         -- local ratioDamage = firstDamage*qRatio[myPlayer:GetSpellData(canUseAbility[a]).lvl] -------------------- damage with ratio X*%
  1920. --         -- local qDmgWithUlt = (ratioDamage*r1DamageRatio) -------------------------------------------- ultimate buff (x*%)*ultimateBonus
  1921. --         qDmg = getDmg("Q", myTarget, myPlayer)*3 -- base + (baseQ % + ultimateBuffAd %) --------------- X + (X*%) + (X*%)*bonus%
  1922. --         finalDamage = qDmg
  1923. --       end
  1924. --       if canUseAbility[a] == _W then
  1925. --         wDmg = getDmg("W", myTarget, myPlayer)
  1926. --         finalDamage = finalDamage + wDmg
  1927. --       end
  1928. --       if canUseAbility[a] == _R then
  1929. --         rDmg = getDmg("R", myTarget, myPlayer,2)
  1930. --         finalDamage = finalDamage + rDmg
  1931. --       end
  1932. --       -- if canUseAbility[a] == _W then
  1933. --       --   local firstDamage = myPlayer:CalcDamage(myTarget, wDamage[myPlayer:GetSpellData(canUseAbility[a]).lvl])
  1934. --       --   wDmg = firstDamage + (firstDamage*r1DamageRatio)
  1935. --       --   finalDamage = finalDamage + wDmg
  1936. --       -- end
  1937. --       -- if canUseAbility[a] == _R then
  1938. --       --   local aaDmg = myPlayer:CalcDamage(myTarget, myPlayer.addDamage + r1DamageRatio)
  1939. --       --   --local aaDmg = myPlayer.addDamage + r1DamageRatio
  1940. --       --   finalDamage = finalDamage + aaDmg
  1941. --       -- end
  1942. --     end
  1943. --   --end
  1944. --   TextTest = "Dmg: "..math.min(finalDamage)
  1945. --   if finalDamage >= myTarget.health then TextTest = "(All IN with (R))" end
  1946. -- end
  1947.  
  1948.  
  1949. -- E -> Hydra or Tiamat -> W -> Q
  1950. -- E -> Second R -> Q
  1951. -- E -> Hydra or Tiamat -> Second R -> Q
  1952.  
  1953. function DamageCombo(myTarget)
  1954.   if not ValidTarget(myTarget) and not TargetIsValid(myTarget) then return end
  1955.   lockE = false
  1956.   --local qPacket     = menu.system.noface
  1957.   local qDmg = 0
  1958.   qDmg = (getDmg("Q", myTarget, myPlayer) or 0)
  1959.   wDmg = (getDmg("W", myTarget, myPlayer) or 0)
  1960.   rDmg = (getDmg("R", myTarget, myPlayer) or 0)
  1961.    -- if Items["Tiamat"].slot ~= nil then
  1962.       tDmg = (getDmg("TIAMAT", myTarget, myPlayer) or 0)
  1963.    -- elseif Items["Hg"].slot ~= nil then
  1964.       hDmg = (getDmg("HYDRA", myTarget, myPlayer) or 0)
  1965.    -- end
  1966.   --CastE(myTarget)
  1967.   if qDmg*3 >= myTarget.health and GetDistance(myTarget) <= GetCustomRange(_Q) then -- triple Q Spamm
  1968.     lockUltimate = true
  1969.     --lockPacket = true
  1970.     lockIgnite = true
  1971.     if myPlayer:CanUseSpell(_Q) == READY then    
  1972.       Packet('S_CAST', {spellId = _Q, fromX = myTarget.visionPos.x, fromY = myTarget.visionPos.z, toX = myTarget.visionPos.x, toY = myTarget.visionPos.z}):send()
  1973.     else
  1974.       CastSpell(_Q, myTarget.visionPos.x, myTarget.visionPos.z)                      
  1975.     end
  1976.     if qCount >= 2 and not myTarget.dead then lockUltimate = false NewCastR(myTarget) end
  1977.   elseif tDmg + hDmg + wDmg + qDmg >= myTarget.health then -- E -> Hydra or Tiamat -> W -> Q
  1978.     if myPlayer:CanUseSpell(_E) == READY then CastSpell(_E, myTarget.visionPos.x, myTarget.visionPos.x) end    
  1979.     if myPlayer:CanUseSpell(_W) == READY then Packet('S_CAST', {spellId = SPELL_2}):send() CastCommonItem(myTarget) end
  1980.     if myPlayer:CanUseSpell(_Q) == READY then CastSpell(_Q, myTarget.visionPos.x, myTarget.visionPos.z) end
  1981.   elseif rDmg + qDmg >= myTarget.health then -- E -> Second R -> Q
  1982.     if myPlayer:CanUseSpell(_E) == READY then CastSpell(_E, myTarget.visionPos.x, myTarget.visionPos.z) end
  1983.     if temUltimate then CastSpell(_R, myTarget.visionPos.x, myTarget.visionPos.z) else if myPlayer:CanUseSpell(_R) == READY then CastSpell(_R) end end
  1984.     if myPlayer:CanUseSpell(_Q) == READY then CastSpell(_Q, myTarget.visionPos.x, myTarget.visionPos.z) end
  1985.   elseif tDmg + hDmg + rDmg + qDmg >= myTarget.health then -- E -> Hydra or Tiamat -> Second R -> Q
  1986.     if myPlayer:CanUseSpell(_E) == READY then CastSpell(_E, myTarget.visionPos.x, myTarget.visionPos.z)  CastCommonItem(myTarget) end    
  1987.     if temUltimate then CastSpell(_R, myTarget.x, myTarget.z) else if myPlayer:CanUseSpell(_R) == READY then Packet('S_CAST', {spellId = SPELL_4}):send() end end
  1988.    if myPlayer:CanUseSpell(_Q) == READY then CastSpell(_Q, myTarget.visionPos.x, myTarget.visionPos.z) end
  1989.   elseif qDmg == 0 or qDmg*3 < myTarget.health then -- Normal Cast if no combo found    
  1990.     CastQ(myTarget)
  1991.     NewCastR(myTarget)
  1992.     if myPlayer:CanUseSpell(_Q) == COOLDOWN then
  1993.       CastE(myTarget)
  1994.       CastW(myTarget)
  1995.     end
  1996.     --CastCommonItem(myTarget)
  1997.   end  
  1998. end
  1999.  
  2000. function NormalCombo(myTarget)
  2001.   local anti_over = menu.comboextra.others.smart
  2002.  
  2003.   -- if menu.comboextra.others.combatAssist then ComboByChampion(myTarget)
  2004.   --   if anti_over then
  2005.   --     if temUltimate then CastSecondR(myTarget) end
  2006.   --     DamageCombo(myTarget)                        
  2007.   --   else
  2008.   --     if temUltimate then CastSecondR(myTarget) end
  2009.   --     CastQ(myTarget)  
  2010.   --     NewCastR(myTarget)
  2011.   --   end
  2012.   -- else
  2013.   --if menu.comboextra.others.combatAssist then ComboByChampion(myTarget) end
  2014.   if ValidTarget(myTarget) then
  2015.     if anti_over then
  2016.       --if temUltimate then CastSecondR(myTarget) end
  2017.       DamageCombo(myTarget)
  2018.       --CastE(myTarget)                        
  2019.     else
  2020.       --if temUltimate then CastSecondR(myTarget) end
  2021.       CastQ(myTarget)  
  2022.       NewCastR(myTarget)
  2023.       if myPlayer:CanUseSpell(_Q) == COOLDOWN then
  2024.         CastE(myTarget)
  2025.         CastW(myTarget)
  2026.       end    
  2027.     end
  2028.     --if ThisIsReal(myTarget) <= myPlayer.range then myPlayer:Attack(myTarget)  end
  2029.   end
  2030. end
  2031.  
  2032. function OrbWalk(myTarget)
  2033.     if ValidTarget(myTarget) and ThisIsReal(myTarget) <= myPlayer.range then
  2034.         if timeToShoot() then
  2035.          myPlayer:Attack(myTarget)
  2036.         elseif heroCanMove() then
  2037.             moveToCursor()
  2038.         end
  2039.     else
  2040.         moveToCursor()
  2041.     end
  2042. end
  2043.  
  2044. local function RunRun()
  2045.     if qCount == 0 then
  2046.         CastSpell(_Q, mousePos.x, mousePos.z)
  2047.     end
  2048.     if qCount == 2 then        
  2049.         CastSpell(_E, mousePos.x, mousePos.z)        
  2050.         DelayAction(function() CastSpell(_Q, mousePos.x, mousePos.z) end, 0.75)      
  2051.     end
  2052.     if GetDistance(mousePos) > myPlayer.range then
  2053.         myPlayer:MoveTo(mousePos.x, mousePos.z)
  2054.     end
  2055. end
  2056.  
  2057. function heroCanMove()
  2058.     return ( GetTickCount() + GetLatency() / 2 > lastAttack + lastWindUpTime)
  2059. end
  2060.  
  2061. function timeToShoot()
  2062.   --local ComboON = menu.combo.key
  2063.   --if ComboON and not lockPacket and temSlow then return (GetTickCount() + GetLatency() / 2 > (lastWindUpTime - GetLatency()/2) ) end  
  2064.   return (GetTickCount() + GetLatency() / 2 > lastAttack + lastAttackCD +20)
  2065. end
  2066.  
  2067. function moveToCursor()
  2068.   --local orbsens_  = (menu.system.orbsens)*100
  2069.   --if GetDistance(mousePos) >= 300 then
  2070.     --local moveToPos = myPlayer + (Vector(mousePos) - myPlayer):normalized()*300
  2071.     myPlayer:MoveTo(mousePos.x, mousePos.z)
  2072.   --end  
  2073. end
  2074.  
  2075. local qTime = 0
  2076. function Arredondar(num, idp)
  2077.  return string.format("%." .. (idp or 0) .. "f", num)
  2078. end
  2079. function OnTick()
  2080.  
  2081.     if myPlayer.dead then return end
  2082.     CastSurviveItem()
  2083.     local ComboON       =   menu.combo.key
  2084.     local FarmChicken_  =   menu.farm.lasthit
  2085.     local LineFarm_     =   menu.farm.lineclear
  2086.     local myOrb         =   menu.system.orb
  2087.     local jump_         =   menu.extra.jump
  2088.     --local farmShiels    =   menu.farm.shieldfarm
  2089.     local targettext_   =   menu.draw.targettext
  2090.     local runrun_       =   menu.extra.run
  2091.     local ksUl_         =   menu.comboextra.ksultimate
  2092.     local evade_        =   menu.system.evadeee
  2093.     local RealTarget    =   nil
  2094.     local smiteJ_       =   menu.farm.extrafarm.smiteJ
  2095.     local HarassON      =   menu.extra.harass  
  2096.     --local BeSmart     =   menu.combo.extracombo.smart
  2097.     if runrun_ then RunRun() end  
  2098.     RealTarget = F5Target()
  2099.     if ValidTarget(RealTarget) and TargetIsValid(RealTarget) then
  2100.       Target = RealTarget
  2101.       BurnYouShit(Target)
  2102.       --if temUltimate then CastSecondR(Target) end
  2103.       if menu.draw.targettext then TextDamage(Target) end
  2104.      
  2105.       --DamageWithFirstR(Target)
  2106.       --if temUltimate then CastSecondR(Target) end  
  2107.     end
  2108.      if ComboON then      
  2109.         NormalCombo(Target)
  2110.         if myOrb then OrbWalk(Target) end
  2111.      end
  2112.      if HarassON then HarassEnemy(Target) end
  2113.      -- if ComboON then
  2114.      --   if myOrb then OrbWalk(Target) end
  2115.      -- end
  2116.     --if ksUl_ and myPlayer:CanUseSpell(_R) == READY then UltimateKS() end
  2117.     AutoStun()
  2118.    
  2119.     SidaMMA()
  2120.  
  2121.     if FarmChicken_ then FarmChicken() end
  2122.     if LineFarm_ then LineFarm() end
  2123.     --if farmShiels then lockPacket = true FarmWithShield() else lockPacket = false end
  2124.     --JungleBitch()
  2125.    
  2126.     if jump_ then JumpQ() end
  2127.     if not targettext_ then KillText = nil end
  2128.     if myPlayer:CanUseSpell(_Q) ~= READY and GetTickCount() + GetLatency()/2 > countTick + 3000 then qCount = 0 end
  2129.     if temUltimate then lockIgnite = true end
  2130.     if smiteJ_ then SmiteBuffMob() end
  2131.  
  2132.     if myPlayer:CanUseSpell(_Q) == READY and ComboON then
  2133.       qTime = (GetBuffDelay(_Q) - (GetTickCount() - qTimeStart))/1000
  2134.       if qTime < 0 then qTime = 0 end
  2135.     elseif myPlayer:CanUseSpell(_Q) == READY and not ComboON then
  2136.        qTime = (4000 - (GetTickCount() - qTimeStart))/1000
  2137.       if qTime < 0 then qTime = 0 end
  2138.     else
  2139.        qTime = myPlayer:GetSpellData(_Q).currentCd
  2140.        lockQ = false
  2141.        --newPos = nil
  2142.     end
  2143.        
  2144. end
  2145.  
  2146. --[[Credits to barasia, vadash and viseversa for anti-lag circles]]--
  2147. local function DrawCircleNextLvl(x, y, z, radius, width, color, chordlength)
  2148.         radius = radius or 300
  2149.         quality = math.max(8,math.floor(180/math.deg((math.asin((chordlength/(2*radius)))))))
  2150.         quality = 2 * math.pi / quality
  2151.         radius = radius*.92
  2152.         local points = {}
  2153.         for theta = 0, 2 * math.pi + quality, quality do
  2154.                 local c = WorldToScreen(D3DXVECTOR3(x + radius * math.cos(theta), y, z - radius * math.sin(theta)))
  2155.                 points[#points + 1] = D3DXVECTOR2(c.x, c.y)
  2156.         end
  2157.         DrawLines2(points, width or 1, color or 4294967295)
  2158. end
  2159.  
  2160. function DrawCircle2(x, y, z, radius, color)
  2161.         local vPos1 = Vector(x, y, z)
  2162.         local vPos2 = Vector(cameraPos.x, cameraPos.y, cameraPos.z)
  2163.         local tPos = vPos1 - (vPos1 - vPos2):normalized() * radius
  2164.         local sPos = WorldToScreen(D3DXVECTOR3(tPos.x, tPos.y, tPos.z))
  2165.         if OnScreen({ x = sPos.x, y = sPos.y }, { x = sPos.x, y = sPos.y })  then
  2166.                 DrawCircleNextLvl(x, y, z, radius, 1, color, 75)        
  2167.         end
  2168. end
  2169.  
  2170. local Points    = nil
  2171. local JumpSpots =
  2172. {
  2173. ['Riven'--[[menu draw]]
  2174.     local qDraw             =       menu.draw.Q
  2175.     local wDraw             =       menu.draw.W
  2176.     local eDraw             =       menu.draw.E
  2177.     local rDraw             =       menu.draw.R
  2178.     local targetDraw        =       menu.draw.target
  2179.     local tEng_             =       menu.draw.targeteng
  2180.     local targettext_       =       menu.draw.targettext
  2181.     local passive_          =       menu.draw.passivecount
  2182.     local spots_            =       menu.draw.spots
  2183.     local from_             =       menu.draw.from
  2184.     local CastPos_          =       menu.draw.castpos
  2185.     local minionJ_          =       menu.draw.minionJ
  2186.     local minionL_          =       menu.draw.minionL
  2187.     local lastHitkey_       =       menu.farm.lasthit
  2188.     local clearjungle_      =       menu.farm.clearjungle
  2189.     local laneClear_        =       menu.draw.minionC
  2190.     local laneclearkey_     =       menu.farm.lineclear
  2191.     local rangeToTarget     =       menu.comboextra.others.targetrange
  2192.     --local damageWithR_      =       menu.draw.damageWithR
  2193.  
  2194.     if qDraw then
  2195.         DrawCircle2(myPlayer.x, myPlayer.y, myPlayer.z, qRange, ARGB(255, 255, 000, 000))
  2196.     end
  2197.     if wDraw then
  2198.         DrawCircle2(myPlayer.x, myPlayer.y, myPlayer.z, wRange, ARGB(255, 000, 255, 000))
  2199.     end
  2200.     if eDraw then
  2201.         DrawCircle2(myPlayer.x, myPlayer.y, myPlayer.z, eRange, ARGB(255, 251, 255, 000))
  2202.     end
  2203.     if rDraw then
  2204.         DrawCircle2(myPlayer.x, myPlayer.y, myPlayer.z, rRange, ARGB(255, 255, 255, 000))
  2205.     end
  2206.  
  2207.     if ValidTarget(Target) and TargetIsValid(Target) and GetDistance(Target) <= rangeToTarget then
  2208.       if targetDraw then
  2209.         for i=0, 3, 1 do
  2210.             DrawCircle2(Target.x, Target.y, Target.z, 80 + i , ARGB(255, 255, 000, 255))              
  2211.         end
  2212.       end
  2213.       if tEng_ then
  2214.         local rangeToShow = math.max(GetCustomRange(_Q), GetCustomRange(_E))
  2215.         DrawCircle2(Target.x, Target.y, Target.z, rangeToShow , ARGB(255, 255, 000, 000))
  2216.       end    
  2217.       if targettext_ and KillText ~= nil then      
  2218.          DrawText3D(KillText, Target.x, Target.y, Target.z, 26, ARGB(255,255,255,000), true)
  2219.       end
  2220.       -- if damageWithR_ and TextTest ~= 0 then
  2221.       --   DrawText3D(tostring(TextTest), myPlayer.x, myPlayer.y, myPlayer.z, 26, ARGB(255, 000, 000, 255), true)
  2222.       -- end
  2223.     end
  2224. -- x-200, y*600
  2225.     if passive_ then      
  2226.         --if x or y == 0 then
  2227.          
  2228.           -- print("x: "..tostring(x)) -- 1920
  2229.           -- print("y: "..tostring(y))
  2230.         --end
  2231.           local PassiveTxt = "Passive Counter: "..tostring(PassiveIndicator)
  2232.           DrawText3D(PassiveTxt, myPlayer.x, myPlayer.y, myPlayer.z, 20, ARGB(255,255,255,255), true) --x/2 - 65, y+850
  2233.        
  2234.     end
  2235.  
  2236.     if spots_ then
  2237.         local From, To, CastPos = ReturnDrawPoint()
  2238.         if from_ and To ~= nil then
  2239.             DrawCircle2(To.x, To.y, To.z, 100, ARGB(255, 255, 255, 000))            
  2240.         end
  2241.         if CastPos_ and CastPos ~= nil then
  2242.             DrawCircle2(CastPos.x, CastPos.y, CastPos.z, 120, ARGB(255, 000, 255, 000))
  2243.         end
  2244.     end
  2245.  
  2246.     if JungleLaneMinion  and clearjungle_ and ValidTarget(JungleLaneMinion) then
  2247.       DrawCircle2(JungleLaneMinion .x, JungleLaneMinion .y, JungleLaneMinion .z, 85, ARGB(255, 000, 255, 000))
  2248.     end
  2249.  
  2250.     if minionL_ and lastHitkey_ and ValidTarget(minion) then
  2251.       DrawCircle2(minion.x, minion.y, minion.z, 65, ARGB(255, 000, 255, 000))
  2252.     end
  2253.  
  2254.     if JungleLaneMinion  and laneclearkey_ and ValidTarget(JungleLaneMinion ) then
  2255.       DrawCircle2(JungleLaneMinion .x, JungleLaneMinion .y, JungleLaneMinion .z, 65, ARGB(255, 000, 255, 000))
  2256.     end
  2257.  
  2258.     if menu.draw.qtimer and myPlayer:CanUseSpell(_Q) ~= NOTLEARNED then
  2259.       -- pos = D3DXVECTOR3(myPlayer.minBBox.x,myPlayer.maxBBox.y,myPlayer.maxBBox.z)
  2260.       -- pPos = WorldToScreen(pos)
  2261.  
  2262.       -- msg = string.format("%g / %g / %g",pPos.x,pPos.y,pPos.z)
  2263.       vPos = GetUnitHPBarPos(myPlayer)
  2264.       local Tempo = qTime
  2265.       if Tempo == 0 then
  2266.         Tempo = "READY"
  2267.       else
  2268.         Tempo = Arredondar(qTime, 0).." s"
  2269.       end
  2270.  
  2271.       DrawText("Q: "..Tempo,16,vPos.x,vPos.y,0xFF80FF00)
  2272.       --DrawText(msg,18,pPos.x,pPos.y,0xFF80FF00)
  2273.     end
  2274.  
  2275.     -- if ValidTarget(Target) and newPos ~= nil then
  2276.     --   DrawCircle2(newPos.x, newPos.y, newPos.z, 115, ARGB(255, 000, 255, 000))
  2277.     -- end
  2278.  
  2279. end
Advertisement
Add Comment
Please, Sign In to add comment