forked from Luricz285/GoS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBaseult.lua
More file actions
137 lines (116 loc) · 4.47 KB
/
Baseult.lua
File metadata and controls
137 lines (116 loc) · 4.47 KB
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
require('Inspired')
AutoUpdate("/D3ftsu/GoS/master/Baseult.lua","/D3ftsu/GoS/master/Baseult.version","Baseult.lua",3)
local BasePositions = {
[SUMMONERS_RIFT] = {
[100] = Vector(14340, 171, 14390),
[200] = Vector(400, 200, 400)
},
[CRYSTAL_SCAR] = {
[100] = Vector(13321, -37, 4163),
[200] = Vector(527, -35, 4163)
},
[TWISTED_TREELINE] = {
[100] = Vector(14320, 151, 7235),
[200] = Vector(1060, 150, 7297)
}
}
local Base = BasePositions[GetMapID()][GetTeam(myHero)]
local SpellData = {
["Ashe"] = {
Delay = 250,
MissileSpeed = 1600,
Damage = function(target) return CalcDamage(myHero, target, 0, 75 + 175*GetCastLevel(myHero,_R) + GetBonusAP(myHero)) end
},
["Draven"] = {
Delay = 400,
MissileSpeed = 2000,
Damage = function(target) return CalcDamage(myHero, target, 75 + 100*GetCastLevel(myHero,_R) + 1.1*GetBonusDmg(myHero)) end
},
["Ezreal"] = {
Delay = 1000,
MissileSpeed = 2000,
Damage = function(target) return CalcDamage(myHero, target, 0, 200 + 150*GetCastLevel(myHero,_R) + .9*GetBonusAP(myHero)+GetBonusDmg(myHero)) end
},
["Jinx"] = {
Delay = 600,
MissileSpeed = 1700,
Damage = function(target) return CalcDamage(myHero, target, math.max(50*GetCastLevel(myHero, _R)+75+GetBonusDmg(myHero)+(0.05*GetCastLevel(myHero, _R)+0.2)*(GetMaxHP(target)-GetCurrentHP(target)))) end
}
}
local BaseultMenu = MenuConfig("Baseult", "Baseult")
BaseultMenu:Boolean("RT", "RecallTracker", true)
if SpellData[GetObjectName(myHero)] then
BaseultMenu:Boolean("Enabled", "Enabled", true)
PrintChat(string.format("<font color='#1244EA'>Baseult</font> <font color='#FFFFFF'> For "..GetObjectName(myHero).." Loaded, Have Fun Getting Some Kills ! </font>"))
PrintChat("Be Careful, Baseult Is Really Banable dear: " ..GetObjectBaseName(myHero))
Delay = SpellData[GetObjectName(myHero)].Delay
MissileSpeed = SpellData[GetObjectName(myHero)].MissileSpeed
Damage = SpellData[GetObjectName(myHero)].Damage
end
local Isrecalling = {}
OnDraw(function()
if BaseultMenu.RT:Value() then
local i = 0
for Champ, recall in pairs(Isrecalling) do
local percent=math.floor(GetCurrentHP(recall.Champ)/GetMaxHP(recall.Champ)*100)
local leftTime = recall.starttime - GetTickCount() + recall.info.totalTime
if leftTime<0 then leftTime = 0 end
FillRect(400,500+18*i-2,168,18,0x50000000)
if i>0 then FillRect(400,500+18*i-2,168,1,0xC0000000) end
DrawText(string.format("%s (%d%%)", Champ, percent), 14, 402, 500+18*i, percentToRGB(percent))
if recall.info.isStart then
DrawText(string.format("%.1fs", leftTime/1000), 14, 515, 500+18*i, percentToRGB(percent))
FillRect(569,500+18*i, 300*leftTime/recall.info.totalTime,14,0x80000000)
else
if recall.killtime == nil then
if recall.info.isFinish and not recall.info.isStart then
recall.result = "finished"
recall.killtime = GetTickCount()+2000
elseif not recall.info.isFinish then
recall.result = "cancelled"
recall.killtime = GetTickCount()+2000
end
end
DrawText(recall.result, 14, 515, 500+18*i, percentToRGB(percent))
end
if recall.killtime~=nil and GetTickCount() > recall.killtime then
Isrecalling[Champ] = nil
end
i=i+1
end
end
end)
OnProcessRecall(function(unit,recall)
if GetTeam(myHero) ~= GetTeam(unit) then
rec = {}
rec.Champ = unit
rec.info = recall
rec.starttime = GetTickCount()
rec.killtime = nil
rec.result = nil
Isrecalling[GetObjectName(unit)] = rec
if SpellData[GetObjectName(myHero)] then
if GetObjectName(myHero) == "Jinx" then
MissileSpeed = GetDistance(Base) > 1350 and (2295000 + (GetDistance(Base) - 1350) * 2200) / GetDistance(Base) or 1700
end
if IsReady(_R) and BaseultMenu.Enabled:Value() and Damage(unit) > GetCurrentHP(unit)+GetDmgShield(unit)+GetHPRegen(unit)*8 then
if (recall.totalTime-recall.passedTime) > Delay + (GetDistance(Base) * 1000 / MissileSpeed) then
DelayAction(function() CastSkillShot(_R,Base) end, (recall.totalTime-recall.passedTime)- (Delay + (GetDistance(Base) * 1000 / MissileSpeed)))
end
end
end
end
end)
function percentToRGB(percent)
local r, g
if percent == 100 then
percent = 99 end
if percent < 50 then
r = math.floor(255 * (percent / 50))
g = 255
else
r = 255
g = math.floor(255 * ((50 - percent % 50) / 50))
end
return 0xFF000000+g*0xFFFF+r*0xFF
end