View difference between Paste ID: 10aLTqd3 and eHRSnYPt
SHOW: | | - or go back to the newest paste.
1-
if myHero.charName == "Nidalee" then
1+
--[[
2-
	PrintChat(" >> Nidalee the Rapist loaded!")
2+
	Nidalee the Rapist
3-
    
3+
]]
4-
    --SETTINGS
4+
if myHero.charName ~= "Nidalee" then return end
5-
    
5+
6-
    require "AllClass"
6+
require "AllClass"
7-
    
7+
 
8-
	local showRanges = true
8+
--[[		Code		]]
9
local mousemoving = true 
10-
	local focusedTarget = true
10+
local movedelay = 0
11
local unitScanDelay = 0
12-
	local RefreshRate = 50
12+
local waitDelay = 300
13
local scanAdditionalRange = 500
14-
    local targetCircle = 100
14+
local units = {}
15
local oldDelayTick = 0
16-
    --Globals
16+
local unitScanTick = 0
17-
    local lastBasicAttack = 0
17+
local holding = 0
18-
	local swingDelay = 0.1 -- Play around with this to get the right delay. I usually set mine lower but people with faster connections may not want to.
18+
local animPlayedTick = nil
19-
	local shootDelay = 0.1
19+
local nextTick = 0
20-
	local swing = 0
20+
21
local AxePos = nil
22-
	-- Target Prediction
22+
23-
	local range = 1500
23+
local lasthiton = true
24-
	local proj_speed = 1.3
24+
25-
	local delay = 1000
25+
local lastdirection = 0
26-
	local smoothness = 50
26+
27
local range = 1400
28-
	local AArange = 600
28+
29-
	local Crange = 550
29+
local wrange = 1000
30
31-
	local targetSelected = true
31+
local AArange = 275
32
local lastBasicAttack = 0
33
local swingDelay = 0.1
34
local rangedSwingDelay = 0.05
35-
    --[[ Code ]]
35+
local swing = 0
36
local tick = nil
37-
	local tp = TargetPrediction(range, proj_speed, delay, smoothness)
37+
-- Active
38-
	local ts = TargetSelector(TARGET_LOW_HP, range)
38+
-- draw
39
40
local targetSelected = true	
41-
    
41+
-- ts
42
local ts
43
--
44-
    function GetDistanceTo(target1, target2)
44+
local ignite = nil
45-
        if target1 and target2 then
45+
local BRKSlot, DFGSlot, HXGSlot, BWCSlot, SheenSlot, TrinitySlot, LichBaneSlot = nil, nil, nil, nil, nil, nil, nil
46-
            if target1.x and target2.x and target1.z and target2.z then
46+
local QREADY, WREADY, EREADY, RREADY, BRKREADY, DFGREADY, HXGREADY, BWCREADY = false, false, false, false, false, false, false, false
47-
                local distance = math.floor(math.sqrt((target2.x - target1.x) ^ 2 + (target2.z - target1.z) ^ 2))
47+
48-
                return distance
48+
function OnLoad()
49-
            end
49+
	NIDConfig= scriptConfig("Nidalee the Rapist", "nidaleetherapist")
50
	NIDConfig:addParam("scriptActive", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 32)
51
	NIDConfig:addParam("scriptActive1", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 67)	
52-
    
52+
  NIDConfig:addParam("scriptActive2", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 88)
53-
    function OnProcessSpell(unit, spell)
53+
	NIDConfig:addParam("harass", "Harass", SCRIPT_PARAM_ONKEYDOWN, false, 84)
54-
        if unit.isMe and (spell.name:find("Attack") ~= nil) then
54+
  NIDConfig:addParam("DASH", "Dash", SCRIPT_PARAM_ONKEYDOWN, false, 90)
55-
            swing = 1
55+
	NIDConfig:addParam("drawcircles", "Draw Circles", SCRIPT_PARAM_ONOFF, true)
56-
            lastBasicAttack = os.clock()
