-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.lua
89 lines (76 loc) · 2.38 KB
/
main.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
local script = {}
script.name = "Xerath+"
script.developer = "asdf"
script.version = 1.0
local avada_lib = module.lib('avada_lib')
if not avada_lib then
console.set_color(12)
print("You need to have Avada Lib in your community_libs folder to run " .. script.name .. "!")
print("You can find it here:")
console.set_color(11)
print("https://gitlab.soontm.net/get_clear_zip.php?fn=avada_lib")
console.set_color(15)
return
elseif avada_lib.version < 1 then
console.set_color(12)
print("Your need to have Avada Lib updated to run " .. script.name .. "!")
print("You can find it here:")
console.set_color(11)
print("https://gitlab.soontm.net/get_clear_zip.php?fn=avada_lib")
console.set_color(15)
return
end
local common = avada_lib.common
local gpred = module.internal("pred")
local evade = module.seek("evade")
script.menu = menu("xerathmenu", script.name)
script.menu:menu("antigap", "Anti-gapcloser E")
for i = 0, objManager.enemies_n - 1 do
local enemy = objManager.enemies[i]
script.menu.antigap:boolean(enemy.charName, enemy.charName, false)
end
r = player:spellSlot(3)
color = graphics.argb(255, 255, 255, 255)
local function AntiGap()
if player:spellSlot(2).state == 0 then
for i=0, objManager.enemies_n - 1 do
local enemy = objManager.enemies[i]
if common.IsValidTarget(enemy) and enemy.path.isActive and enemy.path.isDashing then
name = enemy.charName
if script.menu.antigap[name]:get() then
local pred_pos = gpred.core.project(player.path.serverPos2D, enemy.path, network.latency + 0.25, 1400, enemy.path.dashSpeed)
if pred_pos and pred_pos:dist(player.path.serverPos2D) <= 800 then
player:castSpell("pos", 2, vec3(pred_pos.x, enemy.y, pred_pos.y))
end
end
end
end
end
end
local function OnTick()
AntiGap()
end
local function OnDraw()
graphics.draw_circle(player.pos, 1550, 1, color, 32)
if r.level > 0 then
graphics.draw_circle(player.pos, (2000 + (1200*r.level)), 1, color, 32)
minimap.draw_circle(player.pos, (2000 + (1200*r.level)), 1, color, 32)
end
end
local function OnUpdateBuff(buff)
if buff.name == "xerathrshots" then
evade.core.set_pause(math.huge)
end
end
local function OnRemoveBuff(buff)
if buff.name == "xerathrshots" then
evade.core.set_pause(0)
end
end
cb.add(cb.tick, OnTick)
cb.add(cb.draw, OnDraw)
if evade then
cb.add(cb.updatebuff,OnUpdateBuff)
cb.add(cb.removebuff,OnRemoveBuff)
end
print("Xerath+ loaded")