Kain2030

XT002-HUD.lua

Jul 31st, 2013
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 71.16 KB | None | 0 0
  1. -- ###################################################################################################### --
  2. -- #                                                                                                    # --
  3. -- #                                               XT002-HUD                                            # --
  4. -- #                                                by Sida                                             # --
  5. -- #                         Credit for original scripts 100% to the original authors!!                 # --
  6. -- #                                                                                                    # --
  7. -- ###################################################################################################### --
  8.  
  9. --[--------- Contains ---------]
  10.  
  11. -- Stun Alert : Created by ikita/eXtragoZ
  12. -- Low Awareness : Created by Ryan, Ported by Manciuszz
  13. -- Simple Minion Marker : Created by Kilua
  14. -- Enemy Tower Range : Created by SurfaceS
  15. -- Hidden Objects : Created by SurfaceS
  16. -- Jungle Display : Created by SurfaceS
  17. -- Champion Ranges : Created by heist, ported by Mistal
  18. -- Ward Prediction : Created by eXtragoZ
  19.  
  20. -- ############################################# LOW AWARENESS ##############################################
  21.  
  22. local alertActive = true
  23. local championTable = {}
  24. local playerTimer = {}
  25. local playerDrawer = {}
  26. local player = GetMyHero()
  27. --showErrorsInChat = false
  28. --showErrorTraceInChat = false
  29.  
  30. nextTick = 0 function LowAwarenessOnTick()   if nextTick > GetTickCount() then return end   nextTick = GetTickCount() + 250 --(100 is the delay)    
  31.     local tick = GetTickCount()
  32.     if alertActive == true then
  33.         for i = 1, heroManager.iCount, 1 do
  34.         local object = heroManager:getHero(i)
  35.             if object.team ~= player.team and object.dead == false then
  36.                 if object.visible == true and player:GetDistance(object) < 2500 then
  37.                     if playerTimer[i] == nil then
  38.                         PrintChat(string.format("<font color='#FF0000'> >> ALERT: %s</font>", object.charName))
  39.                         PingSignal(PING_FALLBACK,object.x,object.y,object.z,2)
  40.                         PingSignal(PING_FALLBACK,object.x,object.y,object.z,2)
  41.                         PingSignal(PING_FALLBACK,object.x,object.y,object.z,2)
  42.                         table.insert(championTable, object )
  43.                         playerDrawer[i] = tick
  44.                     end
  45.                     playerTimer[ i ] = tick
  46.                     if (tick - playerDrawer[i]) > 5000 then
  47.                         for ii, tableObject in ipairs(championTable) do
  48.                             if tableObject.charName == object.charName then
  49.                                 table.remove(championTable, ii)
  50.                             end
  51.                         end
  52.                     end
  53.                 else
  54.                     if playerTimer[i] ~= nil and (tick - playerTimer[i]) > 10000 then
  55.                         playerTimer[i] = nil
  56.                         for ii, tableObject in ipairs(championTable) do
  57.                             if tableObject.charName == object.charName then
  58.                                 table.remove(championTable, ii)
  59.                             end
  60.                         end
  61.                     end
  62.                 end
  63.             end
  64.         end
  65.     end
  66. end
  67.  
  68.  
  69.  
  70. function LowAwarenessOnDraw()
  71.     for i,tableObject in ipairs(championTable) do
  72.        if tableObject.visible and tableObject.dead == false and tableObject.team ~= player.team then
  73.             for t = 0, 1 do
  74.                 DrawCircle(tableObject.x, tableObject.y, tableObject.z, 1250 + t*0.25, 0xFFFF0000)
  75.             end
  76.        end
  77.     end
  78. end
  79.  
  80. -- ############################################# LOW AWARENESS ##############################################
  81.  
  82. -- ############################################# STUN ALERT ################################################
  83.  
  84. --[[
  85. Stun Alert v1.4 by eXtragoZ
  86.  
  87.     Checks the number of CC off-cooldown that could disrupt channels: silences, knockbacks, stuns, and suppression
  88.    
  89.     Features:
  90.         - Sphere marker for champions with CC
  91.         - The sphere is thicker depending on how much CC has the enemy
  92.         - Script will print the number of champions that currently has a CC and the number of CC
  93.         - You can move it with shift + mouse
  94.    
  95.     Types of CC:
  96.         - Hard CC (disrupt the channelling)
  97.             - Airborne
  98.                 - Knockback
  99.                 - Knockup
  100.                 - Pull/Fling
  101.             - Forced Action
  102.                 - Charm
  103.                 - Fear
  104.                 - Flee
  105.                 - Taunt
  106.             - Polymorph
  107.             - Silence
  108.             - Stun
  109.             - Suppression
  110.         - Soft CC
  111.             - Blind
  112.             - Entangle
  113.             - Slow
  114.             - Snare
  115.             - Wall
  116. ]]
  117. local basicthickness = 10
  118. local radius = 60
  119. local tablex = 550
  120. local tabley = 645
  121. local UIHK = 16 --shift
  122. local moveui = false
  123. --[[        Code        ]]
  124. PrintChat(" >> Stun alert v1.4 loaded!")
  125. function StunAlertOnDraw()
  126.     local stunChamps = 0
  127.     local amountCC = 0
  128.     for i=1, heroManager.iCount do
  129.         local target = heroManager:GetHero(i)
  130.         if target.team ~= myHero.team and not target.dead then
  131.             local targetCC = GetTargetCC("HardCC",target)
  132.             if targetCC > 0 then
  133.                 stunChamps = stunChamps+1
  134.                 amountCC = amountCC+targetCC
  135.                 if target.visible then
  136.                     thickness = basicthickness*targetCC
  137.                     for j=1, thickness do
  138.                         local ycircle = (j*(radius/thickness*2)-radius)
  139.                         local r = math.sqrt(radius^2-ycircle^2)
  140.                         ycircle = ycircle/1.3
  141.                         DrawCircle(target.x, target.y+250+ycircle, target.z, r, 0x00FF00)
  142.                     end
  143.                 end
  144.             end
  145.         end
  146.     end
  147.     if moveui then tablex,tabley = GetCursorPos().x-40,GetCursorPos().y-15 end
  148.  
  149.     if KCConfig.StunAlertSummary then
  150.         DrawText("Hard CC: "..amountCC, 20, tablex, tabley, 0xFFFFFF00)
  151.         DrawText("CC champions: "..stunChamps, 20, tablex, tabley+15, 0xFFFFFF00)
  152.     end
  153. end
  154. function GetTargetCC(typeCC,target)
  155.     local HardCC, Airborne, Charm, Fear, Taunt, Polymorph, Silence, Stun, Suppression = 0, 0, 0, 0, 0, 0, 0, 0, 0
  156.     local SoftCC, Blind, Entangle, Slow, Snare, Wall = 0, 0, 0, 0, 0, 0
  157.     local targetName = target.charName
  158.     local annieStun = nil
  159.     local QREADY = (target:CanUseSpell(_Q) == 3)
  160.     local WREADY = (target:CanUseSpell(_W) == 3)
  161.     local EREADY = (target:CanUseSpell(_E) == 3)
  162.     local RREADY = (target:CanUseSpell(_R) == 3)
  163.     if targetName == "Ahri" then
  164.         if EREADY then
  165.             HardCC = HardCC+1
  166.             Charm = Charm+1
  167.         end
  168.     elseif targetName == "Akali" then
  169.         if WREADY then
  170.             SoftCC = SoftCC+1
  171.             Slow = Slow+1
  172.         end
  173.     elseif targetName == "Alistar" then
  174.         if QREADY then
  175.             HardCC = HardCC+1
  176.             Airborne = Airborne+1
  177.         end
  178.         if WREADY then
  179.             HardCC = HardCC+1
  180.             Airborne = Airborne+1
  181.         end
  182.     elseif targetName == "Amumu" then
  183.         if QREADY then
  184.             HardCC = HardCC+1
  185.             Stun = Stun+1
  186.         end
  187.         if RREADY then
  188.             SoftCC = SoftCC+1
  189.             Entangle = Entangle+1
  190.         end
  191.     elseif targetName == "Anivia" then
  192.         if QREADY then
  193.             HardCC = HardCC+1
  194.             Stun = Stun+1
  195.             SoftCC = SoftCC+1
  196.             Slow = Slow+1
  197.         end
  198.         if WREADY then
  199.             SoftCC = SoftCC+1
  200.             Wall = Wall+1
  201.         end
  202.         if RREADY then
  203.             SoftCC = SoftCC+1
  204.             Slow = Slow+1
  205.         end
  206.     elseif targetName == "Annie" then
  207.         if annieStun ~= nil and annieStun.valid and target:GetDistance(annieStun) <= 100 then
  208.             HardCC = HardCC+1
  209.             Stun = Stun+1
  210.         end
  211.     elseif targetName == "Ashe" then
  212.         if QREADY then
  213.             SoftCC = SoftCC+1
  214.             Slow = Slow+1
  215.         end
  216.         if RREADY then
  217.             HardCC = HardCC+1
  218.             Stun = Stun+1
  219.             SoftCC = SoftCC+1
  220.             Slow = Slow+1
  221.         end
  222.     elseif targetName == "Blitzcrank" then
  223.         if QREADY then
  224.             HardCC = HardCC+1
  225.             Airborne = Airborne+1
  226.         end
  227.         if EREADY then
  228.             HardCC = HardCC+1
  229.             Airborne = Airborne+1
  230.         end
  231.         if RREADY then
  232.             HardCC = HardCC+1
  233.             Silence = Silence+1
  234.         end
  235.     elseif targetName == "Brand" then
  236.         if QREADY then
  237.             HardCC = HardCC+1
  238.             Stun = Stun+1
  239.         end
  240.     elseif targetName == "Caitlyn" then
  241.         if WREADY then
  242.             SoftCC = SoftCC+1
  243.             Snare = Snare+1
  244.         end
  245.         if EREADY then
  246.             SoftCC = SoftCC+1
  247.             Slow = Slow+1
  248.         end
  249.     elseif targetName == "Cassiopeia" then
  250.         if WREADY then
  251.             SoftCC = SoftCC+1
  252.             Slow = Slow+1
  253.         end
  254.         if RREADY then
  255.             HardCC = HardCC+1
  256.             Stun = Stun+1
  257.             SoftCC = SoftCC+1
  258.             Slow = Slow+1
  259.         end
  260.     elseif targetName == "Chogath" then
  261.         if QREADY then
  262.             HardCC = HardCC+1
  263.             Airborne = Airborne+1
  264.             SoftCC = SoftCC+1
  265.             Slow = Slow+1
  266.         end
  267.         if WREADY then
  268.             HardCC = HardCC+1
  269.             Silence = Silence+1
  270.         end
  271.     elseif targetName == "Darius" then
  272.         if WREADY then
  273.             SoftCC = SoftCC+1
  274.             Slow = Slow+1          
  275.         end
  276.         if EREADY then
  277.             HardCC = HardCC+1
  278.             Airborne = Airborne+1
  279.         end
  280.     elseif targetName == "Diana" then
  281.         if EREADY then
  282.             HardCC = HardCC+1
  283.             Airborne = Airborne+1
  284.             SoftCC = SoftCC+1
  285.             Slow = Slow+1
  286.         end
  287.     elseif targetName == "DrMundo" then
  288.         if QREADY then
  289.             SoftCC = SoftCC+1
  290.             Slow = Slow+1
  291.         end
  292.     elseif targetName == "Draven" then
  293.         if EREADY then
  294.             HardCC = HardCC+1
  295.             Airborne = Airborne+1
  296.             SoftCC = SoftCC+1
  297.             Slow = Slow+1
  298.         end
  299.     elseif targetName == "Elise" then
  300.         if EREADY and target:GetSpellData(_E).name == "EliseHumanE" then
  301.             HardCC = HardCC+1
  302.             Stun = Stun+1
  303.         end
  304.     elseif targetName == "Evelynn" then
  305.         if RREADY then
  306.             SoftCC = SoftCC+1
  307.             Slow = Slow+1          
  308.         end
  309.     elseif targetName == "FiddleSticks" then
  310.         if QREADY then
  311.             HardCC = HardCC+1
  312.             Fear = Fear+1
  313.         end
  314.         if EREADY then
  315.             HardCC = HardCC+1
  316.             Silence = Silence+1
  317.         end
  318.     elseif targetName == "Fizz" then
  319.         if EREADY then
  320.             SoftCC = SoftCC+1
  321.             Slow = Slow+1  
  322.         end
  323.         if RREADY then
  324.             HardCC = HardCC+1
  325.             Airborne = Airborne+1
  326.             SoftCC = SoftCC+1
  327.             Slow = Slow+1
  328.         end
  329.     elseif targetName == "Galio" then
  330.         if QREADY then
  331.             SoftCC = SoftCC+1
  332.             Slow = Slow+1          
  333.         end
  334.         if RREADY then
  335.             HardCC = HardCC+1
  336.             Taunt = Taunt+1        
  337.         end
  338.     elseif targetName == "Gangplank" then
  339.         SoftCC = SoftCC+1
  340.         Slow = Slow+1  
  341.         if RREADY then
  342.             SoftCC = SoftCC+1
  343.             Slow = Slow+1  
  344.         end
  345.     elseif targetName == "Garen" then
  346.         if QREADY then
  347.             HardCC = HardCC+1
  348.             Silence = Silence+1        
  349.         end
  350.     elseif targetName == "Gragas" then
  351.         if EREADY then
  352.             SoftCC = SoftCC+1
  353.             Slow = Slow+1          
  354.         end
  355.         if RREADY then
  356.             HardCC = HardCC+1
  357.             Airborne = Airborne+1      
  358.         end
  359.     elseif targetName == "Graves" then
  360.         if WREADY then
  361.             SoftCC = SoftCC+1
  362.             Slow = Slow+1          
  363.         end
  364.     elseif targetName == "Hecarim" then
  365.         if EREADY then
  366.             HardCC = HardCC+1
  367.             Airborne = Airborne+1  
  368.         end
  369.         if RREADY then
  370.             HardCC = HardCC+1
  371.             Fear = Fear+1
  372.         end
  373.     elseif targetName == "Heimerdinger" then
  374.         if EREADY then
  375.             HardCC = HardCC+1
  376.             Stun = Stun+1
  377.             SoftCC = SoftCC+1
  378.             Blind = Blind+1
  379.         end
  380.         if RREADY then
  381.             SoftCC = SoftCC+1
  382.             Slow = Slow+1
  383.         end
  384.     elseif targetName == "Irelia" then
  385.         if EREADY then
  386.             if (target.health/target.maxHealth) <= (myHero.health/myHero.maxHealth) then
  387.                 HardCC = HardCC+1
  388.                 Stun = Stun+1
  389.             else
  390.                 SoftCC = SoftCC+1
  391.                 Slow = Slow+1
  392.             end        
  393.         end
  394.     elseif targetName == "Janna" then
  395.         if QREADY then
  396.             HardCC = HardCC+1
  397.             Airborne = Airborne+1
  398.         end
  399.         if WREADY then
  400.             SoftCC = SoftCC+1
  401.             Slow = Slow+1
  402.         end
  403.         if RREADY then
  404.             HardCC = HardCC+1
  405.             Airborne = Airborne+1
  406.         end
  407.     elseif targetName == "JarvanIV" then
  408.         if QREADY and EREADY then
  409.             HardCC = HardCC+1
  410.             Airborne = Airborne+1
  411.         end
  412.         if WREADY then
  413.             SoftCC = SoftCC+1
  414.             Slow = Slow+1
  415.         end
  416.         if RREADY then
  417.             SoftCC = SoftCC+1
  418.             Wall = Wall+1
  419.         end
  420.     elseif targetName == "Jax" then
  421.         if EREADY then
  422.             HardCC = HardCC+1
  423.             Stun = Stun+1
  424.         end
  425.     elseif targetName == "Jayce" then
  426.         if QREADY and target:GetSpellData(_Q).name == "JayceToTheSkies" then
  427.             SoftCC = SoftCC+1
  428.             Slow = Slow+1          
  429.         end
  430.         if EREADY and target:GetSpellData(_E).name == "JayceThunderingBlow" then
  431.             HardCC = HardCC+1
  432.             Airborne = Airborne+1
  433.         end
  434.     elseif targetName == "Karma" then
  435.         if WREADY then
  436.             SoftCC = SoftCC+1
  437.             Slow = Slow+1
  438.         end
  439.     elseif targetName == "Karthus" then
  440.         if WREADY then
  441.             SoftCC = SoftCC+1
  442.             Slow = Slow+1
  443.         end
  444.     elseif targetName == "Kassadin" then
  445.         if QREADY then
  446.             HardCC = HardCC+1
  447.             Silence = Silence+1
  448.         end
  449.         if EREADY then
  450.             SoftCC = SoftCC+1
  451.             Slow = Slow+1
  452.         end
  453.     elseif targetName == "Kayle" then
  454.         if QREADY then
  455.             SoftCC = SoftCC+1
  456.             Slow = Slow+1
  457.         end
  458.     elseif targetName == "Kennen" then
  459.         if QREADY and WREADY and EREADY then
  460.             HardCC = HardCC+1
  461.             Stun = Stun+1
  462.         end
  463.         if RREADY then
  464.             HardCC = HardCC+1
  465.             Stun = Stun+1
  466.         end
  467.     elseif targetName == "Khazix" then
  468.         SoftCC = SoftCC+1
  469.         Slow = Slow+1
  470.     elseif targetName == "KogMaw" then
  471.         if EREADY then
  472.             SoftCC = SoftCC+1
  473.             Slow = Slow+1
  474.         end
  475.     elseif targetName == "LeBlanc" then
  476.         if QREADY and (WREADY or EREADY or RREADY) then
  477.             HardCC = HardCC+1
  478.             Silence = Silence+1
  479.         end
  480.         if EREADY then
  481.             SoftCC = SoftCC+1
  482.             Slow = Slow+1
  483.             Snare = Snare+1
  484.         end
  485.         if RREADY and target:GetSpellData(_R).name == "LeblancChaosOrbM" and (WREADY or EREADY or QREADY) then
  486.             HardCC = HardCC+1
  487.             Silence = Silence+1
  488.         end
  489.         if RREADY and target:GetSpellData(_R).name == "LeblancSoulShackleM" then
  490.             SoftCC = SoftCC+1
  491.             Slow = Slow+1
  492.             Snare = Snare+1
  493.         end
  494.     elseif targetName == "LeeSin" then
  495.         if EREADY then
  496.             SoftCC = SoftCC+1
  497.             Slow = Slow+1
  498.         end
  499.         if RREADY then
  500.             HardCC = HardCC+1
  501.             Airborne = Airborne+1
  502.         end
  503.     elseif targetName == "Leona" then
  504.         if QREADY then
  505.             HardCC = HardCC+1
  506.             Stun = Stun+1
  507.         end
  508.         if EREADY then
  509.             SoftCC = SoftCC+1
  510.             Snare = Snare+1
  511.         end
  512.         if RREADY then
  513.             HardCC = HardCC+1
  514.             Stun = Stun+1
  515.             SoftCC = SoftCC+1
  516.             Slow = Slow+1
  517.         end
  518.     elseif targetName == "Lulu" then
  519.         if QREADY then
  520.             SoftCC = SoftCC+1
  521.             Slow = Slow+1
  522.         end
  523.         if WREADY then
  524.             HardCC = HardCC+1
  525.             Polymorph = Polymorph+1
  526.         end
  527.         if RREADY then
  528.             HardCC = HardCC+1
  529.             Airborne = Airborne+1
  530.             SoftCC = SoftCC+1
  531.             Slow = Slow+1
  532.         end
  533.     elseif targetName == "Lux" then
  534.         if QREADY then
  535.             SoftCC = SoftCC+1
  536.             Snare = Snare+1
  537.         end
  538.         if EREADY then
  539.             SoftCC = SoftCC+1
  540.             Slow = Slow+1
  541.         end
  542.     elseif targetName == "Malphite" then
  543.         if QREADY then
  544.             SoftCC = SoftCC+1
  545.             Slow = Slow+1
  546.         end
  547.         if RREADY then
  548.             HardCC = HardCC+1
  549.             Airborne = Airborne+1
  550.         end
  551.     elseif targetName == "Malzahar" then
  552.         if QREADY then
  553.             HardCC = HardCC+1
  554.             Silence = Silence+1        
  555.         end
  556.         if RREADY then
  557.             HardCC = HardCC+1
  558.             Suppression = Suppression+1
  559.         end
  560.     elseif targetName == "Maokai" then
  561.         if QREADY then
  562.             HardCC = HardCC+1
  563.             Airborne = Airborne+1
  564.             SoftCC = SoftCC+1
  565.             Slow = Slow+1
  566.         end
  567.         if WREADY then
  568.             SoftCC = SoftCC+1
  569.             Snare = Snare+1
  570.         end
  571.     elseif targetName == "MissFortune" then
  572.         if EREADY then
  573.             SoftCC = SoftCC+1
  574.             Slow = Slow+1
  575.         end
  576.     elseif targetName == "Morgana" then
  577.         if QREADY then
  578.             SoftCC = SoftCC+1
  579.             Snare = Snare+1
  580.         end
  581.         if RREADY then
  582.             HardCC = HardCC+1
  583.             Stun = Stun+1
  584.             SoftCC = SoftCC+1
  585.             Slow = Slow+1
  586.         end
  587.     elseif targetName == "Nami" then
  588.         if QREADY then
  589.             HardCC = HardCC+1
  590.             Stun = Stun+1
  591.         end
  592.         if EREADY then
  593.             SoftCC = SoftCC+1
  594.             Slow = Slow+1
  595.         end
  596.         if RREADY then
  597.             HardCC = HardCC+1
  598.             Airborne = Airborne+1
  599.             SoftCC = SoftCC+1
  600.             Slow = Slow+1
  601.         end
  602.     elseif targetName == "Nasus" then
  603.         if WREADY then
  604.             SoftCC = SoftCC+1
  605.             Slow = Slow+1
  606.         end
  607.     elseif targetName == "Nautilus" then
  608.         HardCC = HardCC+1
  609.         Stun = Stun+1
  610.         if QREADY then
  611.             HardCC = HardCC+1
  612.             Airborne = Airborne+1
  613.         end
  614.         if EREADY then
  615.             SoftCC = SoftCC+1
  616.             Slow = Slow+1
  617.         end
  618.         if RREADY then
  619.             HardCC = HardCC+1
  620.             Airborne = Airborne+1
  621.         end
  622.     elseif targetName == "Nocturne" then
  623.         if EREADY then
  624.             HardCC = HardCC+1
  625.             Fear = Fear+1
  626.         end
  627.     elseif targetName == "Nunu" then
  628.         if EREADY then
  629.             SoftCC = SoftCC+1
  630.             Slow = Slow+1
  631.         end
  632.         if RREADY then
  633.             SoftCC = SoftCC+1
  634.             Slow = Slow+1
  635.         end
  636.     elseif targetName == "Olaf" then
  637.         if QREADY then
  638.             SoftCC = SoftCC+1
  639.             Slow = Slow+1
  640.         end
  641.     elseif targetName == "Orianna" then
  642.         if WREADY then
  643.             SoftCC = SoftCC+1
  644.             Slow = Slow+1
  645.         end
  646.         if RREADY then
  647.             HardCC = HardCC+1
  648.             Airborne = Airborne+1
  649.         end
  650.     elseif targetName == "Pantheon" then
  651.         if WREADY then
  652.             HardCC = HardCC+1
  653.             Stun = Stun+1
  654.         end
  655.         if RREADY then
  656.             SoftCC = SoftCC+1
  657.             Slow = Slow+1
  658.         end
  659.     elseif targetName == "Poppy" then
  660.         if EREADY then
  661.             HardCC = HardCC+1
  662.             Airborne = Airborne+1
  663.             Stun = Stun+1
  664.         end
  665.     elseif targetName == "Rammus" then
  666.         if QREADY then
  667.             HardCC = HardCC+1
  668.             Airborne = Airborne+1
  669.             SoftCC = SoftCC+1
  670.             Slow = Slow+1
  671.         end
  672.         if EREADY then
  673.             HardCC = HardCC+1
  674.             Taunt = Taunt+1
  675.         end
  676.     elseif targetName == "Renekton" then
  677.         if WREADY then
  678.             HardCC = HardCC+1
  679.             Stun = Stun+1
  680.         end
  681.     elseif targetName == "Rengar" then -----------------------------------
  682.         if EREADY then
  683.             SoftCC = SoftCC+1
  684.             Slow = Slow+1
  685.         end
  686.     elseif targetName == "Riven" then
  687.         if QREADY then
  688.             HardCC = HardCC+1
  689.             Airborne = Airborne+1
  690.         end
  691.         if WREADY then
  692.             HardCC = HardCC+1
  693.             Stun = Stun+1
  694.         end
  695.     elseif targetName == "Rumble" then
  696.         if EREADY then
  697.             SoftCC = SoftCC+1
  698.             Slow = Slow+1
  699.         end
  700.         if RREADY then
  701.             SoftCC = SoftCC+1
  702.             Slow = Slow+1
  703.         end
  704.     elseif targetName == "Ryze" then
  705.         if WREADY then
  706.             SoftCC = SoftCC+1
  707.             Snare = Snare+1
  708.         end
  709.     elseif targetName == "Sejuani" then
  710.         SoftCC = SoftCC+1
  711.         Slow = Slow+1
  712.         if QREADY then
  713.             SoftCC = SoftCC+1
  714.             Slow = Slow+1
  715.         end
  716.         if EREADY then
  717.             SoftCC = SoftCC+1
  718.             Slow = Slow+1
  719.         end
  720.         if RREADY then
  721.             HardCC = HardCC+1
  722.             Stun = Stun+1
  723.         end
  724.     elseif targetName == "Shaco" then
  725.         if WREADY then
  726.             HardCC = HardCC+1
  727.             Fear = Fear+1
  728.         end
  729.         if EREADY then
  730.             SoftCC = SoftCC+1
  731.             Slow = Slow+1
  732.         end
  733.     elseif targetName == "Shen" then
  734.         if EREADY then
  735.             HardCC = HardCC+1
  736.             Taunt = Taunt+1
  737.         end
  738.     elseif targetName == "Shyvana" then
  739.         if RREADY then
  740.             HardCC = HardCC+1
  741.             Airborne = Airborne+1
  742.         end
  743.     elseif targetName == "Singed" then
  744.         if WREADY then
  745.             SoftCC = SoftCC+1
  746.             Slow = Slow+1
  747.         end
  748.         if EREADY then
  749.             HardCC = HardCC+1
  750.             Airborne = Airborne+1
  751.         end
  752.     elseif targetName == "Sion" then
  753.         if QREADY then
  754.             HardCC = HardCC+1
  755.             Stun = Stun+1
  756.         end
  757.     elseif targetName == "Skarner" then
  758.         if QREADY then
  759.             SoftCC = SoftCC+1
  760.             Slow = Slow+1
  761.         end
  762.         if RREADY then
  763.             HardCC = HardCC+1
  764.             Suppression = Suppression+1
  765.         end
  766.     elseif targetName == "Sona" then-------------
  767.         if RREADY then
  768.             HardCC = HardCC+1
  769.             Stun = Stun+1
  770.         end
  771.     elseif targetName == "Soraka" then
  772.         if EREADY then
  773.             HardCC = HardCC+1
  774.             Silence = Silence+1
  775.         end
  776.     elseif targetName == "Swain" then
  777.         if QREADY then
  778.             SoftCC = SoftCC+1
  779.             Slow = Slow+1
  780.         end
  781.         if WREADY then
  782.             SoftCC = SoftCC+1
  783.             Snare = Snare+1
  784.         end
  785.     elseif targetName == "Syndra" then
  786.         if WREADY then
  787.             SoftCC = SoftCC+1
  788.             Slow = Slow+1
  789.         end
  790.         if EREADY then
  791.             HardCC = HardCC+1
  792.             Airborne = Airborne+1
  793.         end
  794.     elseif targetName == "Talon" then
  795.         if WREADY then
  796.             SoftCC = SoftCC+1
  797.             Slow = Slow+1
  798.         end
  799.         if EREADY then
  800.             HardCC = HardCC+1
  801.             Silence = Silence+1
  802.         end
  803.     elseif targetName == "Taric" then
  804.         if EREADY then
  805.             HardCC = HardCC+1
  806.             Stun = Stun+1
  807.         end
  808.     elseif targetName == "Teemo" then
  809.         if QREADY then
  810.             SoftCC = SoftCC+1
  811.             Blind = Blind+1
  812.         end
  813.         if RREADY then
  814.             SoftCC = SoftCC+1
  815.             Slow = Slow+1
  816.         end
  817.     elseif targetName == "Tristana" then
  818.         if WREADY then
  819.             SoftCC = SoftCC+1
  820.             Slow = Slow+1
  821.         end
  822.         if RREADY then
  823.             HardCC = HardCC+1
  824.             Airborne = Airborne+1
  825.         end
  826.     elseif targetName == "Trundle" then
  827.         if EREADY then
  828.             SoftCC = SoftCC+1
  829.             Slow = Slow+1
  830.             Wall = Wall+1
  831.         end
  832.     elseif targetName == "Tryndamere" then
  833.         if WREADY then
  834.             SoftCC = SoftCC+1
  835.             Slow = Slow+1          
  836.         end
  837.     elseif targetName == "TwistedFate" then
  838.         if target:GetSpellData(_W).name == "goldcardlock" then
  839.             HardCC = HardCC+1
  840.             Stun = Stun+1
  841.         end
  842.         if target:GetSpellData(_W).name == "redcardlock" then
  843.             SoftCC = SoftCC+1
  844.             Slow = Slow+1
  845.         end
  846.     elseif targetName == "Twitch" then
  847.         if WREADY then
  848.             SoftCC = SoftCC+1
  849.             Slow = Slow+1
  850.         end
  851.     elseif targetName == "Udyr" then---------
  852.         if EREADY then
  853.             HardCC = HardCC+1
  854.             Stun = Stun+1
  855.         end
  856.     elseif targetName == "Urgot" then
  857.         if WREADY then
  858.             SoftCC = SoftCC+1
  859.             Slow = Slow+1
  860.         end
  861.         if RREADY then
  862.             HardCC = HardCC+1
  863.             Suppression = Suppression+1
  864.         end
  865.     elseif targetName == "Varus" then
  866.         if EREADY then
  867.             SoftCC = SoftCC+1
  868.             Slow = Slow+1
  869.         end
  870.         if RREADY then
  871.             SoftCC = SoftCC+1
  872.             Snare = Snare+1
  873.         end
  874.     elseif targetName == "Vayne" then
  875.         if EREADY then
  876.             HardCC = HardCC+1
  877.             Airborne = Airborne+1
  878.             Stun = Stun+1
  879.         end
  880.     elseif targetName == "Veigar" then
  881.         if EREADY then
  882.             HardCC = HardCC+1
  883.             Stun = Stun+1
  884.         end
  885.     elseif targetName == "Vi" then
  886.         if QREADY then
  887.             HardCC = HardCC+1
  888.             Airborne = Airborne+1
  889.         end
  890.         if RREADY then
  891.             HardCC = HardCC+1
  892.             Airborne = Airborne+1
  893.         end
  894.     elseif targetName == "Viktor" then
  895.         if WREADY then
  896.             HardCC = HardCC+1
  897.             Stun = Stun+1
  898.             SoftCC = SoftCC+1
  899.             Slow = Slow+1
  900.         end
  901.         if RREADY then
  902.             HardCC = HardCC+1
  903.             Silence = Silence+1
  904.         end
  905.     elseif targetName == "Vladimir" then
  906.         if WREADY then
  907.             SoftCC = SoftCC+1
  908.             Slow = Slow+1
  909.         end
  910.     elseif targetName == "Volibear" then
  911.         if QREADY then
  912.             HardCC = HardCC+1
  913.             Airborne = Airborne+1
  914.         end
  915.         if EREADY then
  916.             SoftCC = SoftCC+1
  917.             Slow = Slow+1
  918.         end
  919.     elseif targetName == "Warwick" then
  920.         if RREADY then
  921.             HardCC = HardCC+1
  922.             Suppression = Suppression+1
  923.         end
  924.     elseif targetName == "MonkeyKing" then
  925.         if RREADY then
  926.             HardCC = HardCC+1
  927.             Airborne = Airborne+1
  928.         end
  929.     elseif targetName == "Xerath" then
  930.         if EREADY and (QREADY or RREADY) then
  931.             HardCC = HardCC+1
  932.             Stun = Stun+1
  933.         end
  934.     elseif targetName == "XinZhao" then
  935.         if QREADY then
  936.             HardCC = HardCC+1
  937.             Airborne = Airborne+1
  938.         end
  939.         if EREADY then
  940.             SoftCC = SoftCC+1
  941.             Slow = Slow+1
  942.         end
  943.         if RREADY then
  944.             HardCC = HardCC+1
  945.             Airborne = Airborne+1
  946.         end
  947.     elseif targetName == "Yorick" then
  948.         if WREADY then
  949.             SoftCC = SoftCC+1
  950.             Slow = Slow+1
  951.         end
  952.     elseif targetName == "Zed" then
  953.         if EREADY then
  954.             SoftCC = SoftCC+1
  955.             Slow = Slow+1
  956.         end
  957.     elseif targetName == "Ziggs" then
  958.         if WREADY then
  959.             HardCC = HardCC+1
  960.             Airborne = Airborne+1
  961.         end
  962.         if EREADY then
  963.             SoftCC = SoftCC+1
  964.             Slow = Slow+1
  965.         end
  966.     elseif targetName == "Zilean" then
  967.         if EREADY then
  968.             SoftCC = SoftCC+1
  969.             Slow = Slow+1
  970.         end
  971.     elseif targetName == "Zyra" then
  972.         if WREADY and EREADY then
  973.             SoftCC = SoftCC+1
  974.             Slow = Slow+1
  975.         end
  976.         if EREADY then
  977.             SoftCC = SoftCC+1
  978.             Snare = Snare+1
  979.         end
  980.         if RREADY then
  981.             HardCC = HardCC+1
  982.             Airborne = Airborne+1
  983.         end
  984.     end
  985.     if typeCC == "HardCC" then return HardCC
  986.     elseif typeCC == "Airborne" then return Airborne
  987.     elseif typeCC == "Charm" then return Charm
  988.     elseif typeCC == "Fear" then return Fear
  989.     elseif typeCC == "Taunt" then return Taunt
  990.     elseif typeCC == "Polymorph" then return Polymorph
  991.     elseif typeCC == "Silence" then return Silence
  992.     elseif typeCC == "Stun" then return Stun
  993.     elseif typeCC == "Suppression" then return Suppression
  994.     elseif typeCC == "SoftCC" then return SoftCC
  995.     elseif typeCC == "Blind" then return Blind
  996.     elseif typeCC == "Entangle" then return Entangle
  997.     elseif typeCC == "Slow" then return Slow
  998.     elseif typeCC == "Snare" then return Snare
  999.     elseif typeCC == "Wall" then return Wall
  1000.     else return 0 end
  1001. end
  1002. function StunAlertOnCreateObj(obj)
  1003.     if obj.name:find("StunReady.troy") then
  1004.         for i = 1, heroManager.iCount do
  1005.         local h = heroManager:getHero(i)
  1006.             if h.team ~= myHero.team and GetDistance(obj) <= 100 then
  1007.                 annieStun = obj
  1008.             end
  1009.         end
  1010.     end
  1011. end
  1012. function StunAlertOnWndMsg(msg,key)
  1013.     if msg == WM_LBUTTONUP or not IsKeyDown(UIHK) then moveui = false end
  1014.     if msg == WM_LBUTTONDOWN and IsKeyDown(UIHK) then
  1015.         if CursorIsUnder(tablex, tabley, 130, 40) then moveui = true end
  1016.     end
  1017. end
  1018.  
  1019. -- ############################################# STUN ALERT ################################################
  1020.  
  1021. -- ############################################# TOWER RANGE ################################################
  1022.  
  1023.  
  1024. local towerRange = {
  1025.     turrets = {},
  1026.     typeText = {"OFF", "ON (enemy close)", "ON (enemy)", "ON (all)", "ON (all close)"},
  1027.     --[[         Config         ]]
  1028.     turretRange = 950,                  -- 950
  1029.     fountainRange = 1050,               -- 1050
  1030.     allyTurretColor = 0x80FF00,         -- Green color
  1031.     enemyTurretColor = 0xFF0000,        -- Red color
  1032.     activeType = 1,                     -- 0 Off, 1 Close enemy towers, 2 All enemy towers, 3 Show all, 4 Show all close
  1033.     tickUpdate = 1000,
  1034.     nextUpdate = 0,
  1035. }
  1036.  
  1037. function towerRange.checkTurretState()
  1038.     if towerRange.activeType > 0 then
  1039.         for name, turret in pairs(towerRange.turrets) do
  1040.             turret.active = false
  1041.         end
  1042.         for i = 1, objManager.maxObjects do
  1043.             local object = objManager:getObject(i)
  1044.             if object ~= nil and object.type == "obj_AI_Turret" then
  1045.                 local name = object.name
  1046.                 if towerRange.turrets[name] ~= nil then towerRange.turrets[name].active = true end
  1047.             end
  1048.         end
  1049.         for name, turret in pairs(towerRange.turrets) do
  1050.             if turret.active == false then towerRange.turrets[name] = nil end
  1051.         end
  1052.     end
  1053. end
  1054.  
  1055. function TowerRangeOnDraw()
  1056.     if GetGame().isOver then return end
  1057.     if towerRange.activeType > 0 then
  1058.         for name, turret in pairs(towerRange.turrets) do
  1059.             if turret ~= nil then
  1060.                 if (towerRange.activeType == 1 and turret.team ~= player.team and player.dead == false and GetDistance(turret) < 2000)
  1061.                 or (towerRange.activeType == 2 and turret.team ~= player.team)
  1062.                 or (towerRange.activeType == 3)
  1063.                 or (towerRange.activeType == 4 and player.dead == false and GetDistance(turret) < 2000) then
  1064.                     DrawCircle(turret.x, turret.y, turret.z, turret.range, turret.color)
  1065.                 end
  1066.             end
  1067.         end
  1068.     end
  1069. end
  1070. function TowerRangeOnTick()
  1071. end
  1072. function TowerRangeOnDeleteObj(object)
  1073.     if object ~= nil and object.type == "obj_AI_Turret" then
  1074.         for name, turret in pairs(towerRange.turrets) do
  1075.             if name == object.name then
  1076.                 towerRange.turrets[name] = nil
  1077.                 return
  1078.             end
  1079.         end
  1080.     end
  1081. end
  1082. function TowerRangeOnLoad()
  1083.     gameState = GetGame()
  1084.     for i = 1, objManager.maxObjects do
  1085.         local object = objManager:getObject(i)
  1086.         if object ~= nil and object.type == "obj_AI_Turret" then
  1087.             local turretName = object.name
  1088.             towerRange.turrets[turretName] = {
  1089.                 object = object,
  1090.                 team = object.team,
  1091.                 color = (object.team == player.team and towerRange.allyTurretColor or towerRange.enemyTurretColor),
  1092.                 range = towerRange.turretRange,
  1093.                 x = object.x,
  1094.                 y = object.y,
  1095.                 z = object.z,
  1096.                 active = false,
  1097.             }
  1098.             if turretName == "Turret_OrderTurretShrine_A" or turretName == "Turret_ChaosTurretShrine_A" then
  1099.                 towerRange.turrets[turretName].range = towerRange.fountainRange
  1100.                 for j = 1, objManager.maxObjects do
  1101.                     local object2 = objManager:getObject(j)
  1102.                     if object2 ~= nil and object2.type == "obj_SpawnPoint" and GetDistance(object, object2) < 1000 then
  1103.                         towerRange.turrets[turretName].x = object2.x
  1104.                         towerRange.turrets[turretName].z = object2.z
  1105.                     elseif object2 ~= nil and object2.type == "obj_HQ" and object2.team == object.team then
  1106.                         towerRange.turrets[turretName].y = object2.y
  1107.                     end
  1108.                 end
  1109.             end
  1110.         end
  1111.     end
  1112. end
  1113.  
  1114. -- ############################################# TOWER RANGE ################################################
  1115.  
  1116. -- ############################################# MINION MARKER ################################################
  1117.  
  1118. function MinionMarkerOnLoad()
  1119.     minionTable = {}
  1120.     for i = 0, objManager.maxObjects do
  1121.         local obj = objManager:GetObject(i)
  1122.         if obj ~= nil and obj.type ~= nil and obj.type == "obj_AI_Minion" then
  1123.             table.insert(minionTable, obj)
  1124.         end
  1125.     end
  1126. end
  1127.  
  1128. function MinionMarkerOnDraw()
  1129.     for i,minionObject in ipairs(minionTable) do
  1130.         if not ValidTarget(minionObject) then
  1131.             table.remove(minionTable, i)
  1132.             i = i - 1
  1133.         elseif minionObject ~= nil and myHero:GetDistance(minionObject) ~= nil and myHero:GetDistance(minionObject) < 1500 and minionObject.health ~= nil and minionObject.health <= myHero:CalcDamage(minionObject, myHero.addDamage+myHero.damage) and minionObject.visible ~= nil and minionObject.visible == true then
  1134.             for g = 0, 6 do
  1135.                 DrawCircle(minionObject.x, minionObject.y, minionObject.z,80 + g,255255255)
  1136.             end
  1137.         end
  1138.     end
  1139. end
  1140.  
  1141.  
  1142. function MinionMarkerOnCreateObj(object)
  1143.     if object ~= nil and object.type ~= nil and object.type == "obj_AI_Minion" then table.insert(minionTable, object) end
  1144. end
  1145.  
  1146. -- ############################################# MINION MARKER ################################################
  1147.  
  1148. -- ############################################# HIDDENOBJECTS ################################################
  1149.  
  1150. local hiddenObjects = {
  1151.     --[[      CONFIG      ]]
  1152.     showOnMiniMap = true,           -- show objects on minimap
  1153.     useSprites = true,              -- show sprite on minimap
  1154.     --[[      GLOBAL      ]]
  1155.     objectsToAdd = {
  1156.         { name = "ItemMiniWard", objectType = "wards", spellName = "ItemMiniWard", charName = "ItemMiniWard", color = 0x0000FF00, range = 1450, duration = 60000, sprite = "greenPoint"},
  1157.         { name = "ItemGhostWard", objectType = "wards", spellName = "ItemGhostWard", charName = "ItemGhostWard", color = 0x0000FF00, range = 1450, duration = 180000, sprite = "greenPoint"},
  1158.         { name = "VisionWard", objectType = "wards", spellName = "VisionWard", charName = "VisionWard", color = 0x00FF00FF, range = 1450, duration = 180000, sprite = "yellowPoint"},
  1159.         { name = "SightWard", objectType = "wards", spellName = "SightWard", charName = "SightWard", color = 0x0000FF00, range = 1450, duration = 180000, sprite = "greenPoint"},
  1160.         { name = "WriggleLantern", objectType = "wards", spellName = "WriggleLantern", charName = "WriggleLantern", color = 0x0000FF00, range = 1450, duration = 180000, sprite = "greenPoint"},
  1161.         { name = "Jack In The Box", objectType = "boxes", spellName = "JackInTheBox", charName = "ShacoBox", color = 0x00FF0000, range = 300, duration = 60000, sprite = "redPoint"},
  1162.         { name = "Cupcake Trap", objectType = "traps", spellName = "CaitlynYordleTrap", charName = "CaitlynTrap", color = 0x00FF0000, range = 300, duration = 240000, sprite = "cyanPoint"},
  1163.         { name = "Noxious Trap", objectType = "traps", spellName = "Bushwhack", charName = "Nidalee_Spear", color = 0x00FF0000, range = 300, duration = 240000, sprite = "cyanPoint"},
  1164.         { name = "Noxious Trap", objectType = "traps", spellName = "BantamTrap", charName = "TeemoMushroom", color = 0x00FF0000, range = 300, duration = 600000, sprite = "cyanPoint"},
  1165.         -- to confirm spell
  1166.         { name = "DoABarrelRoll", objectType = "boxes", spellName = "MaokaiSapling2", charName = "MaokaiSproutling", color = 0x00FF0000, range = 300, duration = 35000, sprite = "redPoint"},
  1167.     },
  1168.     tmpObjects = {},
  1169.     sprites = {
  1170.         cyanPoint = { spriteFile = "PingMarkerCyan_8", },
  1171.         redPoint = { spriteFile = "PingMarkerRed_8", },
  1172.         greenPoint = { spriteFile = "PingMarkerGreen_8", },
  1173.         yellowPoint = { spriteFile = "PingMarkerYellow_8", },
  1174.         greyPoint = { spriteFile = "PingMarkerGrey_8", },
  1175.     },
  1176.     objects = {},
  1177. }
  1178.  
  1179. --[[      CODE      ]]
  1180. function hiddenObjects.objectExist(spellName, pos, tick)
  1181.     for i,obj in pairs(hiddenObjects.objects) do
  1182.         if obj.object == nil and obj.spellName == spellName and GetDistance(obj.pos, pos) < 200 and tick < obj.seenTick then
  1183.             return i
  1184.         end
  1185.     end
  1186.     return nil
  1187. end
  1188.  
  1189. function hiddenObjects.addObject(objectToAdd, pos, fromSpell, object)
  1190.     -- add the object
  1191.     local tick = GetTickCount()
  1192.     local objId = objectToAdd.spellName..(math.floor(pos.x) + math.floor(pos.z))
  1193.     --check if exist
  1194.     local objectExist = hiddenObjects.objectExist(objectToAdd.spellName, {x = pos.x, z = pos.z,}, tick - 2000)
  1195.     if objectExist ~= nil then
  1196.         objId = objectExist
  1197.     end
  1198.     if hiddenObjects.objects[objId] == nil then
  1199.         hiddenObjects.objects[objId] = {
  1200.             object = object,
  1201.             color = objectToAdd.color,
  1202.             range = objectToAdd.range,
  1203.             sprite = objectToAdd.sprite,
  1204.             spellName = objectToAdd.spellName,
  1205.             seenTick = tick,
  1206.             endTick = tick + objectToAdd.duration,
  1207.             fromSpell = fromSpell,
  1208.             visible = (object == nil),
  1209.             display = { visible = false, text = ""},
  1210.         }
  1211.     elseif hiddenObjects.objects[objId].object == nil and object ~= nil then
  1212.         hiddenObjects.objects[objId].object = object
  1213.         hiddenObjects.objects[objId].fromSpell = false
  1214.     end
  1215.     hiddenObjects.objects[objId].pos = {x = pos.x, y = pos.y, z = pos.z, }
  1216.     if hiddenObjects.showOnMiniMap == true then hiddenObjects.objects[objId].minimap = GetMinimap(pos) end
  1217. end
  1218.  
  1219. function HiddenObjectsOnCreateObj(object)
  1220.     if object ~= nil and object.type == "obj_AI_Minion" then
  1221.         for i,objectToAdd in pairs(hiddenObjects.objectsToAdd) do
  1222.             if object.name == objectToAdd.name then
  1223.                 local tick = GetTickCount()
  1224.                 table.insert(hiddenObjects.tmpObjects, {tick = tick, object = object})
  1225.             end
  1226.         end
  1227.     end
  1228. end
  1229.  
  1230. function HiddenObjectsOnProcessSpell(object,spell)
  1231.     if object ~= nil and object.team == TEAM_ENEMY then
  1232.         for i,objectToAdd in pairs(hiddenObjects.objectsToAdd) do
  1233.             if spell.name == objectToAdd.spellName then
  1234.                 ticked = GetTickCount()
  1235.                 hiddenObjects.addObject(objectToAdd, spell.endPos, true)
  1236.             end
  1237.         end
  1238.     end
  1239. end
  1240.  
  1241. function HiddenObjectsOnDeleteObj(object)
  1242.     if object ~= nil and object.name ~= nil and object.type == "obj_AI_Minion" then
  1243.         for i,objectToAdd in pairs(hiddenObjects.objectsToAdd) do
  1244.             if object.charName == objectToAdd.charName then
  1245.                 -- remove the object
  1246.                 for j,obj in pairs(hiddenObjects.objects) do
  1247.                     if obj.object.valid and obj.object ~= nil and obj.object.networkID == object.networkID then
  1248.                         hiddenObjects.objects[j] = nil
  1249.                         return
  1250.                     end
  1251.                 end
  1252.             end
  1253.         end
  1254.     end
  1255. end
  1256.  
  1257. function HiddenObjectsOnDraw()
  1258.     if GetGame().isOver then return end
  1259.     local shiftKeyPressed = IsKeyDown(16)
  1260.     for i,obj in pairs(hiddenObjects.objects) do
  1261.         if obj.visible == true then
  1262.             DrawCircle(obj.pos.x, obj.pos.y, obj.pos.z, 100, obj.color)
  1263.             DrawCircle(obj.pos.x, obj.pos.y, obj.pos.z, (shiftKeyPressed and obj.range or 200), obj.color)
  1264.             --minimap
  1265.             if hiddenObjects.showOnMiniMap == true then
  1266.                 if hiddenObjects.useSprites then
  1267.                     hiddenObjects.sprites[obj.sprite].sprite:Draw(obj.minimap.x, obj.minimap.y, 0xFF)
  1268.                 else
  1269.                     DrawText("o",31,obj.minimap.x-7,obj.minimap.y-13,obj.color)
  1270.                 end
  1271.                 if obj.display.visible then
  1272.                     DrawText(obj.display.text,14,obj.display.x,obj.display.y,obj.display.color)
  1273.                 end
  1274.             end
  1275.         end
  1276.     end
  1277. end
  1278.  
  1279. function HiddenObjectsOnTick()
  1280.     if GetGame().isOver then return end
  1281.     local tick = GetTickCount()
  1282.     for i,obj in pairs(hiddenObjects.tmpObjects) do
  1283.         if tick > obj.tick + 1000 or obj.object == nil or obj.object.team == player.team then
  1284.             hiddenObjects.tmpObjects[i] = nil
  1285.         else
  1286.             for j,objectToAdd in pairs(hiddenObjects.objectsToAdd) do
  1287.                 if obj.object ~= nil and obj.object.charName == objectToAdd.charName and obj.object.team == TEAM_ENEMY then
  1288.                     hiddenObjects.addObject(objectToAdd, obj.object, false, obj.object)
  1289.                     hiddenObjects.tmpObjects[i] = nil
  1290.                     break
  1291.                 end
  1292.             end
  1293.         end
  1294.     end
  1295.     for i,obj in pairs(hiddenObjects.objects) do
  1296.         if tick > obj.endTick or (obj.object ~= nil) and false then
  1297.             hiddenObjects.objects[i] = nil
  1298.         else
  1299.             if not obj.valid or obj.object == nil or (obj.valid and obj.object ~= nil and obj.object.dead == false) then
  1300.                 obj.visible = true
  1301.             else
  1302.                 obj.visible = false
  1303.             end
  1304.             -- cursor pos
  1305.             if obj.visible and GetDistanceFromMouse(obj.pos) < 150 then
  1306.                 local cursor = GetCursorPos()
  1307.                 obj.display.color = (obj.fromSpell and 0xFFFF0000 or 0xFF00FF00)
  1308.                 obj.display.text = timerText((obj.endTick-tick)/1000)
  1309.                 obj.display.x = cursor.x - 50
  1310.                 obj.display.y = cursor.y - 50
  1311.                 obj.display.visible = true
  1312.             else
  1313.                 obj.display.visible = false
  1314.             end
  1315.         end
  1316.     end
  1317. end
  1318.  
  1319. function HiddenObjectsOnLoad()
  1320.     gameState = GetGame()
  1321.     if hiddenObjects.showOnMiniMap and hiddenObjects.useSprites then
  1322.         for i,sprite in pairs(hiddenObjects.sprites) do hiddenObjects.sprites[i].sprite = GetSprite("hiddenObjects/"..sprite.spriteFile..".dds") end
  1323.     end
  1324.     for i = 1, objManager.maxObjects do
  1325.         local object = objManager:getObject(i)
  1326.         if object ~= nil then OnCreateObj(object) end
  1327.     end
  1328. end
  1329.  
  1330.  
  1331. -- ############################################# HIDDEN OBJECTS ################################################
  1332.  
  1333. -- ############################################# JUNGLE DISPLAY ################################################
  1334.  
  1335. --[[
  1336.         Script: Jungle Display v0.1d
  1337.         Author: SurfaceS
  1338.        
  1339.         required libs :        
  1340.         required sprites :      Jungle Sprites (if jungle.useSprites = true)
  1341.         exposed variables :     -
  1342.        
  1343.         UPDATES :
  1344.         v0.1                    initial release
  1345.         v0.1b                   added twisted treeline + ping and chat functions.
  1346.         v0.1c                   added ingame time.
  1347.         v0.1d                   added advice on/off by click + send chat respawn on click
  1348.         v0.1e                   added use minimap only mode, use "start" and "gameOver" lib now.
  1349.         v0.1f                   local variables
  1350.         v0.2                    BoL Studio Version
  1351.        
  1352.         USAGE :
  1353.         The script allow you to move and rotate the display
  1354.        
  1355.         Icons :
  1356.         You have 2 icons on the top left of the jungle display.
  1357.         First is for moving, the second is for rotate the display.
  1358.         The third icon is advice or not on this monster
  1359.        
  1360.         Moving :
  1361.         Hold the shift key, clic the move icon and drag the jungle display were you want.
  1362.         Settings are saved between games
  1363.        
  1364.         Rotate :
  1365.         Hold the shift key, clic the rotate icon. (4 types of rotation)
  1366.         Settings are saved between games
  1367.        
  1368.         Send to all by click : hold the shift key, and click on the timer.
  1369. ]]
  1370.  
  1371.  
  1372. --[[      GLOBAL      ]]
  1373. local jungle = {}
  1374.  
  1375. -- [[     CONFIG     ]]
  1376. jungle.pingOnRespawn = true             -- ping location on respawn
  1377. jungle.pingOnRespawnBefore = true       -- ping location before respawn
  1378. jungle.textOnRespawn = true             -- print chat text on respawn
  1379. jungle.textOnRespawnBefore = true       -- print chat text before respawn
  1380. jungle.adviceBefore = 20                -- time in second to advice before monster respawn
  1381. jungle.adviceEnemyMonsters = true       -- advice enemy monster, or just our monsters
  1382. jungle.useSprites = true                -- nice shown or not
  1383. jungle.useMiniMapVersion = true         -- use minimap version (erase all display sprite or text)
  1384.  
  1385. --[[      GLOBAL      ]]
  1386.  
  1387. jungle.monsters = {
  1388.     summonerRift = {
  1389.         {   -- baron
  1390.             name = "baron",
  1391.             spriteFile = "Baron_Square_64",
  1392.             respawn = 420,
  1393.             advise = true,
  1394.             camps = {
  1395.                 {
  1396.                     name = "monsterCamp_12",
  1397.                     creeps = { { { name = "Worm12.1.1" }, }, },
  1398.                     team = TEAM_NEUTRAL,
  1399.                 },
  1400.             },
  1401.         },
  1402.         {   -- dragon
  1403.             name = "dragon",
  1404.             spriteFile = "Dragon_Square_64",
  1405.             respawn = 360,
  1406.             advise = true,
  1407.             camps = {
  1408.                 {
  1409.                     name = "monsterCamp_6",
  1410.                     creeps = { { { name = "Dragon6.1.1" }, }, },
  1411.                     team = TEAM_NEUTRAL,
  1412.                 },
  1413.             },
  1414.         },
  1415.         {   -- blue
  1416.             name = "blue",
  1417.             spriteFile = "AncientGolem_Square_64",
  1418.             respawn = 300,
  1419.             advise = true,
  1420.             camps = {
  1421.                 {
  1422.                     name = "monsterCamp_1",
  1423.                     creeps = { { { name = "AncientGolem1.1.1" }, { name = "YoungLizard1.1.2" }, { name = "YoungLizard1.1.3" }, }, },
  1424.                     team = TEAM_BLUE,
  1425.                 },
  1426.                 {
  1427.                     name = "monsterCamp_7",
  1428.                     creeps = { { { name = "AncientGolem7.1.1" }, { name = "YoungLizard7.1.2" }, { name = "YoungLizard7.1.3" }, }, },
  1429.                     team = TEAM_RED,
  1430.                 },
  1431.             },
  1432.         },
  1433.         {   -- red
  1434.             name = "red",
  1435.             spriteFile = "LizardElder_Square_64",
  1436.             respawn = 300,
  1437.             advise = true,
  1438.             camps = {
  1439.                 {
  1440.                     name = "monsterCamp_4",
  1441.                     creeps = { { { name = "LizardElder4.1.1" }, { name = "YoungLizard4.1.2" }, { name = "YoungLizard4.1.3" }, }, },
  1442.                     team = TEAM_BLUE,
  1443.                 },
  1444.                 {
  1445.                     name = "monsterCamp_10",
  1446.                     creeps = { { { name = "LizardElder10.1.1" }, { name = "YoungLizard10.1.2" }, { name = "YoungLizard10.1.3" }, }, },
  1447.                     team = TEAM_RED,
  1448.                 },
  1449.             },
  1450.         },
  1451.         {   -- wolves
  1452.             name = "wolves",
  1453.             spriteFile = "Giantwolf_Square_64",
  1454.             respawn = 60,
  1455.             advise = false,
  1456.             camps = {
  1457.                 {
  1458.                     name = "monsterCamp_2",
  1459.                     creeps = { { { name = "GiantWolf2.1.3" }, { name = "wolf2.1.1" }, { name = "wolf2.1.2" }, }, },
  1460.                     team = TEAM_BLUE,
  1461.                 },
  1462.                 {
  1463.                     name = "monsterCamp_8",
  1464.                     creeps = { { { name = "GiantWolf8.1.3" }, { name = "wolf8.1.1" }, { name = "wolf8.1.2" }, }, },
  1465.                     team = TEAM_RED,
  1466.                 },
  1467.             },
  1468.         },
  1469.         {   -- wraiths
  1470.             name = "wraiths",
  1471.             spriteFile = "Wraith_Square_64",
  1472.             respawn = 50,
  1473.             advise = false,
  1474.             camps = {
  1475.                 {
  1476.                     name = "monsterCamp_3",
  1477.                     creeps = { { { name = "Wraith3.1.1" }, { name = "LesserWraith3.1.2" }, { name = "LesserWraith3.1.3" }, { name = "LesserWraith3.1.4" }, }, },
  1478.                     team = TEAM_BLUE,
  1479.                 },
  1480.                 {
  1481.                     name = "monsterCamp_9",
  1482.                     creeps = { { { name = "Wraith9.1.1" }, { name = "LesserWraith9.1.2" }, { name = "LesserWraith9.1.3" }, { name = "LesserWraith9.1.4" }, }, },
  1483.                     team = TEAM_RED,
  1484.                 },
  1485.             },
  1486.         },
  1487.         {   -- Golems
  1488.             name = "Golems",
  1489.             spriteFile = "AncientGolem_Square_64",
  1490.             respawn = 60,
  1491.             advise = false,
  1492.             camps = {
  1493.                 {
  1494.                     name = "monsterCamp_5",
  1495.                     creeps = { { { name = "Golem5.1.2" }, { name = "SmallGolem5.1.1" }, }, },
  1496.                     team = TEAM_BLUE,
  1497.                 },
  1498.                 {
  1499.                     name = "monsterCamp_11",
  1500.                     creeps = { { { name = "Golem11.1.2" }, { name = "SmallGolem11.1.1" }, }, },
  1501.                     team = TEAM_RED,
  1502.                 },
  1503.             },
  1504.         },
  1505.     },
  1506.     twistedTreeline = {
  1507.         {   -- Dragon
  1508.             name = "Dragon",
  1509.             spriteFile = "Dragon_Square_64",
  1510.             respawn = 300,
  1511.             advise = true,
  1512.             camps = {
  1513.                 {
  1514.                     name = "monsterCamp_7",
  1515.                     creeps = { { { name = "blueDragon7$1" }, }, },
  1516.                     team = TEAM_NEUTRAL,
  1517.                 },
  1518.             },
  1519.         },
  1520.         {   -- Lizard
  1521.             name = "Lizard",
  1522.             spriteFile = "LizardElder_Square_64",
  1523.             respawn = 240,
  1524.             advise = true,
  1525.             camps = {
  1526.                 {
  1527.                     name = "monsterCamp_8",
  1528.                     creeps = { { { name = "TwistedLizardElder8$1" }, }, },
  1529.                     team = TEAM_NEUTRAL,
  1530.                 },
  1531.             },
  1532.         },
  1533.         {   -- Ghast Wraith or Radib Wolf
  1534.             name = "Buff Camp",
  1535.             spriteFile = "Wraith_Square_64",
  1536.             respawn = 180,
  1537.             advise = true,
  1538.             camps = {
  1539.                 {
  1540.                     name = "monsterCamp_5",
  1541.                     creeps = {
  1542.                         { { name = "Ghast5$1" }, { name = "TwistedBlueWraith5$2" }, { name = "TwistedBlueWraith5$3" }, },
  1543.                         { { name = "RabidWolf5$1" }, { name = "TwistedGiantWolf5$2" }, { name = "TwistedGiantWolf5$3" }, },
  1544.                     },
  1545.                     team = TEAM_BLUE,
  1546.                 },
  1547.                 {
  1548.                     name = "monsterCamp_6",
  1549.                     creeps = {
  1550.                         { { name = "Ghast6$1" }, { name = "TwistedBlueWraith6$2" }, { name = "TwistedBlueWraith6$3" }, },
  1551.                         { { name = "RabidWolf6$1" }, { name = "TwistedGiantWolf6$2" }, { name = "TwistedGiantWolf6$3" }, },
  1552.                     },
  1553.                     team = TEAM_RED,
  1554.                 },
  1555.                
  1556.             },
  1557.         },
  1558.         {   -- Small Golems - Young Lizard, Lizard, Golem
  1559.             name = "bottom small camp",
  1560.             spriteFile = "Gem_Square_64",
  1561.             respawn = 75,
  1562.             advise = false,
  1563.             camps = {
  1564.                 {
  1565.                     name = "monsterCamp_1",
  1566.                     creeps = {
  1567.                         { { name = "Lizard1$1" }, { name = "TwistedGolem1$2" }, { name = "TwistedYoungLizard1$3" }, },
  1568.                         { { name = "TwistedBlueWraith1$1" }, { name = "TwistedTinyWraith1$2" }, { name = "TwistedTinyWraith1$3" }, { name = "TwistedTinyWraith1$4" }, },
  1569.                     },
  1570.                     team = TEAM_BLUE,
  1571.                 },
  1572.                 {
  1573.                     name = "monsterCamp_2",
  1574.                     creeps = {
  1575.                         { { name = "Lizard2$1" }, { name = "TwistedGolem2$2" }, { name = "TwistedYoungLizard2$3" }, },
  1576.                         { { name = "TwistedBlueWraith2$1" }, { name = "TwistedTinyWraith2$2" }, { name = "TwistedTinyWraith2$3" }, { name = "TwistedTinyWraith2$4" }, },
  1577.                      },
  1578.                     team = TEAM_RED,
  1579.                 },
  1580.             },
  1581.         },
  1582.         {   -- Small Golems - Young Lizard, Lizard, Golem
  1583.             name = "Top small camp",
  1584.             spriteFile = "Angel_Square_64",
  1585.             respawn = 75,
  1586.             advise = false,
  1587.             camps = {
  1588.                 {
  1589.                     name = "monsterCamp_3",
  1590.                     creeps = {
  1591.                         { { name = "TwistedGiantWolf3$3" }, { name = "TwistedSmallWolf3$1" }, { name = "TwistedSmallWolf3$2" }, },
  1592.                         { { name = "TwistedGolem3$1" }, { name = "TwistedGolem3$2" } },
  1593.                     },
  1594.                     team = TEAM_BLUE,
  1595.                 },
  1596.                 {
  1597.                     name = "monsterCamp_4",
  1598.                     creeps = {
  1599.                         { { name = "TwistedGiantWolf4$3" }, { name = "TwistedSmallWolf4$1" }, { name = "TwistedSmallWolf4$2" }, },
  1600.                         { { name = "TwistedGolem4$1" }, { name = "TwistedGolem4$2" } },
  1601.                     },
  1602.                     team = TEAM_RED,
  1603.                 },
  1604.             },
  1605.         },
  1606.     },
  1607. }
  1608.  
  1609. jungle.shiftKeyPressed = false
  1610.  
  1611. function _miniMap__OnLoad()
  1612. if _miniMap.init then
  1613.   local map = GetGame().map
  1614.   if not WINDOW_W or not WINDOW_H then
  1615.    WINDOW_H = GetGame().WINDOW_H
  1616.    WINDOW_W = GetGame().WINDOW_W
  1617.   end
  1618.   if WINDOW_H < 500 or WINDOW_W < 500 then return true end
  1619.   local percent = math.max(WINDOW_W/1920, WINDOW_H/1080)
  1620.   _miniMap.step = {x = 265*percent/map.x, y = -264*percent/map.y}
  1621.   _miniMap.x = WINDOW_W-270*percent - _miniMap.step.x * map.min.x
  1622.   _miniMap.y = WINDOW_H-8*percent - _miniMap.step.y * map.min.y
  1623.   _miniMap.init = nil
  1624. end
  1625. return _miniMap.init
  1626. end
  1627.  
  1628. if not jungle.useMiniMapVersion then
  1629.     jungle.configFile = "./Common/jungle.cfg"
  1630.     jungle.display = {}
  1631.     jungle.display.x = 500
  1632.     jungle.display.y = 20
  1633.     jungle.display.rotation = 0
  1634.     jungle.display.move = false
  1635.     jungle.display.moveUnder = false
  1636.     jungle.display.rotateUnder = false
  1637.     jungle.display.size = 64
  1638.    
  1639.     if file_exists(jungle.configFile) then jungle.display = assert(loadfile(jungle.configFile))() end
  1640.  
  1641.     function jungle.writeConfigs()
  1642.         local file = io.open(jungle.configFile, "w")
  1643.         if file then
  1644.             file:write("return { x = "..jungle.display.x..", y = "..jungle.display.y..", rotation = "..jungle.display.rotation..", move = false, moveUnder = false, rotateUnder = false, size = "..jungle.display.size.." }")
  1645.             file:close()
  1646.         end
  1647.     end
  1648.  
  1649.     if jungle.useSprites then
  1650.         jungle.icon = {
  1651.             arrowPressed = { spriteFile = "ArrowPressed_16", },
  1652.             arrowReleased = { spriteFile = "ArrowReleased_16", },
  1653.             arrowSwitch = { spriteFile = "ArrowSwitch_16", },
  1654.             advise = { spriteFile = "Advise_16", },
  1655.             adviseRed = { spriteFile = "AdviseRed_16", },
  1656.         }
  1657.         jungle.teams = {
  1658.             team100 = { spriteFile = "TeamBlue_64", },
  1659.             team200 = { spriteFile = "TeamRed_64",},
  1660.             team300 = { spriteFile = "TeamNeutral_64", },
  1661.         }
  1662.     end
  1663. end
  1664.  
  1665. -- Need to be on a lib
  1666. function jungle.timerSecondLeft(tick, respawn, deathTick)
  1667.     return math.ceil(math.max(0, respawn - (tick - deathTick) / 1000))
  1668. end
  1669.  
  1670. function jungle.addCampAndCreep(object)
  1671.     if object ~= nil and object.name ~= nil then
  1672.         for i,monster in pairs(jungle.monsters[mapName]) do
  1673.             for j,camp in pairs(monster.camps) do
  1674.                 if camp.name == object.name then
  1675.                     camp.object = object
  1676.                     return
  1677.                 end
  1678.                 if object.type == "obj_AI_Minion" then
  1679.                     for k,creepPack in ipairs(camp.creeps) do
  1680.                         for l,creep in ipairs(creepPack) do
  1681.                             if object.name == creep.name then
  1682.                                 creep.object = object
  1683.                                 return
  1684.                             end
  1685.                         end
  1686.                     end
  1687.                 end
  1688.             end
  1689.         end
  1690.     end
  1691. end
  1692.  
  1693. function jungle.removeCreep(object)
  1694.     if object ~= nil and object.type == "obj_AI_Minion" and object.name ~= nil then
  1695.         for i,monster in pairs(jungle.monsters[mapName]) do
  1696.             for j,camp in pairs(monster.camps) do
  1697.                 for k,creepPack in ipairs(camp.creeps) do
  1698.                     for l,creep in ipairs(creepPack) do
  1699.                         if object.name == creep.name then
  1700.                             creep.object = nil
  1701.                             return
  1702.                         end
  1703.                     end
  1704.                 end
  1705.             end
  1706.         end
  1707.     end
  1708. end
  1709.  
  1710. function JungleDisplayOnLoad()
  1711.     startTick = GetGame().tick
  1712.     mapName = GetGame().map.shortName
  1713.     gameState = GetGame()
  1714.     if jungle.monsters[mapName] == nil then
  1715.         jungle = nil
  1716.         function JungleDisplayOnTick()
  1717.         end
  1718.         function JungleDisplayOnDraw()
  1719.         end
  1720.         function JungleDisplayOnCreateObj(obj)
  1721.         end
  1722.         function JungleDisplayOnWndMsg(msg, key)
  1723.         end
  1724.     else
  1725.         if jungle.useSprites and jungle.useMiniMapVersion == false then
  1726.             -- load icons drawing sprites
  1727.             for i,icon in pairs(jungle.icon) do icon.sprite = GetSprite("jungle/"..icon.spriteFile..".dds") end
  1728.             -- load side drawing sprites
  1729.             for i,camps in pairs(jungle.teams) do camps.sprite = GetSprite("jungle/"..camps.spriteFile..".dds") end
  1730.         end
  1731.         -- load monster sprites and init values
  1732.         for i,monster in pairs(jungle.monsters[mapName]) do
  1733.             if jungle.useSprites and jungle.useMiniMapVersion == false then monster.sprite = GetSprite("Characters/"..monster.spriteFile..".dds") end
  1734.             monster.isSeen = false
  1735.             for j,camp in pairs(monster.camps) do
  1736.                 camp.enemyTeam = (camp.team == TEAM_ENEMY)
  1737.                 camp.status = 0
  1738.                 camp.drawText = ""
  1739.                 camp.drawColor = 0xFF00FF00
  1740.             end
  1741.         end
  1742.         for i = 1, objManager.maxObjects do
  1743.             local object = objManager:getObject(i)
  1744.             if object ~= nil then
  1745.                 jungle.addCampAndCreep(object)
  1746.             end
  1747.         end
  1748.        
  1749.         if jungle.useMiniMapVersion then
  1750.             -- test the minimap working
  1751.             if GetMinimapX(0) == -100 then PrintChat("Minimap not working, please reload") end
  1752.             --
  1753.             function JungleDisplayOnDraw()
  1754.                 if GetGame().isOver then return end
  1755.                 for i,monster in pairs(jungle.monsters[mapName]) do
  1756.                     if monster.isSeen == true then
  1757.                         for j,camp in pairs(monster.camps) do
  1758.                             if camp.status == 2 then
  1759.                                 DrawText("X",16,camp.minimap.x - 4, camp.minimap.y - 5, camp.drawColor)
  1760.                             elseif camp.status == 4 then
  1761.                                 DrawText(camp.drawText,16,camp.minimap.x - 9, camp.minimap.y - 5, camp.drawColor)
  1762.                             end
  1763.                         end
  1764.                     end
  1765.                 end
  1766.             end
  1767.         elseif jungle.useSprites then
  1768.             function JungleDisplayOnDraw()
  1769.                 if GetGame().isOver then return end
  1770.                 local monsterCount = 0
  1771.                 for i,monster in pairs(jungle.monsters[mapName]) do
  1772.                     if monster.isSeen == true then
  1773.                         jungle.monsters[mapName][i].sprite:Draw(jungle.display.x + monster.shift.x,jungle.display.y + monster.shift.y,0xFF)
  1774.                         if monster.advise then jungle.icon.advise.sprite:Draw(jungle.display.x + monster.shift.x + jungle.display.size - 18,jungle.display.y - 2,0xFF) end
  1775.                         for j,camp in pairs(monster.camps) do
  1776.                             if camp.status ~= 0 then
  1777.                                 jungle.teams["team"..camp.team].sprite:Draw(jungle.display.x + camp.shift.x,jungle.display.y + camp.shift.y,0xFF)
  1778.                                 DrawText(camp.drawText,17,jungle.display.x + camp.shift.x + 10,jungle.display.y + camp.shift.y - 3,camp.drawColor)
  1779.                             end
  1780.                         end
  1781.                         monsterCount = monsterCount + 1
  1782.                     end
  1783.                 end
  1784.                 if monsterCount > 0 then
  1785.                     jungle.icon.arrowPressed.sprite:Draw(jungle.display.x,jungle.display.y,(jungle.shiftKeyPressed and 0xFF or 0xAA))
  1786.                     jungle.icon.arrowSwitch.sprite:Draw(jungle.display.x+16,jungle.display.y,(jungle.shiftKeyPressed and 0xFF or 0xAA))
  1787.                 end
  1788.             end
  1789.         else
  1790.             function JungleDisplayOnDraw()
  1791.                 if GetGame().isOver then return end
  1792.                 local monsterCount = 0
  1793.                 for i,monster in pairs(jungle.monsters[mapName]) do
  1794.                     if monster.isSeen == true then
  1795.                         DrawText(monster.name..(monster.advise and " *" or ""),17,jungle.display.x + monster.shift.x,jungle.display.y + monster.shift.y,0xFFFF0000)
  1796.                         for j,camp in pairs(monster.camps) do
  1797.                             if camp.status ~= 0 then
  1798.                                 DrawText(camp.team.." - "..camp.drawText,17,jungle.display.x + camp.shift.x + 10,jungle.display.y + camp.shift.y - 3,camp.drawColor)
  1799.                             end
  1800.                         end
  1801.                         monsterCount = monsterCount + 1
  1802.                     end
  1803.                 end
  1804.             end
  1805.         end
  1806.        
  1807.         function JungleDisplayOnCreateObj(object)
  1808.             if object ~= nil then
  1809.                 jungle.addCampAndCreep(object)
  1810.             end
  1811.         end
  1812.        
  1813.         function JungleDisplayOnWndMsg(msg,key)
  1814.             if msg == WM_LBUTTONDOWN and IsKeyDown(16) then
  1815.                 for i,monster in pairs(jungle.monsters[mapName]) do
  1816.                     if monster.isSeen == true then
  1817.                         if monster.iconUnder then
  1818.                             monster.advise = not monster.advise
  1819.                             break
  1820.                         else
  1821.                             for j,camp in pairs(monster.camps) do
  1822.                                 if camp.textUnder then
  1823.                                     if camp.respawnText ~= nil then SendChat(""..camp.respawnText) end
  1824.                                     break
  1825.                                 end
  1826.                             end
  1827.                         end
  1828.                     end
  1829.                 end
  1830.             end
  1831.         end
  1832.        
  1833.         function JungleDisplayOnDeleteObj(object)
  1834.             if object ~= nil then
  1835.                 jungle.removeCreep(object)
  1836.             end
  1837.         end
  1838.        
  1839.         function JungleDisplayOnTick()
  1840.             if GetGame().isOver then return end
  1841.             -- walkaround OnWndMsg bug
  1842.             jungle.shiftKeyPressed = IsKeyDown(16)
  1843.             if jungle.useMiniMapVersion == false and jungle.display.moveUnder and IsKeyDown(1) then
  1844.                 jungle.display.move = true
  1845.             elseif jungle.useMiniMapVersion == false and jungle.display.move and IsKeyDown(1) == false then
  1846.                 jungle.display.move = false
  1847.                 jungle.display.moveUnder = false
  1848.                 jungle.display.cursorShift = nil
  1849.                 jungle.writeConfigs()
  1850.             elseif jungle.useMiniMapVersion == false and jungle.display.rotateUnder and IsKeyDown(1) then
  1851.                 jungle.display.rotation = (jungle.display.rotation == 3 and 0 or jungle.display.rotation + 1)
  1852.                 jungle.writeConfigs()
  1853.             end
  1854.             local tick = GetTickCount()
  1855.             local monsterCount = 0
  1856.             for i,monster in pairs(jungle.monsters[mapName]) do
  1857.                 for j,camp in pairs(monster.camps) do
  1858.                     local campStatus = 0
  1859.                     for k,creepPack in ipairs(camp.creeps) do
  1860.                         for l,creep in ipairs(creepPack) do
  1861.                             if creep.object ~= nil and creep.object.dead == false then
  1862.                                 if l == 1 then
  1863.                                     campStatus = 1
  1864.                                 elseif campStatus ~= 1 then
  1865.                                     campStatus = 2
  1866.                                 end
  1867.                             end
  1868.                         end
  1869.                     end
  1870.                     --[[  Not used until camp.showOnMinimap work
  1871.                     if (camp.object and camp.object.showOnMinimap == 1) then
  1872.                         -- camp is here
  1873.                         if campStatus == 0 then campStatus = 3 end
  1874.                     elseif camp.status == 3 then                        -- empty not seen when killed
  1875.                         campStatus = 5
  1876.                     elseif campStatus == 0 and (camp.status == 1 or camp.status == 2) then
  1877.                         campStatus = 4
  1878.                         camp.deathTick = tick
  1879.                     end
  1880.                     ]]
  1881.                     -- temp fix until camp.showOnMinimap work
  1882.                     -- not so good
  1883.                     if jungle.useMiniMapVersion and camp.object ~= nil then camp.minimap = GetMinimap(camp.object) end
  1884.                     if camp.object ~= nil and campStatus == 0 then
  1885.                         if (camp.status == 1 or camp.status == 2) then
  1886.                             campStatus = 4
  1887.                             camp.deathTick = tick
  1888.                             camp.advisedBefore = false
  1889.                             camp.advised = false
  1890.                             camp.respawnTime = math.ceil((tick - startTick) / 1000) + monster.respawn
  1891.                             camp.respawnText = (camp.enemyTeam and "Enemy " or "")..monster.name.." respawn at "..TimerText(camp.respawnTime)
  1892.                         elseif (camp.status == 4) then
  1893.                             campStatus = 4
  1894.                         else
  1895.                             campStatus = 3
  1896.                         end
  1897.                     end
  1898.                     if jungle.useMiniMapVersion == false and campStatus ~= 0 then
  1899.                         if jungle.display.rotation == 0 then
  1900.                             camp.shift = { x = monsterCount * jungle.display.size, y = (camp.enemyTeam and jungle.display.size + 26 or jungle.display.size + 6), }
  1901.                         elseif jungle.display.rotation == 1 then
  1902.                             camp.shift = { x = jungle.display.size + 6, y = (monsterCount * jungle.display.size) + (camp.enemyTeam and 32 or 12 ), }
  1903.                         elseif jungle.display.rotation == 2 then
  1904.                             camp.shift = { x = monsterCount * jungle.display.size, y = (camp.enemyTeam and -(jungle.display.size - 24) or -(jungle.display.size - 44)), }
  1905.                         elseif jungle.display.rotation == 3 then
  1906.                             camp.shift = { x = -(jungle.display.size + 6), y = (monsterCount * jungle.display.size) + (camp.enemyTeam and 32 or 12 ), }
  1907.                         end
  1908.                     end
  1909.                     if camp.status ~= campStatus or campStatus == 4 then
  1910.                         if campStatus ~= 0 then
  1911.                             if monster.isSeen == false then monster.isSeen = true end
  1912.                             camp.status = campStatus
  1913.                         end
  1914.                         if camp.status == 1 then                -- ready
  1915.                             camp.drawText = "ready"
  1916.                             camp.drawColor = 0xFF00FF00
  1917.                         elseif camp.status == 2 then            -- ready, master creeps dead
  1918.                             camp.drawText = "stolen"
  1919.                             camp.drawColor = 0xFFFF0000
  1920.                         elseif camp.status == 3 then            -- ready, not creeps shown
  1921.                             camp.drawText = "   ?"
  1922.                             camp.drawColor = 0xFF00FF00        
  1923.                         elseif camp.status == 4 then            -- empty from creeps kill
  1924.                             local secondLeft = jungle.timerSecondLeft(tick, monster.respawn, camp.deathTick)
  1925.                             if monster.advise == true and (jungle.adviceEnemyMonsters == true or camp.enemyTeam == false) then
  1926.                                 if secondLeft == 0 and camp.advised == false then
  1927.                                     camp.advised = true
  1928.                                     if jungle.textOnRespawn then PrintChat("<font color='#00FFCC'>"..(camp.enemyTeam and "Enemy " or "")..monster.name.." has respawned</font>") end
  1929.                                     if jungle.pingOnRespawn then PingSignal(PING_FALLBACK,camp.object.x,camp.object.y,camp.object.z,2) end
  1930.                                 elseif secondLeft <= jungle.adviceBefore and camp.advisedBefore == false then
  1931.                                     camp.advisedBefore = true
  1932.                                     if jungle.textOnRespawnBefore then PrintChat("<font color='#00FFCC'>"..(camp.enemyTeam and "Enemy " or "")..monster.name.." will respawn in "..secondLeft.." sec</font>") end
  1933.                                     if jungle.pingOnRespawnBefore then PingSignal(PING_FALLBACK,camp.object.x,camp.object.y,camp.object.z,2) end
  1934.                                 end
  1935.                             end
  1936.                             -- temp fix until camp.showOnMinimap work
  1937.                             if secondLeft == 0 then
  1938.                                 camp.status = 0
  1939.                             end
  1940.                             camp.drawText = " "..TimerText(secondLeft)
  1941.                             camp.drawColor = 0xFFFFFF00
  1942.                         elseif camp.status == 5 then            -- camp found empty (not using yet)
  1943.                             camp.drawText = "   -"
  1944.                             camp.drawColor = 0xFFFF0000
  1945.                         end
  1946.                     end
  1947.                     if jungle.shiftKeyPressed and camp.status == 4 then
  1948.                         camp.drawText = " "..(camp.respawnTime ~= nil and TimerText(camp.respawnTime) or "")
  1949.                         if jungle.useMiniMapVersion then
  1950.                             camp.textUnder = (CursorIsUnder(camp.minimap.x - 9, camp.minimap.y - 5, 20, 8))
  1951.                         else
  1952.                             camp.textUnder = (jungle.display.move == false and jungle.display.moveUnder == false and jungle.display.rotateUnder == false and CursorIsUnder(jungle.display.x + camp.shift.x, jungle.display.y + camp.shift.y, jungle.display.size, 16))
  1953.                         end
  1954.                     else
  1955.                         camp.textUnder = false
  1956.                     end
  1957.                 end
  1958.                     -- update monster pos
  1959.                 if monster.isSeen == true and jungle.useMiniMapVersion == false then
  1960.                     if jungle.display.rotation == 0 or jungle.display.rotation == 2 then
  1961.                         monster.shift = { x = monsterCount * jungle.display.size, y = 0, }
  1962.                     else
  1963.                         monster.shift = { x = 0, y = monsterCount * jungle.display.size, }
  1964.                     end
  1965.                     monster.iconUnder = (jungle.shiftKeyPressed and jungle.display.move == false and jungle.display.moveUnder == false and jungle.display.rotateUnder == false and CursorIsUnder(jungle.display.x + monster.shift.x, jungle.display.y + monster.shift.y, jungle.display.size, jungle.display.size))
  1966.                     monsterCount = monsterCount + 1
  1967.                 end
  1968.             end
  1969.             -- update icon mouse
  1970.             if jungle.useMiniMapVersion == false then
  1971.                 if jungle.display.move == true then
  1972.                     if jungle.display.cursorShift == nil or jungle.display.cursorShift.x == nil or jungle.display.cursorShift.y == nil then
  1973.                         jungle.display.cursorShift = { x = GetCursorPos().x - jungle.display.x, y = GetCursorPos().y - jungle.display.y, }
  1974.                     else
  1975.                         jungle.display.x = GetCursorPos().x - jungle.display.cursorShift.x
  1976.                         jungle.display.y = GetCursorPos().y - jungle.display.cursorShift.y
  1977.                     end
  1978.                 else
  1979.                     jungle.display.moveUnder = (jungle.shiftKeyPressed and CursorIsUnder(jungle.display.x, jungle.display.y, 16, 16))
  1980.                     jungle.display.rotateUnder = (jungle.shiftKeyPressed and CursorIsUnder(jungle.display.x + 16, jungle.display.y, 16, 16))
  1981.                 end
  1982.             end
  1983.         end
  1984.     end
  1985. end
  1986.  
  1987. -- ############################################# JUNGLEDISPLAY ################################################
  1988.  
  1989. -- ############################################# ENEMY RANGE ################################################
  1990.  
  1991. -- Simple Player and Enemy Range Circles
  1992. -- by heist
  1993. -- v1.0
  1994. -- Initial release
  1995. -- v1.0.1
  1996. -- Adjusted AA range to be more accurate
  1997. -- Adopted to studio by Mistal
  1998.  
  1999. champAux = {}
  2000. champ = {
  2001.     Ahri = { 880, 975 },
  2002.     Akali = { 800, 0 },
  2003.     Alistar = { 650, 0 },
  2004.     Amumu = { 0, 600 },
  2005.     Anivia = { 650, 1100 },
  2006.     Annie = { 625, 0 },
  2007.     Ashe = { 1200, 0 },
  2008.     Blitzcrank = { 1000, 0 },
  2009.     Brand = { 900, 0 },
  2010.     Caitlyn = { 1300, 0 },
  2011.     Cassiopeia = { 700, 850 },
  2012.     Chogath = { 950, 700 },
  2013.     Corki = { 1200, 0 },
  2014.     Darius = {550, 475}, -- his E and R
  2015.     Diana = {830, 900}, -- Q and R
  2016.     Draven = {550, 0 }, -- his Ulti is global, his normal range is 550
  2017.     DrMundo = { 1000, 0 },
  2018.     Evelynn = { 325, 0 },
  2019.     Ezreal = { 1000, 0 },
  2020.     Fiddlesticks = { 475, 575 },
  2021.     Fiora = { 600, 400 },
  2022.     Fizz = { 550, 1275 },
  2023.     Galio = { 1000, 550 },
  2024.     Gangplank = { 625, 0 },
  2025.     Garen = { 400, 0 },
  2026.     Gragas = { 1150, 1050 },
  2027.     Graves = { 750, 0 },
  2028.     Hecarim = { 325, 0 }, -- Placeholder
  2029.     Heimerdinger = { 1000, 0 },
  2030.     Irelia = { 650, 425 },
  2031.     Janna = { 800, 1700 },
  2032.     JarvanIV = { 770, 650 },
  2033.     Jax = { 700, 0 },
  2034.     Jayce = { 500, 1050 }, -- normal range attack and ulti
  2035.     Karma = { 800, 0 },
  2036.     Karthus = { 850, 1000 },
  2037.     Kassadin = { 700, 650 },
  2038.     Katarina = { 700, 0 },
  2039.     Kayle = { 650, 0 },
  2040.     Kennen = { 1050, 0 },
  2041.     KogMaw = { 1000, 0 },
  2042.     Leblanc = { 1300, 600 },
  2043.     LeeSin = { 1100, 0 },
  2044.     Leona = { 1200, 0 },
  2045.     Lulu = { 925, 650 },
  2046.     Lux = { 1000, 0 },
  2047.     Malphite = { 1000, 0 },
  2048.     Malzahar = { 700, 0 },
  2049.     Maokai = { 650, 0 },
  2050.     MasterYi = { 600, 0 },
  2051.     MissFortune = { 625, 1400 },
  2052.     MonkeyKing = { 625, 325 },
  2053.     Mordekaiser = { 700, 1125 },
  2054.     Morgana = { 1300, 600 },
  2055.     Nasus = { 700, 0 },
  2056.     Nautilus = { 950, 850 },
  2057.     Nidalee = { 1500, 0 },
  2058.     Nocturne = { 1200, 465 },
  2059.     Nunu = { 550, 0 },
  2060.     Olaf = { 1000, 0 },
  2061.     Orianna = { 825, 0 },
  2062.     Pantheon = { 0, 600 },
  2063.     Poppy = { 525, 0 },
  2064.     Rammus = { 0, 325 },
  2065.     Renekton = { 550, 0 },
  2066.     Riven = { 0, 250 },
  2067.     Rumble = { 600, 1000 },
  2068.     Ryze = { 675, 625 },
  2069.     Sejuani = { 700, 1150 },
  2070.     Shaco = { 625, 0 },
  2071.     Shen = { 0, 600 },
  2072.     Shyvana = { 1000, 0 },
  2073.     Singed = { 0, 125 },
  2074.     Sion = { 550, 0 },
  2075.     Sivir = { 1100, 0 },
  2076.     Skarner = { 600, 350 },
  2077.     Sona = { 0, 1000 },
  2078.     Soraka = { 0, 725 },
  2079.     Swain = { 900, 0 },
  2080.     Syndra = { 550, 0 },
  2081.     Talon = { 700, 0 },
  2082.     Taric = { 0, 625 },
  2083.     Teemo = { 680, 0 },
  2084.     Tristana = { 900, 700 },
  2085.     Trundle = { 0, 1000 },
  2086.     Tryndamere = { 660, 0 },
  2087.     TwistedFate = { 1700, 0 },
  2088.     Twitch = { 1200, 0 },
  2089.     Udyr = { 625, 0 },
  2090.     Urgot = { 1000, 0 },
  2091.     Varus = { 925, 1075 },
  2092.     Vayne = { 0, 450 },
  2093.     Veigar = { 650, 0 },
  2094.     Viktor = { 600, 0 },
  2095.     Vladimir = { 600, 700 },
  2096.     Volibear = { 425, 0 },
  2097.     Warwick = { 0, 700 },
  2098.     Xerath = { 1300, 900 },
  2099.     XinZhao = { 650, 0 },
  2100.     Yorick = { 600, 0 },
  2101.     Ziggs = { 1000, 850 },
  2102.     Zilean = { 700, 0 },
  2103.     Zyra = { 825, 1100 },
  2104. }
  2105. champAux = champ
  2106. player = GetMyHero()
  2107. heroindex, c = {}, 0
  2108. for i = 1, heroManager.iCount do
  2109. local h = heroManager:getHero(i)
  2110. if h.name == player.name or h.team ~= player.team then
  2111. heroindex[c+1] = i
  2112. c = c+1
  2113. end
  2114. end
  2115.  
  2116. function RangesOnDraw()
  2117. for _,v in ipairs(heroindex) do
  2118. local h = heroManager:getHero(v)
  2119. local t = champAux[h.charName]
  2120.  
  2121. if h.visible and not h.dead then
  2122.          if h.range > 400 and (t == nil or (h.range + 100 ~= t[1] and h.range + 100 ~= t[2])) then
  2123.          DrawCircle(h.x, h.y, h.z,h.range + 100, 0xFF646464)
  2124.          end
  2125.          if t ~= nil then
  2126.          if t[1] > 0 then
  2127.                  DrawCircle(h.x, h.y, h.z,t[1], 0xFF006400)
  2128.          end
  2129.          if t[2] > 0 then
  2130.                  DrawCircle(h.x, h.y, h.z,t[2], 0xFF640000)
  2131.          end
  2132.          end
  2133. end
  2134. end
  2135. end
  2136.  
  2137. -- ############################################# ENEMY RANGE ################################################
  2138.  
  2139. -- ############################################# WARD PREDICTION RANGE ################################################
  2140.  
  2141. --[[
  2142.     Ward Prediction 1.0 by eXtragoZ
  2143.            
  2144.         It uses AllClass
  2145.    
  2146.     Features:
  2147.         - Prints in the chat the amount of wards purchased and used by allies and enemies
  2148.         - Indicates the position where may be the ward that use the enemy with circles and says the remaining duration
  2149.         - You can remove the marks pressing shift and double click in the circle
  2150. ]]
  2151. --[[        Config      ]]
  2152. local WardPredictionHK = 16 --shift
  2153. --[[        Code        ]]
  2154. local WardPredictionlastclick = 0
  2155. local WardPredictiondeletewards = 0
  2156. local WardPredictioncountSightWard,WardPredictionlastcountSightWard,WardPredictioncountVisionWard,WardPredictioncountlastcountVisionWard = {},{},{},{}
  2157. local WardPredictionitemslot = {ITEM_1,ITEM_2,ITEM_3,ITEM_4,ITEM_5,ITEM_6}
  2158. local WardPredictioncolorteam = "#0095FF"
  2159. local WardPredictionunittraveled = {}
  2160. local WardPredictionMissTimer = {}
  2161. local WardPredictionMissSec = {}
  2162. local WardPredictiontick_heros = {}
  2163. local WardPredictioncenterpos = {}
  2164. local WardPredictionpossibleposlist = {}
  2165.  
  2166. function WardPredictionOnLoad()
  2167.     for i=1, heroManager.iCount do WardPredictioncountSightWard[i],WardPredictionlastcountSightWard[i],WardPredictioncountVisionWard[i],WardPredictioncountlastcountVisionWard[i] = 0,0,0,0 end
  2168.     PrintChat(" >> Ward Prediction 1.0 loaded!")
  2169. end
  2170. function WardPredictionOnTick()
  2171.     for i=1, heroManager.iCount do
  2172.         local champion = heroManager:GetHero(i)
  2173.         WardPredictioncountSightWard[i] = 0
  2174.         WardPredictioncountVisionWard[i] = 0
  2175.         for j=1, 6 do
  2176.             local item = champion:getItem(WardPredictionitemslot[j])
  2177.             if item ~= nil and item.id == 2044 then WardPredictioncountSightWard[i] = WardPredictioncountSightWard[i] + item.stacks end
  2178.             if item ~= nil and item.id == 2043 then WardPredictioncountVisionWard[i] = WardPredictioncountVisionWard[i] + item.stacks end
  2179.         end
  2180.         WardPredictioncolorteam = (champion.team == myHero.team and "#0095FF" or "#FF0000")
  2181.         if WardPredictionlastcountSightWard[i] > WardPredictioncountSightWard[i] then
  2182.             PrintChat("<font color='"..WardPredictioncolorteam.."'>"..champion.charName.."</font><font color='#EEA111'> used "..WardPredictionlastcountSightWard[i]-WardPredictioncountSightWard[i].." </font><font color='#199C33'>Sight Ward</font>")
  2183.             if WardPredictionunittraveled[i] ~= nil and champion.team ~= myHero.team then
  2184.                 table.insert(WardPredictionpossibleposlist, {x = (WardPredictioncenterpos[i].x+champion.x)/2, y = (WardPredictioncenterpos[i].y+champion.y)/2, z = (WardPredictioncenterpos[i].z+champion.z)/2, wardtime = GetTickCount()+180000, warddistance = WardPredictionunittraveled[i]/2+680})
  2185.             end
  2186.         end
  2187.         if WardPredictionlastcountSightWard[i] < WardPredictioncountSightWard[i] then
  2188.             PrintChat("<font color='"..WardPredictioncolorteam.."'>"..champion.charName.."</font><font color='#FFFC00'> buy "..WardPredictioncountSightWard[i]-WardPredictionlastcountSightWard[i].." </font><font color='#199C33'>Sight Ward</font>")
  2189.         end
  2190.         if WardPredictioncountlastcountVisionWard[i] > WardPredictioncountVisionWard[i] then
  2191.             PrintChat("<font color='"..WardPredictioncolorteam.."'>"..champion.charName.."</font><font color='#EEA111'> used "..WardPredictioncountlastcountVisionWard[i]-WardPredictioncountVisionWard[i].." </font><font color='#C000FF'>Vision Ward</font>")
  2192.             if WardPredictionunittraveled[i] ~= nil and champion.team ~= myHero.team then
  2193.                 table.insert(WardPredictionpossibleposlist, {x = (WardPredictioncenterpos[i].x+champion.x)/2, y = (WardPredictioncenterpos[i].y+champion.y)/2, z = (WardPredictioncenterpos[i].z+champion.z)/2, wardtime = GetTickCount()+180000, warddistance = WardPredictionunittraveled[i]/2+680})
  2194.             end
  2195.         end
  2196.         if WardPredictioncountlastcountVisionWard[i] < WardPredictioncountVisionWard[i] then
  2197.             PrintChat("<font color='"..WardPredictioncolorteam.."'>"..champion.charName.."</font><font color='#FFFC00'> buy "..WardPredictioncountVisionWard[i]-WardPredictioncountlastcountVisionWard[i].." </font><font color='#C000FF'>Vision Ward</font>")
  2198.         end
  2199.         WardPredictionlastcountSightWard[i] = WardPredictioncountSightWard[i]
  2200.         WardPredictioncountlastcountVisionWard[i] = WardPredictioncountVisionWard[i]
  2201.     end
  2202.     for i,object in ipairs(WardPredictionpossibleposlist) do
  2203.         if GetTickCount() > object.wardtime then
  2204.             table.remove(WardPredictionpossibleposlist,i)
  2205.         elseif GetTickCount()-WardPredictiondeletewards <= 50 then
  2206.             if GetDistance(object,mousePos)<=object.warddistance then
  2207.                 table.remove(WardPredictionpossibleposlist,i)
  2208.             end
  2209.         end
  2210.     end
  2211.     for i=1, heroManager.iCount do
  2212.         local heros = heroManager:GetHero(i)
  2213.         if heros.team ~= myHero.team and not heros.visible and not heros.dead then
  2214.             if WardPredictiontick_heros[i] == nil then WardPredictiontick_heros[i] = GetTickCount() end
  2215.             WardPredictionMissTimer[i] = GetTickCount() - WardPredictiontick_heros[i]          
  2216.             WardPredictionMissSec[i] =  WardPredictionMissTimer[i]/1000
  2217.             WardPredictionunittraveled[i] = heros.ms*WardPredictionMissSec[i]
  2218.         else
  2219.             WardPredictiontick_heros[i] = nil
  2220.             WardPredictionMissTimer[i] = nil
  2221.             WardPredictionMissSec[i] = 0
  2222.             WardPredictionunittraveled[i] = 0
  2223.         end
  2224.         WardPredictioncenterpos[i] = {x = heros.x, y = heros.y, z = heros.z}
  2225.     end
  2226. end
  2227.  
  2228. function WardPredictionOnDraw()
  2229.     local order = 0
  2230.     for i,object in ipairs(WardPredictionpossibleposlist) do
  2231.         if object.warddistance <= 10000 then
  2232.             DrawCircle(object.x, object.y, object.z, object.warddistance, 0xFF11FF)
  2233.         end
  2234.         if GetDistance(object,mousePos)<=object.warddistance then
  2235.             local cursor = GetCursorPos()
  2236.             DrawText("Possible ward "..timerText((object.wardtime-GetTickCount())/1000),16, cursor.x, cursor.y + 50+15*order, RGBA(255,100,0,255))
  2237.             order = order+1
  2238.         end
  2239.     end
  2240. end
  2241.  
  2242. function WardPredictionOnWndMsg(msg,key)
  2243.     if IsKeyDown(WardPredictionHK) then
  2244.         if msg == WM_LBUTTONUP then
  2245.             if GetTickCount()-WardPredictionlastclick <= 200 then
  2246.                 WardPredictiondeletewards = GetTickCount()
  2247.             end
  2248.             WardPredictionlastclick = GetTickCount()
  2249.         end
  2250.     end
  2251. end
  2252.  
  2253. -- ############################################# WARD PREDICTION RANGE ################################################
  2254.  
  2255.  
  2256. -- XT002 --
  2257.  
  2258. function OnLoad()
  2259.     KCConfig = scriptConfig("XT002 HUD", "xt002hud")
  2260.     KCConfig:addParam("MinionMarker", "Enable Minion Marker", SCRIPT_PARAM_ONOFF, true)
  2261.     KCConfig:addParam("TowerRange", "Enable Tower Range", SCRIPT_PARAM_ONOFF, true)
  2262.     KCConfig:addParam("StunAlert", "Enable Stun Alert", SCRIPT_PARAM_ONOFF, true)
  2263.     KCConfig:addParam("StunAlertSummary", "Enable Stun Alert Summary", SCRIPT_PARAM_ONOFF, true)
  2264.     KCConfig:addParam("LowAwareness", "Enable Low Awareness", SCRIPT_PARAM_ONOFF, true)
  2265.     KCConfig:addParam("HiddenObjects", "Enable Hidden Objects", SCRIPT_PARAM_ONOFF, true)
  2266.     KCConfig:addParam("JungleDisplay", "Enable Jungle Display", SCRIPT_PARAM_ONOFF, true)
  2267.     KCConfig:addParam("Ranges", "Enable Player & Enemy Ranges", SCRIPT_PARAM_ONOFF, false)
  2268.     KCConfig:addParam("WardPrediction", "Enable Ward Prediction", SCRIPT_PARAM_ONOFF, false)
  2269.    
  2270.     JungleDisplayOnLoad()
  2271.     TowerRangeOnLoad()
  2272.     MinionMarkerOnLoad()
  2273.     HiddenObjectsOnLoad()
  2274.     WardPredictionOnLoad()
  2275. end
  2276.  
  2277. function OnTick()
  2278.     if KCConfig.TowerRange then
  2279.         TowerRangeOnTick()
  2280.     end
  2281.     if KCConfig.LowAwareness then
  2282.         LowAwarenessOnTick()
  2283.     end
  2284.     if KCConfig.HiddenObjects then
  2285.         HiddenObjectsOnTick()
  2286.     end
  2287.     if KCConfig.JungleDisplay then
  2288.         JungleDisplayOnTick()
  2289.     end
  2290.     if KCConfig.WardPrediction then
  2291.         WardPredictionOnTick()
  2292.     end
  2293. end
  2294.  
  2295. function OnCreateObj(obj)
  2296.     if KCConfig.MinionMarker then
  2297.         MinionMarkerOnCreateObj(obj)
  2298.     end
  2299.     if KCConfig.HiddenObjects then
  2300.         HiddenObjectsOnCreateObj(obj)
  2301.     end
  2302.     if KCConfig.JungleDisplay then
  2303.         JungleDisplayOnCreateObj(obj)
  2304.     end
  2305. end
  2306.  
  2307. function OnDeleteObj(obj)
  2308.     if KCConfig.TowerRange then
  2309.         TowerRangeOnDeleteObj(obj)
  2310.     end
  2311.     if KCConfig.HiddenObjects then
  2312.         HiddenObjectsOnDeleteObj(obj)
  2313.     end
  2314.     if KCConfig.JungleDisplay then
  2315.         if JungleDisplayOnDeleteObj then JungleDisplayOnDeleteObj(obj) end
  2316.     end
  2317. end
  2318.  
  2319. function OnDraw()
  2320.     if KCConfig.MinionMarker then
  2321.         MinionMarkerOnDraw()
  2322.     end
  2323.     if KCConfig.TowerRange then
  2324.         TowerRangeOnDraw()
  2325.     end
  2326.     if KCConfig.StunAlert then
  2327.         StunAlertOnDraw()
  2328.     end
  2329.     if KCConfig.LowAwareness then
  2330.         LowAwarenessOnDraw()
  2331.     end
  2332.     if KCConfig.HiddenObjects then
  2333.         HiddenObjectsOnDraw()
  2334.     end
  2335.     if KCConfig.JungleDisplay then
  2336.         JungleDisplayOnDraw()
  2337.     end
  2338.     if KCConfig.Ranges then
  2339.         RangesOnDraw()
  2340.     end
  2341.     if KCConfig.WardPrediction then
  2342.         WardPredictionOnDraw()
  2343.     end
  2344. end
  2345.  
  2346. function OnWndMsg(msg,key)
  2347.     if KCConfig.JungleDisplay then
  2348.         JungleDisplayOnWndMsg(msg, key  )
  2349.     end
  2350.     if KCConfig.StunAlert then
  2351.         StunAlertOnWndMsg(msg, key)
  2352.     end
  2353.     if KCConfig.WardPrediction then
  2354.         WardPredictionOnWndMsg(msg, key)
  2355.     end
  2356. end
  2357.  
  2358. PrintChat(" >> XT002-HUD Loaded <<")
Advertisement
Add Comment
Please, Sign In to add comment