25 is the default damage without growth, you can get it if you do this simple calculation :
80 is damage at lvl 1
55 is Q growth stat
25 is difference which is 80-55
and this works for every lvl if you try another calculation
135 is damage
55 is Q growth stat for every lvl so lvl 2 = 55*2 = 110
135-110 = 25 which is difference
Oh that's awesome i get it. thank for all those helpful comments.
local target = GetTarget(1000, DAMAGE_MAGIC) while blitz Q is 925 Range is still difficult for me to understand why
Login to Account Create an Account

Want to start learning

Best Answer Pazamolam , 29 August 2015 - 07:45
Finally i got the kayle script done. I will love to hear how i can improve it:
local info = "Kayle v1.0.0 By Vegita" textTable = {info} PrintChat(textTable[1]) Config = scriptConfig("Kayle", "Kayle:") 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) DrawingsConfig = scriptConfig("Drawings", "Drawings:") DrawingsConfig.addParam("DrawQ", "Draw Q", SCRIPT_PARAM_ONOFF, true) DrawingsConfig.addParam("DrawW", "Draw W", SCRIPT_PARAM_ONOFF, true) DrawingsConfig.addParam("DrawE", "Draw E", SCRIPT_PARAM_ONOFF, true) DrawingsConfig.addParam("DrawR", "Draw R", SCRIPT_PARAM_ONOFF, true) OnLoop(function(myHero) Drawings() local target = GetCurrentTarget() if KeyIsDown (string.byte(" ")) and ValidTarget(target) then if IsInDistance(target, GetCastRange(myHero,_Q)) and CanUseSpell(myHero, _Q) == READY and Config.Q then CastTargetSpell(target, _Q) end if IsInDistance(target, 525) and CanUseSpell(myHero, _E) == READY and Config.E then CastTargetSpell(myHero, _E) end for _, ally in pairs(GetAllyHeroes()) do if Config.W then if (GetCurrentHP(ally)/GetMaxHP(ally))<0.5 and CanUseSpell(myHero, _W) == READY and IsInDistance(ally, 600) then CastTargetSpell(ally, _W) end end end if Config.W then if (GetCurrentHP(myHero)/GetMaxHP(myHero))<0.6 and CanUseSpell(myHero, _W) == READY then CastTargetSpell(myHero, _W) end end if Config.R then if (GetCurrentHP(myHero)/GetMaxHP(myHero))<0.3 and CanUseSpell(myHero, _R) == READY then CastTargetSpell(myHero, _R) end end for _, ally in pairs(GetAllyHeroes()) do if Config.R then if (GetCurrentHP(ally)/GetMaxHP(ally))<0.3 and CanUseSpell(myHero, _R) == READY and IsInDistance(ally, 900) then CastTargetSpell(ally, _R) end end end end end) function Drawings() local myHero = GetMyHero() local target = GetCurrentTarget() local myHeroPos = GetOrigin(myHero) if "Kayle" == GetObjectName(myHero) then myHeroPos = GetOrigin(myHero) if DrawingsConfig.DrawQ then DrawCircle(myHeroPos.x,myHeroPos.y,myHeroPos.z,GetCastRange(myHero,_Q),3,100,0xff00ff00) end if DrawingsConfig.DrawW then DrawCircle(myHeroPos.x,myHeroPos.y,myHeroPos.z,GetCastRange(myHero,_W),3,100,0xff00ff00) end if DrawingsConfig.DrawE then DrawCircle(myHeroPos.x,myHeroPos.y,myHeroPos.z,GetCastRange(myHero,525),3,100,0xff00ff000) end if DrawingsConfig.DrawR then DrawCircle(myHeroPos.x,myHeroPos.y,myHeroPos.z,GetCastRange(myHero,_R),3,100,0xff00ff00) end end endGo to the full post »
#21
Posted 29 August 2015 - 02:49

#22
Posted 29 August 2015 - 02:52

25 is the default damage without growth, you can get it if you do this simple calculation :
80 is damage at lvl 1
55 is Q growth stat
25 is difference which is 80-55
and this works for every lvl if you try another calculation
135 is damage
55 is Q growth stat for every lvl so lvl 2 = 55*2 = 110
135-110 = 25 which is difference
Oh that's awesome i get it. thank for all those helpful comments.
local target = GetTarget(1000, DAMAGE_MAGIC) while blitz Q is 925 Range is still difficult for me to understand why
i said already
#23
Posted 29 August 2015 - 02:52

It will select target in bigger radius instead of 925 to be grabbed by Q
#24
Posted 29 August 2015 - 02:57

It will select target in bigger radius instead of 925 to be grabbed by Q
Thank you, do you know why its efficient?
i said already
Yea i typed it before you answered, thanks very much
#25
Posted 29 August 2015 - 02:58

#26
Posted 29 August 2015 - 03:07

Lets say you will make range 925 and if in that range comes any champion "even tank or something that you don't want to get grabbed " Q will grab . But if you make target select range bigger it will look for other champions/enemies that has low hp to be grabbed
#27
Posted 29 August 2015 - 03:32

Ok i have attempted to do something, can someone tell me what's wrong with this code?
OnLoop(function(myHero) Drawings() if IWalkConfig.Combo then local target = GetTarget(700, DAMAGE_MAGIC) if CanUseSpell(myHero, _Q) == READY and Config.Q and ValidTarget(target, GetCastRange(myHero,_Q)) then CastSkillShot(_Q,QPred.PredPos.x,QPred.PredPos.y,QPred.PredPos.z) if CanUseSpell(myHero, _E) == READY and Config.E and ValidTarget(target, 525) then CastSpell(_E) end end end function Drawings() myHeroPos = GetOrigin(myHero) if DrawingsConfig.DrawQ and DrawingsConfig.DrawW and DrawingsConfig.DrawE and DrawingsConfig.DrawR then DrawCircle(myHeroPos.x,myHeroPos.y,myHeroPos.z,GetCastRange(myHero,_Q),3,100,0xff00ff00) end DrawCircle(myHeroPos.x,myHeroPos.y,myHeroPos.z,GetCastRange(myHero,_W),3,100,0xff00ff00) end DrawCircle(myHeroPos.x,myHeroPos.y,myHeroPos.z,GetCastRange(myHero,_E),3,100,0xff00ff00) end DrawCircle(myHeroPos.x,myHeroPos.y,myHeroPos.z,GetCastRange(myHero,_R),3,100,0xff00ff00) end end end
it tells me to close an ')' on DrawCircle from this line OnLoop(function(myHero)
#28
Posted 29 August 2015 - 03:40

Ok i have attempted to do something, can someone tell me what's wrong with this code?
OnLoop(function(myHero) Drawings() if IWalkConfig.Combo then local target = GetTarget(700, DAMAGE_MAGIC) if CanUseSpell(myHero, _Q) == READY and Config.Q and ValidTarget(target, GetCastRange(myHero,_Q)) and QPred.HitChance == 1 then CastSkillShot(_Q,QPred.PredPos.x,QPred.PredPos.y,QPred.PredPos.z) if CanUseSpell(myHero, _E) == READY and Config.E and ValidTarget(target, 525) then CastSpell(_E) end end end function Drawings() myHeroPos = GetOrigin(myHero) if DrawingsConfig.DrawQ and DrawingsConfig.DrawW and DrawingsConfig.DrawE and DrawingsConfig.DrawR then DrawCircle(myHeroPos.x,myHeroPos.y,myHeroPos.z,GetCastRange(myHero,_Q),3,100,0xff00ff00) end DrawCircle(myHeroPos.x,myHeroPos.y,myHeroPos.z,GetCastRange(myHero,_W),3,100,0xff00ff00) end DrawCircle(myHeroPos.x,myHeroPos.y,myHeroPos.z,GetCastRange(myHero,_E),3,100,0xff00ff00) end DrawCircle(myHeroPos.x,myHeroPos.y,myHeroPos.z,GetCastRange(myHero,_R),3,100,0xff00ff00) end end endit tells me something between DrawCircle in line 35 to close ( on line 14 something like that.
first of all you don't have any menu to make config.Q or DrawingsConfig, and your Drawings() format is wrong, you changed mine in a wrong way, it will draw all the circles if only all the DrawingsConfig are ON so if you disable Q Drawing in the menu every drawing will be off.. 2nd you don't have QPred for the Q cast
and when you changed my Drawings() function you have useless end's in DrawCircle lines
#29
Posted 29 August 2015 - 03:47

Ok i have attempted to do something, can someone tell me what's wrong with this code?
OnLoop(function(myHero) Drawings() if IWalkConfig.Combo then local target = GetTarget(700, DAMAGE_MAGIC) if CanUseSpell(myHero, _Q) == READY and Config.Q and ValidTarget(target, GetCastRange(myHero,_Q)) then CastSkillShot(_Q,QPred.PredPos.x,QPred.PredPos.y,QPred.PredPos.z) if CanUseSpell(myHero, _E) == READY and Config.E and ValidTarget(target, 525) then CastSpell(_E) end end end function Drawings() myHeroPos = GetOrigin(myHero) if DrawingsConfig.DrawQ and DrawingsConfig.DrawW and DrawingsConfig.DrawE and DrawingsConfig.DrawR then DrawCircle(myHeroPos.x,myHeroPos.y,myHeroPos.z,GetCastRange(myHero,_Q),3,100,0xff00ff00) end DrawCircle(myHeroPos.x,myHeroPos.y,myHeroPos.z,GetCastRange(myHero,_W),3,100,0xff00ff00) end DrawCircle(myHeroPos.x,myHeroPos.y,myHeroPos.z,GetCastRange(myHero,_E),3,100,0xff00ff00) end DrawCircle(myHeroPos.x,myHeroPos.y,myHeroPos.z,GetCastRange(myHero,_R),3,100,0xff00ff00) end end endit tells me to close an ')' on DrawCircle from this line OnLoop(function(myHero)
you must learn to walk before you can run....
#30
Posted 29 August 2015 - 03:51

first of all you don't have any menu to make config.Q or DrawingsConfig, and your Drawings() format is wrong, you changed mine in a wrong way, it will draw all the circles if only all the DrawingsConfig are ON so if you disable Q Drawing in the menu every drawing will be off.. 2nd you don't have QPred for the Q cast
and when you changed my Drawings() function you have useless end's in DrawCircle lines
Actually i have a menu i just didn't include it. and i fixed the QPred here is the new code: now it tells me to put an '<eof>' in one before the last line.
infoConfig = scriptConfig("Kayle", "Kayle") infoConfig.addParam("Kayle", "Kayle v1.00", SCRIPT_PARAM_INFO) Config = scriptConfig("Kayle", "Kayle:") Config.addParam("Q", "Use Q", SCRIPT_PARAM_ONOFF, true) Config.addParam("E", "Use E", SCRIPT_PARAM_ONOFF, true) DrawingsConfig = scriptConfig("Drawings", "Drawings:") DrawingsConfig.addParam("DrawQ", "Draw Q", SCRIPT_PARAM_ONOFF, true) DrawingsConfig.addParam("DrawW", "Draw W", SCRIPT_PARAM_ONOFF, true) DrawingsConfig.addParam("DrawR", "Draw R", SCRIPT_PARAM_ONOFF, true) myIAC = IAC() OnLoop(function(myHero) Drawings() if IWalkConfig.Combo then local target = GetTarget(700, DAMAGE_MAGIC) if CanUseSpell(myHero, _Q) == READY and Config.Q and ValidTarget(target, GetCastRange(myHero,_Q)) then CastSpell(_Q) if CanUseSpell(myHero, _E) == READY and Config.E and ValidTarget(target, 525) then CastSpell(_E) end end end function Drawings() myHeroPos = GetOrigin(myHero) if DrawingsConfig.DrawQ and DrawingsConfig.DrawW and DrawingsConfig.DrawR then DrawCircle(myHeroPos.x,myHeroPos.y,myHeroPos.z,GetCastRange(myHero,_Q),3,100,0xff00ff00) end DrawCircle(myHeroPos.x,myHeroPos.y,myHeroPos.z,GetCastRange(myHero,_W),3,100,0xff00ff00) end DrawCircle(myHeroPos.x,myHeroPos.y,myHeroPos.z,GetCastRange(myHero,_R),3,100,0xff00ff00) end) end end
#31
Posted 29 August 2015 - 03:54

you must learn to walk before you can run....
I will in time, but for now I'm trying make at least a fast and simple script and improve from there
#32
Posted 29 August 2015 - 03:57

I will in time, but for now I'm trying make at least a fast and simple script and improve from there
rly? as I see you are making a complex script.....
#33
Posted 29 August 2015 - 04:01

rly? as I see you are making a complex script.....
That's a 38 lines script O_O I think that's the most simple one i have seen so far. By the way do you know why won't the new code work? i posted it 2 comments above
#34
Posted 29 August 2015 - 04:05

That's a 38 lines script O_O I think that's the most simple one i have seen so far. By the way do you know why won't the new code work? i posted it 2 comments above
my kayle is 16 lines
and your OnLoop didn't have "end"
#35
Posted 29 August 2015 - 04:07

my kayle is 16 lines
and your OnLoop didn't have "end"
I will have a look at your kayle, 16 lines sounds interesting.
Any ideas how i fix the OnLoop?
#36
Posted 29 August 2015 - 04:10

I will have a look at your kayle, 16 lines sounds interesting.
Any ideas how i fix the OnLoop?
just go check my kayle you will know how
#37
Posted 29 August 2015 - 05:52

Okay guys i have a new problem. I have made this script:
infoConfig = scriptConfig("Kayle", "Kayle") infoConfig.addParam("Kayle", "Kayle v1.00", SCRIPT_PARAM_INFO) Config = scriptConfig("Kayle", "Kayle:") 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) DrawingsConfig = scriptConfig("Drawings", "Drawings:") DrawingsConfig.addParam("DrawQ", "Draw Q", SCRIPT_PARAM_ONOFF, true) DrawingsConfig.addParam("DrawW", "Draw W", SCRIPT_PARAM_ONOFF, true) DrawingsConfig.addParam("DrawE", "Draw E", SCRIPT_PARAM_ONOFF, true) DrawingsConfig.addParam("DrawR", "Draw R", SCRIPT_PARAM_ONOFF, true) myIAC = IAC() function OnLoad() PrintChat("Kayle v1.0.0") end OnLoop(function(myHero) Drawings() if IWalkConfig.Combo then local target = GetCurrentTarget() if IsInDistance(target, GetCastRange(myHero,_Q)) and CanUseSpell(myHero, _Q) == READY and Config.Q then CastTargetSpell(target, _Q) end if IsInDistance(target, 525) and CanUseSpell(myHero, _E) == READY and Config.E then CastTargetSpell(myHero, _E) end end for _, ally in pairs(GetAllyHeroes()) do if Config.W then if (GetCurrentHP(ally)/GetMaxHP(ally))<0.5 and CanUseSpell(myHero, _W) == READY and IsInDistance(ally, 600) then CastTargetSpell(ally, _W) end end end if Config.W then if (GetCurrentHP(myHero)/GetMaxHP(myHero))<0.6 and CanUseSpell(myHero, _W) == READY then CastTargetSpell(myHero, _W) end end if Config.R then if (GetCurrentHP(myHero)/GetMaxHP(myHero))<0.3 and CanUseSpell(myHero, _R) == READY then CastTargetSpell(myHero, _R) end end for _, ally in pairs(GetAllyHeroes()) do if Config.R then if (GetCurrentHP(ally)/GetMaxHP(ally))<0.3 and CanUseSpell(myHero, _R) == READY and IsInDistance(ally, 900) then CastTargetSpell(ally, _R) end end end end) function Drawings() myHeroPos = GetOrigin(myHero) if DrawingsConfig.DrawQ then DrawCircle(myHeroPos.x,myHeroPos.y,myHeroPos.z,GetCastRange(myHero,_Q),3,100,0xff00ff00) end if DrawingsConfig.DrawW then DrawCircle(myHeroPos.x,myHeroPos.y,myHeroPos.z,GetCastRange(myHero,_W),3,100,0xff00ff00) end if DrawingsConfig.DrawE then DrawCircle(myHeroPos.x,myHeroPos.y,myHeroPos.z,GetCastRange(myHero,525),3,100,0xff00ff000) end if DrawingsConfig.DrawR then DrawCircle(myHeroPos.x,myHeroPos.y,myHeroPos.z,GetCastRange(myHero,_R),3,100,0xff00ff00) end end
Actually it surprisingly worked, and it was nice and all, and then in the middle of the game right after i killed Kog Maw i got this error:
Any ideas?
#38
Posted 29 August 2015 - 05:59

#39
Posted 29 August 2015 - 06:02

try dis http://pastebin.com/ZFgUwSP7
What were the changes i can't seem to find any it's hard searching them
#40
Posted 29 August 2015 - 06:02

as I said, plz learn walk first.
if you really understand that 16 lines code, you won't make the mistake like now.
and don't copy any code you don't understand.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users