Hello, not sure if that's the right forum to post that topic. I have found that site and i think GoS is an amazing tool and looks like a nice community here .
I want to learn how to script from zero to hero and try to make my own scripts and be a part of this community growth
if anyone can help me with guides and stuff I'll be happy. I know some basics but i want to know more and start making scripts
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 »
#1
Posted 29 August 2015 - 11:14

#2
Posted 29 August 2015 - 11:17

make a garen
#3
Posted 29 August 2015 - 11:25

make a garen
Be serious or feel my wrath
#4
Posted 29 August 2015 - 11:25

Be serious or feel my wrath
#5
Posted 29 August 2015 - 11:32

Keppo
#6
Posted 29 August 2015 - 11:37

Keppo
DrawHand(target,handsize,slapspeed)
DrawHand(Zypppy,150,100000000)
if myHand.slap "Zypppy" then
DrawText ("Don't Keppo me", 30, 100, 100, 0xFFFFFF00)
how is it for first script?
#7
Posted 29 August 2015 - 12:59

Im learning myself doe
You can look at my screpts they are simple AF
#8
Posted 29 August 2015 - 01:17

#9
Posted 29 August 2015 - 01:27

you can learn from my script, they are all simple and readable.
#10
Posted 29 August 2015 - 01:28

Im learning myself doe
![]()
You can look at my screpts they are simple AF
I will have a look. thanks
You might look around for some super simple and basic scripts, try to understand what's in there and code something similar.
Do you have any recommendations for begginers? thanks for the comment
you can learn from my script, they are all simple and readable.
Which script is it?
#11
Posted 29 August 2015 - 01:32

I will have a look. thanks
Do you have any recommendations for begginers? thanks for the comment
Which script is it?
hmmm.....
start from kayle and karthus for basic spell usage
then vayne for lib usage
#12
Posted 29 August 2015 - 02:10

hmmm.....
start from kayle and karthus for basic spell usage
then vayne for lib usage
I'm starting to learn a little but a bit confused with some numbers. I took Deftsu's Blitzcrank for example, why those numbers are used?
local target = GetTarget(1000, DAMAGE_MAGIC) if ValidTarget(target, 1000) then
and also this one:
local QPred = GetPredictionForPlayer(GetMyHeroPos(),target,GetMoveSpeed(target),1800,250,GetCastRange(myHero,_Q),70,true,true)
i can't figure what those numbers are
#13
Posted 29 August 2015 - 02:16

local target = GetTarget(1000, DAMAGE_MAGIC)
if ValidTarget(target, 1000) then
Is for selecting target in that range for spells
local QPred = GetPredictionForPlayer(GetMyHeroPos(),target,GetMoveSpeed(target),1800,250,GetCastRange(myHero,_Q),70,true,true)
This is for Qprediction 1800-Missile speed "how fast spell reaches end of range" 250 is delay before cast GetCast range is Q cast range , 70 is Radius of that spell that will hit enemy true is for minion collision true for AOE / enemy champion collision
#14
Posted 29 August 2015 - 02:21

I'm starting to learn a little but a bit confused with some numbers. I took Deftsu's Blitzcrank for example, why those numbers are used?
local target = GetTarget(1000, DAMAGE_MAGIC) if ValidTarget(target, 1000) thenand also this one:
local QPred = GetPredictionForPlayer(GetMyHeroPos(),target,GetMoveSpeed(target),1800,250,GetCastRange(myHero,_Q),70,true,true)i can't figure what those numbers are
local target = GetTarget(1000, DAMAGE_MAGIC)
if ValidTarget(target, 1000) then
1000 is the range, DAMAGE_MAGIC/DAMAGE_PHYSICAL will get our current target depending on AD/AP Champ so if i'm playing Jinx i'll get Target with DAMAGE_PHYSICAL else if i play Cassio or any other AP i get target with DAMAGE_MAGIC
ValidTarget will Check if Target is Valid and not Dead/Immune and is Targetable
(you can find this functions in Inspired.lua)
for prediction it's like this :
local QPred = GetPredictionForPlayer(startPosition, targetUnit, targetUnitMoveSpeed, spellTravelSpeed, spellDelay, spellRange, spellWidth, collision, addHitBox)
so startPosition is our Hero Position for most of spells : GetMyHeroPos() will get our Position
-targetUnit is the target : you need to get a target first
-targetUnitMoveSpeed is the target move speed : GetMoveSpeed(target) will get target move speed
-spelltravelSpeed (aka projectilespeed) : you need to get it from external sources like lolwikia
-spelldelay : with milliseconds usually it's 250 for most of spells but some spells like chogath Q or Ezreal R have more delay, you still can get it from external sources
-spellRange : it's the spell max Range for example Blitz Q is 925 i think, GetCastRange(myHero, _Q) will get the spell range for Q or just put 925 if you want a custom range
-spellWidth : this is spell width, you can get it from external sources
-Collision : if it's true that means it will collide with minions for ex Blitz Q, NidaQ if you put it false it means that the spell won't collide ex ezreal R,Ekko Q
-addHitBox : i still don't know what's this, put it true by default
tip : local QPred can be named to what you want since it's local
#15
Posted 29 August 2015 - 02:23

