Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Nasus Q Farmer 1.2
- by Kevinkev
- Credits to eXtragoZ for the Q bonus counter, stop after Q, display info and them circles. ^__^
- Made by requests
- ]]--
- if myHero.charName ~= "Nasus" then return end
- local myObjectsTable = {}
- function OnLoad()
- --Objects--
- for i = 0, objManager.maxObjects, 1 do
- local object = objManager:GetObject(i)
- if objectIsValid(object) then table.insert(myObjectsTable, object) end
- end
- --Configuration--
- FarmQHK = 90 -- Z is the default key
- AutoWalkHK = 85 --U
- ScanRange = 500 --This is the range it reacts to auto walk
- --No touchy these variables
- qrng = 125 --Nasus autoatk range
- QBonus = 0
- lastSiphoning = 0
- killedcount = 0
- --Items
- DFGSlot, HXGSlot, BWCSlot, shureliasSlot, SheenSlot, TrinitySlot, LichBaneSlot = nil, nil, nil, nil, nil, nil, nil
- --Menu
- WConfig = scriptConfig("Nasus Q Farmer 1.2","SusanFarm")
- --Displays the siphoning strike information.
- WConfig:addParam("SiphInfo", "Display Siphoning info", SCRIPT_PARAM_ONOFF, true)
- --AutoWalk AutoFarm
- WConfig:addParam("AutoWalk", "Automatic Walking", SCRIPT_PARAM_ONKEYTOGGLE, false, AutoWalkHK)
- WConfig:addParam("AutoFarm", "Automatic Farming", SCRIPT_PARAM_ONKEYTOGGLE, true, FarmQHK)
- --Shows current State
- WConfig:permaShow("AutoWalk")
- WConfig:permaShow("AutoFarm")
- PrintChat(" >> Nasus Q Loaded")
- end
- function OnCreateObj(object)
- if objectIsValid(object) then table.insert(myObjectsTable, object) end
- end
- function objectIsValid(object)
- return object and object.valid and object.name:find("Minion_") and object.team ~= myHero.team and object.dead == false
- end
- function OnTick()
- DFGSlot, HXGSlot, BWCSlot, SheenSlot, TrinitySlot, LichBaneSlot, shureliasSlot = GetInventorySlotItem(3128), GetInventorySlotItem(3146), GetInventorySlotItem(3144), GetInventorySlotItem(3057), GetInventorySlotItem(3078), GetInventorySlotItem(3100), GetInventorySlotItem(3069)
- QREADY = myHero:CanUseSpell(_Q) == READY
- if WConfig.AutoFarm then
- if GetTickCount()-lastSiphoning<=100 then myHero:StopPosition() end
- for i,minionObjectI in ipairs(myObjectsTable) do
- if objectIsValid(minionObjectI) then
- if minionObjectI ~= nil and minionObjectI.name:find("Minion_") and minionObjectI.team ~= myHero.team and minionObjectI.dead == false then
- --Calculate damage
- local hitdamage = getDmg("AD",minionObjectI,myHero) --base
- itemDamage = (SheenSlot and hitdamage or 0) + (TrinitySlot and hitdamage*1.5 or 0) + (LichBaneSlot and getDmg("LICHBANE",enemy,myHero) or 0)
- damage = myHero:CalcDamage(minionObjectI, QBonus) + getDmg("Q",minionObjectI,myHero) + itemDamage
- if myHero:GetDistance(minionObjectI) < qrng + ScanRange and QREADY and minionObjectI.health <= damage then
- --PrintChat(tostring(minionObjectI.health))
- if WConfig.AutoWalk == true then
- myHero:MoveTo(minionObjectI.x,minionObjectI.z)
- end
- if myHero:GetDistance(minionObjectI) < qrng + 100 and minionObjectI.dead ==false then
- CastSpell(_Q)
- myHero:Attack(minionObjectI)
- else table.remove(myObjectsTable, i) i = i - 1
- end
- end
- end
- end
- end
- end
- function OnCreateObj(object)
- if object ~= nil and object.name:find("GoldAquisition") then
- if GetTickCount()-lastSiphoning <= 400 then
- killedcount = killedcount+1
- QBonus = killedcount*3
- end
- end
- end
- function OnProcessSpell(unit, spell)
- if unit.isMe and spell.name == "SiphoningStrikeAttack" then
- lastSiphoning = GetTickCount()
- end
- end
- function OnDraw()
- if WConfig.SiphInfo then
- DrawText("Siphoning last hits: "..killedcount.." Bonus Dmg: "..QBonus, 20, 100, 100, 0xFFFFFF00)
- end
- DrawCircle(myHero.x, myHero.y, myHero.z, ScanRange, 0xFF0000)
- SC__OnDraw()
- end
- function OnWndMsg(msg, key)
- SC__OnWndMsg(msg,key)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement