Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ Melee Last Hit 1.0 by HeX ]]--
- if myHero.range > 200 then PrintChat("<font color='#FF0000'> >> LOADING FAILED - Only melee champions supported. <<</font>") return end
- local player = GetMyHero()
- local bRange = 75
- --[[ Waits ]]--
- local nextTick = 0
- local waitDelay = 400
- --[[ Extra Damage ]]--
- local MaladyDmg = 0
- function OnLoad()
- PrintChat("<font color='#CCCCCC'> >> Melee Last Hit 1.0 loaded! <<</font>")
- MLConfig = scriptConfig("Melee Last Hit", "MeleeLastHit")
- MLConfig:addParam("lasthit", "Last Hit for me", SCRIPT_PARAM_ONKEYDOWN, false, 65)
- MLConfig:addParam("spellsword", "Have Spellsword", SCRIPT_PARAM_ONOFF, false)
- MLConfig:addParam("mousemoving", "Move to mouse", SCRIPT_PARAM_ONOFF, true)
- MLConfig:permaShow("lasthit")
- enemyMinions = minionManager(MINION_ENEMY, 600, player, MINION_SORT_HEALTH_ASC)
- end
- function getExtraDmg()
- ExtraDmg = 0
- if GetInventoryHaveItem(3091, player) == true then
- ExtraDmg = ExtraDmg + 42
- end
- if MLConfig.spellsword then
- ExtraDmg = ExtraDmg + (player.ap*0.1)
- end
- if GetInventoryHaveItem(3114, player) == true then
- maladyDmg = 15+(player.ap*0.1)
- ExtraDmg = ExtraDmg + maladyDmg
- end
- return ExtraDmg
- end
- function OnTick()
- enemyMinions:update()
- getExtraDmg()
- if MLConfig.lasthit then
- if MLConfig.mousemoving and GetTickCount() > nextTick then
- player:MoveTo(mousePos.x, mousePos.z)
- end
- for index, minion in pairs(enemyMinions.objects) do
- if GetDistance(minion, myHero) <= (myHero.range+75) and GetTickCount() > nextTick then
- local aDmg = getDmg("AD",minion, myHero)
- local bDmg = myHero:CalcMagicDamage(minion, ExtraDmg)
- if (aDmg+bDmg)>minion.health then
- myHero:Attack(minion)
- nextTick = GetTickCount() + waitDelay
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement