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