Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Menu
- Config = scriptConfig("Graves", "Graves.lua")
- Config.addParam("Q", "Use Q", SCRIPT_PARAM_ONOFF, true)
- Config.addParam("W", "Use W", SCRIPT_PARAM_ONOFF, true)
- Config.addParam("E", "Use E", SCRIPT_PARAM_ONOFF, true)
- Config.addParam("R", "Use R", SCRIPT_PARAM_ONOFF, true)
- --Start
- OnLoop(function(myHero)
- local target = GetCurrentTarget()
- if ValidTarget(target, math.huge) then
- if KeyIsDown(32) then
- castW(target)
- castQ(target)
- castE(target)
- castR(target)
- end
- end
- end
- -- End
- -- W cast
- )function castW( target )
- if Config.W then
- pred = GetPredictionForPlayer(GetOrigin(target),target,GetMoveSpeed(target),math.huge,500,GetCastRange(myHero,_W),900,false,true)
- if IsInDistance(target, GetCastRange(myHero,_W)) and CanUseSpell(myHero,_W) == READY and pred.HitChance == 1 then
- CastSkillShot(_W,pred.PredPos.x,pred.PredPos.y,pred.PredPos.z)
- end
- end
- -- Q cast
- function castQ( target )
- if Config.Q then
- pred = GetPredictionForPlayer(GetOrigin(target),target,GetMoveSpeed(target),math.huge,500,GetCastRange(myHero,_Q),900,false,true)
- if IsInDistance(target, GetCastRange(myHero,_Q)) and CanUseSpell(myHero,_Q) == READY and pred.HitChance == 1 then
- CastSkillShot(_Q,pred.PredPos.x,pred.PredPos.y,pred.PredPos.z)
- end
- end
- -- E cast
- end
- function castE( target )
- if Config.E then
- if IsInDistance(target, GetCastRange(myHero,_E)) and CanUseSpell(myHero,_E) == READY then
- CastSkillShot(_E, GetMousePos().x, GetMousePos().y, GetMousePos().z)
- end
- end
- -- R cast
- -- R cast
- function castR( target )
- pred = GetPredictionForPlayer(GetOrigin(target),target,GetMoveSpeed(target),math.huge,500,GetCastRange(myHero,_R),950,false,true)
- if CanUseSpell(myHero_R) == READY and pred.HitChance == 1 and IsInDistance(target, GetCastRange(myHero,_R)) and Config.R and CalcDamage(myHero, target, (150*GetCastLevel(myHero,_R)+100+1.5*GetBonusDmg(myHero)), 0) > GetCurrentHP(target) then
- CastSkillShot(_R,pred.PredPos.x,pred.PredPos.y,pred.PredPos.z)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement