Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- AutoMorgana by x7x
- My first script with TS :)
- ]]
- if myHero.charName == "Morgana" then
- require "AllClass"
- require "spellDmg"
- local QRange = 1300
- local QWidth = 200
- local ts = TargetSelector(TARGET_LOW_HP,QRange,DAMAGE_MAGIC,false)
- local tq = TargetPrediction(QRange, 1.2, 0, 300, 50)
- local DFGSSlot = nil
- local DFGReady = false
- function OnLoad()
- MorgConfig = scriptConfig("Morgana Combo", "MorganaCombo")
- MorgConfig:addParam("active", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 32)
- MorgConfig:addParam("useult", "Use Ultimate", SCRIPT_PARAM_ONOFF, true)
- MorgConfig:permaShow("active")
- ts.name = "Morgana"
- MorgConfig:addTS(ts)
- PrintChat(">> AutoMorgana loaded! Press shift to configure.")
- end
- function OnTick()
- ts:update()
- DFGSlot = GetInventorySlotItem(3128)
- DFGReady = (DFGSlot ~= nil and myHero:CanUseSpell(DFGSlot) == READY)
- WReady = (myHero:CanUseSpell(_W) == READY)
- RReady = (myHero:CanUseSpell(_R) == READY)
- TargetPrediction__OnTick()
- if ts.target ~= nil and MorgConfig.active then
- qpred = tq:GetPrediction(ts.target)
- if qpred ~= nil then
- CastSpell(_Q, qpred.x, qpred.z)
- end
- end
- if myHero:CanUseSpell(_Q) == COOLDOWN and ts.target ~= nil and MorgConfig.active and ts.target.canMove == false then
- myHero:Attack(ts.target)
- if GetDistance(ts.target) < 750 then
- if DFGReady then CastSpell(DFGSlot, ts.target) end
- end
- myHero:Attack(ts.target)
- if GetDistance(ts.target) < 900 then
- if WReady then CastSpell(_W,ts.target.x,ts.target.z) end
- end
- myHero:Attack(ts.target)
- if GetDistance(ts.target) < 600 and MorgConfig.useult then
- if RReady then CastSpell(_R) end
- end
- myHero:Attack(ts.target)
- end
- end
- function OnUnload()
- PrintChat(">> AutoMorgana unloaded!")
- end
- function OnDraw()
- SC__OnDraw()
- 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