Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Xin The Rapist v1.1
- ]]
- if myHero.charName ~= "XinZhao" then return end
- local mousemoving = true
- local waitDelay = 400
- local scanAdditionalRange = 500
- local nextTick = 0
- local chall = nil
- local range = 650
- local AArange = 0
- local lastBasicAttack = 0
- local swingDelay = (0.35 - (GetLatency()/1000))
- local swing = 0
- local targetSelected = true
- local ts
- local ignite = nil
- local YMGBSlot, TMATSlot, SotDSlot, BRKSlot, DFGSlot, HXGSlot, BWCSlot, SheenSlot, TrinitySlot, LichBaneSlot, ROSlot, ENTSlot, LOCKSlot = nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil
- local QREADY, WREADY, EREADY, RREADY, YMGBREADY, TMATREADY, SotDREADY, BRKREADY, DFGREADY, HXGREADY, BWCREADY, ROREADY, ENTREADY, LOCKREADY = false, false, false, false, false, false, false, false, false, false, false, false, false, false
- function OnLoad()
- XINConfig= scriptConfig("Xin The Rapist v1.1", "xintherapistv1.1")
- XINConfig:addParam("scriptActive", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 88)
- XINConfig:addParam("scriptActive1", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 90)
- XINConfig:addParam("Alt", "Alternate", SCRIPT_PARAM_ONKEYDOWN, false, 17)
- 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_ONKEYDOWN, false, 192)
- XINConfig:permaShow("autoAAFarm")
- ts = TargetSelector(TARGET_LOW_HP,range+150,DAMAGE_PHYSICAL)
- ts.name = XinZhao
- XINConfig:addTS(ts)
- enemyMinions = minionManager(MINION_ENEMY, range+150, player, MINION_SORT_HEALTH_ASC)
- 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 OnCreateObj(obj)
- if obj ~= nil and (obj.name:find("xen_ziou_intimidate") ~= nil) then
- chall = obj
- end
- end
- function OnDeleteObj(obj)
- if obj ~= nil and (obj.name:find("xen_ziou_intimidate") ~= nil) then
- chall = nil
- end
- end
- function OnTick()
- AArange = (myHero.range + (GetDistance(myHero.minBBox, myHero.maxBBox)/2))
- if myHero.dead then
- return
- end
- if swing == 1 and os.clock() > lastBasicAttack + 0.5 then
- swing = 0
- end
- ts:update()
- --[[===================================== SPELLS!============================================]]--
- QREADY = (myHero:CanUseSpell(_Q) == READY)
- WREADY = (myHero:CanUseSpell(_W) == READY)
- EREADY = (myHero:CanUseSpell(_E) == READY)
- RREADY = (myHero:CanUseSpell(_R) == READY)
- IREADY = (ignite ~= nil and myHero:CanUseSpell(ignite) == READY)
- --[[===================================== ITEMS!=============================================]]--
- YMGBSlot, TMATSlot, SotDSlot, BRKSlot, DFGSlot, HXGSlot, BWCSlot, SheenSlot, TrinitySlot, LichBaneSlot, ROSlot, ENTSlot, LOCKSlot = GetInventorySlotItem(3142), GetInventorySlotItem(3077) or GetInventorySlotItem(3074) , GetInventorySlotItem(3131), GetInventorySlotItem(3153), GetInventorySlotItem(3128), GetInventorySlotItem(3146), GetInventorySlotItem(3144), GetInventorySlotItem(3057), GetInventorySlotItem(3078), GetInventorySlotItem(3100), GetInventorySlotItem(3143), GetInventorySlotItem(3184), GetInventorySlotItem(3190)
- DFGREADY = (DFGSlot ~= nil and myHero:CanUseSpell(DFGSlot) == READY)
- HXGREADY = (HXGSlot ~= nil and myHero:CanUseSpell(HXGSlot) == READY)
- BWCREADY = (BWCSlot ~= nil and myHero:CanUseSpell(BWCSlot) == READY)
- TMATREADY = (TMATSlot ~= nil and myHero:CanUseSpell(TMATSlot) == READY)
- SotDREADY = (SotDSlot ~= nil and myHero:CanUseSpell(SotDSlot) == READY)
- YMGBREADY = (YMGBSlot ~= nil and myHero:CanUseSpell(YMGBSlot) == READY)
- ROREADY = (ROSlot ~= nil and myHero:CanUseSpell(ROSlot) == READY)
- ENTREADY = (ENTSlot ~= nil and myHero:CanUseSpell(ENTSlot) == READY)
- LOCKREADY = (LOCKSlot ~= nil and myHero:CanUseSpell(LOCKSlot) == READY)
- --[[=============================== Smart Ignite (See function.XinDmgCalculation towards the end of the script) ===============================]]--
- if (XINConfig.scriptActive or XINConfig.scriptActive1 or XINConfig.scriptActive2 or XINConfig.scriptActive3) and ts.target ~= nil and XINConfig.autoignite and IREADY then
- local QWEDmg = XinDmgCalculation(ts.target)
- local IDmg = getDmg("IGNITE",ts.target,myHero)
- if GetDistance(ts.target) < 600 and ts.target.health > QWEDmg and ts.target.health <= IDmg+QWEDmg then CastSpell(ignite, ts.target) end
- end
- --[[========================================================================================]]--
- --[[===================================== UltActive ========================================]]--
- --[[========================================================================================]]--
- if RREADY and XINConfig.Alt == true then
- for i = 1, heroManager.iCount, 1 do
- local hero = heroManager:getHero(i)
- if ValidTarget(hero) and GetDistance(hero) < 450 and hero.team ~= myHero.team then
- CastSpell(_R)
- end
- end
- end
- --[[========================================================================================]]--
- --[[===================================== scriptActive =====================================]]--
- --[[========================================================================================]]--
- if XINConfig.scriptActive and ts.target 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 ROREADY and GetDistance(ts.target) <= 485 and ts.target.type == "obj_AI_Hero" then CastSpell(ROSlot) end
- if LOCKREADY and GetDistance(ts.target) <= 485 and ts.target.type == "obj_AI_Hero" then CastSpell(LOCKSlot) end
- if EREADY and (GetDistance(ts.target) < range and GetDistance(ts.target) > AArange - 75) then
- myHero:Attack(ts.target)
- CastSpell(_E, ts.target)
- end
- if swing == 0 then
- if GetDistance(ts.target) < AArange + 250 then
- myHero:Attack(ts.target)
- if YMGBREADY and GetDistance(ts.target) > AArange then -- YMGB
- if ts.target.type == "obj_AI_Hero" then
- CastSpell(YMGBSlot)
- end
- end
- end
- elseif swing == 1 then
- if QREADY == false and QREADY == false and TMATREADY == false and os.clock() - lastBasicAttack > swingDelay then
- if ts.target ~= nil then
- swing = 0
- if AAmove == true then
- player:MoveTo(ts.target.x, ts.target.z)
- end
- myHero:Attack(ts.target)
- elseif ts.target == nil then
- swing = 0
- end
- end
- if WREADY and GetDistance(ts.target) < AArange then
- CastSpell(_W)
- end
- if EREADY and GetDistance(ts.target) < range and os.clock() - lastBasicAttack > swingDelay then
- myHero:Attack(ts.target)
- CastSpell(_E, ts.target)
- swing = 0
- end
- if QREADY and os.clock() - lastBasicAttack > swingDelay then
- CastSpell(_Q)
- swing = 0
- end
- if TMATREADY and GetDistance(ts.target) < 375 and QREADY == false and os.clock() - lastBasicAttack > swingDelay then
- CastSpell(TMATSlot)
- swing = 0
- end
- if YMGBREADY then -- YMGB
- if ts.target.type == "obj_AI_Hero" and GetDistance(ts.target) < 400 then
- CastSpell(YMGBSlot)
- end
- end
- if ENTREADY then -- YMGB
- if ts.target.type == "obj_AI_Hero" and GetDistance(ts.target) < 400 then
- CastSpell(ENTSlot)
- end
- end
- if SotDREADY then
- if ts.target.type == "obj_AI_Hero" and GetDistance(ts.target) < 400 then
- CastSpell(SotDSlot)
- end
- end
- end
- end
- --[[========================================================================================]]--
- --[[===================================== scriptActive1 ====================================]]--
- --[[========================================================================================]]--
- if XINConfig.scriptActive1 and ts.target 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 ROREADY and GetDistance(ts.target) <= 485 and ts.target.type == "obj_AI_Hero" then CastSpell(ROSlot) end
- if LOCKREADY and GetDistance(ts.target) <= 485 and ts.target.type == "obj_AI_Hero" then CastSpell(LOCKSlot) end
- if EREADY and (GetDistance(ts.target) < range and GetDistance(ts.target) > AArange - 75) then
- myHero:Attack(ts.target)
- CastSpell(_E, ts.target)
- end
- if swing == 0 then
- if GetDistance(ts.target) < AArange + 250 then
- myHero:Attack(ts.target)
- if YMGBREADY and GetDistance(ts.target) > AArange then -- YMGB
- if ts.target.type == "obj_AI_Hero" then
- CastSpell(YMGBSlot)
- end
- end
- end
- elseif swing == 1 then
- if QREADY == false and RREADY == false and QREADY == false and TMATREADY == false and os.clock() - lastBasicAttack > swingDelay then
- if ts.target ~= nil then
- swing = 0
- if AAmove == true then
- player:MoveTo(ts.target.x, ts.target.z)
- end
- myHero:Attack(ts.target)
- elseif ts.target == nil then
- swing = 0
- end
- end
- if RREADY and GetDistance(ts.target) < 350 and chall ~= nil and chall.x == ts.target.x and chall.z == ts.target.z and os.clock() - lastBasicAttack > swingDelay then
- CastSpell(_R)
- swing = 0
- end
- if EREADY and RREADY == false and GetDistance(ts.target) < range and os.clock() - lastBasicAttack > swingDelay then
- myHero:Attack(ts.target)
- CastSpell(_E, ts.target)
- swing = 0
- end
- if WREADY and GetDistance(ts.target) < AArange then
- CastSpell(_W)
- end
- if QREADY and RREADY == false and os.clock() - lastBasicAttack > swingDelay then
- CastSpell(_Q)
- swing = 0
- end
- if TMATREADY and GetDistance(ts.target) < 375 and QREADY == false and os.clock() - lastBasicAttack > swingDelay then
- CastSpell(TMATSlot)
- swing = 0
- end
- if YMGBREADY then -- YMGB
- if ts.target.type == "obj_AI_Hero" and GetDistance(ts.target) < 400 then
- CastSpell(YMGBSlot)
- end
- end
- if ENTREADY then -- YMGB
- if ts.target.type == "obj_AI_Hero" and GetDistance(ts.target) < 400 then
- CastSpell(ENTSlot)
- end
- end
- if SotDREADY then
- if ts.target.type == "obj_AI_Hero" and GetDistance(ts.target) < 400 then
- CastSpell(SotDSlot)
- end
- end
- end
- end
- --[[========================================================================================]]--
- --[[===================================== Autofarming ======================================]]--
- --[[========================================================================================]]--
- if XINConfig.autoAAFarm then
- enemyMinions:update()
- if mousemoving and GetTickCount() > nextTick then
- player:MoveTo(mousePos.x, mousePos.z)
- end
- local tick = GetTickCount()
- for index, minion in pairs(enemyMinions.objects) do
- if minion and minion.dead == false then
- local myAA = getDmg("AD",minion,myHero)
- if minion and minion.health <= myAA and GetDistance(minion) <= (player.range + scanAdditionalRange) and GetTickCount() > nextTick then
- player:Attack(minion)
- nextTick = GetTickCount() + waitDelay
- end
- end
- end
- end
- end
- function XinDmgCalculation(enemy)
- local hitdamage = getDmg("AD",enemy,myHero)
- local qdamage = getDmg("Q",enemy,myHero)*3
- local edamage = getDmg("E",enemy,myHero)
- local rdamage = getDmg("R",enemy,myHero)
- local combo5 = 0
- if GetDistance(enemy) < AArange + 100 then
- combo5 = hitdamage
- end
- if QREADY and GetDistance(enemy) < AArange + 100 then
- combo5 = combo5 + qdamage + (hitdamage*2)
- end
- if EREADY and GetDistance(enemy) < range then
- combo5 = combo5 + edamage
- end
- return combo5
- 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 RREADY then DrawCircle(myHero.x, myHero.y, myHero.z, 450, 0x992D3D) end
- if ts.target ~= nil then
- for j=0, 1 do DrawCircle(ts.target.x, ts.target.y, ts.target.z, (GetDistance(ts.target.minBBox, ts.target.maxBBox)/2) + j*1, 0x00FF00) end
- end
- end
- end
- function OnSendChat(msg)
- ts:OnSendChat(msg, "pri")
- end
- PrintChat(" >> Xin The Rapist v1.1 loaded!")
Advertisement
Add Comment
Please, Sign In to add comment