Advertisement
Guest User

Untitled

a guest
Aug 18th, 2015
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.04 KB | None | 0 0
  1. OnLoop(function(myHero)
  2. -- DrawText("Karthus script loaded",20,0,0,0xffff0000)
  3. killableInfo()
  4. local target = GetCurrentTarget()
  5. if ValidTarget(target, math.huge) then
  6. -- DrawText(GetObjectName(target),20,0,150,0xff00ff00)
  7. if KeyIsDown(32) then
  8. castE(target)
  9. castW(target)
  10. castQ(target)
  11. end
  12. end
  13. end)
  14.  
  15. function castQ( target )
  16. -- CastStartPosVec,EnemyChampionPtr,EnemyMoveSpeed,YourSkillshotSpeed,SkillShotDelay,SkillShotRange,SkillShotWidth,MinionCollisionCheck,AddHitBox;
  17. pred = GetPredictionForPlayer(GetOrigin(target),target,GetMoveSpeed(target),math.huge,500,GetCastRange(myHero,_Q),200,false,true)
  18. if IsInDistance(target, GetCastRange(myHero,_Q)) and CanUseSpell(myHero,_Q) == READY and pred.HitChance == 1 then
  19. CastSkillShot(_Q,pred.PredPos.x,pred.PredPos.y,pred.PredPos.z)
  20. end
  21. end
  22.  
  23. function castW( target )
  24. -- CastStartPosVec,EnemyChampionPtr,EnemyMoveSpeed,YourSkillshotSpeed,SkillShotDelay,SkillShotRange,SkillShotWidth,MinionCollisionCheck,AddHitBox;
  25. pred = GetPredictionForPlayer(GetOrigin(target),target,GetMoveSpeed(target),math.huge,500,GetCastRange(myHero,_W),800,false,true)
  26. if IsInDistance(target, GetCastRange(myHero,_W)) and CanUseSpell(myHero,_W) == READY and pred.HitChance == 1 then
  27. CastSkillShot(_W,pred.PredPos.x,pred.PredPos.y,pred.PredPos.z)
  28. end
  29. end
  30.  
  31. function castE( target )
  32. -- open E
  33. if IsInDistance(target, GetCastRange(myHero,_E)) and CanUseSpell(myHero,_E) == READY and GotBuff(myHero,"KarthusDefile") <= 0 then
  34. CastTargetSpell(myHero, _E)
  35. end
  36.  
  37. -- close E
  38. if not IsInDistance(target, GetCastRange(myHero,_E)) and GotBuff(myHero,"KarthusDefile") > 0 then
  39. CastTargetSpell(myHero, _E)
  40. end
  41. end
  42.  
  43. function killableInfo()
  44. -- no need show killable info when R in cd
  45. if CanUseSpell(myHero,_R) ~= READY then return end
  46.  
  47. rDmg = 100 + GetCastLevel(myHero,_R) * 150 + GetBonusAP(myHero) * 0.6
  48. -- info = "R dmg : "..rDmg .. "\n"
  49. info = ""
  50. for nID, enemy in pairs(enemyHeroes) do
  51. if IsObjectAlive(enemy) then
  52. realdmg = CalcDamage(myHero, enemy, 0, rDmg)
  53. hp = GetCurrentHP(enemy)
  54. if realdmg > hp then
  55. info = info..GetObjectName(enemy)
  56. if not IsVisible(enemy) then
  57. info = info.." maybe"
  58. end
  59. info = info.." killable\n"
  60. end
  61. -- info = info..GetObjectName(enemy).." HP:"..hp.." dmg: "..realdmg.." "..killable.."\n"
  62. end
  63. end
  64. DrawText(info,40,500,0,0xffff0000)
  65. end
  66.  
  67. PrintChat("simple karthus script loaded")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement