Script6


SUBMITTED BY: Alerand

DATE: May 3, 2016, 9:36 a.m.

FORMAT: Text only

SIZE: 29.1 kB

HITS: 20307

  1. --[[
  2. Doctor Yi
  3. SCRIPT BY DrPhoenix
  4. Changelog :
  5. 0.01 : First release
  6. 0.02 : Add ScriptStatus Tracker
  7. 0.03 : - Add an auto-updater (S1mple class)
  8. - Dodge targeted spells
  9. - Combo with items usage
  10. More Soon !
  11. ]]--
  12. assert(load(Base64Decode("G0x1YVIAAQQEBAgAGZMNChoKAAAAAAAAAAAAAQQfAAAAAwAAAEQAAACGAEAA5QAAAJ1AAAGGQEAA5UAAAJ1AAAGlgAAACIAAgaXAAAAIgICBhgBBAOUAAQCdQAABhkBBAMGAAQCdQAABhoBBAOVAAQCKwICDhoBBAOWAAQCKwACEhoBBAOXAAQCKwICEhoBBAOUAAgCKwACFHwCAAAsAAAAEEgAAAEFkZFVubG9hZENhbGxiYWNrAAQUAAAAQWRkQnVnc3BsYXRDYWxsYmFjawAEDAAAAFRyYWNrZXJMb2FkAAQNAAAAQm9sVG9vbHNUaW1lAAQQAAAAQWRkVGlja0NhbGxiYWNrAAQGAAAAY2xhc3MABA4AAABTY3JpcHRUcmFja2VyAAQHAAAAX19pbml0AAQSAAAAU2VuZFZhbHVlVG9TZXJ2ZXIABAoAAABzZW5kRGF0YXMABAsAAABHZXRXZWJQYWdlAAkAAAACAAAAAwAAAAAAAwkAAAAFAAAAGABAABcAAIAfAIAABQAAAAxAQACBgAAAHUCAAR8AgAADAAAAAAQSAAAAU2VuZFZhbHVlVG9TZXJ2ZXIABAcAAAB1bmxvYWQAAAAAAAEAAAABAQAAAAAAAAAAAAAAAAAAAAAEAAAABQAAAAAAAwkAAAAFAAAAGABAABcAAIAfAIAABQAAAAxAQACBgAAAHUCAAR8AgAADAAAAAAQSAAAAU2VuZFZhbHVlVG9TZXJ2ZXIABAkAAABidWdzcGxhdAAAAAAAAQAAAAEBAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAAAAQAEDQA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M6rUV5ifrGr3MQE")
  14. if myHero.charName ~= "MasterYi" then return end
  15. AARange = 189
  16. QRange = 600
  17. SmiteRange = 560
  18. SmitePos = nil
  19. abilityLevel = 0
  20. minions = minionManager(MINION_ENEMY, QRange, myHero, MINION_SORT_MINHEALTH_DEC)
  21. jungleMinions = minionManager(MINION_JUNGLE, SmiteRange, myHero, MINION_SORT_MINHEALTH_DEC)
  22. DragonSprite = GetSprite("\\DoctorYi\\Dragon.png")
  23. BaronSprite = GetSprite("\\DoctorYi\\Baron.png")
  24. TimeDragonDown = 0
  25. TimeDragonSpawn = 0
  26. TimeBaronDown = 0
  27. TimeBaronSpawn = 0
  28. ItemsList = {
  29. BRK = { id = 3153, range = 450, reqTarget = true, slot = nil }, --Blade of the ruined king
  30. BWC = { id = 3144, range = 400, reqTarget = true, slot = nil }, -- Bilgewater Cutlass
  31. THD = { id = 3748, range = 189, reqTarget = true, slot = nil }, -- Titanic Hydra
  32. SR = { id = 3715, range = 560, reqTarget = true, slot = nil }, -- Red Smite
  33. SB = { id = 3706, range = 560, reqTarget = true, slot = nil }, -- Blue Smite
  34. SRD = { id = 1415, range = 560, reqTarget = true, slot = nil }, -- Red Smite Devorer
  35. SBD = { id = 1403, range = 560, reqTarget = true, slot = nil }, -- Blue Smite Devorer
  36. SRS = { id = 3931, range = 560, reqTarget = true, slot = nil }, -- Red Smite Devorer Sated
  37. SBS = { id = 3930, range = 560, reqTarget = true, slot = nil }, -- Blue Smite Devorer Sated
  38. YGB = { id = 3142, range = 350, reqTarget = false, slot = nil }, -- Youmuu Ghostblade
  39. QSS = { id = 3140, range = 0, reqTarget = false, slot = nil }, -- Quicksilver Sash
  40. MCS = { id = 3139, range = 0, reqTarget = false, slot = nil } -- Mercurial Scimitar
  41. }
  42. if myHero:GetSpellData(SUMMONER_1).name:find("Smite") then SmitePos = SUMMONER_1 elseif myHero:GetSpellData(SUMMONER_2).name:find("Smite") then SmitePos = SUMMONER_2 end
  43. function OnLoad()
  44. Update()
  45. Menu()
  46. ts = TargetSelector(TARGET_LESS_CAST_PRIORITY, 900, DAMAGE_PHYSICAL, false, true)
  47. GetTowers()
  48. PrintMsg("Loaded !")
  49. end
  50. function CheckJungle()
  51. if Config.GeneralSettings.UseSmite then
  52. for i, jungle in pairs(jungleMinions.objects) do
  53. if jungle ~= nil then
  54. SmiteMonster(jungle)
  55. end
  56. end
  57. end
  58. end
  59. function OnTick()
  60. HumanizerTime()
  61. AutoLevel()
  62. SetSkin(myHero, Config.MiscSettings.SetSkin)
  63. GetTimers()
  64. jungleMinions:update()
  65. CheckJungle()
  66. Combo()
  67. Items()
  68. CheckTower()
  69. GetTarget()
  70. end
  71. function GetTarget()
  72. ts:update()
  73. target = ts.target
  74. end
  75. function GetTowers()
  76. towers = {}
  77. for i=1, objManager.maxObjects do
  78. obj = objManager:GetObject(i)
  79. if obj and obj.team ~= myHero.team and obj.health > 0 and obj.type == "obj_AI_Turret" then
  80. towers[#towers+1] = obj
  81. end
  82. end
  83. end
  84. function CheckTower()
  85. outTower = true
  86. for _,v in pairs(towers) do
  87. if target ~= nil and GetDistance(v, target) < 775 then
  88. outTower = false
  89. break
  90. elseif target ~= nil and GetDistance(v, target) > 775 then
  91. outTower = true
  92. break
  93. end
  94. end
  95. end
  96. function OnDraw()
  97. if SmitePos ~= nil and Config.DrawSettings.DrawSmiteON and myHero:CanUseSpell(SmitePos) and not myHero.dead then
  98. DrawCircle3D(myHero.x, myHero.y, myHero.z, SmiteRange, 1, RGB(255,130,0), Config.DrawSettings.DrawQuality)
  99. end
  100. if Config.DrawSettings.DrawQON and myHero:CanUseSpell(_Q) and not myHero.dead then
  101. DrawCircle3D(myHero.x, myHero.y, myHero.z, QRange, 1, RGB(178,255,0), Config.DrawSettings.DrawQuality)
  102. end
  103. if Config.DrawSettings.DrawAaON and not myHero.dead then
  104. DrawCircle3D(myHero.x, myHero.y, myHero.z, AARange, 1, RGB(255,100,100), Config.DrawSettings.DrawQuality)
  105. end
  106. if Config.DrawSettings.TimerType == 1 and Config.DrawSettings.TimerON then
  107. DragonSprite:Draw(Config.DrawSettings.TimerX,Config.DrawSettings.TimerY, 255)
  108. DragonSprite:SetScale(0.4, 0.4)
  109. if DragonTimer == "00:00" then
  110. DrawText("Live !", 15, Config.DrawSettings.TimerX + 66, Config.DrawSettings.TimerY + 23, ARGB(255,187,255,0))
  111. else
  112. DrawText(DragonTimer, 15, Config.DrawSettings.TimerX + 66, Config.DrawSettings.TimerY + 23, ARGB(255,187,255,0))
  113. end
  114. BaronSprite:Draw(Config.DrawSettings.TimerX, Config.DrawSettings.TimerY + 60, 255)
  115. BaronSprite:SetScale(0.4, 0.4)
  116. if BaronTimer == "00:00" then
  117. DrawText("Live !", 15, Config.DrawSettings.TimerX + 66, Config.DrawSettings.TimerY + 83, ARGB(255,187,255,0))
  118. else
  119. DrawText(BaronTimer, 15, Config.DrawSettings.TimerX + 66, Config.DrawSettings.TimerY + 83, ARGB(255,187,255,0))
  120. end
  121. elseif Config.DrawSettings.TimerType == 2 and Config.DrawSettings.TimerON then
  122. DragonSprite:Draw(Config.DrawSettings.TimerX,Config.DrawSettings.TimerY, 255)
  123. DragonSprite:SetScale(0.4, 0.4)
  124. if DragonTimer == "00:00" then
  125. DrawText("Live !", 15, Config.DrawSettings.TimerX + 66, Config.DrawSettings.TimerY + 23, ARGB(255,187,255,0))
  126. else
  127. DrawText(DragonTimer, 15, Config.DrawSettings.TimerX + 66, Config.DrawSettings.TimerY + 23, ARGB(255,187,255,0))
  128. end
  129. BaronSprite:Draw(Config.DrawSettings.TimerX + 128, Config.DrawSettings.TimerY, 255)
  130. BaronSprite:SetScale(0.4, 0.4)
  131. if BaronTimer == "00:00" then
  132. DrawText("Live !", 15, Config.DrawSettings.TimerX + 194, Config.DrawSettings.TimerY + 23, ARGB(255,187,255,0))
  133. else
  134. DrawText(BaronTimer, 15, Config.DrawSettings.TimerX + 194, Config.DrawSettings.TimerY + 23, ARGB(255,187,255,0))
  135. end
  136. end
  137. end
  138. function Menu()
  139. Config = scriptConfig("Doctor Yi", "MasterYi")
  140. Config:addSubMenu("General Settings", "GeneralSettings")
  141. Config.GeneralSettings:addParam("comboON", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, string.byte(" "))
  142. Config.GeneralSettings:addParam("UseSmite", "Smite Dragon, Rift Herald and Baron", SCRIPT_PARAM_ONOFF, true)
  143. Config:addSubMenu("Humanizer", "HumanizerSettings")
  144. Config.HumanizerSettings:addParam("ComboHumanizerON", "Humanizer for combo", SCRIPT_PARAM_ONOFF, true)
  145. Config.HumanizerSettings:addParam("ComboHumanizerMinValue", "Min Value", SCRIPT_PARAM_SLICE, 100, 0, 1000, 0)
  146. Config.HumanizerSettings:addParam("ComboHumanizerMaxValue", "Max Value", SCRIPT_PARAM_SLICE, 200, 0, 1000, 0)
  147. Config.HumanizerSettings:setCallback("ComboHumanizerMinValue", function (value) if value < Config.HumanizerSettings.ComboHumanizerMinValue then Config.HumanizerSettings.ComboHumanizerMaxValue = Config.HumanizerSettings.ComboHumanizerMinValue end end)
  148. Config.HumanizerSettings:setCallback("ComboHumanizerMaxValue", function (value) if value > Config.HumanizerSettings.ComboHumanizerMaxValue then Config.HumanizerSettings.ComboHumanizerMinValue = Config.HumanizerSettings.ComboHumanizerMaxValue end end)
  149. Config.HumanizerSettings:addParam("SpaceHumanizer11","____________________________________________", 5, "")
  150. Config.HumanizerSettings:addParam("SpaceHumanizer12","", 5, "")
  151. Config.HumanizerSettings:addParam("DodgeHumanizerON", "Humanizer for dodge", SCRIPT_PARAM_ONOFF, true)
  152. Config.HumanizerSettings:addParam("DodgeHumanizerMinValue", "Min Value", SCRIPT_PARAM_SLICE, 150, 0, 1000, 0)
  153. Config.HumanizerSettings:addParam("DodgeHumanizerMaxValue", "Max Value", SCRIPT_PARAM_SLICE, 300, 0, 1000, 0)
  154. Config.HumanizerSettings:setCallback("DodgeHumanizerMinValue", function (value) if value < Config.HumanizerSettings.DodgeHumanizerMinValue then Config.HumanizerSettings.DodgeHumanizerMaxValue = Config.HumanizerSettings.DodgeHumanizerMinValue end end)
  155. Config.HumanizerSettings:setCallback("DodgeHumanizerMaxValue", function (value) if value > Config.HumanizerSettings.DodgeHumanizerMaxValue then Config.HumanizerSettings.DodgeHumanizerMinValue = Config.HumanizerSettings.DodgeHumanizerMaxValue end end)
  156. Config.HumanizerSettings:addParam("SpaceHumanizer21","____________________________________________", 5, "")
  157. Config.HumanizerSettings:addParam("SpaceHumanizer22","", 5, "")
  158. Config.HumanizerSettings:addParam("SmiteHumanizerON", "Humanizer for smite", SCRIPT_PARAM_ONOFF, true)
  159. Config.HumanizerSettings:addParam("SmiteHumanizerMinValue", "Min Value", SCRIPT_PARAM_SLICE, 100, 0, 1000, 0)
  160. Config.HumanizerSettings:addParam("SmiteHumanizerMaxValue", "Max Value", SCRIPT_PARAM_SLICE, 200, 0, 1000, 0)
  161. Config.HumanizerSettings:setCallback("SmiteHumanizerMinValue", function (value) if value < Config.HumanizerSettings.SmiteHumanizerMinValue then Config.HumanizerSettings.SmiteHumanizerMaxValue = Config.HumanizerSettings.SmiteHumanizerMinValue end end)
  162. Config.HumanizerSettings:setCallback("SmiteHumanizerMaxValue", function (value) if value > Config.HumanizerSettings.SmiteHumanizerMaxValue then Config.HumanizerSettings.SmiteHumanizerMinValue = Config.HumanizerSettings.SmiteHumanizerMaxValue end end)
  163. Config.HumanizerSettings:addParam("SpaceHumanizer31","____________________________________________", 5, "")
  164. Config.HumanizerSettings:addParam("SpaceHumanizer32","", 5, "")
  165. Config.HumanizerSettings:addParam("EmoteHumanizerON", "Humanizer for emote", SCRIPT_PARAM_ONOFF, true)
  166. Config.HumanizerSettings:addParam("EmoteHumanizerMinValue", "Min Value", SCRIPT_PARAM_SLICE, 200, 0, 1000, 0)
  167. Config.HumanizerSettings:addParam("EmoteHumanizerMaxValue", "Max Value", SCRIPT_PARAM_SLICE, 300, 0, 1000, 0)
  168. Config.HumanizerSettings:setCallback("EmoteHumanizerMinValue", function (value) if value < Config.HumanizerSettings.EmoteHumanizerMinValue then Config.HumanizerSettings.EmoteHumanizerMaxValue = Config.HumanizerSettings.EmoteHumanizerMinValue end end)
  169. Config.HumanizerSettings:setCallback("EmoteHumanizerMaxValue", function (value) if value > Config.HumanizerSettings.EmoteHumanizerMaxValue then Config.HumanizerSettings.EmoteHumanizerMinValue = Config.HumanizerSettings.EmoteHumanizerMaxValue end end)
  170. Config:addSubMenu("Combo", "ComboSettings")
  171. Config:addSubMenu("Items", "ItemsSettings")
  172. Config.ItemsSettings:addParam("SmiteChampON", "Use smite on champion", SCRIPT_PARAM_ONOFF, true)
  173. Config.ItemsSettings:addParam("YoumuuON", "Use Youmuu", SCRIPT_PARAM_ONOFF, true)
  174. Config.ItemsSettings:addParam("BotkrON", "Use BOTRK", SCRIPT_PARAM_ONOFF, true)
  175. Config.ItemsSettings:addParam("TitanicON", "Use Titanic Hydra", SCRIPT_PARAM_ONOFF, true)
  176. Config:addSubMenu("Dodge", "DodgeSettings")
  177. Config.DodgeSettings:addParam("DodgeON", "Dodge dangerous spells with Q or W", SCRIPT_PARAM_ONOFF, true)
  178. Config:addSubMenu("Draw", "DrawSettings")
  179. Config.DrawSettings:addParam("DrawAaON", "Draw AA range", SCRIPT_PARAM_ONOFF, false)
  180. Config.DrawSettings:addParam("DrawSmiteON", "Draw Smite range", SCRIPT_PARAM_ONOFF, true)
  181. Config.DrawSettings:addParam("DrawQON", "Draw Alpha Strike range", SCRIPT_PARAM_ONOFF, true)
  182. Config.DrawSettings:addParam("SpaceDraw11","____________________________________________", 5, "")
  183. Config.DrawSettings:addParam("SpaceDraw12","", 5, "")
  184. Config.DrawSettings:addParam("TimerON", "Draw Timers", SCRIPT_PARAM_ONOFF, true)
  185. Config.DrawSettings:addParam("TimerY", "Vertical Position of the Timer", SCRIPT_PARAM_SLICE, 50, 0, WINDOW_H - 120, 0)
  186. Config.DrawSettings:addParam("TimerX", "Horizontal Position of the Timer", SCRIPT_PARAM_SLICE, 50, 0, WINDOW_W - 128, 0)
  187. Config.DrawSettings:addParam("TimerType", "Display in ", SCRIPT_PARAM_LIST, 1, {"column", "row"})
  188. Config.DrawSettings:addParam("SpaceDraw21","____________________________________________", 5, "")
  189. Config.DrawSettings:addParam("SpaceDraw22","", 5, "")
  190. Config.DrawSettings:addParam("DrawQuality", "Quality of the circle", SCRIPT_PARAM_SLICE, 30, 10, 50, 0)
  191. Config:addSubMenu("Miscellaneous", "MiscSettings")
  192. Config.MiscSettings:addParam("SetSkin", "Select Skin", SCRIPT_PARAM_LIST, 7, {"Assassin", "Chosen", "Ionia", "Samurai Yi", "Headhunter", "Chroma Pack: Gold", "Chroma Pack: Aqua", "Chroma Pack: Crimson", "PROJECT","Classic"})
  193. Config.MiscSettings:addParam("AutoLevelON", "Auto level spells (Q>E>W)", SCRIPT_PARAM_ONOFF, true)
  194. Config.MiscSettings:addParam("EmoteON", "Emote on kill or assist", SCRIPT_PARAM_ONOFF, true)
  195. Config.GeneralSettings:permaShow("comboON")
  196. Config:addParam("space2", "", 5, "")
  197. Config:addParam("signature1", "Let the Doctor carry", 5, "")
  198. Config:addParam("signature2", " by DrPhoenix ", 5, "")
  199. end
  200. function PrintMsg(msg)
  201. PrintChat("<font color=\"#6eed00\"><b>[</b></font><font color=\"#a2ed00\"><b>Doctor Yi</b></font><font color=\"#6eed00\"><b>]</b></font> <font color=\"#fce700\">"..msg.."</font>")
  202. end
  203. function HumanizerTime()
  204. if Config.HumanizerSettings.ComboHumanizerON == true then
  205. ComboHumanizer = math.random(Config.HumanizerSettings.ComboHumanizerMinValue, Config.HumanizerSettings.ComboHumanizerMaxValue)/1000
  206. else
  207. ComboHumanizer = 0
  208. end
  209. if Config.HumanizerSettings.DodgeHumanizerON == true then
  210. DodgeHumanizer = math.random(Config.HumanizerSettings.DodgeHumanizerMinValue, Config.HumanizerSettings.DodgeHumanizerMaxValue)/1000
  211. else
  212. DodgeHumanizer = 0
  213. end
  214. if Config.HumanizerSettings.SmiteHumanizerON == true then
  215. SmiteHumanizer = math.random(Config.HumanizerSettings.SmiteHumanizerMinValue, Config.HumanizerSettings.SmiteHumanizerMaxValue)/1000
  216. else
  217. SmiteHumanizer = 0
  218. end
  219. if Config.HumanizerSettings.EmoteHumanizerON == true then
  220. EmoteHumanizer = math.random(Config.HumanizerSettings.EmoteHumanizerMinValue, Config.HumanizerSettings.EmoteHumanizerMaxValue)/1000
  221. else
  222. EmoteHumanizer = 0
  223. end
  224. end
  225. function AutoLevel()
  226. if Config.MiscSettings.AutoLevelON then
  227. abilitySequence = {SPELL_1,SPELL_2,SPELL_3,SPELL_1,SPELL_1,SPELL_4,SPELL_1,SPELL_3,SPELL_1,SPELL_3,SPELL_4,SPELL_3,SPELL_3,SPELL_2,SPELL_2,SPELL_4,SPELL_2,SPELL_2}
  228. if myHero.level > abilityLevel then
  229. abilityLevel = abilityLevel + 1
  230. LevelSpell(abilitySequence[abilityLevel])
  231. end
  232. end
  233. end
  234. function GetTimers()
  235. if ((GetInGameTimer() - TimeDragonDown) < 360 and (GetInGameTimer() - TimeDragonDown) >= 0) then
  236. if(GetInGameTimer() < 360) then
  237. TimeDragonSpawn = 150 - (GetInGameTimer() - TimeDragonDown) + 1
  238. else
  239. TimeDragonSpawn = 360 - (GetInGameTimer() - TimeDragonDown) + 1
  240. end
  241. end
  242. if TimeDragonSpawn <= 0 then
  243. TimeDragonSpawn = 0
  244. end
  245. if ((GetInGameTimer() - TimeBaronDown) < 1200 and (GetInGameTimer() - TimeBaronDown) >= 0) then
  246. if(GetInGameTimer() < 1200) then
  247. TimeBaronSpawn = 1200 - (GetInGameTimer() - TimeBaronDown) + 1
  248. else
  249. TimeBaronSpawn = 420 - (GetInGameTimer() - TimeBaronDown) + 1
  250. end
  251. end
  252. if TimeBaronSpawn <= 0 then
  253. TimeBaronSpawn = 0
  254. end
  255. nMins = string.format("%02.f", math.floor(TimeDragonSpawn/60))
  256. nSecs = string.format("%02.f", math.floor(TimeDragonSpawn - nMins *60))
  257. DragonTimer = nMins..":" ..nSecs
  258. nMins = string.format("%02.f", math.floor(TimeBaronSpawn/60))
  259. nSecs = string.format("%02.f", math.floor(TimeBaronSpawn - nMins *60))
  260. BaronTimer = nMins..":" ..nSecs
  261. end
  262. function GetSmiteDamage()
  263. if myHero.level <= 4 then
  264. SmiteDamage = 370 + (myHero.level*20)
  265. end
  266. if myHero.level > 4 and myHero.level <= 9 then
  267. SmiteDamage = 330 + (myHero.level*30)
  268. end
  269. if myHero.level > 9 and myHero.level <= 14 then
  270. SmiteDamage = 240 + (myHero.level*40)
  271. end
  272. if myHero.level > 14 then
  273. SmiteDamage = 100 + (myHero.level*50)
  274. end
  275. return SmiteDamage
  276. end
  277. function SmiteMonster(obj)
  278. local DistanceMonster = GetDistance(obj)
  279. if SmitePos ~= nil and myHero:CanUseSpell(SmitePos) == READY and DistanceMonster <= SmiteRange and obj.health <= GetSmiteDamage() then
  280. if obj.charName == "SRU_Baron" or obj.charName == "SRU_Dragon" or obj.charName == "SRU_RiftHerald" then
  281. DelayAction(function() CastSpell(SmitePos, obj) end, SmiteHumanizer)
  282. end
  283. end
  284. end
  285. function OnAnimation(unit, animation)
  286. if unit.team ~= myHero.team and unit.type == myHero.type and animation == "Death" and Config.MiscSettings.EmoteON then
  287. DelayAction(function() SendChat("/masterybadge") end, EmoteHumanizer)
  288. end
  289. end
  290. function OnProcessSpell(unit,spell)
  291. if unit.team ~= myHero.team and spell and spell.target and spell.target.isMe then
  292. Dodge(DodgeHumanizer, true, unit.charName, spell.name)
  293. end
  294. end
  295. function Combo()
  296. if Config.GeneralSettings.comboON and outTower then
  297. if player:CanUseSpell(_R) == READY and target ~= nil and GetDistance(target, myHero) <= 2000 then
  298. CastSpell(_R,target)
  299. end
  300. if player:CanUseSpell(_E) == READY and target ~= nil and GetDistance(target, myHero) <= AARange then
  301. CastSpell(_E,target)
  302. end
  303. if player:CanUseSpell(_Q) == READY and target ~= nil and GetDistance(target, myHero) > AARange then
  304. CastSpell(_Q,target)
  305. end
  306. end
  307. end
  308. function Items()
  309. if Config.GeneralSettings.comboON and target ~= nil then
  310. for _, item in pairs(ItemsList) do
  311. item.slot = GetInventorySlotItem(item.id)
  312. if item.slot ~= nil then
  313. if item.id == 3715 or item.id == 3706 or item.id == 1415 or item.id == 1403 or item.id == 3931 or item.id == 3930 then
  314. if GetDistance(target) < item.range then
  315. DelayAction(function() CastSpell(SmitePos, target) end, ComboHumanizer)
  316. end
  317. end
  318. if item.reqTarget and GetDistance(target) < item.range then
  319. DelayAction(function() CastSpell(item.slot, target) end, ComboHumanizer)
  320. elseif not item.reqTarget and GetDistance(target, myHero) <= 2000 then
  321. DelayAction(function() CastSpell(item.slot) end, ComboHumanizer)
  322. end
  323. end
  324. end
  325. end
  326. end
  327. function Dodge(delay, useW, champ, name)
  328. minions = minionManager(MINION_ENEMY, QRange, myHero, MINION_SORT_MINHEALTH_DEC)
  329. minionManager(MINION_JUNGLE, QRange, myHero, MINION_SORT_MINHEALTH_DEC)
  330. DelayAction(function()
  331. if myHero:CanUseSpell(_Q) then
  332. for i, unit in ipairs(GetEnemyHeroes()) do
  333. if ValidTarget(unit) then
  334. if GetDistance(unit, myHero) <= QRange and outTower then
  335. Target = unit
  336. CastSpell(_Q, Target)
  337. elseif #minions.objects > 0 then
  338. CastSpell(_Q, minions.objects[1])
  339. elseif #jungleMinions.objects > 0 then
  340. CastSpell(_Q, jungleMinions.objects[1])
  341. elseif myHero:CanUseSpell(_W) and useW then
  342. CastSpell(_W)
  343. end
  344. end
  345. end
  346. elseif myHero:CanUseSpell(_W) then
  347. CastSpell(_W)
  348. end
  349. end, delay)
  350. end
  351. function OnCreateObj(obj)
  352. if obj.name == "SRU_Dragon_Death.troy" then
  353. TimeDragonSpawn = 360
  354. TimeDragonDown = GetInGameTimer()
  355. end
  356. if obj.name == "SRU_Baron_Death.troy" then
  357. TimeBaronSpawn = 420
  358. TimeBaronDown = GetInGameTimer()
  359. end
  360. function Update()
  361. local UpdateHost = "www.scarjit.de"
  362. local ServerPath = "/DrPhoenix/BoL/Scripts/DoctorSentences/"
  363. local ServerFileName = "DoctorSentences.lua"
  364. local ServerVersionFileName = "DoctorSentences.version"
  365. local version = 0.03
  366. DL = Download()
  367. local ServerVersionDATA = GetWebResult("scarjit.de" , ServerPath..ServerVersionFileName)
  368. if ServerVersionDATA then
  369. local ServerVersion = tonumber(ServerVersionDATA)
  370. if ServerVersion then
  371. if ServerVersion > tonumber(version) then
  372. PrintChatMsg("Updating, don't press F9")
  373. DL:newDL(UpdateHost, ServerPath..ServerFileName, ServerFileName, SCRIPT_PATH, function ()
  374. PrintChatMsg("DoctorSentences updated, please reload")
  375. end)
  376. end
  377. else
  378. PrintChatMsg("An error occured, while updating, please reload")
  379. end
  380. else
  381. PrintChatMsg("Could not connect to update Server")
  382. end
  383. local KDA = nil
  384. end
  385. class "Download"
  386. function Download:__init()
  387. socket = require("socket")
  388. self.aktivedownloads = {}
  389. self.callbacks = {}
  390. AddTickCallback(function ()
  391. self:RemoveDone()
  392. end)
  393. class("Async")
  394. function Async:__init(host, filepath, localname, drawoffset, localpath)
  395. self.progress = 0
  396. self.host = host
  397. self.filepath = filepath
  398. self.localname = localname
  399. self.offset = drawoffset
  400. self.localpath = localpath
  401. self.CRLF = '\r\n'
  402. self.headsocket = socket.tcp()
  403. self.headsocket:settimeout(1)
  404. self.headsocket:connect(self.host, 80)
  405. self.headsocket:send('HEAD '..self.filepath..' HTTP/1.1'.. self.CRLF ..'Host: '..self.host.. self.CRLF ..'User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36'.. self.CRLF .. self.CRLF)
  406. self.HEADdata = ""
  407. self.DLdata = ""
  408. self.StartedDownload = false
  409. self.canDL = true
  410. AddTickCallback(function ()
  411. self:tick()
  412. end)
  413. AddDrawCallback(function ()
  414. self:draw()
  415. end)
  416. end
  417. function Async:tick()
  418. if self.progress == 100 then return end
  419. if self.HEADcStatus ~= "timeout" and self.HEADcStatus ~= "closed" then
  420. self.HEADfString, self.HEADcStatus, self.HEADpString = self.headsocket:receive(16);
  421. if self.HEADfString then
  422. self.HEADdata = self.HEADdata..self.HEADfString
  423. elseif self.HEADpString and #self.HEADpString > 0 then
  424. self.HEADdata = self.HEADdata..self.HEADpString
  425. end
  426. elseif self.HEADcStatus == "timeout" then
  427. self.headsocket:close()
  428. --Find Lenght
  429. local begin = string.find(self.HEADdata, "Length: ")
  430. if begin then
  431. self.HEADdata = string.sub(self.HEADdata,begin+8)
  432. local n = 0
  433. local _break = false
  434. for i=1, #self.HEADdata do
  435. local c = tonumber(string.sub(self.HEADdata,i,i))
  436. if c and _break == false then
  437. n = n+1
  438. else
  439. _break = true
  440. end
  441. end
  442. self.HEADdata = string.sub(self.HEADdata,1,n)
  443. self.StartedDownload = true
  444. self.HEADcStatus = "closed"
  445. end
  446. end
  447. if self.HEADcStatus == "closed" and self.StartedDownload == true and self.canDL == true then --Double Check
  448. self.canDL = false
  449. self.DLsocket = socket.tcp()
  450. self.DLsocket:settimeout(1)
  451. self.DLsocket:connect(self.host, 80)
  452. --Start Main Download
  453. self.DLsocket:send('GET '..self.filepath..' HTTP/1.1'.. self.CRLF ..'Host: '..self.host.. self.CRLF ..'User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36'.. self.CRLF .. self.CRLF)
  454. end
  455. if self.DLsocket and self.DLcStatus ~= "timeout" and self.DLcStatus ~= "closed" then
  456. self.DLfString, self.DLcStatus, self.DLpString = self.DLsocket:receive(1024);
  457. if ((self.DLfString) or (self.DLpString and #self.DLpString > 0)) then
  458. self.DLdata = self.DLdata .. (self.DLfString or self.DLpString)
  459. end
  460. elseif self.DLcStatus and self.DLcStatus == "timeout" then
  461. self.DLsocket:close()
  462. self.DLcStatus = "closed"
  463. self.DLdata = string.sub(self.DLdata,#self.DLdata-tonumber(self.HEADdata)+1)
  464. local file = io.open(self.localpath.."\\"..self.localname, "w+b")
  465. file:write(self.DLdata)
  466. file:close()
  467. self.progress = 100
  468. end
  469. if self.progress ~= 100 and self.DLdata and #self.DLdata > 0 then
  470. self.progress = (#self.DLdata/tonumber(self.HEADdata))*100
  471. end
  472. end
  473. function Async:draw()
  474. if self.progress < 100 then
  475. DrawTextA("Downloading: "..self.localname,15,50,35+self.offset)
  476. DrawRectangleOutline(49,50+self.offset,250,20, ARGB(255,255,255,255),1)
  477. if self.progress ~= 100 then
  478. DrawLine(50,60+self.offset,50+(2.5*self.progress),60+self.offset,18,ARGB(150,255-self.progress*2.5,self.progress*2.5,255-self.progress*2.5))
  479. DrawTextA(tostring(math.round(self.progress).." %"), 15,150,52+self.offset)
  480. end
  481. end
  482. end
  483. end
  484. function Download:newDL(host, file, name, path, callback)
  485. local offset = (#self.aktivedownloads+1)*40
  486. self.aktivedownloads[#self.aktivedownloads+1] = Async(host, file, name, offset-40, path)
  487. if not callback then
  488. callback = (function ()
  489. end)
  490. end
  491. self.callbacks[#self.callbacks+1] = callback
  492. end
  493. function Download:RemoveDone()
  494. if #self.aktivedownloads == 0 then return end
  495. local x = {}
  496. for k, v in pairs(self.aktivedownloads) do
  497. if math.round(v.progress) < 100 then
  498. v.offset = k*40-40
  499. x[#x+1] = v
  500. else
  501. self.callbacks[k]()
  502. end
  503. end
  504. self.aktivedownloads = {}
  505. self.aktivedownloads = x
  506. end

comments powered by Disqus