I'm working on a Varus script - And I can't quit figure out how to do his Q. IE: Should I find the mean? Another issue - Is actually "channeling" his Q to cast at max range.
I've attempted to look at other peoples scripts - And nothing seems to fit how his Q works. I've gotten a basic shell.
And form of assistance would be much appreciated. Thanks!
Login to Account Create an Account

Min/Max Range for Spells & Casting spells that require Channeling.
#1
Posted 10 July 2017 - 06:43

#2
Posted 10 July 2017 - 06:52

#3
Posted 10 July 2017 - 07:06

Yeah. I've read through the API. It doesn't have anything in it in regards to Min/Max Range (Just .range).
Varus's Q has a minRange of 925 and a maxRange of 1625. But I'm only getting a ".range" of 925 period.
#4
Posted 10 July 2017 - 07:10

I cant tell. Because my bad english.
#5
Posted 10 July 2017 - 07:18

So - At:
http://leagueoflegen....com/wiki/Varus
You can see right next to Piercing Arrow TARGET RANGE: 925 / 1625
Make sense?
In essence - You charge up his Q to deal more damage - And hit targets from further away.
#6
Posted 10 July 2017 - 07:37

Doesn't his Q have a changing state you can use ?
#7
Posted 10 July 2017 - 08:00

#8
Posted 11 July 2017 - 02:51

Is it correct to assume that Spell Data can automatically be parsed with:
Q = { range = myHero:GetSpellData(_Q).range, delay = myHero:GetSpellData(_Q).delay, speed = myHero:GetSpellData(_Q).speed, width = myHero:GetSpellData(_Q).width } E = { range = myHero:GetSpellData(_E).range, delay = myHero:GetSpellData(_E).delay, speed = myHero:GetSpellData(_E).speed, width = myHero:GetSpellData(_E).width } R = { range = myHero:GetSpellData(_R).range, delay = myHero:GetSpellData(_R).delay, speed = myHero:GetSpellData(_R).speed, width = myHero:GetSpellData(_R).width }
I found this in a post from Proerd and I wanted to make sure.
#9
Posted 11 July 2017 - 03:16

Cant you just do it time based? I mean it grows at a fixed rate on time right? it has a min and max distance and then cancels after a period of time
Min dist + x * t ??
Just a thought while sitting here at work planning on what to eat for lunch lol
#10
Posted 11 July 2017 - 03:47

Cant you just do it time based? I mean it grows at a fixed rate on time right? it has a min and max distance and then cancels after a period of time
Min dist + x * t ??
Just a thought while sitting here at work planning on what to eat for lunch lol
I was actually thinking that here today. Establish a local "qMinRange" and "qMaxRange" or something like that - And * by 4 (I think that is the time it takes to fully charge in secs).
That being said - I'm not entirely sure if/how attack speed effects that.
I'm new to coding Lua (I have SOME experience with Python, Java and the C platforms). So this is a new venture for me in learning. I took Pluralsights Lua course (linked below) - It didn't really teach me more than I already knew from other languages though. Lol
https://app.pluralsi...ble-of-contents
Either way - Ty for the assistance so far!
#11
Posted 11 July 2017 - 03:57

Note: I'm using "AlqoholicSkeleton.lua" and "EduAnnie.lua" as guidance. I also tried to use "LazyXerath.lua"'s Q logic. But it doesn't seem that they are similar in function to each other.
#12
Posted 13 July 2017 - 08:21

Taken directly from varus sourcecode for int that I didn't finish and didn't release:
local QCastData = {casting, starttime} function CalcQRange(timer) local rangediff = skills.Q.maxRange - skills.Q.minRange local min = skills.Q.minRange local total = rangediff / 1.4 * timer + min if total > skills.Q.maxRange then total = skills.Q.maxRange end return total end function DrawQRange() if QCastData.casting then local timecasting = GetGameTimer() - QCastData.starttime local range = CalcQRange(timecasting) DrawCircle(GetOrigin(myHero), range, 1, 10, GoS.White) else DrawCircle(GetOrigin(myHero), skills.Q.minRange, 1, 10, GoS.White) end end OnUpdateBuff(function(unit, buff) if buff.Name == "VarusQ" and unit.networkID == myHero.networkID then QCastData.casting = true QCastData.starttime = GetGameTimer() end end) OnRemoveBuff(function(unit, buff) if buff.Name == "VarusQ" and unit.networkID == myHero.networkID then QCastData.casting = false end end)
idk if it works anymore but it did at the time, i havent used int in months.
You'll also have to port it to EXT but that isn't hard.
#13
Posted 17 July 2017 - 10:02

Taken directly from varus sourcecode for int that I didn't finish and didn't release:
local QCastData = {casting, starttime} function CalcQRange(timer) local rangediff = skills.Q.maxRange - skills.Q.minRange local min = skills.Q.minRange local total = rangediff / 1.4 * timer + min if total > skills.Q.maxRange then total = skills.Q.maxRange end return total end function DrawQRange() if QCastData.casting then local timecasting = GetGameTimer() - QCastData.starttime local range = CalcQRange(timecasting) DrawCircle(GetOrigin(myHero), range, 1, 10, GoS.White) else DrawCircle(GetOrigin(myHero), skills.Q.minRange, 1, 10, GoS.White) end end OnUpdateBuff(function(unit, buff) if buff.Name == "VarusQ" and unit.networkID == myHero.networkID then QCastData.casting = true QCastData.starttime = GetGameTimer() end end) OnRemoveBuff(function(unit, buff) if buff.Name == "VarusQ" and unit.networkID == myHero.networkID then QCastData.casting = false end end)idk if it works anymore but it did at the time, i havent used int in months.
You'll also have to port it to EXT but that isn't hard.
Once things get smooth again with Ext - I'm going to try this! Thanks!
#14
Posted 15 August 2017 - 10:58

if activeSpell works as intended, here is an example :
math.min(1625, 925 + growth * (Game.Timer()-activeSpell.startTime))
growth is how much it grows for each sec and you would probably also remove the windupTime from the calculation as idk how startTime works.
#15
Posted 20 November 2017 - 12:35

1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users