Advertisement
Guest User

Untitled

a guest
Jul 4th, 2015
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.42 KB | None | 0 0
  1. if myHero.charName ~= "Rengar" then return end
  2.  
  3. local ts
  4. local ts = TargetSelector(TARGET_LESS_CAST, 800, DAMAGE_PHYSICAL, false)
  5. local VP = nil
  6. local ignite = nil
  7. local Smite = nil
  8.  
  9. --<<<<<<<<<<<____________LOADLIBS___________>>>>>>>>>>>>
  10. if not _G.Reborn_Loaded then
  11. if FileExist(LIB_PATH .. "/SxOrbWalk.lua") then
  12. require("SxOrbWalk")
  13. end
  14. end
  15.  
  16. if FileExist(LIB_PATH .. "/VPrediction.lua") then
  17. require("VPrediction")
  18. VP = VPrediction()
  19. end
  20.  
  21. --<<<<<<<<<<<____________MENU___________>>>>>>>>>>>>
  22. function Menu()
  23. if not _G.Reborn_Loaded then
  24. SxOrb:LoadToMenu()
  25. end
  26.  
  27. if myHero:GetSpellData(SUMMONER_1).name:find("summonerdot") then
  28. ignite = SUMMONER_1
  29. elseif myHero:GetSpellData(SUMMONER_2).name:find("summonerdot") then
  30. ignite = SUMMONER_2
  31. end
  32.  
  33. if myHero:GetSpellData(SUMMONER_1).name:find(Smite.name[1]) or myHero:GetSpellData(SUMMONER_1).name:find(Smite.name[2]) or myHero:GetSpellData(SUMMONER_1).name:find(Smite.name[3]) or myHero:GetSpellData(SUMMONER_1).name:find(Smite.name[4]) or myHero:GetSpellData(SUMMONER_1).name:find(Smite.name[5]) then
  34. Smite = SUMMONER_1
  35. elseif myHero:GetSpellData(SUMMONER_2).name:find(Smite.name[1]) or myHero:GetSpellData(SUMMONER_2).name:find(Smite.name[2]) or myHero:GetSpellData(SUMMONER_2).name:find(Smite.name[3]) or myHero:GetSpellData(SUMMONER_2).name:find(Smite.name[4]) or myHero:GetSpellData(SUMMONER_2).name:find(Smite.name[5]) then
  36. Smite = SUMMONER_2
  37. end
  38.  
  39. r = scriptConfig("FunBox Rengar", "rengar")
  40. r:addSubMenu("important", "imp")
  41. r.imp:addParam("fury", "EMPOWERED", SCRIPT_PARAM_LIST, 3, {"< Q >", "< W >", "< E >"})
  42. r.imp:addParam("on", "combo", SCRIPT_PARAM_ONKEYDOWN, false, 32)
  43. r:addSubMenu("autoheal", "heal")
  44. r.heal:addParam("hpmin", "%Hp to heal", SCRIPT_PARAM_SLICE, 25, 0, 100, 0)
  45.  
  46. if ignite == SUMMONER_1 or ignite == SUMMONER_2 then
  47. r:addSubMenu("Ignite", "ign")
  48. r.ign:addParam("autoign", "killsteal with ignite", SCRIPT_PARAM_ONOFF, true)
  49. for i, enemy in ipairs(GetEnemyHeroes()) do
  50. r.ign:addParam(enemy.charName, "Use Ignite on " .. enemy.charName, SCRIPT_PARAM_ONOFF, true)
  51. end
  52. end
  53.  
  54. if Smite == SUMMONER_1 or Smite == SUMMONER_2 then
  55. r:addSubMenu("Smite", "smt")
  56. r.smt:addParam("slowsmt", "use in combo", SCRIPT_PARAM_ONOFF, true)
  57. for i, enemy in ipairs(GetEnemyHeroes()) do
  58. r.smt:addParam(enemy.charName, "Use Smite on " .. enemy.charName, SCRIPT_PARAM_ONOFF, true)
  59. end
  60. end
  61. end
  62.  
  63. -- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  64. -- | ____________________________________________ ONLOAD _________________________________________________________________ |
  65. -- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  66.  
  67. function OnLoad()
  68. Smite =
  69. {
  70. name = {"summonersmite",
  71. "S5_SummonerSmiteQuick",
  72. "ItemSmiteAoE",
  73. "S5_SummonerSmitePlayerGanker",
  74. "S5_SummonerSmiteDuel"
  75. }
  76. }
  77. ItemNames =
  78. {
  79. [3074] = "ItemTiamatCleave",
  80. [3077] = "ItemTiamatCleave",
  81. [3139] = "ItemMercurial",
  82. [3140] = "QuicksilverSash",
  83. [3142] = "YoumusBlade",
  84. [3143] = "RanduinsOmen",
  85. [3144] = "BilgewaterCutlass",
  86. [3146] = "HextechGunblade",
  87. [3153] = "ItemSwordOfFeastAndFamine",
  88. [3157] = "ZhonyasHourglass",
  89. }
  90. _G.ITEM_1 = 06
  91. _G.ITEM_2 = 07
  92. _G.ITEM_3 = 08
  93. _G.ITEM_4 = 09
  94. _G.ITEM_5 = 10
  95. _G.ITEM_6 = 11
  96. _G.ITEM_7 = 12
  97. ___GetInventorySlotItem = rawget(_G, "GetInventorySlotItem")
  98. _G.GetInventorySlotItem = GetSlotItem
  99. Menu()
  100. print(" >>> Funbox Rengar Loaded!")
  101. end
  102.  
  103. -- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  104. -- | ____________________________________________ ONTICK _________________________________________________________________ |
  105. -- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  106.  
  107. function OnTick()
  108. ts.target = GetCustomTarget()
  109. healing()
  110. combo()
  111. if ignite == SUMMONER_1 or ignite == SUMMONER_2 then
  112. autoignite()
  113. end
  114. end
  115.  
  116. -- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  117. -- | ____________________________________________ FUNCTIONS ______________________________________________________________ |
  118. -- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  119.  
  120. function OnDraw()
  121. local startLeft = WorldToScreen(D3DXVECTOR3(myHero.x, myHero.y - 50, myHero.z))
  122. if r.imp.fury == 1 then
  123. DrawText("Q", 30, startLeft.x, (startLeft.y), 0xFFFFFFFF)
  124. end
  125. if r.imp.fury == 3 then
  126. DrawText("E", 30, startLeft.x, (startLeft.y), 0xFFFFFFFF)
  127. end
  128. end
  129.  
  130. function OnWndMsg(Msg, Key)
  131. if Msg == KEY_DOWN and Key == GetKey("1") then
  132. r.imp.fury = 1
  133. elseif Msg == KEY_DOWN and Key == GetKey("3") then
  134. r.imp.fury = 3
  135. end
  136. end
  137.  
  138. function GetCustomTarget()
  139. ts:update()
  140. if _G.AutoCarry and ValidTarget(_G.AutoCarry.Crosshair:GetTarget()) then return _G.AutoCarry.Crosshair:GetTarget() end
  141. if not _G.Reborn_Loaded then return ts.target end
  142. return ts.target
  143. end
  144.  
  145. function combo()
  146. if r.imp.on then
  147. if Smite == SUMMONER_1 or Smite == SUMMONER_2 then
  148. smiteslow()
  149. end
  150. ccleaner()
  151. botrk()
  152. hydra()
  153. yumu()
  154. hexblade()
  155. omen()
  156. zhonya()
  157. if myHero.mana <= 4 then
  158. if ts.target and (myHero:CanUseSpell(_E) == READY) and GetDistance(ts.target) < 500 then
  159. local CastPosition, HitChance, Position = VP:GetLineCastPosition(ts.target, 0.5, 90, 1000, 1500, myHero, true)
  160. if CastPosition and HitChance >= 2 and GetDistance(CastPosition) < 1000 then
  161. CastSpell(_E, CastPosition.x, CastPosition.z)
  162. end
  163. end
  164. if ts.target and (myHero:CanUseSpell(_W) == READY) and GetDistance(ts.target) < 400 then
  165. CastSpell(_W)
  166. end
  167. if ts.target and (myHero:CanUseSpell(_Q) == READY) and GetDistance(ts.target) < 250 then
  168. CastSpell(_Q)
  169. end
  170. end
  171. if myHero.mana == 5 then
  172. if r.imp.fury == 1 and ts.target then
  173. if ((myHero.health/myHero.maxHealth)*100 <= r.heal.hpmin) then
  174. CastSpell(_W)
  175. elseif ((myHero.health/myHero.maxHealth)*100 > r.heal.hpmin) then
  176. if GetDistance(ts.target) < 250 then
  177. CastSpell(_Q)
  178. end
  179. end
  180. end
  181. if r.imp.fury == 2 and ts.target and GetDistance(ts.target) < 450 then
  182. CastSpell(_W)
  183. end
  184. if r.imp.fury == 3 and ts.target then
  185. if ((myHero.health/myHero.maxHealth)*100 <= r.heal.hpmin) then
  186. CastSpell(_W)
  187. elseif ((myHero.health/myHero.maxHealth)*100 > r.heal.hpmin) then
  188. local CastPosition, HitChance, Position = VP:GetLineCastPosition(ts.target, 0.250, 90, 1000, 1300, myHero, true)
  189. if GetDistance(ts.target) < 500 and GetDistance(ts.target) > 175 then
  190. if CastPosition and HitChance >= 2 then
  191. CastSpell(_E, CastPosition.x, CastPosition.z)
  192. end
  193. elseif GetDistance(ts.target) <= 175 then
  194. CastSpell(_Q)
  195. end
  196. end
  197. end
  198. end
  199. end
  200. end
  201.  
  202. function smiteslow()
  203. if (myHero:CanUseSpell(Smite) == READY) and r.smt.slowsmt or r.smt.killsmt then
  204. for i, enemy in ipairs(GetEnemyHeroes()) do
  205. if r.smt[enemy.charName] then
  206. if ValidTarget(enemy, 400) then
  207. CastSpell(Smite, enemy)
  208. end
  209. end
  210. end
  211. end
  212. end
  213.  
  214. function autoignite()
  215. if (myHero:CanUseSpell(ignite) == READY) and r.ign.autoign then
  216. for i, enemy in ipairs(GetEnemyHeroes()) do
  217. if r.ign[enemy.charName] then
  218. if ValidTarget(enemy, 600) then
  219. local dmg = (50 + (20 * myHero.level))
  220. if enemy.health < dmg then
  221. CastSpell(ignite, enemy)
  222. end
  223. end
  224. end
  225. end
  226. end
  227. end
  228.  
  229. function healing()
  230. if ((myHero.health/myHero.maxHealth)*100 <= r.heal.hpmin) and myHero.mana == 5 then
  231. CastSpell(_W)
  232. end
  233. end
  234.  
  235. function GetSlotItem(id, unit)
  236. unit = unit or myHero
  237. if (not ItemNames[id]) then
  238. return ___GetInventorySlotItem(id, unit)
  239. end
  240. local name = ItemNames[id]
  241. for slot = ITEM_1, ITEM_7 do
  242. local item = unit:GetSpellData(slot).name
  243. if ((#item > 0) and (item:lower() == name:lower())) then
  244. return slot
  245. end
  246. end
  247. end
  248.  
  249. function hydra()
  250. if ts.target then
  251. local Slot = GetInventorySlotItem(3077) or GetInventorySlotItem(3074)
  252. if Slot ~= nil and myHero:CanUseSpell(Slot) == READY and GetDistance(ts.target) < 150 then
  253. CastSpell(Slot)
  254. end
  255. end
  256. end
  257.  
  258. function yumu()
  259. if ts.target then
  260. local Slot = GetInventorySlotItem(3142)
  261. if Slot ~= nil and myHero:CanUseSpell(Slot) == READY and GetDistance(ts.target) < 400 then
  262. CastSpell(Slot)
  263. end
  264. end
  265. end
  266.  
  267. function omen()
  268. if ts.target then
  269. local Slot = GetInventorySlotItem(3143)
  270. if Slot ~= nil and myHero:CanUseSpell(Slot) == READY and GetDistance(ts.target) < 400 then
  271. CastSpell(Slot)
  272. end
  273. end
  274. end
  275.  
  276. function ccleaner()
  277. local Slot = GetInventorySlotItem(3139) or GetInventorySlotItem(3140)
  278. if Slot ~= nil and myHero:CanUseSpell(Slot) == READY then
  279. for i = 1, player.buffCount, 1 do
  280. local buff = player:getBuff(i)
  281. if buff.valid then
  282. if buff.name == "MordekaiserChildrenOfTheGrave" then
  283. CastSpell(Slot)
  284. end
  285. if buff.name == "SkarnerImpale" then
  286. CastSpell(Slot)
  287. end
  288. if buff.name == "LuxLightBindingMis" then
  289. CastSpell(Slot)
  290. end
  291. if buff.name == "Wither" then
  292. CastSpell(Slot)
  293. end
  294. if buff.name == "SonaCrescendo" then
  295. CastSpell(Slot)
  296. end
  297. if buff.name == "DarkBindingMissile" then
  298. CastSpell(Slot)
  299. end
  300. if buff.name == "CurseoftheSadMummy" then
  301. CastSpell(Slot)
  302. end
  303. if buff.name == "EnchantedCrystalArrow" then
  304. CastSpell(Slot)
  305. end
  306. if buff.name == "BlindingDart" then
  307. CastSpell(Slot)
  308. end
  309. if buff.name == "LuluWTwo" then
  310. CastSpell(Slot)
  311. end
  312. if buff.name == "AhriSeduce" then
  313. CastSpell(Slot)
  314. end
  315. if buff.name == "Disintegrate" or buff.name == "InfernalGuardian" or buff.name == "Incinerate" then
  316. if myHero.canMove == false then
  317. CastSpell(Slot)
  318. end
  319. end
  320. if buff.name == "CassiopeiaPetrifyingGaze" then
  321. CastSpell(Slot)
  322. end
  323. if buff.name == "Terrify" then
  324. CastSpell(Slot)
  325. end
  326. if buff.name == "HowlingGale" then
  327. CastSpell(Slot)
  328. end
  329. if buff.name == "JaxCounterStrike" then
  330. CastSpell(Slot)
  331. end
  332. if buff.name == "KennenShurikenStorm" then
  333. CastSpell(Slot)
  334. end
  335. if buff.name == "LeblancSoulShackle" then
  336. CastSpell(Slot)
  337. end
  338. if buff.name == "LeonaSolarFlare" then
  339. CastSpell(Slot)
  340. end
  341. if buff.name == "LissandraR" then
  342. CastSpell(Slot)
  343. end
  344. if buff.name == "AlZaharNetherGrasp" then
  345. CastSpell(Slot)
  346. end
  347. if buff.name == "MonkeyKingDecoy" then
  348. CastSpell(Slot)
  349. end
  350. if buff.name == "NamiQ" then
  351. CastSpell(Slot)
  352. end
  353. if buff.name == "OrianaDetonateCommand" then
  354. CastSpell(Slot)
  355. end
  356. if buff.name == "Pantheon_LeapBash" then
  357. CastSpell(Slot)
  358. end
  359. if buff.name == "PuncturingTaunt" then
  360. CastSpell(Slot)
  361. end
  362. if buff.name == "SejuaniGlacialPrisonStart" then
  363. CastSpell(Slot)
  364. end
  365. if buff.name == "SwainShadowGrasp" then
  366. CastSpell(Slot)
  367. end
  368. if buff.name == "Imbue" then
  369. CastSpell(Slot)
  370. end
  371. if buff.name == "ThreshQ" then
  372. CastSpell(Slot)
  373. end
  374. if buff.name == "UrgotSwap2" then
  375. CastSpell(Slot)
  376. end
  377. if buff.name == "VarusR" then
  378. CastSpell(Slot)
  379. end
  380. if buff.name == "VeigarEventHorizon" then
  381. CastSpell(Slot)
  382. end
  383. if buff.name == "ViR" then
  384. CastSpell(Slot)
  385. end
  386. if buff.name == "InfiniteDuress" then
  387. CastSpell(Slot)
  388. end
  389. if buff.name == "ZyraGraspingRoots" then
  390. CastSpell(Slot)
  391. end
  392. end
  393. end
  394. end
  395. end
  396.  
  397. function botrk()
  398. if ts.target then
  399. local Slot = GetInventorySlotItem(3144) or GetInventorySlotItem(3153)
  400. if Slot ~= nil and myHero:CanUseSpell(Slot) == READY and GetDistance(ts.target) < 500 then
  401. CastSpell(Slot, ts.target)
  402. end
  403. end
  404. end
  405.  
  406. function hexblade()
  407. if ts.target then
  408. local Slot = GetInventorySlotItem(3146)
  409. if Slot ~= nil and myHero:CanUseSpell(Slot) == READY and GetDistance(ts.target) < 600 then
  410. CastSpell(Slot, ts.target)
  411. end
  412. end
  413. end
  414.  
  415. function zhonya()
  416. if ts.target then
  417. local Slot = GetInventorySlotItem(3157)
  418. if Slot ~= nil and myHero:CanUseSpell(Slot) == READY and GetDistance(ts.target) < 500 and myHero.Health < 200 then
  419. CastSpell(Slot)
  420. end
  421. end
  422. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement