Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ LastHitter v1.75 by DeniCevap!
- Press X to disable/enable the lasthitter!
- Press Z to harass!
- In chat:
- .elast ( enable lasthitter )
- .dlast ( disable lasthitter )
- .circleon ( draws circles and hp )
- .circleoff ( disable circles and hp )
- Fixed bugs: All of them, just run the script :)
- New Features:
- TRUS gave me some thing to put into the code, thanks!
- Sion's Q
- Harassing/Blood mode = Z key, forces spell use on the enemy to reduce his hp for a Ally to swoop in and take the kill.
- Howto add new champions, put this into the infoTable table.
- {name="Name of course.", range = range of script, spell = _(Spell goes here, yes the _ should be there), getDMGfrom = "(Spell without _ here)"},
- --]]
- do
- spellText = {"Q","W","E","R"}
- infoTable = {
- {name="Ashe", range = 1100, spell = _W, castTarget = false},
- {name="Akali", range = 600, spell = _Q, castTarget = true},
- {name="Alistar", range = 650, spell = _W, castTarget = true},
- {name="Anivia", range = 650, spell = _E, castTarget = true},
- {name="Annie", range = 625, spell = _Q, castTarget = true},
- {name="Brand", range = 625, spell = _E, castTarget = true},
- {name="Caitlyn", range = 1200, spell = _Q, castTarget = false},
- {name="Cassiopeia",range = 700, spell = _E, castTarget = true},
- {name="Chogath",range = 150, spell = _R, castTarget = true},
- {name="Darius",range = 475, spell = _R, castTarget = true},
- {name="Diana",range = 900, spell = _R, castTarget = true},
- {name="Evelynn",range = 325, spell = _E, castTarget = true},
- {name="Fiddlesticks",range = 750, spell = _E, castTarget = true},
- {name="Gangplank",range = 625, spell = _Q, castTarget = true},
- {name="Kassadin",range = 650,spell = _Q, castTarget = true},
- {name="Katarina", range = 700, spell = _E, castTarget = true},
- {name="Kayle",range = 650, spell = _Q, castTarget = true},
- {name="MasterYi",range = 600, spell = _Q, castTarget = true},
- {name="Miss Fortune",range = 550, spell = _Q, castTarget = true},
- {name="Nunu",range = 550, spell = _E, castTarget = true},
- {name="Irelia",range = 650, spell = _Q, castTarget = false},
- {name="Taric", range = 625, spell = _E, castTarget = true},
- {name="Teemo", range = 590, spell = _Q, castTarget = true},
- {name="Tristana",range = 700, spell = _R, castTarget = true},
- {name="Twitch",range = 1200, spell = _E, castTarget = true},
- {name="Ryze",range = 625, spell = _W, castTarget = true},
- {name="Soraka",range = 725, spell = _E, castTarget = true},
- {name="Shaco",range = 625, spell = _E, castTarget = true},
- {name="Sivir",range = 1000, spell = _Q, castTarget = false},
- {name="Sion",range = 550, spell = _Q, castTarget = true},
- {name="Veigar",range = 650, spell = _Q, castTarget = true},
- {name="Volibear",range = 400, sell = _W, castTarget = true},
- {name="Viktor",range = 600, spell = _Q, castTarget = true},
- {name="Vladimir",range = 600, spell = _Q, castTarget = true},
- {name="Warwick",range = 400, spell = _Q, castTarget = true},
- {name="XinZhao",range = 600, spell = _E, castTarget = true},
- }
- for i,info in pairs(infoTable) do
- if player.charName ~= info.name then table.remove(infoTable, i) end
- end
- if #infoTable == 0 then PrintChat(" » "..player.charName.." is not supported") return end
- local ToggleHK = string.byte("X") -- X
- local harassHK = string.byte("Z") -- Z
- local active = true
- local harass = false
- local player = GetMyHero()
- local drawcircles = true
- local ts
- function OnLoad()
- ts = TargetSelector(TARGET_LOW_HP,0,DAMAGE_MAGIC)
- for i,info in pairs(infoTable) do
- if ts.range < info.range then ts.range = info.range end
- end
- PrintChat(" » LastHitter is "..player.charName..".")
- end
- function OnTick()
- ts:update()
- if active then
- for i,info in pairs(infoTable) do
- if player:CanUseSpell(info.spell) == READY and ValidTarget(ts, info.range) then
- local Dmg = getDmg(spellText(info.spell + 1 - _Q)),ts.target,player)
- if ts.target.health < Dmg then
- PrintFloatText(ts.target,10,"DIE!!!")
- if info.castTarget then
- CastSpell(info.spell,ts.target)
- else
- CastSpell(info.spell,ts.target.x,ts.target.z)
- end
- end
- else
- PrintFloatText(ts.target,0,"" .. math.ceil(ts.target.health - (Dmg)) .. " hp")
- end
- end
- end
- if harass then
- for i,info in pairs(infoTable) do
- if player:CanUseSpell(info.spell) == READY and ValidTarget(ts.target, info.range) then
- if info.castTarget then
- CastSpell(info.spell,ts.target)
- else
- CastSpell(info.spell,ts.target.x,ts.target.z)
- end
- end
- end
- end
- end
- function OnDraw()
- if drawcircles and not player.dead then
- DrawCircle(player.x, player.y, player.z, ts.range, 0x19A712)
- if ts.target ~= nil then
- for j=0, 15 do
- DrawCircle(ts.target.x, ts.target.y, ts.target.z, 40 + j*1.5, 0x00FF00)
- end
- end
- end
- end
- function OnSendChat(text)
- if text == ".elast" then
- BlockChat()
- active = true
- PrintChat(">> LastHitter enabled")
- elseif text == ".dlast" then
- BlockChat()
- active = false
- PrintChat(">> LastHitter disabled")
- elseif text == ".circleoff" then
- BlockChat()
- drawcircles = false
- PrintChat(">> Drawing Circles and HP off!")
- elseif text == ".circleon" then
- BlockChat()
- drawcircles = true
- PrintChat(">> Drawing Cricles and HP on!")
- end
- end
- function OnWndMsg(msg,key)
- if msg == KEY_DOWN then
- if key == ToggleHK then
- if active then
- active = false
- PrintChat(">> LastHitter disabled")
- else
- active = true
- PrintChat(">> LastHitter enabled")
- end
- end
- end
- if key == harassHK then
- harass = (msg == KEY_DOWN)
- end
- end
- end
Add Comment
Please, Sign In to add comment