56+
	NIDConfig:addParam("drawtext", "Draw Text", SCRIPT_PARAM_ONOFF, true)
57
	NIDConfig:addParam("drawprediction", "Draw Prediction", SCRIPT_PARAM_ONOFF, false)
58
	NIDConfig:addParam("autoignite", "Auto Ignite", SCRIPT_PARAM_ONOFF, true)
59
	NIDConfig:addParam("autoAAFarm", "Auto Farm", SCRIPT_PARAM_ONKEYDOWN, false, 192)
60
  NIDConfig:permaShow("autoAAFarm")
61-
-- SCRIPT---
61+
	ts = TargetSelector(TARGET_LOW_HP,range+200,DAMAGE_MAGIC)
62
	ts.name = "Nidalee"
63-
	function OnTick()
63+
	NIDConfig:addTS(ts)
64-
		if myHero.dead then
64+
	if myHero:GetSpellData(SUMMONER_1).name:find("SummonerDot") then ignite = SUMMONER_1
65-
			return
65+
	elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerDot") then ignite = SUMMONER_2 end	
66-
		end --If dead. Do nothing.
66+
end
67-
       	
67+
68-
		if IsKeyDown(88) and myHero:GetSpellData(_W).name == "Bushwhack" and myHero:CanUseSpell(_Q) == READY then	
68+
69-
		ts:update()
69+
70-
		TargetPrediction__OnTick()
70+
	function OnProcessSpell(unit, spell)
71-
			if ts.target ~= nil and not ts.target.dead and ts.target.team ~= myHero.team and ts.target.visible  and GetDistanceTo(myHero,ts.target) <= range then
71+
		if unit.isMe and (spell.name:find("Attack") ~= nil) then
72-
				local predictedPos = tp:GetPrediction(ts.target)
72+
			swing = 1
73-
				if predictedPos ~= nil and myHero:CanUseSpell(_Q) == READY then	
73+
			lastBasicAttack = os.clock()
74-
					CastSpell(_Q, predictedPos.x, predictedPos.z)			
74+
75
	end
76
77
78
79-
		if IsKeyDown(90) and myHero:GetSpellData(_W).name == "Bushwhack" and myHero:CanUseSpell(_E) == READY then
79+
function OnTick()
80-
			ts:update()
80+
  
81-
			if ts.target ~= nil and not ts.target.dead and ts.target.team ~= myHero.team and ts.target.visible  and GetDistanceTo(myHero,ts.target) <= AArange then
81+
  
82
	if myHero.dead then
83
		return
84-
			if swing == 1 then	
84+
85-
				if player:CanUseSpell(_E) == READY and os.clock() - lastBasicAttack > swingDelay then
85+
  
86-
					CastSpell(_E, myHero)
86+
  ts:update()
87-
					swing = 0
87+
  Prediction__OnTick()
88
  
89-
			end		
89+
  if myHero:GetSpellData(_Q).name == "JavelinToss" or myHero:GetSpellData(_W).name == "Bushwhack" or myHero:GetSpellData(_E).name == "PrimalSurge" then
90
    HUMAN = true
91
    COUGAR = false
92-
		if IsKeyDown(88) and myHero:GetSpellData(_W).name == "Pounce" then
92+
93-
			ts:update()
93+
  
94-
			if ts.target ~= nil and not ts.target.dead and ts.target.team ~= myHero.team and ts.target.visible  and GetDistanceTo(myHero,ts.target) <= Crange then
94+
  if myHero:GetSpellData(_Q).name == "Takedown" or myHero:GetSpellData(_W).name == "Pounce" or myHero:GetSpellData(_E).name == "Swipe" then
95-
				CastSpell(_W, ts.target.x,ts.target.z)
95+
    COUGAR = true
96
    HUMAN = false
97-
			end	
97+
98-
			if swing == 1 then
98+
99-
				if player:CanUseSpell(_E) == READY then
99+
	if swing == 1 and os.clock() > lastBasicAttack + 0.5 then
