--[[
Doctor Yi
SCRIPT BY DrPhoenix
Changelog :
0.01 : First release
0.02 : Add ScriptStatus Tracker
0.03 : - Add an auto-updater (S1mple class)
- Dodge targeted spells
- Combo with items usage
More Soon !
]]--
assert(load(Base64Decode("G0x1YVIAAQQEBAgAGZMNChoKAAAAAAAAAAAAAQQfAAAAAwAAAEQAAACGAEAA5QAAAJ1AAAGGQEAA5UAAAJ1AAAGlgAAACIAAgaXAAAAIgICBhgBBAOUAAQCdQAABhkBBAMGAAQCdQAABhoBBAOVAAQCKwICDhoBBAOWAAQCKwACEhoBBAOXAAQCKwICEhoBBAOUAAgCKwACFHwCAAAsAAAAEEgAAAEFkZFVubG9hZENhbGxiYWNrAAQUAAAAQWRkQnVnc3BsYXRDYWxsYmFjawAEDAAAAFRyYWNrZXJMb2FkAAQNAAAAQm9sVG9vbHNUaW1lAAQQAAAAQWRkVGlja0NhbGxiYWNrAAQGAAAAY2xhc3MABA4AAABTY3JpcHRUcmFja2VyAAQHAAAAX19pbml0AAQSAAAAU2VuZFZhbHVlVG9TZXJ2ZXIABAoAAABzZW5kRGF0YXMABAsAAABHZXRXZWJQYWdlAAkAAAACAAAAAwAAAAAAAwkAAAAFAAAAGABAABcAAIAfAIAABQAAAAxAQACBgAAAHUCAAR8AgAADAAAAAAQSAAAAU2VuZFZhbHVlVG9TZXJ2ZXIABAcAAAB1bmxvYWQAAAAAAAEAAAABAQAAAAAAAAAAAAAAAAAAAAAEAAAABQAAAAAAAwkAAAAFAAAAGABAABcAAIAfAIAABQAAAAxAQACBgAAAHUCAAR8AgAADAAAAAAQSAAAAU2VuZFZhbHVlVG9TZXJ2ZXIABAkAAABidWdzcGxhdAAAAAAAAQAAAAEBAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAAAAQAEDQAAAEYAwACAAAAAXYAAAUkAAABFAAAATEDAAMGAAABdQIABRsDAAKUAAADBAAEAXUCAAR8AgAAFAAAABA4AAABTY3JpcHRUcmFja2VyAAQSAAAAU2VuZFZhbHVl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VRpbWUABA0AAABCb2xUb29sc1RpbWUABAYAAABpc1ZpcAAEAQAAAAAECQAAAFZJUF9VU0VSAAMAAAAAAADwPwMAAAAAAAAAAAQJAAAAY2hhbXBpb24ABAcAAABteUhlcm8ABAkAAABjaGFyTmFtZQAECwAAAEdldFdlYlBhZ2UABA4AAABib2wtdG9vbHMuY29tAAQXAAAAL2FwaS9ldmVudHM/c2NyaXB0S2V5PQAECgAAAHNjcmlwdEtleQAECQAAACZhY3Rpb249AAQLAAAAJmNoYW1waW9uPQAEDgAAACZib2xVc2VybmFtZT0ABAcAAAAmaHdpZD0ABA0AAAAmaW5nYW1lVGltZT0ABAgAAAAmaXNWaXA9AAAAAAACAAAAAAABAQAAAAAAAAAAAAAAAAAAAAAmAAAAKgAAAAMACiEAAADGQEAAAYEAAN2AAAHHwMAB3YCAAArAAIDHAEAAzADBAUABgACBQQEA3UAAAscAQADMgMEBQcEBAIABAAHBAQIAAAKAAEFCAgBWQYIC3UCAAccAQADMgMIBQcECAIEBAwDdQAACxwBAAMyAwgFBQQMAgYEDAN1AAAIKAMSHCgDEiB8AgAASAAAABAcAAABTb2NrZXQABAgAAAByZXF1aXJlAAQHAAAAc29ja2V0AAQEAAAAdGNwAAQIAAAAY29ubmVjdAADAAAAAAAAVEAEBQAAAHNlbmQABAUAAABHRVQgAAQSAAAAIEhUVFAvMS4wDQpIb3N0OiAABAUAAAANCg0KAAQLAAAAc2V0dGltZW91dAADAAAAAAAAAAAEAgAAAGIAAwAAAPyD15dBBAIAAAB0AAQKAAAATGFzdFByaW50AAQBAAAAAAQFAAAARmlsZQAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAA="), nil, "bt", _ENV))()
TrackerLoad("RM6rUV5ifrGr3MQE")
if myHero.charName ~= "MasterYi" then return end
AARange = 189
QRange = 600
SmiteRange = 560
SmitePos = nil
abilityLevel = 0
minions = minionManager(MINION_ENEMY, QRange, myHero, MINION_SORT_MINHEALTH_DEC)
jungleMinions = minionManager(MINION_JUNGLE, SmiteRange, myHero, MINION_SORT_MINHEALTH_DEC)
DragonSprite = GetSprite("\\DoctorYi\\Dragon.png")
BaronSprite = GetSprite("\\DoctorYi\\Baron.png")
TimeDragonDown = 0
TimeDragonSpawn = 0
TimeBaronDown = 0
TimeBaronSpawn = 0
ItemsList = {
BRK = { id = 3153, range = 450, reqTarget = true, slot = nil }, --Blade of the ruined king
BWC = { id = 3144, range = 400, reqTarget = true, slot = nil }, -- Bilgewater Cutlass
THD = { id = 3748, range = 189, reqTarget = true, slot = nil }, -- Titanic Hydra
SR = { id = 3715, range = 560, reqTarget = true, slot = nil }, -- Red Smite
SB = { id = 3706, range = 560, reqTarget = true, slot = nil }, -- Blue Smite
SRD = { id = 1415, range = 560, reqTarget = true, slot = nil }, -- Red Smite Devorer
SBD = { id = 1403, range = 560, reqTarget = true, slot = nil }, -- Blue Smite Devorer
SRS = { id = 3931, range = 560, reqTarget = true, slot = nil }, -- Red Smite Devorer Sated
SBS = { id = 3930, range = 560, reqTarget = true, slot = nil }, -- Blue Smite Devorer Sated
YGB = { id = 3142, range = 350, reqTarget = false, slot = nil }, -- Youmuu Ghostblade
QSS = { id = 3140, range = 0, reqTarget = false, slot = nil }, -- Quicksilver Sash
MCS = { id = 3139, range = 0, reqTarget = false, slot = nil } -- Mercurial Scimitar
}
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
function OnLoad()
Update()
Menu()
ts = TargetSelector(TARGET_LESS_CAST_PRIORITY, 900, DAMAGE_PHYSICAL, false, true)
GetTowers()
PrintMsg("Loaded !")
end
function CheckJungle()
if Config.GeneralSettings.UseSmite then
for i, jungle in pairs(jungleMinions.objects) do
if jungle ~= nil then
SmiteMonster(jungle)
end
end
end
end
function OnTick()
HumanizerTime()
AutoLevel()
SetSkin(myHero, Config.MiscSettings.SetSkin)
GetTimers()
jungleMinions:update()
CheckJungle()
Combo()
Items()
CheckTower()
GetTarget()
end
function GetTarget()
ts:update()
target = ts.target
end
function GetTowers()
towers = {}
for i=1, objManager.maxObjects do
obj = objManager:GetObject(i)
if obj and obj.team ~= myHero.team and obj.health > 0 and obj.type == "obj_AI_Turret" then
towers[#towers+1] = obj
end
end
end
function CheckTower()
outTower = true
for _,v in pairs(towers) do
if target ~= nil and GetDistance(v, target) < 775 then
outTower = false
break
elseif target ~= nil and GetDistance(v, target) > 775 then
outTower = true
break
end
end
end
function OnDraw()
if SmitePos ~= nil and Config.DrawSettings.DrawSmiteON and myHero:CanUseSpell(SmitePos) and not myHero.dead then
DrawCircle3D(myHero.x, myHero.y, myHero.z, SmiteRange, 1, RGB(255,130,0), Config.DrawSettings.DrawQuality)
end
if Config.DrawSettings.DrawQON and myHero:CanUseSpell(_Q) and not myHero.dead then
DrawCircle3D(myHero.x, myHero.y, myHero.z, QRange, 1, RGB(178,255,0), Config.DrawSettings.DrawQuality)
end
if Config.DrawSettings.DrawAaON and not myHero.dead then
DrawCircle3D(myHero.x, myHero.y, myHero.z, AARange, 1, RGB(255,100,100), Config.DrawSettings.DrawQuality)
end
if Config.DrawSettings.TimerType == 1 and Config.DrawSettings.TimerON then
DragonSprite:Draw(Config.DrawSettings.TimerX,Config.DrawSettings.TimerY, 255)
DragonSprite:SetScale(0.4, 0.4)
if DragonTimer == "00:00" then
DrawText("Live !", 15, Config.DrawSettings.TimerX + 66, Config.DrawSettings.TimerY + 23, ARGB(255,187,255,0))
else
DrawText(DragonTimer, 15, Config.DrawSettings.TimerX + 66, Config.DrawSettings.TimerY + 23, ARGB(255,187,255,0))
end
BaronSprite:Draw(Config.DrawSettings.TimerX, Config.DrawSettings.TimerY + 60, 255)
BaronSprite:SetScale(0.4, 0.4)
if BaronTimer == "00:00" then
DrawText("Live !", 15, Config.DrawSettings.TimerX + 66, Config.DrawSettings.TimerY + 83, ARGB(255,187,255,0))
else
DrawText(BaronTimer, 15, Config.DrawSettings.TimerX + 66, Config.DrawSettings.TimerY + 83, ARGB(255,187,255,0))
end
elseif Config.DrawSettings.TimerType == 2 and Config.DrawSettings.TimerON then
DragonSprite:Draw(Config.DrawSettings.TimerX,Config.DrawSettings.TimerY, 255)
DragonSprite:SetScale(0.4, 0.4)
if DragonTimer == "00:00" then
DrawText("Live !", 15, Config.DrawSettings.TimerX + 66, Config.DrawSettings.TimerY + 23, ARGB(255,187,255,0))
else
DrawText(DragonTimer, 15, Config.DrawSettings.TimerX + 66, Config.DrawSettings.TimerY + 23, ARGB(255,187,255,0))
end
BaronSprite:Draw(Config.DrawSettings.TimerX + 128, Config.DrawSettings.TimerY, 255)
BaronSprite:SetScale(0.4, 0.4)
if BaronTimer == "00:00" then
DrawText("Live !", 15, Config.DrawSettings.TimerX + 194, Config.DrawSettings.TimerY + 23, ARGB(255,187,255,0))
else
DrawText(BaronTimer, 15, Config.DrawSettings.TimerX + 194, Config.DrawSettings.TimerY + 23, ARGB(255,187,255,0))
end
end
end
function Menu()
Config = scriptConfig("Doctor Yi", "MasterYi")
Config:addSubMenu("General Settings", "GeneralSettings")
Config.GeneralSettings:addParam("comboON", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, string.byte(" "))
Config.GeneralSettings:addParam("UseSmite", "Smite Dragon, Rift Herald and Baron", SCRIPT_PARAM_ONOFF, true)
Config:addSubMenu("Humanizer", "HumanizerSettings")
Config.HumanizerSettings:addParam("ComboHumanizerON", "Humanizer for combo", SCRIPT_PARAM_ONOFF, true)
Config.HumanizerSettings:addParam("ComboHumanizerMinValue", "Min Value", SCRIPT_PARAM_SLICE, 100, 0, 1000, 0)
Config.HumanizerSettings:addParam("ComboHumanizerMaxValue", "Max Value", SCRIPT_PARAM_SLICE, 200, 0, 1000, 0)
Config.HumanizerSettings:setCallback("ComboHumanizerMinValue", function (value) if value < Config.HumanizerSettings.ComboHumanizerMinValue then Config.HumanizerSettings.ComboHumanizerMaxValue = Config.HumanizerSettings.ComboHumanizerMinValue end end)
Config.HumanizerSettings:setCallback("ComboHumanizerMaxValue", function (value) if value > Config.HumanizerSettings.ComboHumanizerMaxValue then Config.HumanizerSettings.ComboHumanizerMinValue = Config.HumanizerSettings.ComboHumanizerMaxValue end end)
Config.HumanizerSettings:addParam("SpaceHumanizer11","____________________________________________", 5, "")
Config.HumanizerSettings:addParam("SpaceHumanizer12","", 5, "")
Config.HumanizerSettings:addParam("DodgeHumanizerON", "Humanizer for dodge", SCRIPT_PARAM_ONOFF, true)
Config.HumanizerSettings:addParam("DodgeHumanizerMinValue", "Min Value", SCRIPT_PARAM_SLICE, 150, 0, 1000, 0)
Config.HumanizerSettings:addParam("DodgeHumanizerMaxValue", "Max Value", SCRIPT_PARAM_SLICE, 300, 0, 1000, 0)
Config.HumanizerSettings:setCallback("DodgeHumanizerMinValue", function (value) if value < Config.HumanizerSettings.DodgeHumanizerMinValue then Config.HumanizerSettings.DodgeHumanizerMaxValue = Config.HumanizerSettings.DodgeHumanizerMinValue end end)
Config.HumanizerSettings:setCallback("DodgeHumanizerMaxValue", function (value) if value > Config.HumanizerSettings.DodgeHumanizerMaxValue then Config.HumanizerSettings.DodgeHumanizerMinValue = Config.HumanizerSettings.DodgeHumanizerMaxValue end end)
Config.HumanizerSettings:addParam("SpaceHumanizer21","____________________________________________", 5, "")
Config.HumanizerSettings:addParam("SpaceHumanizer22","", 5, "")
Config.HumanizerSettings:addParam("SmiteHumanizerON", "Humanizer for smite", SCRIPT_PARAM_ONOFF, true)
Config.HumanizerSettings:addParam("SmiteHumanizerMinValue", "Min Value", SCRIPT_PARAM_SLICE, 100, 0, 1000, 0)
Config.HumanizerSettings:addParam("SmiteHumanizerMaxValue", "Max Value", SCRIPT_PARAM_SLICE, 200, 0, 1000, 0)
Config.HumanizerSettings:setCallback("SmiteHumanizerMinValue", function (value) if value < Config.HumanizerSettings.SmiteHumanizerMinValue then Config.HumanizerSettings.SmiteHumanizerMaxValue = Config.HumanizerSettings.SmiteHumanizerMinValue end end)
Config.HumanizerSettings:setCallback("SmiteHumanizerMaxValue", function (value) if value > Config.HumanizerSettings.SmiteHumanizerMaxValue then Config.HumanizerSettings.SmiteHumanizerMinValue = Config.HumanizerSettings.SmiteHumanizerMaxValue end end)
Config.HumanizerSettings:addParam("SpaceHumanizer31","____________________________________________", 5, "")
Config.HumanizerSettings:addParam("SpaceHumanizer32","", 5, "")
Config.HumanizerSettings:addParam("EmoteHumanizerON", "Humanizer for emote", SCRIPT_PARAM_ONOFF, true)
Config.HumanizerSettings:addParam("EmoteHumanizerMinValue", "Min Value", SCRIPT_PARAM_SLICE, 200, 0, 1000, 0)
Config.HumanizerSettings:addParam("EmoteHumanizerMaxValue", "Max Value", SCRIPT_PARAM_SLICE, 300, 0, 1000, 0)
Config.HumanizerSettings:setCallback("EmoteHumanizerMinValue", function (value) if value < Config.HumanizerSettings.EmoteHumanizerMinValue then Config.HumanizerSettings.EmoteHumanizerMaxValue = Config.HumanizerSettings.EmoteHumanizerMinValue end end)
Config.HumanizerSettings:setCallback("EmoteHumanizerMaxValue", function (value) if value > Config.HumanizerSettings.EmoteHumanizerMaxValue then Config.HumanizerSettings.EmoteHumanizerMinValue = Config.HumanizerSettings.EmoteHumanizerMaxValue end end)
Config:addSubMenu("Combo", "ComboSettings")
Config:addSubMenu("Items", "ItemsSettings")
Config.ItemsSettings:addParam("SmiteChampON", "Use smite on champion", SCRIPT_PARAM_ONOFF, true)
Config.ItemsSettings:addParam("YoumuuON", "Use Youmuu", SCRIPT_PARAM_ONOFF, true)
Config.ItemsSettings:addParam("BotkrON", "Use BOTRK", SCRIPT_PARAM_ONOFF, true)
Config.ItemsSettings:addParam("TitanicON", "Use Titanic Hydra", SCRIPT_PARAM_ONOFF, true)
Config:addSubMenu("Dodge", "DodgeSettings")
Config.DodgeSettings:addParam("DodgeON", "Dodge dangerous spells with Q or W", SCRIPT_PARAM_ONOFF, true)
Config:addSubMenu("Draw", "DrawSettings")
Config.DrawSettings:addParam("DrawAaON", "Draw AA range", SCRIPT_PARAM_ONOFF, false)
Config.DrawSettings:addParam("DrawSmiteON", "Draw Smite range", SCRIPT_PARAM_ONOFF, true)
Config.DrawSettings:addParam("DrawQON", "Draw Alpha Strike range", SCRIPT_PARAM_ONOFF, true)
Config.DrawSettings:addParam("SpaceDraw11","____________________________________________", 5, "")
Config.DrawSettings:addParam("SpaceDraw12","", 5, "")
Config.DrawSettings:addParam("TimerON", "Draw Timers", SCRIPT_PARAM_ONOFF, true)
Config.DrawSettings:addParam("TimerY", "Vertical Position of the Timer", SCRIPT_PARAM_SLICE, 50, 0, WINDOW_H - 120, 0)
Config.DrawSettings:addParam("TimerX", "Horizontal Position of the Timer", SCRIPT_PARAM_SLICE, 50, 0, WINDOW_W - 128, 0)
Config.DrawSettings:addParam("TimerType", "Display in ", SCRIPT_PARAM_LIST, 1, {"column", "row"})
Config.DrawSettings:addParam("SpaceDraw21","____________________________________________", 5, "")
Config.DrawSettings:addParam("SpaceDraw22","", 5, "")
Config.DrawSettings:addParam("DrawQuality", "Quality of the circle", SCRIPT_PARAM_SLICE, 30, 10, 50, 0)
Config:addSubMenu("Miscellaneous", "MiscSettings")
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"})
Config.MiscSettings:addParam("AutoLevelON", "Auto level spells (Q>E>W)", SCRIPT_PARAM_ONOFF, true)
Config.MiscSettings:addParam("EmoteON", "Emote on kill or assist", SCRIPT_PARAM_ONOFF, true)
Config.GeneralSettings:permaShow("comboON")
Config:addParam("space2", "", 5, "")
Config:addParam("signature1", "Let the Doctor carry", 5, "")
Config:addParam("signature2", " by DrPhoenix ", 5, "")
end
function PrintMsg(msg)
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>")
end
function HumanizerTime()
if Config.HumanizerSettings.ComboHumanizerON == true then
ComboHumanizer = math.random(Config.HumanizerSettings.ComboHumanizerMinValue, Config.HumanizerSettings.ComboHumanizerMaxValue)/1000
else
ComboHumanizer = 0
end
if Config.HumanizerSettings.DodgeHumanizerON == true then
DodgeHumanizer = math.random(Config.HumanizerSettings.DodgeHumanizerMinValue, Config.HumanizerSettings.DodgeHumanizerMaxValue)/1000
else
DodgeHumanizer = 0
end
if Config.HumanizerSettings.SmiteHumanizerON == true then
SmiteHumanizer = math.random(Config.HumanizerSettings.SmiteHumanizerMinValue, Config.HumanizerSettings.SmiteHumanizerMaxValue)/1000
else
SmiteHumanizer = 0
end
if Config.HumanizerSettings.EmoteHumanizerON == true then
EmoteHumanizer = math.random(Config.HumanizerSettings.EmoteHumanizerMinValue, Config.HumanizerSettings.EmoteHumanizerMaxValue)/1000
else
EmoteHumanizer = 0
end
end
function AutoLevel()
if Config.MiscSettings.AutoLevelON then
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}
if myHero.level > abilityLevel then
abilityLevel = abilityLevel + 1
LevelSpell(abilitySequence[abilityLevel])
end
end
end
function GetTimers()
if ((GetInGameTimer() - TimeDragonDown) < 360 and (GetInGameTimer() - TimeDragonDown) >= 0) then
if(GetInGameTimer() < 360) then
TimeDragonSpawn = 150 - (GetInGameTimer() - TimeDragonDown) + 1
else
TimeDragonSpawn = 360 - (GetInGameTimer() - TimeDragonDown) + 1
end
end
if TimeDragonSpawn <= 0 then
TimeDragonSpawn = 0
end
if ((GetInGameTimer() - TimeBaronDown) < 1200 and (GetInGameTimer() - TimeBaronDown) >= 0) then
if(GetInGameTimer() < 1200) then
TimeBaronSpawn = 1200 - (GetInGameTimer() - TimeBaronDown) + 1
else
TimeBaronSpawn = 420 - (GetInGameTimer() - TimeBaronDown) + 1
end
end
if TimeBaronSpawn <= 0 then
TimeBaronSpawn = 0
end
nMins = string.format("%02.f", math.floor(TimeDragonSpawn/60))
nSecs = string.format("%02.f", math.floor(TimeDragonSpawn - nMins *60))
DragonTimer = nMins..":" ..nSecs
nMins = string.format("%02.f", math.floor(TimeBaronSpawn/60))
nSecs = string.format("%02.f", math.floor(TimeBaronSpawn - nMins *60))
BaronTimer = nMins..":" ..nSecs
end
function GetSmiteDamage()
if myHero.level <= 4 then
SmiteDamage = 370 + (myHero.level*20)
end
if myHero.level > 4 and myHero.level <= 9 then
SmiteDamage = 330 + (myHero.level*30)
end
if myHero.level > 9 and myHero.level <= 14 then
SmiteDamage = 240 + (myHero.level*40)
end
if myHero.level > 14 then
SmiteDamage = 100 + (myHero.level*50)
end
return SmiteDamage
end
function SmiteMonster(obj)
local DistanceMonster = GetDistance(obj)
if SmitePos ~= nil and myHero:CanUseSpell(SmitePos) == READY and DistanceMonster <= SmiteRange and obj.health <= GetSmiteDamage() then
if obj.charName == "SRU_Baron" or obj.charName == "SRU_Dragon" or obj.charName == "SRU_RiftHerald" then
DelayAction(function() CastSpell(SmitePos, obj) end, SmiteHumanizer)
end
end
end
function OnAnimation(unit, animation)
if unit.team ~= myHero.team and unit.type == myHero.type and animation == "Death" and Config.MiscSettings.EmoteON then
DelayAction(function() SendChat("/masterybadge") end, EmoteHumanizer)
end
end
function OnProcessSpell(unit,spell)
if unit.team ~= myHero.team and spell and spell.target and spell.target.isMe then
Dodge(DodgeHumanizer, true, unit.charName, spell.name)
end
end
function Combo()
if Config.GeneralSettings.comboON and outTower then
if player:CanUseSpell(_R) == READY and target ~= nil and GetDistance(target, myHero) <= 2000 then
CastSpell(_R,target)
end
if player:CanUseSpell(_E) == READY and target ~= nil and GetDistance(target, myHero) <= AARange then
CastSpell(_E,target)
end
if player:CanUseSpell(_Q) == READY and target ~= nil and GetDistance(target, myHero) > AARange then
CastSpell(_Q,target)
end
end
end
function Items()
if Config.GeneralSettings.comboON and target ~= nil then
for _, item in pairs(ItemsList) do
item.slot = GetInventorySlotItem(item.id)
if item.slot ~= nil then
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
if GetDistance(target) < item.range then
DelayAction(function() CastSpell(SmitePos, target) end, ComboHumanizer)
end
end
if item.reqTarget and GetDistance(target) < item.range then
DelayAction(function() CastSpell(item.slot, target) end, ComboHumanizer)
elseif not item.reqTarget and GetDistance(target, myHero) <= 2000 then
DelayAction(function() CastSpell(item.slot) end, ComboHumanizer)
end
end
end
end
end
function Dodge(delay, useW, champ, name)
minions = minionManager(MINION_ENEMY, QRange, myHero, MINION_SORT_MINHEALTH_DEC)
minionManager(MINION_JUNGLE, QRange, myHero, MINION_SORT_MINHEALTH_DEC)
DelayAction(function()
if myHero:CanUseSpell(_Q) then
for i, unit in ipairs(GetEnemyHeroes()) do
if ValidTarget(unit) then
if GetDistance(unit, myHero) <= QRange and outTower then
Target = unit
CastSpell(_Q, Target)
elseif #minions.objects > 0 then
CastSpell(_Q, minions.objects[1])
elseif #jungleMinions.objects > 0 then
CastSpell(_Q, jungleMinions.objects[1])
elseif myHero:CanUseSpell(_W) and useW then
CastSpell(_W)
end
end
end
elseif myHero:CanUseSpell(_W) then
CastSpell(_W)
end
end, delay)
end
function OnCreateObj(obj)
if obj.name == "SRU_Dragon_Death.troy" then
TimeDragonSpawn = 360
TimeDragonDown = GetInGameTimer()
end
if obj.name == "SRU_Baron_Death.troy" then
TimeBaronSpawn = 420
TimeBaronDown = GetInGameTimer()
end
function Update()
local UpdateHost = "www.scarjit.de"
local ServerPath = "/DrPhoenix/BoL/Scripts/DoctorSentences/"
local ServerFileName = "DoctorSentences.lua"
local ServerVersionFileName = "DoctorSentences.version"
local version = 0.03
DL = Download()
local ServerVersionDATA = GetWebResult("scarjit.de" , ServerPath..ServerVersionFileName)
if ServerVersionDATA then
local ServerVersion = tonumber(ServerVersionDATA)
if ServerVersion then
if ServerVersion > tonumber(version) then
PrintChatMsg("Updating, don't press F9")
DL:newDL(UpdateHost, ServerPath..ServerFileName, ServerFileName, SCRIPT_PATH, function ()
PrintChatMsg("DoctorSentences updated, please reload")
end)
end
else
PrintChatMsg("An error occured, while updating, please reload")
end
else
PrintChatMsg("Could not connect to update Server")
end
local KDA = nil
end
class "Download"
function Download:__init()
socket = require("socket")
self.aktivedownloads = {}
self.callbacks = {}
AddTickCallback(function ()
self:RemoveDone()
end)
class("Async")
function Async:__init(host, filepath, localname, drawoffset, localpath)
self.progress = 0
self.host = host
self.filepath = filepath
self.localname = localname
self.offset = drawoffset
self.localpath = localpath
self.CRLF = '\r\n'
self.headsocket = socket.tcp()
self.headsocket:settimeout(1)
self.headsocket:connect(self.host, 80)
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)
self.HEADdata = ""
self.DLdata = ""
self.StartedDownload = false
self.canDL = true
AddTickCallback(function ()
self:tick()
end)
AddDrawCallback(function ()
self:draw()
end)
end
function Async:tick()
if self.progress == 100 then return end
if self.HEADcStatus ~= "timeout" and self.HEADcStatus ~= "closed" then
self.HEADfString, self.HEADcStatus, self.HEADpString = self.headsocket:receive(16);
if self.HEADfString then
self.HEADdata = self.HEADdata..self.HEADfString
elseif self.HEADpString and #self.HEADpString > 0 then
self.HEADdata = self.HEADdata..self.HEADpString
end
elseif self.HEADcStatus == "timeout" then
self.headsocket:close()
--Find Lenght
local begin = string.find(self.HEADdata, "Length: ")
if begin then
self.HEADdata = string.sub(self.HEADdata,begin+8)
local n = 0
local _break = false
for i=1, #self.HEADdata do
local c = tonumber(string.sub(self.HEADdata,i,i))
if c and _break == false then
n = n+1
else
_break = true
end
end
self.HEADdata = string.sub(self.HEADdata,1,n)
self.StartedDownload = true
self.HEADcStatus = "closed"
end
end
if self.HEADcStatus == "closed" and self.StartedDownload == true and self.canDL == true then --Double Check
self.canDL = false
self.DLsocket = socket.tcp()
self.DLsocket:settimeout(1)
self.DLsocket:connect(self.host, 80)
--Start Main Download
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)
end
if self.DLsocket and self.DLcStatus ~= "timeout" and self.DLcStatus ~= "closed" then
self.DLfString, self.DLcStatus, self.DLpString = self.DLsocket:receive(1024);
if ((self.DLfString) or (self.DLpString and #self.DLpString > 0)) then
self.DLdata = self.DLdata .. (self.DLfString or self.DLpString)
end
elseif self.DLcStatus and self.DLcStatus == "timeout" then
self.DLsocket:close()
self.DLcStatus = "closed"
self.DLdata = string.sub(self.DLdata,#self.DLdata-tonumber(self.HEADdata)+1)
local file = io.open(self.localpath.."\\"..self.localname, "w+b")
file:write(self.DLdata)
file:close()
self.progress = 100
end
if self.progress ~= 100 and self.DLdata and #self.DLdata > 0 then
self.progress = (#self.DLdata/tonumber(self.HEADdata))*100
end
end
function Async:draw()
if self.progress < 100 then
DrawTextA("Downloading: "..self.localname,15,50,35+self.offset)
DrawRectangleOutline(49,50+self.offset,250,20, ARGB(255,255,255,255),1)
if self.progress ~= 100 then
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))
DrawTextA(tostring(math.round(self.progress).." %"), 15,150,52+self.offset)
end
end
end
end
function Download:newDL(host, file, name, path, callback)
local offset = (#self.aktivedownloads+1)*40
self.aktivedownloads[#self.aktivedownloads+1] = Async(host, file, name, offset-40, path)
if not callback then
callback = (function ()
end)
end
self.callbacks[#self.callbacks+1] = callback
end
function Download:RemoveDone()
if #self.aktivedownloads == 0 then return end
local x = {}
for k, v in pairs(self.aktivedownloads) do
if math.round(v.progress) < 100 then
v.offset = k*40-40
x[#x+1] = v
else
self.callbacks[k]()
end
end
self.aktivedownloads = {}
self.aktivedownloads = x
end