local target = GetTarget(1000, DAMAGE_MAGIC)
if ValidTarget(target, 1000) then
Is for selecting target in that range for spells
local QPred = GetPredictionForPlayer(GetMyHeroPos(),target,GetMoveSpeed(target),1800,250,GetCastRange(myHero,_Q),70,true,true)
This is for Qprediction 1800-Missile speed "how fast spell reaches end of range" 250 is delay before cast GetCast range is Q cast range , 70 is Radius of that spell that will hit enemy true is for minion collision true for AOE / enemy champion collision
I see, thanks. So how do i find all that information? The missile speed, delay before cast, and the Spell Radius?
Also about ValidTarget, Blitzcrank's Q has 925 Range, but the number is 1000. Why is that?
#16
Posted 29 August 2015 - 02:26

local target = GetTarget(1000, DAMAGE_MAGIC)
if ValidTarget(target, 1000) then
1000 is the range, DAMAGE_MAGIC/DAMAGE_PHYSICAL will get our current target depending on AD/AP Champ so if i'm playing Jinx i'll get Target with DAMAGE_PHYSICAL else if i play Cassio or any other AP i get target with DAMAGE_MAGIC
ValidTarget will Check if Target is Valid and not Dead/Immune and is Targetable
(you can find this functions in Inspired.lua)
for prediction it's like this :
local QPred = GetPredictionForPlayer(startPosition, targetUnit, targetUnitMoveSpeed, spellTravelSpeed, spellDelay, spellRange, spellWidth, collision, addHitBox)
so startPosition is our Hero Position for most of spells : GetMyHeroPos() will get our Position
-targetUnit is the target : you need to get a target first
-targetUnitMoveSpeed is the target move speed : GetMoveSpeed(target) will get target move speed
-spelltravelSpeed (aka projectilespeed) : you need to get it from external sources like lolwikia
-spelldelay : with milliseconds usually it's 250 for most of spells but some spells like chogath Q or Ezreal R have more delay, you still can get it from external sources
-spellRange : it's the spell max Range for example Blitz Q is 925 i think, GetCastRange(myHero, _Q) will get the spell range for Q or just put 925 if you want a custom range
-spellWidth : this is spell width, you can get it from external sources
-Collision : if it's true that means it will collide with minions for ex Blitz Q, NidaQ if you put it false it means that the spell won't collide ex ezreal R,Ekko Q
-addHitBox : i still don't know what's this, put it true by default
tip : local QPred can be named to what you want since it's local
Thank's for the very helpful comment i will try to use this information right now. But if blit'z range is 925 then why if ValidTarget(target, 1000)
#17
Posted 29 August 2015 - 02:31

Thank's for the very helpful comment i will try to use this information right now. But if blit'z range is 925 then why if ValidTarget(target, 1000)
look, i updated my code again, now it's more understandable https://github.com/D.../Blitzcrank.lua
#18
Posted 29 August 2015 - 02:40

look, i updated my code again, now it's more understandable https://github.com/D.../Blitzcrank.lua
Thank's I'm getting it really fast. Two things i did not figure out:
same as before if ValidTarget(target, 1000) but blitz Q has 925 Range.
and (55*GetCastLevel(myHero,_Q)+25+GetBonusAP(myHero))) that's on the kill steal section. I figured that the 55 states the damage growth each level of Q, but didn't understand the +25 number
#19
Posted 29 August 2015 - 02:46

Thank's I'm getting it really fast. Two things i did not figure out:
same as before if ValidTarget(target, 1000) but blitz Q has 925 Range.
and (55*GetCastLevel(myHero,_Q)+25+GetBonusAP(myHero))) that's on the kill steal section. I figured that the 55 states the damage growth each level of Q, but didn't understand the +25 number
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
#20
Posted 29 August 2015 - 02:49

i don't have if ValidTarget(target , 1000) anymore, anyway it's used for more better Q, for example if we have ADC at 1000 range and support at 925 range, it will try to focus ADC in most cases if the target selector will get it
3 user(s) are reading this topic
0 members, 3 guests, 0 anonymous users