Advertisement
Kevinkev

Fixed

Feb 6th, 2013
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.52 KB | None | 0 0
  1. --[[
  2.  
  3.  
  4. Gangplank Q Autohitter + Enemy Harass
  5.  
  6. Version 1.1 by Wursti
  7.  
  8. History:
  9.  
  10. 1.0  - First Version
  11. 1.01 - Fixed Small Bug Q Damage
  12. 1.1  - Integration of Circle Range Q and Sheen, Trinity and Lich Bane Support
  13.  
  14.  
  15.  
  16.  
  17. ]]--
  18.  
  19.  
  20.  
  21. --[[Hotkeys]]--
  22. local HK = 84
  23. local CHK = 32
  24. local circ = true
  25.  
  26. --[[ Code ]]--
  27.  
  28.  
  29. local myObjectsTable = {}
  30.  
  31. local player = GetMyHero()
  32. local scriptActive = false
  33. local CscriptActive = false
  34. local ResetscriptActive = false
  35. local Sheen = false
  36. local Lich = false
  37. local Trini = false
  38. local mydmg,Qdmg,Sdmg,Ldmg,Tdmg,Bdmg = 0,0,0,0,0,0
  39.  
  40. function OnLoad()
  41. ts = TargetSelector(TARGET_LOW_HP, 625, DAMAGE_PHYSICAL)
  42.  
  43.    for i = 0, objManager.maxObjects, 1 do
  44.           local object = objManager:GetObject(i)
  45.           if minionValid(object) then table.insert(myObjectsTable, object) end
  46.    end
  47. end
  48.  
  49. if player.charName == "Gangplank" then
  50.  
  51. PrintChat(" Gang Makin Money Script + Harass!")
  52.  
  53.  
  54.  
  55. function OnWndMsg(msg,key)
  56.   if key == HK then
  57.         if msg == KEY_DOWN then
  58.             if scriptActive then
  59.                 scriptActive = false
  60.                 PrintChat("Auto Q Enemies Disabled")
  61.             else
  62.                 scriptActive = true
  63.                 PrintChat("Auto Q Enemies Enabled")
  64.             end
  65.         end
  66.   elseif key == CHK then
  67.         if msg == KEY_DOWN and CscriptActive == false then
  68.            ResetscriptActive = scriptActive
  69.            CscriptActive = true
  70.         elseif msg == KEY_DOWN then
  71.                 CscriptActive = true
  72.                 scriptActive = false
  73.             else
  74.                 CscriptActive = false
  75.                 scriptActive = ResetscriptActive
  76.            
  77.         end
  78.   end
  79. end
  80. function minionValid(object)
  81.     return object ~= nil and object.valid and string.find(object.name,"Minion_") == 1 and object.team ~= player.team and object.dead == false
  82. end
  83. function OnCreateObj(object)
  84.    if minionValid(object) then table.insert(myObjectsTable, object) end
  85. end
  86. function OnTick()
  87.  
  88. ts:update()
  89.  
  90. Sheen, Trini, Lich = GetInventorySlotItem(3057), GetInventorySlotItem(3078), GetInventorySlotItem(3100)
  91.  
  92.  
  93.    if scriptActive == true then
  94.      if myHero:GetSpellData(_Q).level > 0 and myHero:CanUseSpell(_Q) == READY then
  95.         for i,minion in ipairs(myObjectsTable) do
  96.        
  97.            if minionValid(minion) then
  98.               local Qdmg = getDmg("Q",minion,myHero)
  99.             PrintChat(Qdmg)
  100.               local Bdmg = getDmg("AD",minion,myHero)
  101.               local Sdmg = (Sheen and Bdmg or 0)
  102.               local Tdmg = (Trini and 1.5 * Bdmg or 0)
  103.               local Ldmg = (Lich and getDmg("LICHBANE",minion,myHero) or 0)
  104.               mydmg = Qdmg + Sdmg + Tdmg + Ldmg
  105.               if minion.health <= mydmg and GetDistance(minion,myHero) < 625 then
  106.                 PrintChat("dmg:" ..mydmg )
  107.                 PrintChat("dmg:" ..Sdmg )
  108.                  CastSpell(_Q,minion)
  109.               end
  110.  else table.remove(myObjectsTable, i) i = i - 1
  111.         end
  112.         end
  113.     end
  114.  
  115.  
  116.     elseif CscriptActive == true then
  117.       if myHero:GetSpellData(_Q).level > 0 and myHero:CanUseSpell(_Q) == READY then
  118.         if ts.target ~= nil and myHero:CanUseSpell(_Q) == READY and myHero:GetDistance(ts.target) < 625 then
  119.                  CastSpell(_Q, ts.target)
  120.         end
  121.      end
  122.    end  
  123. end  
  124.        
  125.  
  126.        
  127. function OnSendChat(msg)
  128.  
  129.    TargetSelector__OnSendChat(msg)
  130.  
  131.    ts:OnSendChat(msg, "pri")
  132.  
  133. end
  134.  
  135. function OnDraw()
  136.  
  137. if circ == true then
  138. DrawCircle(player.x,player.y,player.z,625,0xFF80FF00)
  139. end
  140.  
  141. if CscriptActive == true then
  142. DrawText("Champion Hunt", 20, 120, 40, 0xFFfff600)
  143. end
  144.  
  145. if scriptActive == true then
  146. DrawText("Minion Hunt", 20, 120, 60, 0xFFfff600)
  147. end
  148.  
  149. end
  150.  
  151.  
  152.  
  153. else
  154. PrintChat(" No Gang no Money!")
  155. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement