Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- function OnAnimation(unit, animation)
- --if unit.isMe and animation ~= "Run" then PrintChat(animation) end
- if not myHero.dead then
- if unit.isMe and animation ~= "Crit" or unit.isMe and animation == "Run" or unit.isMe and animation == "Idle1" or unit.isMe and animation == "Idle2" then
- if nextAA > GetTickCount() then
- PrintChat("notCrit")
- if LastTarget ~= nil then
- myHero:MoveTo(myHero.x, myHero.z)
- myHero:Attack(LastTarget)
- nextAA = GetTickCount() + 100
- end
- end
- end
- end
- end
- function OnLoad()
- PrintChat("AUTOCRIT TEST VERSION LOADED")
- LastTarget = nil
- nextAA = 0
- end
- function OnTick()
- if LastTarget ~= nil then if LastTarget.dead then LastTarget = nil end end
- end]]
- CritScriptEnabled = true
- AttackDone = false
- AttackTick = 0
- LastTarget = nil
- InterputedAA = 0
- function OnProcessSpell(unit, spell)
- if unit.isMe then if spell.target ~= nil and not spell.target.isMe then LastTarget = spell.target end end
- end
- function OnAnimation(unit, animation)
- if unit.isMe and animation == "Attack1" and LastTarget ~= nil and animation ~= "Crit" or unit.isMe and animation == "Attack2" and LastTarget ~= nil and animation ~= "Crit" then
- if unit.critChance > -1 then -- unit.critChance is broken.
- if InterputedAA < 2 then -- Anti noncrits wave
- myHero:HoldPosition()
- AttackTick = GetTickCount() -- + 250 -- useless.
- AttackDone = false
- PrintChat("Interputting AA")
- InterputedAA = InterputedAA + 1
- else
- PrintChat("TooManyInterputs, letting normal AA")
- InterputedAA = 0
- end
- else
- PrintChat("Too low critchance, not intrputing AA.")
- end
- end
- if unit.isMe then PrintChat(animation) end
- end
- function OnTick()
- if LastTarget ~= nil and LastTarget.dead then LastTarget = nil end
- if AttackDone == false and GetTickCount() > AttackTick and LastTarget ~= nil then
- myHero:Attack(LastTarget)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment