Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Fiora
- by Kevinkev
- No puns ;(
- ]]--
- if myHero.charName == "Fiora" then
- function OnLoad()
- comboHK = 32 --Spacebar
- runTsTarget = string.byte("X")
- WalkToCursor = string.byte("C")
- --Do not touch
- swingDelay = 0.8
- Qrange = 600
- Rrange = 400
- ScanRange = 700
- bAttack = false
- lastBasicAttack = 0
- ts = TargetSelector(TARGET_LOW_HP,700,DAMAGE_PHYSICAL,false)
- --Menu
- FConfig = scriptConfig("Fiora Combo", "FioraCombo")
- FConfig:addParam("combo", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, comboHK)
- FConfig:addParam("r2t", "Run to target during combo", SCRIPT_PARAM_ONKEYTOGGLE, false, runTsTarget)
- FConfig:addParam("w2c", "Walk to cursor", SCRIPT_PARAM_ONKEYTOGGLE, false, WalkToCursor)
- FConfig:addParam("useult", "Use Ultimate", SCRIPT_PARAM_ONOFF, true)
- FConfig:permaShow("combo")
- FConfig:permaShow("r2t")
- FConfig:permaShow("w2c")
- ts.name = "Fiora"
- FConfig:addTS(ts)
- PrintChat(">> Fiora Loaded!")
- end
- function OnProcessSpell(unit, spell)
- if unit.isMe and (spell.name:find("BasicAttack" or "CritAttack") ~= nil) then
- swing = 1
- bAttack = true
- lastBasicAttack = os.clock()
- end
- end
- function moveToCursor()
- local moveX = mousePos.x
- local moveZ = mousePos.z
- myHero:MoveTo(moveX, moveZ)
- end
- function OnTick()
- ts:update()
- QReady = (myHero:CanUseSpell(_Q) == READY)
- WReady = (myHero:CanUseSpell(_W) == READY)
- EReady = (myHero:CanUseSpell(_E) == READY)
- RReady = (myHero:CanUseSpell(_R) == READY)
- if os.clock() > lastBasicAttack + 0.5 then
- swing = 0
- bAttack = false
- end
- if FConfig.combo and FConfig.w2c then
- moveToCursor()
- end
- if ts.target ~= nil and FConfig.combo then
- --Walks to target when script active
- if FConfig.r2t then
- myHero:Attack(ts.target)
- end
- --Q at target, auto attack then Q again.
- if QReady then
- CastSpell(_Q,ts.target)
- myHero:Attack(ts.target)
- CastSpell(_E,ts.target)
- if QReady and os.clock() - lastBasicAttack > swingDelay and bAttack then
- CastSpell(_Q,ts.target)
- end
- end
- --Calculates enemies near target
- if moreThanOne() then
- RDamage = getDmg("R",ts.target,myHero,1)
- else
- RDamage = getDmg("R",ts.target,myHero,3)
- end
- if RReady and FConfig.useult and RDamage >= ts.target.health then
- CastSpell(_R,ts.target)
- end
- end
- end
- function moreThanOne()
- local boolean = false
- for j = 1, heroManager.iCount, 1 do
- local enemyhero = heroManager:getHero(j)
- if myHero.team ~= enemyhero.team and ValidTarget(enemyhero) then
- if ValidTargetNear(enemyhero,400,ts.target) then
- boolean = true
- else
- boolean = (false or boolean)
- end
- end
- end
- return boolean
- end
- function OnDraw()
- SC__OnDraw()
- DrawCircle(myHero.x, myHero.y, myHero.z, ScanRange, 0xFF0000)
- end
- function OnWndMsg(msg,key)
- SC__OnWndMsg(msg,key)
- end
- function OnSendChat(msg)
- TargetSelector__OnSendChat(msg)
- ts:OnSendChat(msg, "pri")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement