forked from Luricz285/GoS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOrianna.lua
More file actions
272 lines (219 loc) · 10.4 KB
/
Orianna.lua
File metadata and controls
272 lines (219 loc) · 10.4 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
if GetObjectName(GetMyHero()) ~= "Orianna" then return end
require('Inspired')
require('DeftLib')
require('DamageLib')
AutoUpdate("/D3ftsu/GoS/master/Orianna.lua","/D3ftsu/GoS/master/Orianna.version","Orianna.lua",4)
local Ball = myHero
local OriannaMenu = MenuConfig("Orianna", "Orianna")
OriannaMenu:Menu("Combo", "Combo")
OriannaMenu.Combo:Boolean("Q", "Use Q", true)
OriannaMenu.Combo:Boolean("W", "Use W", true)
OriannaMenu.Combo:Boolean("E", "Use E", true)
OriannaMenu.Combo:Menu("R", "Use R")
OriannaMenu.Combo.R:Boolean("REnabled", "Enabled", true)
OriannaMenu.Combo.R:Boolean("Rkill", "if Can Kill", true)
OriannaMenu.Combo.R:Slider("Rcatch", "if can catch X enemies", 2, 0, 5, 1)
OriannaMenu:Menu("Harass", "Harass")
OriannaMenu.Harass:Boolean("Q", "Use Q", true)
OriannaMenu.Harass:Boolean("W", "Use W", true)
OriannaMenu.Harass:Boolean("E", "Use E", false)
OriannaMenu.Harass:Slider("Mana", "if Mana % is More than", 30, 0, 80, 1)
OriannaMenu:Menu("Killsteal", "Killsteal")
OriannaMenu.Killsteal:Boolean("Q", "Killsteal with Q", false)
OriannaMenu.Killsteal:Boolean("W", "Killsteal with W", true)
OriannaMenu.Killsteal:Boolean("E", "Killsteal with E", false)
OriannaMenu:Menu("Misc", "Misc")
if Ignite ~= nil then OriannaMenu.Misc:Boolean("AutoIgnite", "Auto Ignite", true) end
OriannaMenu.Misc:Menu("AutoUlt", "Auto Ult")
OriannaMenu.Misc.AutoUlt:Boolean("Enabled", "Enabled", true)
OriannaMenu.Misc.AutoUlt:Slider("catchable", "if Can Catch X Enemies", 3, 0, 5, 1)
OriannaMenu.Misc.AutoUlt:Slider("killable", "if Can Kill X Enemies", 2, 0, 5, 1)
OriannaMenu:Menu("JungleClear", "JungleClear")
OriannaMenu.JungleClear:Boolean("Q", "Use Q", true)
OriannaMenu.JungleClear:Boolean("W", "Use W", true)
OriannaMenu.JungleClear:Boolean("E", "Use E", true)
OriannaMenu:Menu("LaneClear", "LaneClear")
OriannaMenu.LaneClear:Boolean("Q", "Use Q", true)
OriannaMenu.LaneClear:Boolean("W", "Use W", true)
OriannaMenu:Menu("Drawings", "Drawings")
OriannaMenu.Drawings:Boolean("Q", "Draw Q Range", true)
OriannaMenu.Drawings:Boolean("W", "Draw W Radius", true)
OriannaMenu.Drawings:Boolean("E", "Draw E Range", true)
OriannaMenu.Drawings:Boolean("R", "Draw R Radius", true)
OriannaMenu.Drawings:Boolean("Ball", "Draw Ball Position", true)
OriannaMenu:Menu("Interrupt", "Interrupt (R)")
DelayAction(function()
local str = {[_Q] = "Q", [_W] = "W", [_E] = "E", [_R] = "R"}
for i, spell in pairs(CHANELLING_SPELLS) do
for _,k in pairs(GetEnemyHeroes()) do
if spell["Name"] == GetObjectName(k) then
OriannaMenu.Interrupt:Boolean(GetObjectName(k).."Inter", "On "..GetObjectName(k).." "..(type(spell.Spellslot) == 'number' and str[spell.Spellslot]), true)
end
end
end
end, 1)
OnProcessSpell(function(unit, spell)
if GetObjectType(unit) == Obj_AI_Hero and GetTeam(unit) ~= GetTeam(myHero) and IsReady(_R) then
if CHANELLING_SPELLS[spell.name] then
if ValidTarget(unit, 1000) and GetObjectName(unit) == CHANELLING_SPELLS[spell.name].Name and OriannaMenu.Interrupt[GetObjectName(unit).."Inter"]:Value() and GetDistance(Ball,unit) <= 400 then
CastSpell(_R)
end
end
end
end)
OnDraw(function(myHero)
if OriannaMenu.Drawings.Ball:Value() then DrawCircle(GetOrigin(Ball),150,1,25,0xffffffff) end
if OriannaMenu.Drawings.W:Value() then DrawCircle(GetOrigin(Ball),250,1,25,0xffffffff) end
if OriannaMenu.Drawings.R:Value() then DrawCircle(GetOrigin(Ball),400,1,25,0xffffffff) end
if OriannaMenu.Drawings.Q:Value() then DrawCircle(GetOrigin(myHero),825,1,25,0xff00ff00) end
if OriannaMenu.Drawings.E:Value() then DrawCircle(myHeroPos(),1000,2,25,0xff00ff00) end
end)
local Missiles = {}
OnCreateObj(function(Object)
if GetObjectBaseName(Object) == "missile" then
table.insert(Missiles,Object)
end
end)
OnDeleteObj(function(Object)
if GetObjectBaseName(Object) == "missile" then
for i,rip in pairs(Missiles) do
if GetNetworkID(Object) == GetNetworkID(rip) then
table.remove(Missiles,i)
end
end
end
end)
OnTick(function(myHero)
local target = GetCurrentTarget()
for _,missile in pairs(Missiles) do
if GetObjectSpellOwner(missile) == myHero and GetObjectSpellName(missile) == "orianaizuna" then
Ball = missile
end
end
if IOW:Mode() == "Combo" then
if IsReady(_R) and OriannaMenu.Combo.R.REnabled:Value() then
if EnemiesAround2(GetOrigin(Ball), 400) >= OriannaMenu.Combo.R.Rcatch:Value() then
CastSpell(_R)
end
end
if IsReady(_R) then
if IsReady(_Q) and OriannaMenu.Combo.Q:Value() and EnemiesAround(myHeroPos(), 825) < 2 and ValidTarget(target, 825) then
Cast(_Q,target,Ball)
end
elseif CanUseSpell(myHero, _R) ~= READY then
if IsReady(_Q) and OriannaMenu.Combo.Q:Value() and ValidTarget(target, 825) then
Cast(_Q,target,Ball)
end
end
if IsReady(_W) and OriannaMenu.Combo.W:Value() and ValidTarget(target, 1200) and GetDistance(Ball, target) <= 250 then
CastSpell(_W)
end
if Ball ~= myHero and IsReady(_E) and ValidTarget(target, 1000) and OriannaMenu.Combo.E:Value() then
local pointSegment,pointLine,isOnSegment = VectorPointProjectionOnLineSegment(myHeroPos(), GetOrigin(target), Vector(Ball))
if pointLine and GetDistance(pointSegment, target) < 80 then
CastTargetSpell(myHero, _E)
end
end
end
if IOW:Mode() == "Harass" and GetPercentMP(myHero) >= OriannaMenu.Harass.Mana:Value() then
if IsReady(_Q) and OriannaMenu.Harass.Q:Value() and EnemiesAround(myHeroPos(), 825) < 2 and ValidTarget(target, 825) then
Cast(_Q,target,Ball)
end
if IsReady(_W) and OriannaMenu.Harass.W:Value() and ValidTarget(target, 825) and GetDistance(Ball, target) <= 250 then
CastSpell(_W)
end
if Ball ~= myHero and IsReady(_E) and ValidTarget(target, 1000) and OriannaMenu.Harass.E:Value() then
local pointSegment,pointLine,isOnSegment = VectorPointProjectionOnLineSegment(myHeroPos(), GetOrigin(target), Vector(Ball))
if pointLine and GetDistance(pointSegment, target) <= 80 then
CastTargetSpell(myHero, _E)
end
end
end
local KillableEnemies = 0
for i,enemy in pairs(GetEnemyHeroes()) do
if Ignite and OriannaMenu.Misc.AutoIgnite:Value() then
if IsReady(Ignite) and 20*GetLevel(myHero)+50 > GetHP(enemy)+GetHPRegen(enemy)*3 and ValidTarget(enemy, 600) then
CastTargetSpell(enemy, Ignite)
end
end
if IOW:Mode() == "Combo" and ValidTarget(enemy, 1200) and OriannaMenu.Combo.R.Rkill:Value() and GetDistance(Ball, enemy) < 400 and GetCurrentHP(enemy)+GetMagicShield(enemy)+GetDmgShield(enemy) < CalcDamage(myHero, enemy, 0, 75*GetCastLevel(myHero, _R)+75+0.7*GetBonusAP(myHero) + Ludens()) then
CastSpell(_R)
end
if IsReady(_R) and OriannaMenu.Misc.AutoUlt.Enabled:Value() then
if ValidTarget(enemy, 1200) and GetDistance(Ball, enemy) <= 400 and GetHP2(enemy) < getdmg("R",enemy) then
KillableEnemies = KillableEnemies + 1
end
if KillableEnemies >= OriannaMenu.Misc.AutoUlt.killable:Value() then
CastSpell(_R)
end
end
if IsReady(_W) and OriannaMenu.Killsteal.W:Value() and ValidTarget(enemy, 1200) and GetDistance(Ball, enemy) <= 250 and GetCurrentHP(enemy)+GetMagicShield(enemy)+GetDmgShield(enemy) < getdmg("W",enemy) then
CastSpell(_W)
elseif IsReady(_Q) and ValidTarget(enemy, 825) and OriannaMenu.Killsteal.Q:Value() and GetCurrentHP(enemy)+GetMagicShield(enemy)+GetDmgShield(enemy) < getdmg("Q",enemy) then
Cast(_Q,enemy,Ball)
elseif Ball ~= myHero and IsReady(_E) and ValidTarget(enemy, 1000) and OriannaMenu.Killsteal.E:Value() then
local pointSegment,pointLine,isOnSegment = VectorPointProjectionOnLineSegment(myHeroPos(), GetOrigin(enemy), Vector(Ball))
if pointLine and GetDistance(pointSegment, enemy) <= 80 and GetCurrentHP(enemy)+GetMagicShield(enemy)+GetDmgShield(enemy) < getdmg("E",enemy) then
CastTargetSpell(myHero, _E)
end
end
local QThrowPos = GetMEC(400,GetEnemyHeroes())
if IOW:Mode() == "Combo" and EnemiesAround2(myHeroPos(), 825) >= 2 and ValidTarget(enemy, 825) and IsReady(_R) and OriannaMenu.Combo.Q:Value() then
CastSkillShot(_Q, QThrowPos.x, QThrowPos.y, QThrowPos.z)
end
end
if IsReady(_R) and OriannaMenu.Misc.AutoUlt.Enabled:Value() then
if EnemiesAround2(GetOrigin(Ball), 400) >= OriannaMenu.Misc.AutoUlt.catchable:Value() then
CastSpell(_R)
end
end
if IOW:Mode() == "LaneClear" then
if IsReady(_Q) and OriannaMenu.LaneClear.Q:Value() then
local BestPos, BestHit = GetFarmPosition(825, 80)
if BestPos and BestHit > 2 then
CastSkillShot(_Q,BestPos)
end
end
if IsReady(_W) and OriannaMenu.LaneClear.W:Value() and MinionsAround(GetOrigin(Ball), 250) > 2 then
CastSpell(_W)
end
for _,mob in pairs(minionManager.objects) do
if GetTeam(mob) == 300 then
if IsReady(_W) and OriannaMenu.JungleClear.W:Value() and ValidTarget(mob, 1200) and GetDistance(Ball, mob) <= 250 then
CastSpell(_W)
end
if IsReady(_Q) and OriannaMenu.JungleClear.Q:Value() and ValidTarget(mob, 825) then
CastSkillShot(_Q, GetOrigin(mob))
end
if Ball ~= myHero and IsReady(_E) and OriannaMenu.JungleClear.E:Value() and ValidTarget(mob, 1000) then
local pointSegment,pointLine,isOnSegment = VectorPointProjectionOnLineSegment(GetOrigin(myHero), GetOrigin(mob), GetOrigin(Ball))
if pointLine and GetDistance(pointSegment, mob) <= 80 then
CastTargetSpell(myHero, _E)
end
end
end
end
end
end)
OnProcessSpell(function(unit, spell)
if unit == myHero and spell.name == "OrianaRedactCommand" then
Ball = spell.target
end
end)
OnObjectLoad(function(Object)
if GetObjectBaseName(Object) == "Orianna_Base_Q_yomu_ring_green.troy" then
Ball = Object
end
end)
OnCreateObj(function(Object)
if GetObjectBaseName(Object) == "Orianna_Base_Q_yomu_ring_green.troy" then
Ball = Object
end
end)
OnUpdateBuff(function(unit,buff)
if unit == myHero and buff.Name == "orianaghostself" then
Ball = myHero
end
end)
PrintChat(string.format("<font color='#1244EA'>Orianna:</font> <font color='#FFFFFF'> By Deftsu Loaded, Have A Good Game ! </font>"))
PrintChat("Have Fun Using D3Carry Scripts: " ..GetObjectBaseName(myHero))