Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Xin The Rapist
- ]]
- if myHero.charName ~= "XinZhao" then return end
- require "AllClass"
- --[[ Code ]]
- local mousemoving = true
- local movedelay = 0
- local unitScanDelay = 0
- local waitDelay = 300
- local scanAdditionalRange = 500
- local units = {}
- local oldDelayTick = 0
- local unitScanTick = 0
- local holding = 0
- local animPlayedTick = nil
- local nextTick = 0
- local lasthiton = true
- local range = 650
- local AArange = 325
- local lastBasicAttack = 0
- local swingDelay = 0.15
- local swing = 0
- -- Active
- -- draw
- local targetSelected = true
- -- ts
- local ts
- --
- local ignite = nil
- local BRKSlot, DFGSlot, HXGSlot, BWCSlot, SheenSlot, TrinitySlot, LichBaneSlot = nil, nil, nil, nil, nil, nil, nil
- local QREADY, WREADY, EREADY, RREADY, BRKREADY, DFGREADY, HXGREADY, BWCREADY = false, false, false, false, false, false, false, false
- function OnLoad()
- XINConfig= scriptConfig("Xin The Rapist", "xintherapist")
- XINConfig:addParam("scriptActive", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 88)
- XINConfig:addParam("scriptActive1", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 90)
- XINConfig:addParam("scriptActive2", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 67)
- XINConfig:addParam("drawcircles", "Draw Circles", SCRIPT_PARAM_ONOFF, true)
- XINConfig:addParam("drawtext", "Draw Text", SCRIPT_PARAM_ONOFF, true)
- XINConfig:addParam("autoignite", "Auto Ignite", SCRIPT_PARAM_ONOFF, true)
- XINConfig:addParam("autoAAFarm", "Auto Farm", SCRIPT_PARAM_ONKEYTOGGLE, false, 192)
- XINConfig:permaShow("autoAAFarm")
- ts = TargetSelector(TARGET_LOW_HP,range+150,DAMAGE_PHYSICAL)
- ts.name = XinZhao
- XINConfig:addTS(ts)
- if myHero:GetSpellData(SUMMONER_1).name:find("SummonerDot") then ignite = SUMMONER_1
- elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerDot") then ignite = SUMMONER_2 end
- end
- function OnProcessSpell(unit, spell)
- if unit.isMe and (spell.name:find("Attack") ~= nil) then
- swing = 1
- lastBasicAttack = os.clock()
- end
- end
- function OnTick()
- if myHero.dead then
- return
- end
- if swing == 1 and os.clock() > lastBasicAttack + 0.5 then
- swing = 0
- end
- if ignite ~= nil and myHero:CanUseSpell(ignite) == READY then
- if IREADY then
- local ignitedmg = 0
- for j = 1, heroManager.iCount, 1 do
- local enemyhero = heroManager:getHero(j)
- if ValidTarget(enemyhero,600) then
- ignitedmg = 50 + 20 * myHero.level
- if enemyhero.health <= (ignitedmg - 50) then
- CastSpell(ignite, enemyhero)
- end
- end
- end
- end
- end
- ts:update()
- BRKSlot, DFGSlot, HXGSlot, BWCSlot, SheenSlot, TrinitySlot, LichBaneSlot = GetInventorySlotItem(3153), GetInventorySlotItem(3128), GetInventorySlotItem(3146), GetInventorySlotItem(3144), GetInventorySlotItem(3057), GetInventorySlotItem(3078), GetInventorySlotItem(3100)
- QREADY = (myHero:CanUseSpell(_Q) == READY)
- WREADY = (myHero:CanUseSpell(_W) == READY)
- EREADY = (myHero:CanUseSpell(_E) == READY)
- RREADY = (myHero:CanUseSpell(_R) == READY)
- DFGREADY = (DFGSlot ~= nil and myHero:CanUseSpell(DFGSlot) == READY)
- HXGREADY = (HXGSlot ~= nil and myHero:CanUseSpell(HXGSlot) == READY)
- BWCREADY = (BWCSlot ~= nil and myHero:CanUseSpell(BWCSlot) == READY)
- BRKREADY = (BRKSlot ~= nil and myHero:CanUseSpell(BRKSlot) == READY)
- IREADY = (ignite ~= nil and myHero:CanUseSpell(ignite) == READY)
- if XINConfig.scriptActive and ts.target ~= nil then
- if DFGREADY then CastSpell(DFGSlot, ts.target) end
- if HXGREADY then CastSpell(HXGSlot, ts.target) end
- if BWCREADY then CastSpell(BWCSlot, ts.target) end
- if BRKREADY then CastSpell(BRKSlot, ts.target) end
- if swing == 0 then
- if GetDistance(ts.target) < range then
- myHero:Attack(ts.target)
- end
- if EREADY and GetDistance(ts.target) < range then
- CastSpell(_E, ts.target)
- end
- elseif swing == 1 then
- if WREADY and GetDistance(ts.target) < AArange and not EREADY then
- CastSpell(_W)
- end
- if QREADY and os.clock() - lastBasicAttack > swingDelay then
- CastSpell(_Q)
- swing = 0
- end
- end
- end
- if XINConfig.scriptActive1 and ts.target ~= nil then
- if DFGREADY then CastSpell(DFGSlot, ts.target) end
- if HXGREADY then CastSpell(HXGSlot, ts.target) end
- if BWCREADY then CastSpell(BWCSlot, ts.target) end
- if BRKREADY then CastSpell(BRKSlot, ts.target) end
- if swing == 0 then
- if GetDistance(ts.target) < range then
- myHero:Attack(ts.target)
- end
- elseif swing == 1 then
- if WREADY and GetDistance(ts.target) < AArange then
- CastSpell(_W)
- end
- if QREADY and os.clock() - lastBasicAttack > swingDelay then
- CastSpell(_Q)
- swing = 0
- end
- end
- end
- if XINConfig.scriptActive2 and ts.target ~= nil then
- if DFGREADY then CastSpell(DFGSlot, ts.target) end
- if HXGREADY then CastSpell(HXGSlot, ts.target) end
- if BWCREADY then CastSpell(BWCSlot, ts.target) end
- if BRKREADY then CastSpell(BRKSlot, ts.target) end
- if swing == 0 then
- if GetDistance(ts.target) < range then
- myHero:Attack(ts.target)
- end
- if EREADY and GetDistance(ts.target) < range then
- CastSpell(_E, ts.target)
- end
- elseif swing == 1 then
- if RREADY and os.clock() - lastBasicAttack > swingDelay then
- CastSpell(_R)
- swing = 0
- elseif WREADY and GetDistance(ts.target) < AArange and not RREADY then
- CastSpell(_W)
- end
- if QREADY and not RREADY and os.clock() - lastBasicAttack > swingDelay then
- CastSpell(_Q)
- swing = 0
- end
- end
- end
- if XINConfig.autoAAFarm then
- if mousemoving and GetTickCount() > nextTick then
- player:MoveTo(mousePos.x, mousePos.z)
- end
- local tick = GetTickCount()
- if lasthiton then
- unitScanTick = tick
- for i = 1, objManager.maxObjects, 1 do
- local object = objManager:getObject(i)
- if object ~= nil and object.team ~= player.team and object.type == "obj_AI_Minion" and string.find(object.charName,"Minion") then
- if not object.dead and GetDistance(object,player) <= (player.range + scanAdditionalRange) then
- if units[object.name] == nil then
- units[object.name] = { obj = object, markTick = 0 }
- end
- else
- units[object.name] = nil
- end
- end
- end
- end
- for i, unit in pairs(units) do
- if unit.obj == nil or unit.obj.dead or GetDistance(player,unit.obj) > (player.range + scanAdditionalRange) then
- units[i] = nil
- else
- if unit.obj.health <= (myHero:CalcDamage(unit.obj,myHero.totalDamage)) then --
- if lasthiton and GetTickCount() > nextTick then
- player:Attack(unit.obj) ---PrintChat("ATTACKING")
- nextTick = GetTickCount() + waitDelay
- return
- end
- end
- end
- end
- end
- end
- function OnDraw()
- if XINConfig.drawcircles and not myHero.dead then
- if EREADY then DrawCircle(myHero.x, myHero.y, myHero.z, range, 0x992D3D)end
- if ts.target ~= nil then
- for j=0, 10 do DrawCircle(ts.target.x, ts.target.y, ts.target.z, 40 + j*1.5, 0x00FF00) end
- end
- end
- SC__OnDraw()
- end
- function OnWndMsg(msg,key)
- SC__OnWndMsg(msg,key)
- end
- function OnSendChat(msg)
- TargetSelector__OnSendChat(msg)
- ts:OnSendChat(msg, "pri")
- end
- PrintChat(" >> Xin The Rapist loaded!")
Advertisement
Add Comment
Please, Sign In to add comment