forked from Luricz285/GoS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRiven.lua
More file actions
286 lines (238 loc) · 9.89 KB
/
Riven.lua
File metadata and controls
286 lines (238 loc) · 9.89 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
273
274
275
276
277
278
279
280
281
282
283
284
285
286
if GetObjectName(GetMyHero()) ~= "Riven" then return end
require('MapPositionGOS')
require('Inspired')
require('DeftLib')
require('DamageLib')
AutoUpdate("/D3ftsu/GoS/master/Riven.lua","/D3ftsu/GoS/master/Riven.version","Riven.lua",3)
local RivenMenu = MenuConfig("Riven", "Riven")
RivenMenu:Menu("Combo", "Combo")
RivenMenu.Combo:Boolean("Q", "Use Q", true)
RivenMenu.Combo:Boolean("W", "Use W", true)
RivenMenu.Combo:Boolean("E", "Use E", true)
RivenMenu.Combo:Boolean("H", "Use Hydra", true)
RivenMenu:Menu("Harass", "Harass")
RivenMenu.Harass:Boolean("Q", "Use Q", true)
RivenMenu.Harass:Boolean("W", "Use W", true)
RivenMenu.Harass:Boolean("E", "Use E", true)
RivenMenu.Harass:Boolean("H", "Use Hydra", true)
RivenMenu:Menu("Killsteal", "Killsteal")
RivenMenu.Killsteal:Boolean("W", "Killsteal with W", true)
RivenMenu.Killsteal:Boolean("R", "Killsteal with R", true)
RivenMenu:Menu("Misc", "Misc")
if Ignite ~= nil then RivenMenu.Misc:Boolean("Autoignite", "Auto Ignite", true) end
RivenMenu.Misc:DropDown("cancel", "Cancel Animation", 1, {"Dance", "Taunt", "Laugh", "Joke", "Off"})
RivenMenu.Misc:KeyBinding("Flee", "Flee", string.byte("T"))
RivenMenu.Misc:KeyBinding("WallJump", "WallJump", string.byte("G"))
RivenMenu.Misc:Boolean("AutoW", "Auto W", true)
RivenMenu.Misc:Slider("AutoWCount", "if Enemies Around >", 3, 1, 5, 1)
RivenMenu:Menu("Drawings", "Drawings")
RivenMenu.Drawings:Boolean("Q", "Draw Q Range", true)
RivenMenu.Drawings:Boolean("W", "Draw W Range", true)
RivenMenu.Drawings:Boolean("E", "Draw E Range", true)
RivenMenu.Drawings:Boolean("R", "Draw R Range", true)
RivenMenu.Drawings:Boolean("EQ", "Draw EQ Range", true)
RivenMenu:Menu("Interrupt", "Interrupt (W)")
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
RivenMenu.Interrupt:Boolean(GetObjectName(k).."Inter", "On "..GetObjectName(k).." "..(type(spell.Spellslot) == 'number' and str[spell.Spellslot]), true)
end
end
end
end, 1)
local QCast = 0
local lastE = 0
OnDraw(function(myHero)
local pos = GetOrigin(myHero)
if RivenMenu.Drawings.Q:Value() then DrawCircle(pos,275,1,25,GoS.Pink) end
if RivenMenu.Drawings.W:Value() then DrawCircle(pos,260,1,25,GoS.Yellow) end
if RivenMenu.Drawings.E:Value() then DrawCircle(pos,250,1,50,GoS.Blue) end
if RivenMenu.Drawings.R:Value() then DrawCircle(pos,1100,1,0,GoS.Green) end
if RivenMenu.Drawings.EQ:Value() then DrawCircle(pos,525,1,0,GoS.Red) end
end)
OnTick(function(myHero)
mousePos = GetMousePos()
local target = GetCurrentTarget()
if IOW:Mode() == "Combo" then
if IsReady(_E) and RivenMenu.Combo.E:Value() and ValidTarget(target, 440) and GetDistance(target) > GetRange(myHero)+GetHitBox(myHero) then
CastSkillShot(_E, GetOrigin(target))
end
if IsReady(_Q) and IsReady(_E) and RivenMenu.Combo.Q:Value() and RivenMenu.Combo.E:Value() and ValidTarget(target, 715) and GetDistance(target) > GetRange(myHero)+GetHitBox(target) then
CastSkillShot(_E, GetOrigin(target))
DelayAction(function() CastSkillShot(_Q, GetOrigin(target)) end, 267)
end
end
if IOW:Mode() == "Harass" then
if IsReady(_E) and RivenMenu.Harass.E:Value() and ValidTarget(target, 440) and GetDistance(target) > GetRange(myHero)+GetHitBox(myHero) then
CastSkillShot(_E, GetOrigin(target))
end
if IsReady(_Q) and IsReady(_E) and RivenMenu.Harass.Q:Value() and RivenMenu.Harass.E:Value() and ValidTarget(target, 715) and GetDistance(target) > GetRange(myHero)+GetHitBox(myHero)*3 then
CastSkillShot(_E, GetOrigin(target))
DelayAction(function() CastSkillShot(_Q, GetOrigin(target)) end, 267)
end
end
if IsReady(_W) and RivenMenu.Misc.AutoW:Value() and EnemiesAround2(GetOrigin(myHero),260,267) >= RivenMenu.Misc.AutoWCount:Value() then
CastSpell(_W)
end
if RivenMenu.Misc.Flee:Value() then
MoveToXYZ(mousePos)
if IsReady(_E) then
CastSkillShot(_E, mousePos)
end
if not IsReady(_E) and IsReady(_Q) and lastE + 350 < GetTickCount() then
CastSkillShot(_Q, mousePos)
end
end
if RivenMenu.Misc.WallJump:Value() then
local movePos1 = GetOrigin(myHero) + (Vector(mousePos) - GetOrigin(myHero)):normalized() * 75
local movePos2 = GetOrigin(myHero) + (Vector(mousePos) - GetOrigin(myHero)):normalized() * 450
if QCast < 2 and CanUseSpell(myHero, _Q) ~= ONCOOLDOWN then
CastSkillShot(_Q, mousePos)
end
if not MapPosition:inWall(movePos1) then
MoveToXYZ(mousePos)
else
if not MapPosition:inWall(movePos2) and CanUseSpell(myHero, _Q) ~= ONCOOLDOWN then
CastSkillShot(_Q, movePos2)
end
end
end
for i,enemy in pairs(GetEnemyHeroes()) do
if Ignite and RivenMenu.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 IsReady(_W) and ValidTarget(enemy, 260) and RivenMenu.Killsteal.W:Value() and GetHP(enemy) < getdmg("W",enemy) then
CastSpell(_W)
elseif IsReady(_R) and GetCastName(myHero, _R) ~= "RivenFengShuiEngine" and ValidTarget(enemy, 1100) and RivenMenu.Killsteal.R:Value() and GetHP(enemy) < getdmg("R",enemy) then
Cast(_R,enemy)
end
end
end)
OnProcessSpell(function(unit,spell)
if GetObjectType(unit) == Obj_AI_Hero and GetTeam(unit) ~= GetTeam(myHero) and IsReady(_W) then
if CHANELLING_SPELLS[spell.name] then
if ValidTarget(unit, 260) and GetObjectName(unit) == CHANELLING_SPELLS[spell.name].Name and RivenMenu.Interrupt[GetObjectName(unit).."Inter"]:Value() then
CastSpell(_W)
end
end
end
if unit == myHero then
if spell.name == "RivenFeint" then
lastE = GetTickCount()
end
local target = IOW:GetTarget()
if spell.name:lower():find("attack") then
DelayAction(function()
if IOW:Mode() == "Combo" and ValidTarget(target) then
if IsReady(_W) and RivenMenu.Combo.W:Value() then
CastSpell(_W)
elseif GetItemSlot(myHero, 3074) > 0 and IsReady(GetItemSlot(myHero, 3074)) and RivenMenu.Combo.H:Value() then
CastSpell(GetItemSlot(myHero, 3074))
elseif GetItemSlot(myHero, 3077) > 0 and IsReady(GetItemSlot(myHero, 3077)) and RivenMenu.Combo.H:Value() then
CastSpell(GetItemSlot(myHero, 3077))
elseif IsReady(_Q) and RivenMenu.Combo.Q:Value() then
CastSkillShot(_Q, GetOrigin(target))
end
end
if IOW:Mode() == "Harass" and ValidTarget(target) then
if IsReady(_W) and RivenMenu.Harass.W:Value() then
CastSpell(_W)
elseif GetItemSlot(myHero, 3074) > 0 and IsReady(GetItemSlot(myHero, 3074)) and RivenMenu.Harass.H:Value() then
CastSpell(GetItemSlot(myHero, 3074))
elseif GetItemSlot(myHero, 3077) > 0 and IsReady(GetItemSlot(myHero, 3077)) and RivenMenu.Harass.H:Value() then
CastSpell(GetItemSlot(myHero, 3077))
elseif IsReady(_Q) and RivenMenu.Harass.Q:Value() then
CastSkillShot(_Q, GetOrigin(target))
end
end
end, GetWindUp(myHero)*1000 )
end
if spell.name == "RivenMartyr" then
DelayAction(function()
if IOW:Mode() == "Combo" and ValidTarget(target) then
if IsReady(_Q) and RivenMenu.Combo.Q:Value() then
CastSkillShot(_Q, GetOrigin(target))
end
end
if IOW:Mode() == "Harass" and ValidTarget(target) then
if IsReady(_Q) and RivenMenu.Harass.Q:Value() then
CastSkillShot(_Q, GetOrigin(target))
end
end
end, spell.windUpTime*1000 )
end
if spell.name == "RivenTriCleave" then
IOW:ResetAA()
end
if spell.name == "ItemTiamatCleave" then
IOW:ResetAA()
DelayAction(function()
if IOW:Mode() == "Combo" and ValidTarget(target) then
if IsReady(_Q) and RivenMenu.Combo.Q:Value() then
CastSkillShot(_Q, GetOrigin(target))
end
end
if IOW:Mode() == "Harass" and ValidTarget(target) then
if IsReady(_Q) and RivenMenu.Harass.Q:Value() then
CastSkillShot(_Q, GetOrigin(target))
end
end
end, spell.windUpTime*1000 )
end
if spell.name == "RivenFengShuiEngine" then
IOW:ResetAA()
DelayAction(function()
if IOW:Mode() == "Combo" and ValidTarget(target) then
if IsReady(_Q) and RivenMenu.Combo.Q:Value() then
CastSkillShot(_Q, GetOrigin(target))
end
end
if IOW:Mode() == "Harass" and ValidTarget(target) then
if IsReady(_Q) and RivenMenu.Harass.Q:Value() then
CastSkillShot(_Q, GetOrigin(target))
end
end
end, spell.windUpTime*1000 )
end
if spell.name == "rivenizunablade" then
IOW:ResetAA()
DelayAction(function()
if IOW:Mode() == "Combo" and ValidTarget(target) then
if IsReady(_Q) and RivenMenu.Combo.Q:Value() then
CastSkillShot(_Q, GetOrigin(target))
end
end
if IOW:Mode() == "Harass" and ValidTarget(target) then
if IsReady(_Q) and RivenMenu.Harass.Q:Value() then
CastSkillShot(_Q, GetOrigin(target))
end
end
end, spell.windUpTime*1000 )
end
end
end)
OnProcessSpellComplete(function(unit,spell)
if unit == myHero and spell.name == "RivenTriCleave" then
local Emotes = {EMOTE_DANCE, EMOTE_TAUNT, EMOTE_LAUGH, EMOTE_JOKE}
if RivenMenu.Misc.cancel:Value() ~= 5 then
CastEmote(Emotes[RivenMenu.Misc.cancel:Value()])
end
end
end)
OnUpdateBuff(function(unit,buff)
if unit == myHero and buff.Name == "RivenTriCleave" then
QCast = buff.Count
end
end)
OnRemoveBuff(function(unit,buff)
if unit == myHero and buff.Name == "RivenTriCleave" then
QCast = 0
end
end)
AddGapcloseEvent(_W, 260, false, RivenMenu)
PrintChat(string.format("<font color='#1244EA'>Riven:</font> <font color='#FFFFFF'> By Deftsu Loaded, Have A Good Game ! </font>"))
PrintChat("Have Fun Using D3Carry Scripts: " ..GetObjectBaseName(myHero))