100-
					if ts.target ~= nil and not ts.target.dead and ts.target.team ~= myHero.team and ts.target.visible  and os.clock() - lastBasicAttack > swingDelay then
100+
101-
						CastSpell(_E, ts.target.x,ts.target.z)
101+
102-
						swing = 0
102+
103
	if ignite ~= nil and myHero:CanUseSpell(ignite) == READY then
104
		if IREADY then
105-
				if player:CanUseSpell(_E) ~= READY and player:CanUseSpell(_Q) == READY then
105+
			local ignitedmg = 0	
106-
					if os.clock() - lastBasicAttack > swingDelay then
106+
			for j = 1, heroManager.iCount, 1 do
107-
						CastSpell(_Q)
107+
				local enemyhero = heroManager:getHero(j)
108-
						swing = 0		
108+
				if ValidTarget(enemyhero,600) then
109
					ignitedmg = 50 + 20 * myHero.level
110
					if enemyhero.health <= (ignitedmg - 50) then
111
						CastSpell(ignite, enemyhero)
112
					end
113
				end
114-
		if IsKeyDown(90) and myHero:GetSpellData(_W).name == "Pounce" then
114+
115-
			ts:update()
115+
116-
			if ts.target ~= nil and not ts.target.dead and ts.target.team ~= myHero.team and ts.target.visible  and GetDistanceTo(myHero,ts.target) <= Crange then		
116+
117
118
	BRKSlot, DFGSlot, HXGSlot, BWCSlot, SheenSlot, TrinitySlot, LichBaneSlot = GetInventorySlotItem(3153), GetInventorySlotItem(3128), GetInventorySlotItem(3146), GetInventorySlotItem(3144), GetInventorySlotItem(3057), GetInventorySlotItem(3078), GetInventorySlotItem(3100)
119-
			if swing == 1 then
119+
	QREADY = (myHero:CanUseSpell(_Q) == READY)
120-
				if player:CanUseSpell(_E) == READY then
120+
	WREADY = (myHero:CanUseSpell(_W) == READY)
121-
					if ts.target ~= nil and not ts.target.dead and ts.target.team ~= myHero.team and ts.target.visible  and os.clock() - lastBasicAttack > swingDelay then
121+
	EREADY = (myHero:CanUseSpell(_E) == READY)
122-
						CastSpell(_E, ts.target.x,ts.target.z)
122+
	RREADY = (myHero:CanUseSpell(_R) == READY)
123-
						swing = 0
123+
	DFGREADY = (DFGSlot ~= nil and myHero:CanUseSpell(DFGSlot) == READY)
124
	HXGREADY = (HXGSlot ~= nil and myHero:CanUseSpell(HXGSlot) == READY)
125
	BWCREADY = (BWCSlot ~= nil and myHero:CanUseSpell(BWCSlot) == READY)
126-
				if player:CanUseSpell(_E) ~= READY and player:CanUseSpell(_Q) == READY then
126+
	BRKREADY = (BRKSlot ~= nil and myHero:CanUseSpell(BRKSlot) == READY)
127-
					if os.clock() - lastBasicAttack > swingDelay then
127+
	IREADY = (ignite ~= nil and myHero:CanUseSpell(ignite) == READY)
128-
						CastSpell(_Q)
128+
129-
						swing = 0		
129+
130
---------------------------------------------------------------- Combos Etc---------------------------------------------------------------------------------
131
132
133
	if NIDConfig.harass and ts.target ~= nil then
134
    if HUMAN and not COUGAR then	
135-
		if IsKeyDown(67) and myHero:GetSpellData(_W).name == "Pounce" then
135+
      if QREADY then
136-
			if swing == 0 and myHero:CanUseSpell(_W) == READY  then		
136+
        QtravelDuration = (GetDistance(myHero, ts.nextPosition) / 1.2) + 290
137-
				CastSpell(_W, mousePos.x,mousePos.z)
137+
        ts:SetPrediction(QtravelDuration)  
138-
			end	
138+
        if GetDistance(ts.target)<range and GetDistance(ts.nextPosition) < range and not GetMinionCollision(myHero,ts.nextPosition, 150) then
139-
			if swing == 1 then
139+
          CastSpell(_Q, ts.nextPosition.x, ts.nextPosition.z)
140-
				if player:CanUseSpell(_E) == READY then
140+
141-
					if os.clock() - lastBasicAttack > swingDelay then
141+
      end
142-
						CastSpell(_E, mousePos.x,mousePos.z)
142+
143-
						swing = 0
143+
    if COUGAR and not HUMAN then
144
      CastSpell(_R)
145
    end
146-
				if player:CanUseSpell(_E) ~= READY and player:CanUseSpell(_Q) == READY then
146+
147-
					if os.clock() - lastBasicAttack > swingDelay then
147+
 
148-
						CastSpell(_Q)
148+
149-
						swing = 0		
149+
 
150
  if HUMAN and NIDConfig.scriptActive and ts.target ~= nil and not COUGAR then		
151
		if DFGREADY then CastSpell(DFGSlot, ts.target) end
152
		if HXGREADY then CastSpell(HXGSlot, ts.target) end
153
		if BWCREADY then CastSpell(BWCSlot, ts.target) end
154
		if BRKREADY then CastSpell(BRKSlot, ts.target) end
155
		if QREADY then
156
      QtravelDuration = (GetDistance(myHero, ts.nextPosition) / 1.2) + 270
157-
		if os.clock() > lastBasicAttack + 0.5 then
157+
      ts:SetPrediction(QtravelDuration)  
158
      if HUMAN and GetDistance(ts.target) < range and GetDistance(ts.nextPosition) < range and not GetMinionCollision(myHero,ts.nextPosition, 150) then
159
        CastSpell(_Q, ts.nextPosition.x, ts.nextPosition.z)
160-
        
160+
      end
161
    end		
162
		if swing == 0  then
163-
	function OnDraw()
163+
			if GetDistance(ts.target) < AArange then
164-
		if myHero.dead then return end
164+
        myHero:Attack(ts.target)
165-
		if focusedTarget then
165+
      end
166-
			if ts.target ~= nil then
166+
167-
				DrawCircle(ts.target.x, ts.target.y, ts.target.z, targetCircle, 0xFFFF0000)
167+
  end
168
  
169
  
170
  
171-
		if showRanges then
171+
  if COUGAR and NIDConfig.scriptActive and ts.target ~= nil and not HUMAN then			
172-
			DrawCircle(myHero.x, myHero.y, myHero.z, AArange, 0xFF00FF00)
172+
		if DFGREADY then CastSpell(DFGSlot, ts.target) end
173-
			if myHero:GetSpellData(_W).name == "Bushwhack" then --if in Human stance            	
173+
		if HXGREADY then CastSpell(HXGSlot, ts.target) end
174-
				if myHero:CanUseSpell(_Q) == READY then
174+
		if BWCREADY then CastSpell(BWCSlot, ts.target) end
175-
					DrawCircle(myHero.x, myHero.y, myHero.z, range, 0xFF00FF00) 
175+
		if BRKREADY then CastSpell(BRKSlot, ts.target) end		
176
    if swing == 0 then
177
      if GetDistance(ts.target) < myHero.range + 300 then
178
        myHero:Attack(ts.target)
179
      end      
180-
end
180+
			if WREADY and GetDistance(ts.target) < myHero.range + 300 then				
181
				myHero:Attack(ts.target)
182
				if GetTickCount()-lastdirection >= 500 then
183
					local absposxy = math.min(math.abs(ts.target.x-myHero.x),math.abs(ts.target.y-myHero.y))
184
					myHero:MoveTo(myHero.x+(ts.target.x-myHero.x)*100/absposxy,myHero.z+(ts.target.z-myHero.z)*100/absposxy)
185
					lastdirection = GetTickCount()
186
        elseif GetTickCount()-lastdirection >= 100 then
187
					CastSpell(_W, ts.target.x,ts.target.z)
188
				end				
189
			end      
190
    elseif swing == 1 then
191
      if EREADY and GetDistance(ts.target) < myHero.range + 200 and os.clock() - lastBasicAttack > swingDelay then				
192
        if GetTickCount()-lastdirection >= 500 then
193
          local absposxy = math.min(math.abs(ts.target.x-myHero.x),math.abs(ts.target.y-myHero.y))
194
          myHero:MoveTo(myHero.x+(ts.target.x-myHero.x)*100/absposxy,myHero.z+(ts.target.z-myHero.z)*100/absposxy)
195
          lastdirection = GetTickCount()
196
        elseif GetTickCount()-lastdirection >= 100 then
197
          CastSpell(_E, ts.target.x,ts.target.z)
198
          swing = 0
199
        end
200
      elseif QREADY and not EREADY and os.clock() - lastBasicAttack > swingDelay then
201
        CastSpell(_Q)
202
        swing = 0			
203
      end
204
    end
205
  end
206
  
207
  
208
  
209
  if HUMAN and NIDConfig.scriptActive1 and ts.target ~= nil and not COUGAR then			
210
		if DFGREADY then CastSpell(DFGSlot, ts.target) end
211
		if HXGREADY then CastSpell(HXGSlot, ts.target) end
212
		if BWCREADY then CastSpell(BWCSlot, ts.target) end
213
		if BRKREADY then CastSpell(BRKSlot, ts.target) end		
214
		if swing == 0  then
215
			if GetDistance(ts.target) < AArange then
216
        myHero:Attack(ts.target)
217
      end
218
    elseif swing == 1 then
219
      if EREADY and os.clock() - lastBasicAttack > rangedSwingDelay then
220
				CastSpell(_E, myHero)
221
				swing = 0
222
			end		   
223
    end
224
  end
225
  
226
  
227
  
228
  if COUGAR and NIDConfig.scriptActive1 and ts.target ~= nil and not HUMAN then		
229
		if DFGREADY then CastSpell(DFGSlot, ts.target) end
230
		if HXGREADY then CastSpell(HXGSlot, ts.target) end
231
		if BWCREADY then CastSpell(BWCSlot, ts.target) end
232
		if BRKREADY then CastSpell(BRKSlot, ts.target) end		
233
    if swing == 0 then
234
      if GetDistance(ts.target) < myHero.range + 300 then
235
        myHero:Attack(ts.target)
236
      end
237
    elseif swing == 1 then
238
      if EREADY and GetDistance(ts.target) < myHero.range + 200 and os.clock() - lastBasicAttack > swingDelay then			
239
        if GetTickCount()-lastdirection >= 500 then
240
          local absposxy = math.min(math.abs(ts.target.x-myHero.x),math.abs(ts.target.y-myHero.y))
241
          myHero:MoveTo(myHero.x+(ts.target.x-myHero.x)*100/absposxy,myHero.z+(ts.target.z-myHero.z)*100/absposxy)
242
          lastdirection = GetTickCount()
243
        elseif GetTickCount()-lastdirection >= 100 then
244
          CastSpell(_E, ts.target.x,ts.target.z)
245
          swing = 0
246
        end	
247
      elseif QREADY and not EREADY and os.clock() - lastBasicAttack > swingDelay then
248
        CastSpell(_Q)
249
        swing = 0			
250
      end
251
    end
252
  end
253
  
254
  
255
  
256
  if HUMAN and NIDConfig.scriptActive2 and not COUGAR then
257
    if ts.target ~= nil then
258
      if DFGREADY then CastSpell(DFGSlot, ts.target) end
259
      if HXGREADY then CastSpell(HXGSlot, ts.target) end
260
      if BWCREADY then CastSpell(BWCSlot, ts.target) end
261
      if BRKREADY then CastSpell(BRKSlot, ts.target) end
262
      if WREADY then
263
        WtravelDuration = 270+350
264
        ts:SetPrediction(WtravelDuration)   
265
        if GetDistance(ts.target) < wrange and GetDistance(ts.nextPosition) < wrange then
266
          CastSpell(_W, ts.nextPosition.x, ts.nextPosition.z)
267
        end
268
      end		
269
      if swing == 0  then
270
        if GetDistance(ts.target) < AArange then
271
          myHero:Attack(ts.target)
272
        end
273
      elseif swing == 1 then
274
        if EREADY and os.clock() - lastBasicAttack > rangedSwingDelay then
275
          CastSpell(_E, myHero)
276
          swing = 0
277
        end		   
278
      end
279
    elseif ts.target == nil then
280
      if WREADY then
281
        CastSpell(_W,mousePos.x,mousePos.z)
282
      end
283
    end
284
  end
285
  
286
  
287
  
288
  if COUGAR and NIDConfig.scriptActive2 and ts.target ~= nil and not HUMAN then		
289
		if DFGREADY then CastSpell(DFGSlot, ts.target) end
290
		if HXGREADY then CastSpell(HXGSlot, ts.target) end
291
		if BWCREADY then CastSpell(BWCSlot, ts.target) end
292
		if BRKREADY then CastSpell(BRKSlot, ts.target) end		
293
    if swing == 0 then
294
      if GetDistance(ts.target) < myHero.range + 300 then
295
        myHero:Attack(ts.target)
296
      end      
297
			if WREADY and GetDistance(ts.target) < myHero.range + 300 then				
298
				myHero:MoveTo(ts.target.x,ts.target.z)
299
				if GetTickCount()-lastdirection >= 500 then
300
					local absposxy = math.min(math.abs(ts.target.x-myHero.x),math.abs(ts.target.y-myHero.y))
301
					myHero:MoveTo(myHero.x+(ts.target.x-myHero.x)*100/absposxy,myHero.z+(ts.target.z-myHero.z)*100/absposxy)
302
					lastdirection = GetTickCount()
303
        elseif GetTickCount()-lastdirection >= 100 then
304
					CastSpell(_W, ts.target.x,ts.target.z)
305
				end				
306
			end      
307
    elseif swing == 1 then
308
      if WREADY and GetDistance(ts.target) < myHero.range + 300 and os.clock() - lastBasicAttack > swingDelay then				
309
        myHero:MoveTo(ts.target.x,ts.target.z)
310
        if GetTickCount()-lastdirection >= 500 then
311
          local absposxy = math.min(math.abs(ts.target.x-myHero.x),math.abs(ts.target.y-myHero.y))
312
          myHero:MoveTo(myHero.x+(ts.target.x-myHero.x)*100/absposxy,myHero.z+(ts.target.z-myHero.z)*100/absposxy)
313
          lastdirection = GetTickCount()
314
        elseif GetTickCount()-lastdirection >= 100 then
315
          CastSpell(_W, ts.target.x,ts.target.z)
316
        end				
317
      end
318
      if EREADY and not WREADY and GetDistance(ts.target) < myHero.range + 200 and os.clock() - lastBasicAttack > swingDelay then				
319
        if GetTickCount()-lastdirection >= 500 then
320
          local absposxy = math.min(math.abs(ts.target.x-myHero.x),math.abs(ts.target.y-myHero.y))
321
          myHero:MoveTo(myHero.x+(ts.target.x-myHero.x)*100/absposxy,myHero.z+(ts.target.z-myHero.z)*100/absposxy)
322
          lastdirection = GetTickCount()
323
        elseif GetTickCount()-lastdirection >= 100 then
324
          CastSpell(_E, ts.target.x,ts.target.z)
325
          swing = 0
326
        end	
327
      elseif QREADY and not EREADY and os.clock() - lastBasicAttack > swingDelay then
328
        CastSpell(_Q)
329
        swing = 0			
330
      end
331
    end
332
  end
333
  
334
  
335
  
336
	if NIDConfig.DASH then
337
    myHero:MoveTo(mousePos.x,mousePos.z)
338
		if COUGAR and not HUMAN then
339
			if WREADY then
340
        if GetTickCount()-lastdirection >= 500 then
341
          local absposxy = math.min(math.abs(mousePos.x-myHero.x),math.abs(mousePos.y-myHero.y))
342
          myHero:MoveTo(myHero.x+(mousePos.x-myHero.x)*100/absposxy,myHero.z+(mousePos.z-myHero.z)*100/absposxy)
343
          lastdirection = GetTickCount()
344
        elseif GetTickCount()-lastdirection >= 100 then
345
          CastSpell(_W)
346
        end
347
      end
348
    end
349
		if HUMAN and not COUGAR then
350
				CastSpell(_R)
351
		end	
352
	end
353
  
354
  
355
356
	if NIDConfig.autoAAFarm then
357
		if mousemoving and GetTickCount() > nextTick then
358
			player:MoveTo(mousePos.x, mousePos.z)
359
		end
360
						
361
		local tick = GetTickCount()
362
		if lasthiton then
363
		unitScanTick = tick
364
			for i = 1, objManager.maxObjects, 1 do
365
				local object = objManager:getObject(i)
366
				if object ~= nil and object.team ~= player.team and object.type == "obj_AI_Minion" and string.find(object.charName,"Minion") then
367
					if not object.dead and GetDistance(object,player) <= (player.range + scanAdditionalRange) then
368
						if units[object.name] == nil then
369
							units[object.name] = { obj = object, markTick = 0 }
370
						end
371
					else
372
						units[object.name] = nil
373
					end
374
				end
375
			end
376
		end
377
		for i, unit in pairs(units) do
378
			if unit.obj == nil or unit.obj.dead or GetDistance(player,unit.obj) > (player.range + scanAdditionalRange) then
379
				units[i] = nil
380
			else
381
				if unit.obj.health <= (myHero:CalcDamage(unit.obj,myHero.totalDamage)) then -- 
382
					if lasthiton and GetTickCount() > nextTick then
383
						player:Attack(unit.obj) ---PrintChat("ATTACKING")
384
						nextTick = GetTickCount() + waitDelay	
385
						return
386
					end 
387
				end
388
			end     
389
		end
390
	end	
391
	
392
end
393
function OnDraw()
394
	if NIDConfig.drawcircles and not myHero.dead then
395
    if HUMAN and not COUGAR then
396
      DrawCircle(myHero.x, myHero.y, myHero.z, myHero.range+150, 0x992D3D)
397
      if QREADY then DrawCircle(myHero.x, myHero.y, myHero.z, range, 0x992D3D)end
398
      if WREADY then DrawCircle(myHero.x, myHero.y, myHero.z, wrange, 0xFFFFFF)end
399
    end
400
    if COUGAR and not HUMAN then
401
      DrawCircle(myHero.x, myHero.y, myHero.z, myHero.range+150, 0x992D3D)
402
      if WREADY then DrawCircle(myHero.x, myHero.y, myHero.z, myHero.range+300, 0xFFFFFF)end
403
    end
404
		if ts.target ~= nil then
405
			for j=0, 10 do DrawCircle(ts.target.x, ts.target.y, ts.target.z, 40 + j*1.5, 0x00FF00) end
406
		end
407
	end  
408
	if ts.target ~= nil and NIDConfig.drawprediction then
409
		DrawCircle(ts.nextPosition.x, ts.target.y, ts.nextPosition.z, 200, 0x0000FF)
410
	end
411
	SC__OnDraw()
412
end
413
function OnWndMsg(msg,key)
414
	SC__OnWndMsg(msg,key)
415
end
416
function OnSendChat(msg)
417
	TargetSelector__OnSendChat(msg)
418
	ts:OnSendChat(msg, "pri")
419
end
420
PrintChat(" >> Nidalee the Rapist!")