Skocz do zawartości

[TuT] Soraka Slack - Edytowane Skrypty


Pearl0PL

Rekomendowane odpowiedzi

Witam, chciałbym wam zaprezentować skrypty Soraka Slack edytowane przezemnie - dodałem anty afk, automatycznie uzywa shurelyi locketa i summoner spelli (1 spell - clarity, 2 spell - bariera/heal).

 

Soraka - PassiveFollow.lua (anty afk)

 

 

 

--[[
 
Passive Follow by ivan[russia]
 
 
 
!!!ALERT!!!
 
AUTOFOLLOW NOT TOO INTELECTUAL, PLAYERS CAN REPORT AUTOFOLLOW FOR FEED OR CHEATING OR BOTING, THEN YOU CAN GET BAN, POSIBLE BAN FOR HACKING
 
IN DEVELOPMENT
 
cmd list:
 
.follow start DummyNick -- starts follow champion with nickname: DummyNick
 
.follow stop -- stops follow champion
 
Updated for BoL by ikita
 
]]
 
 
 
 
 
-- SETTINGS
 
do
 
-- you can change true to false and false to true
 
-- false is turn off
 
-- true is turn on
 
 
 
SetupTogleKey = 117    --Key to Togle script. [ F6 - 117 ] default
 
--key codes
 
--http://www.indigorose.com/webhelp/ams/Program_Reference/Misc/Virtual_Key_Codes.htm
 
 
 
SetupFollowDistance = 500
 
--Distance between FollowTarget and Champion in which champion starts correcting itself
 
--Should be more then 400
 
 
 
SetupFollowAlly = true
 
-- you start follow near ally when your followtarget have been diead
 
 
 
SetupRunAway = true
 
-- if no ally was near when followtarget died, you run to close tower
 
 
 
SetupRunAwayRecall = true
 
-- if you succesfully recall after followtarget died or recalled, you start recall
 
 
 
SetupFollowRecall = true
 
-- should you recall as soon as follow target racalled
 
 
 
SetupAutoHold = true -- Need work
 
-- stop autohit creeps when following target
 
end
 
 
 
-- GLOBALS [Do Not Change]
 
do
 
SetupDebug = true
 
switcher = true
 
following = nil
 
temp_following = nil
 
stopPosition = false
 
 
 
--state of app enum
 
FOLLOW = 1
 
TEMP_FOLLOW = -33
 
WAITING_FOLLOW_RESP = 150
 
GOING_TO_TOWER = 666
 
 
 
--by default
 
state = FOLLOW
 
 
 
-- spawn
 
allySpawn = nil
 
enemySpawn = nil
 
 
 
version = 1
 
player = GetMyHero()
 
end
 
 
 
recallStartTime = 0
 
recallDetected = false
 
licz = 0
round = 0
playerx = player.x
playerz = player.z
playerxold = 0
playerzold = 0
 
 
recentrecallTarget = player
 
 
 
-- ABSTRACTION-METHODS
 
 
 
--return players table
 
function GetPlayers(team, includeDead, includeSelf)
 
local players = {}
 
for i=1, heroManager.iCount, 1 do
 
local member = heroManager:getHero(i)
 
if member ~= nil and member.valid and member.type == "obj_AI_Hero" and member.visible and member.team == team then
 
if member.name ~= player.name or includeSelf then
 
if includeDead then
 
table.insert(players,member)
 
elseif member.dead == false then
 
table.insert(players,member)
 
end
 
end
 
end
 
end
 
if #players > 0 then
 
return players
 
else
 
return false
 
end
 
end
 
 
 
--return towers table
 
function GetTowers(team)
 
local towers = {}
 
for i=1, objManager.maxObjects, 1 do
 
local tower = objManager:getObject(i)
 
if tower ~= nil and tower.valid and tower.type == "obj_AI_Turret" and tower.visible and tower.team == team then
 
table.insert(towers,tower)
 
end
 
end
 
if #towers > 0 then
 
return towers
 
else
 
return false
 
end
 
end
 
 
 
--here get close tower
 
function GetCloseTower(hero, team)
 
local towers = GetTowers(team)
 
if #towers > 0 then
 
local candidate = towers[1]
 
for i=2, #towers, 1 do
 
if (towers[i].health/towers[i].maxHealth > 0.1) and hero:GetDistance(candidate) > hero:GetDistance(towers[i]) then candidate = towers[i] end
 
end
 
return candidate
 
else
 
return false
 
end
 
end
 
 
 
--here get close player
 
function GetClosePlayer(hero, team)
 
local players = GetPlayers(team,false,false)
 
if #players > 0 then
 
local candidate = players[1]
 
for i=2, #players, 1 do
 
if hero:GetDistance(candidate) > hero:GetDistance(players[i]) then candidate = players[i] end
 
end
 
return candidate
 
else
 
return false
 
end
 
end
 
 
 
-- return count of champs near hero
 
function cntOfChampsNear(hero,team,distance)
 
local cnt = 0 -- default count of champs near HERO
 
local players = GetPlayers(team,false,true)
 
for i=1, #players, 1 do
 
if players[i] ~= hero and hero:GetDistance(players[i]) < distance then cnt = cnt + 1 end
 
end
 
return cnt
 
end
 
 
 
-- return %hp of champs near hero
 
function hpOfChampsNear(hero,team,distance)
 
local percent = 0 -- default %hp of champs near HERO
 
local players = GetPlayers(team,false, true)
 
for i=1, #players, 1 do
 
if players[i] ~= hero and hero:GetDistance(players[i]) < distance then percent = percent + players[i].health/players[i].maxHealth end
 
end
 
return percent
 
end
 
 
 
function OnProcessSpell(object,spellProc) --for soraka + sona
 
if switcher == true and object.name == player.name and (spellProc.name == "SonaHymnofValorAttack" or spellProc.name == "SonaAriaofPerseveranceAttack" or spellProc.name == "SonaBasicAttack" or spellProc.name == "SonaBasicAttack2" or spellProc.name == "SonaSongofDiscordAttack" or spellProc.name == "SorakaBasicAttack" or spellProc.name == "SorakaBasicAttack2") then
 
Run(GetCloseTower(player,player.team))
 
end
 
end
 
 
 
-- is recall, return true/false
 
function isRecall(hero)
 
if GetTickCount() - recallStartTime > 8000 then
 
return false
 
else
 
if recentrecallTarget.name == hero.name then
 
return true
 
end
 
return false
 
end
 
end
 
 
 
function OnCreateObj(object)
 
if object.name == "TeleportHomeImproved.troy" or object.name == "TeleportHome.troy" then
 
for i = 1, heroManager.iCount do
 
local target = heroManager:GetHero(i)
 
if GetDistance(target, object) < 100 then
 
recentrecallTarget = target
 
end
 
end
 
recallStartTime = GetTickCount()
 
end
 
end
 
 
 
-- turn (off - on) by SetupTogleKey
 
function OnWndMsg(msg, keycode)
 
if keycode == SetupTogleKey and msg == KEY_DOWN then
 
        if switcher == true then
 
            switcher = false
 
PrintChat("<font color='#FF0000'>Passive Follow >> TURNED OFF </font>")
 
        else
 
            switcher = true
 
PrintChat("<font color='#00FF00'>Passive Follow >> TURNED ON </font>")
 
        end
 
    end
 
end
 
 
 
-- CHAT CALLBACK
 
function OnSendChat(text)
 
if string.sub(text,1,7) == ".follow" then
 
BlockChat()
 
if string.sub(text,9,13) == "start" then
 
name = string.sub(text,15)
 
players = GetPlayers(player.team, true, false)
 
if players ~= false then
 
for i=1, #players, 1 do
 
if (string.lower(players[i].name) == string.lower(name)) then
 
following = players[i]
 
PrintChat("Passive Follow >> following summoner: "..players[i].name)
 
carryCheck = true
 
if following.dead then state = WAITING_FOLLOW_RESP else state = FOLLOW end
 
end
 
end
 
if following == nil then PrintChat("Passive Follow >> "..name.." did not found") end
 
end
 
end
 
if string.sub(text,9,12) == "stop" then
 
following = nil
 
state = FOLLOW
 
PrintChat("Passive Follow >> terminated")
 
end
 
end
 
end
 
 
 
-- TIMER CALLBACK
 
mytime = GetTickCount()
 
 
 
function OnTick()
 
licz = licz + 1
--PrintChat("licz = "..licz)
if licz > 2500 then
    if playerz == player.z and playerx == player.x then
        PrintChat("<font color='#FF0000'> It seems you are afk, let me fix this </font>")
        
        
        if round == 0 then
            PrintChat("Random move")
            player:MoveTo(player.x+math.random(-100,1000), player.z+math.random(-100,1000))
            round = 1
        elseif round == 1 then
            PrintChat("Another random move")
            player:MoveTo(player.x+math.random(-500,3000), player.z+math.random(-300,2000))
            round = 2
        else
            PrintChat("Back to prev pos")
            player:MoveTo(playerxold, playerzold)
            round = 0
        end
        
        
        licz = 0
        playerzold = playerz
        playerxold = playerx
    else
        playerz = player.z
        playerx = player.x
        licz = 0
    end
end
 
 
 
--Identify AD carry and follow
if carryCheck == false then
 
for i = 1, heroManager.iCount, 1 do
 
local teammates = heroManager:getHero(i)
 
--Coordinates are for bots only
 
if math.sqrt((teammates.x - 12143)^2 + (teammates.z - 2190)^2) < 4500 and teammates.team == player.team and teammates.name ~= player.name then
 
following = teammates
 
PrintChat("Passive Follow >> following summoner: "..teammates.name)
 
state = FOLLOW
 
carryCheck = true
 
end
 
end
 
end
 
 
 
if GetTickCount() - mytime > 800 and switcher then
 
Brain()
 
mytime = GetTickCount()
 
end
 
if following ~= nil then
 
Status(following, 1, value)
 
end
 
end
 
 
 
-- STATUS CALLBACK
 
function Status(member, desc, value)
 
if member == following and desc == 1 then
 
if member.dead and state == FOLLOW then
 
PrintChat("Passive Follow >> "..member.name.." dead")
 
-- if SetupFollowAlly == true and ALLYNEAR then temporary changing follow target
 
if SetupFollowAlly and player:GetDistance(GetClosePlayer(player,player.team)) < SetupFollowDistance then
 
temp_following = GetClosePlayer(player,player.team)
 
PrintChat("Passive Follow >> "..(GetClosePlayer(player,player.team)).name.." temporary following")
 
state = TEMP_FOLLOW
 
elseif SetupRunAway then
 
state = GOING_TO_TOWER
 
else
 
state = WAITING_FOLLOW_RESP
 
end
 
end
 
if member.dead == false then
 
if state == WAITING_FOLLOW_RESP then
 
PrintChat("Passive Follow >> "..member.name.." alive")
 
state = FOLLOW
 
end
 
if state == TEMP_FOLLOW then
 
temp_following = nil
 
PrintChat("Passive Follow >> "..member.name.." alive")
 
state = FOLLOW
 
end
 
if state == GOING_TO_TOWER then
 
PrintChat("Passive Follow >> "..member.name.." alive")
 
state = FOLLOW
 
end
 
end
 
end
 
end
 
 
 
-- SEMICORE
 
-- run(follow) to target
 
function Run(target)
 
if target.type == "obj_AI_Hero" then
 
if target:GetDistance(allySpawn) > SetupFollowDistance then
 
if (player:GetDistance(target) > SetupFollowDistance or player:GetDistance(target) < 275 --[[this is to stop get aoe, which are often 275 range]] or player:GetDistance(allySpawn) + 275 > target:GetDistance(allySpawn)) then
 
followX = ((allySpawn.x - target.x)/(target:GetDistance(allySpawn)) * ((SetupFollowDistance - 300) / 2 + 300) + target.x + math.random(-((SetupFollowDistance-300)/3),((SetupFollowDistance-300)/3)))
 
followZ = ((allySpawn.z - target.z)/(target:GetDistance(allySpawn)) * ((SetupFollowDistance - 300) / 2 + 300) + target.z + math.random(-((SetupFollowDistance-300)/3),((SetupFollowDistance-300)/3)))
 
player:MoveTo(followX, followZ)
 
else
 
player:HoldPosition()
 
end
 
elseif SetupFollowRecall and player:GetDistance(allySpawn) > (SetupFollowDistance * 3) then
 
state = GOING_TO_TOWER
 
end
 
end
 
if target.type == "obj_AI_Turret" then
 
if player:GetDistance(target) > 300 then
 
player:MoveTo(target.x + math.random(-150,150), target.z + math.random(-150,150))
 
elseif SetupRunAwayRecall then
 
CastSpell(RECALL)
 
if following.dead == true then
 
state = WAITING_FOLLOW_RESP
 
else
 
state = FOLLOW
 
end
 
end
 
end
 
end
 
 
 
-- CORE
 
function Brain()
 
if following ~= nil and player.dead == false and isRecall(player) == false then
 
if state == FOLLOW then
 
Run(following)
 
end
 
if state == TEMP_FOLLOW and temp_following ~= nil then Run(temp_following) end
 
if state == GOING_TO_TOWER then Run(GetCloseTower(player,player.team)) end
 
 
 
end
 
end
 
 
 
-- AT LOADING OF SCRIPT
 
 
 
-- here checking timer
 
function OnLoad()
 
PrintChat("Passive Follow >> v"..tostring(version).." LOADED")
 
carryCheck = false
 
-- numerate spawn
 
for i=1, objManager.maxObjects, 1 do
 
local candidate = objManager:getObject(i)
 
if candidate ~= nil and candidate.valid and candidate.type == "obj_SpawnPoint" then
 
if candidate.x < 3000 then
 
if player.team == TEAM_BLUE then allySpawn = candidate else enemySpawn = candidate end
 
else
 
if player.team == TEAM_BLUE then enemySpawn = candidate else allySpawn = candidate end
 
end
 
end
 
end
 
-- fix user settings
 
if SetupFollowDistance < 400 then SetupFollowDistance = 400 end
 
-- count towers
 
end

 

 

 

 

Soraka - SorakaSlack.lua - uzywanie itemow i spelli

 

 

 

if GetMyHero().charName == "Soraka" then
 
--[[
 
SORAKA SLACKER v8
 
By Ivan[russia]
 
Credits To Zynox/grey autolvl spell/ikita autosilence/nanja taric/wee Ward Scanner
 
I Learned From Their Previous Scripts
 
v7: script heal ignited too, but now it preffer unignated targets
 
Updated for BoL by ikita v8.3
 
Credits to Barasia283 for everything on auto silence
 
--]]
 
 
 
------------------------------- SETTINGS -------------------------------
 
-- you can change true to false and false to true
 
-- false means turn off
 
-- true means turn on
 
SetupAutoUlt= true -- Auto Ult
 
SetupUltEffect=1 -- (between 1-5), script use ult when (Full_Ult_Heal_Possible_Value) > (One_Man_Ult_Heal_Possible_Value * SetupUltEffect)
 
 
 
SetupAutoHeal= true -- Auto Heal
 
SetupHealGiveRate= 1 -- At which rate you should heal. Example: your usual heal gives 100 hp , SetupHealGiveRate=3 means 100x3, so script heals when target miss 300 hp
 
 
 
SetupAutoMana= true -- Auto Mana
 
SetupManaGiveRate= 1 -- At which rate you should give mana. Example: your usual mana gives 50 mana, SetupManaGiveRate=2 means 50x2, so script gives mana when target miss 100 mana. Check 1 rate if you want give mana often
 
 
 
SetupAutoSilence= true -- Auto Silence --in development
 
SetupAntiKarthus= true -- Soraka AutoUlt KarthusUlt on low hp targets
 
 
 
SetupAutoStarcall= true -- Auto Starcall
 
SetupStarcallLimit = 200 -- Does not cast Starcall when mana falls below this level
 
 
 
SetupDistance= 850 -- How much distance to use spells
 
 
 
SetupTogleKey= 117    --Key to Togle script. [ F6 - 117 ] default
 
--key codes
 
--http://www.indigorose.com/webhelp/ams/Program_Reference/Misc/Virtual_Key_Codes.htm
 
 
 
SetupAutoLvLSpell= true -- AutoLvL Spells of soraka
 
abilitySequence = {2,3,2,3,2,4,2,3,2,3,4,3,1,1,1,4,1,1} -- list for SetupAutoLvLSpell
 
 
 
SetupDrawInfo = true -- Drawing usefull info on screen
 
SetupDrawX = 0.8
 
SetupDrawY = 0.2 -- Position of info, minimum = 0, maximum = 1, SetupDrawX - width, SetupDrawY - height
 
 
 
recentrecallTarget = player
 
 
 
 
 
 
 
------------------------------- GLOBALS [Do Not Change] -------------------------------
 
SetupDebug= false --Debug Mode
 
abilityLevel = 0
 
Soraka_SWITCH = true
 
player = GetMyHero()
 
 
 
--info table
 
info = {}
 
 
 
-- ultimate info
 
info[1] = {}
 
info[1][1] = false -- state
 
info[1][2] = 0 -- number
 
info[1][3] = "ultimate: " -- text
 
info[1][4] = 0 -- RED
 
info[1][5] = 255 -- GREEN
 
info[1][6] = 0 -- BLUE
 
 
 
-- gold info
 
info[2] = {}
 
info[2][1] = false -- state
 
info[2][2] = 0 -- number
 
info[2][3] = "gold/10sec: " -- text
 
info[2][4] = 255 -- RED
 
info[2][5] = 255 -- GREEN
 
info[2][6] = 51 -- BLUE
 
 
 
 
 
-- gold/10 info
 
gold10SecAgo = 0
 
GoldRefreshTick = 0
 
 
-- spawn
 
allySpawn = nil
 
enemySpawn = nil
 
 
 
recallStartTime = 0
 
recallDetected = false
 
 
-- auto items
 
ShurelyaUsed = false
LockedUsed = false
lastTimeShurelya = 0
lastTimeLocked = 0
 
 
 
-- disable name list from Barasia283
 
disableArray = {
 
"CaitlynAceintheHole", "Crowstorm", "Drain", "ReapTheWhirlwind", "FallenOne", "KatarinaR", "AlZaharNetherGrasp",
 
"GalioIdolOfDurand", "Meditate", "MissFortuneBulletTime", "AbsoluteZero", "Pantheon_Heartseeker", "Pantheon_GrandSkyfall_Jump",
 
"ShenStandUnited", "gate", "UrgotSwap2", "InfiniteDuress", "VarusQ"
 
}
 
 
 
------------------------------- MATH SPELLS -------------------------------
 
 
 
-- HEAL
 
function calcHeal(ignited)
 
local rank = player:GetSpellData(1).level
 
if rank == 0 then return nil end
 
if ignited == false then
 
if rank == 1 then return math.floor(70 + player.ap * 0.45 + 0.5)
 
elseif rank == 2 then return math.floor(140 + player.ap * 0.45 + 0.5)
 
elseif rank == 3 then return math.floor(210 + player.ap * 0.45 + 0.5)
 
elseif rank == 4 then return math.floor(280 + player.ap * 0.45 + 0.5)
 
elseif rank == 5 then return math.floor(350 + player.ap * 0.45 + 0.5) end
 
else
 
if rank == 1 then return math.floor((70 + player.ap * 0.45)/2 + 0.5)
 
elseif rank == 2 then return math.floor((140 + player.ap * 0.45)/2 + 0.5)
 
elseif rank == 3 then return math.floor((210 + player.ap * 0.45)/2 + 0.5)
 
elseif rank == 4 then return math.floor((280 + player.ap * 0.45)/2 + 0.5)
 
elseif rank == 5 then return math.floor((350 + player.ap * 0.45)/2 + 0.5) end
 
end
 
end
 
 
 
function calcHealResult(hero)
 
local healValue = calcHeal(isIgnited(hero))
 
if healValue == nil then return nil end
 
-- return healed value
 
if (hero.maxHealth - hero.health) < healValue then return hero.maxHealth - hero.health else return healValue end
 
end
 
 
 
-- MANA
 
function calcMana()
 
local rank = player:GetSpellData(2).level
 
if rank == 0 then return nil
 
elseif rank == 1 then return 40
 
elseif rank == 2 then return 80
 
elseif rank == 3 then return 120
 
elseif rank == 4 then return 160
 
elseif rank == 5 then return 200 end
 
end
 
 
 
function calcManaResult(hero)
 
local manaValue = calcMana()
 
if manaValue == nil then return nil end
 
-- return mana'ed value
 
if (hero.maxMana - hero.mana) < manaValue then return hero.maxMana - hero.mana else return manaValue end
 
end
 
 
 
-- ULT
 
function calcUlt(ignited)
 
local rank = player:GetSpellData(3).level
 
if rank == 0 then return nil end
 
if ignited == false then
 
if rank == 1 then return math.floor(200 + player.ap * 0.7 + 0.5)
 
elseif rank == 2 then return math.floor(320 + player.ap * 0.7 + 0.5)
 
elseif rank == 3 then return math.floor(440 + player.ap * 0.7 + 0.5) end
 
else
 
if rank == 1 then return math.floor((200 + player.ap * 0.7)/2 + 0.5)
 
elseif rank == 2 then return math.floor((320 + player.ap * 0.7)/2 + 0.5)
 
elseif rank == 3 then return math.floor((440 + player.ap * 0.7)/2 + 0.5) end
 
end
 
end
 
 
 
function calcUltResult()
 
if calcUlt(false) == nil then return nil end
 
--calc ult for players
 
local ultResult = 0
 
local players = GetPlayers(player.team , false, true)
 
for i=1, #players, 1 do
 
-- dont count targets at Spawn
 
if isInSpawn(players[i]) == false and isRecall(players[i]) == false then
 
if (players[i].maxHealth - players[i].health) < calcUlt(isIgnited(players[i])) then
 
ultResult = ultResult + players[i].maxHealth - players[i].health
 
else
 
ultResult = ultResult + calcUlt(isIgnited(players[i]))
 
end
 
end
 
end
 
--return total result
 
return math.floor(ultResult + 0.5)
 
end
 
 
 
------------------------------- ABSTRACTION-METHODS -------------------------------
 
-- return players table
 
function GetPlayers(team, includeDead, includeSelf)
 
local players = {}
 
for i=1, heroManager.iCount, 1 do
 
local member = heroManager:getHero(i)
 
if member ~= nil and member.type == "obj_AI_Hero" and member.team == team then
 
if member.charName ~= player.charName or includeSelf then
 
if includeDead then
 
table.insert(players,member)
 
elseif member.dead == false then
 
table.insert(players,member)
 
end
 
end
 
end
 
end
 
return players
 
end
 
 
 
-- return towers table
 
function GetTowers(team)
 
local towers = {}
 
for i=1, objManager.maxObjects, 1 do
 
local tower = objManager:getObject(i)
 
if tower ~= nil and tower.type == "obj_AI_Turret" and tower.visible and tower.team == team then
 
table.insert(towers,tower)
 
end
 
end
 
if #towers > 0 then
 
return towers
 
else
 
return false
 
end
 
end
 
 
 
-- here get close tower
 
function GetCloseTower(hero, team)
 
local towers = GetTowers(team)
 
if #towers > 0 then
 
local candidate = towers[1]
 
for i=2, #towers, 1 do
 
if (towers[i].health/towers[i].maxHealth > 0.1) and hero:GetDistance(candidate) > hero:GetDistance(towers[i]) then candidate = towers[i] end
 
end
 
return candidate
 
else
 
return false
 
end
 
end
 
 
 
-- here get close player
 
function GetClosePlayer(hero, team)
 
local players = GetPlayers(team,false)
 
if #players > 0 then
 
local candidate = players[1]
 
for i=2, #players, 1 do
 
if hero:GetDistance(candidate) > hero:GetDistance(players[i]) then candidate = players[i] end
 
end
 
return candidate
 
else
 
return false
 
end
 
end
 
 
 
-- return count of champs near hero
 
function cntOfChampsNear(hero,team,distance)
 
local cnt = 0 -- default count of champs near HERO
 
local players = GetPlayers(team,false)
 
for i=1, #players, 1 do
 
if hero:GetDistance(players[i]) < distance then cnt = cnt + 1 end
 
end
 
return cnt
 
end
 
 
 
-- return %hp of champs near hero
 
function hpOfChampsNear(hero,team,distance)
 
local percent = 0 -- default %hp of champs near HERO
 
local players = GetPlayers(team,false)
 
for i=1, #players, 1 do
 
if hero:GetDistance(players[i]) < distance then percent = percent + players[i].health/players[i].maxHealth end
 
end
 
return percent
 
end
 
 
 
-- is recall, return true/false
 
function isRecall(hero)
 
if GetTickCount() - recallStartTime > 8000 then
 
return false
 
else
 
if recentrecallTarget.name == hero.name then
 
return true
 
end
 
return false
 
end
 
end
 
 
 
function OnCreateObj(object)
 
if object.name == "TeleportHomeImproved.troy" or object.name == "TeleportHome.troy" then
 
for i = 1, heroManager.iCount do
 
local target = heroManager:GetHero(i)
 
if GetDistance(target, object) < 100 then
 
recentrecallTarget = target
 
end
 
end
 
recallStartTime = GetTickCount()
 
end
 
end
 
 
 
 
 
-- CHECK IS HERO IGNITED
 
 function isIgnited(hero)
 
if detectBuffs(hero,{"SummonerDot","grievouswound"}) then return 1 else return 0 end
 
 end
 
 
 
 -- DETECT BUFFS IN TABLE buffs ON HERO
 
 function detectBuffs(hero,buffs)
 
for j = 1, hero.buffCount, 1 do
 
buff = hero:getBuff(j)
 
for i = 1, #buffs, 1 do
 
if buff == buffs[i] then return true end
 
end
 
end
 
return false
 
 end
 
 
 
-- CHECK IS HERO IN SPAWN
 
function isInSpawn(hero)
 
if math.sqrt((allySpawn.x - hero.x) ^ 2 + (allySpawn.z - hero.z) ^ 2) < 1000 then return true end
 
return false
 
end
 
 
 
------------------------------- CORE -------------------------------
 
function AutoUlt()
 
if SetupDebug == true then PrintChat("debug >> AutoUlt()") end
 
--check is ult lvled and ready
 
if player:GetSpellData(3).level > 0 and player:CanUseSpell(_R) == READY then
 
if calcUltResult() > (calcUlt(false) * SetupUltEffect) then
 
CastSpell(_R)
 
end
 
end
 
end
 
 
 
--if SetupAutoSilence or SetupAntiKarthus then script.createObjectCallback = "AutoSilence" end
 
function AutoSilence(object) --Working on it
 
--[[ if object ~= nil and object.name == "Data\Particles\FallenOne_nova.troy" and object.team == TEAM_ENEMY then
 
if player:GetSpellLevel(3) > 0 and player:GetSpellState(_R) == STATE_READY and SetupAntiKarthus then
 
players = GetPlayers(player.team, false, true)
 
for i=1,#players,1 do
 
if karthus:CalculateMagicDamage(players[i],(400 * karthus.level/11 + karthus.ap * 0.6) * 1.2) > players[i].health then
 
player:UseSpell(_R)
 
PrintChat("SORAKA SLACK >> AntiKarthus Ultimate!")
 
end
 
end
 
end
 
end]]
 
end
 
 
 
function OnProcessSpell(object,spellProc)
 
if player:GetSpellData(2).level > 0 and player:CanUseSpell(_E) == READY and SetupAutoSilence == true and Soraka_SWITCH == true and object.team ~= player.team then
 
for i = 1, #disableArray, 1 do
 
if GetDistance(object, player) < 725 then
 
if spellProc.name == disableArray[i] then
 
CastSpell(_E, object)
 
end
 
end
 
end
 
end
 
end
 
function AutoItems()
 
if SetupDebug == true then PrintChat("debug >> AutoItems()") end
 
 
-- check items
local ItemSlot = {ITEM_1,ITEM_2,ITEM_3,ITEM_4,ITEM_5,ITEM_6,}
 
 
-- shurelya
    for i=1, 6, 1 do
        if player:getInventorySlot(ItemSlot[i]) == 3069 and ShurelyaUsed == false then
            local healTarget = nil
 
            local players = GetPlayers(player.team, false, true)
 
            -- check is need heal and select target
 
            for i=1, #players, 1 do
 
            if player:GetDistance(players[i]) < SetupDistance and isRecall(players[i]) == false and isInSpawn(players[i]) == false then
 
            -- calculate is need heal to target
 
            if healTarget ~= nil and ((players[i].maxHealth - players[i].health) / (isIgnited(players[i]) + 1)) > ((healTarget.maxHealth - healTarget.health) / (isIgnited(healTarget) + 1)) then healTarget = players[i]
 
            elseif healTarget == nil and (players[i].maxHealth - players[i].health) > (calcHeal(isIgnited(players[i])) * SetupHealGiveRate) then healTarget = players[i] end
 
            end
 
            end
 
            --heal targets
 
            if healTarget ~= nil then
                 FinalItemslotM = ItemSlot[i]
 
                 CastSpell(FinalItemslotM)
 
                 ShurelyaUsed = true
 
                 lastTimeShurelya = GetTickCount()
            end
 
        end
 
    end
    
    if GetTickCount() - lastTimeShurelya > 60000 then
 
             ShurelyaUsed = false
 
    end
 
 
 
-- locket
 
    for i=1, 6, 1 do
        if player:getInventorySlot(ItemSlot[i]) == 3190 and LockedUsed == false then
        local healTarget = nil
 
            local players = GetPlayers(player.team, false, true)
 
            -- check is need heal and select target
 
            for i=1, #players, 1 do
 
            if player:GetDistance(players[i]) < SetupDistance and isRecall(players[i]) == false and isInSpawn(players[i]) == false then
 
            -- calculate is need heal to target
 
            if healTarget ~= nil and ((players[i].maxHealth - players[i].health) / (isIgnited(players[i]) + 1)) > ((healTarget.maxHealth - healTarget.health) / (isIgnited(healTarget) + 1)) then healTarget = players[i]
 
            elseif healTarget == nil and (players[i].maxHealth - players[i].health) > (calcHeal(isIgnited(players[i])) * SetupHealGiveRate) then healTarget = players[i] end
 
            end
 
            end
 
            --heal targets
 
            if healTarget ~= nil then
             FinalItemslotM = ItemSlot[i]
 
             CastSpell(FinalItemslotM)
 
             ShurelyaUsed = true
 
             lastTimeLocked = GetTickCount()
             end
        end
 
    end
    
    if GetTickCount() - lastTimeLocked > 60000 then
 
             LockedUsed = false
 
    end    
    
    
 
end
 
 
function AutoBarrier()
 
if SetupDebug == true then PrintChat("debug >> AutoBarrier()") end
local BarrierUsed = false
local hpPercent = player.health/player.maxHealth
local hpLimit = 0.375
local lastTimeBarrier = 0
 
    if hpLimit >= hpPercent and BarrierUsed == false then
         CastSpell(SUMMONER_2)
 
         BarrierUsed = true
 
         lastTimeBarrier = GetTickCount()
    end
    
    if GetTickCount() - lastTimeBarrier > 210000 then
 
             BarrierUsed = false
 
    end
end
 
function AutoClarity()
 
if SetupDebug == true then PrintChat("debug >> AutoClarity()") end
local ClarityUsed = false
local mpPercent = player.mana/player.maxMana
local mpLimit = 0.375
local lastTimeClarity = 0
 
    if mpLimit >= mpPercent and ClarityUsed == false then
         CastSpell(SUMMONER_1)
 
         ClarityUsed = true
 
         lastTimeClarity = GetTickCount()
    end
    
    if GetTickCount() - lastTimeClarity > 180000 then
 
             ClarityUsed = false
 
    end
end
 
 
 
function AutoHeal()
 
if SetupDebug == true then PrintChat("debug >> AutoHeal()") end
 
--check is heal lvled and ready
 
if player:GetSpellData(1).level > 0 and player:CanUseSpell(_W) == READY then
 
local healTarget = nil
 
local players = GetPlayers(player.team, false, true)
 
-- check is need heal and select target
 
for i=1, #players, 1 do
 
if player:GetDistance(players[i]) < SetupDistance and isRecall(players[i]) == false and isInSpawn(players[i]) == false then
 
-- calculate is need heal to target
 
if healTarget ~= nil and ((players[i].maxHealth - players[i].health) / (isIgnited(players[i]) + 1)) > ((healTarget.maxHealth - healTarget.health) / (isIgnited(healTarget) + 1)) then healTarget = players[i]
 
elseif healTarget == nil and (players[i].maxHealth - players[i].health) > (calcHeal(isIgnited(players[i])) * SetupHealGiveRate) then healTarget = players[i] end
 
end
 
end
 
--heal targets
 
if healTarget ~= nil then CastSpell(_W, healTarget) end
 
end
 
end
 
 
 
function AutoStarcall()
 
--check Q lvled and ready
 
if player:GetSpellData(0).level > 0 and player:CanUseSpell(_Q) == READY then
 
for i = 1, heroManager.iCount do
 
local target = heroManager:GetHero(i)
 
if target ~= nil and target.team ~= player.team and GetDistance(target, player) < 500 and player.mana > SetupStarcallLimit then
 
CastSpell(_Q)
 
end
 
end
 
end
 
end
 
 
 
 
 
function AutoMana() --Champion check seems bugged ?
 
if SetupDebug == true then PrintChat("debug >> AutoMana()") end
 
--check is E lvled and ready
 
if player:GetSpellData(2).level > 0 and player:CanUseSpell(_E) == READY then
 
local manaTarget = nil
 
local players = GetPlayers(player.team, false, false)
 
-- check is need mana and select target
 
for i=1, #players, 1 do
 
if isRecall(players[i]) == false and isInSpawn(players[i]) == false and players[i].charName ~= "Mordekaiser" and player:GetDistance(players[i]) < SetupDistance and players[i].maxMana > 201 then
 
-- calculate is need mana to target
 
if manaTarget ~= nil and (players[i].maxMana - players[i].mana) > (manaTarget.maxMana - manaTarget.mana) then manaTarget = players[i]
 
elseif manaTarget == nil and (players[i].maxMana - players[i].mana) > (calcMana() * SetupManaGiveRate) then manaTarget = players[i] end
 
end
 
end
 
--mana targets
 
if manaTarget ~= nil then CastSpell(_E, manaTarget) end
 
end
 
end
 
 
 
--get info to draw
 
--called every TimerCallback
 
function GetInfo()
 
--ultimate info
 
if player:GetSpellData(3).level > 0 --[[and player:GetSpellState(_R) == STATE_READY]] then
 
info[1][2] = calcUltResult()
 
info[1][1] = true
 
else info[1][1] = false end
 
--gold / 10 info
 
if GetTickCount() - GoldRefreshTick > 9999 then
 
if (player.gold - gold10SecAgo) > 0 and (player.gold - gold10SecAgo) < 84 then
 
info[2][1] = true
 
 
 
info[2][2] = string.format("%.02f", (player.gold - gold10SecAgo))
 
end
 
gold10SecAgo = player.gold
 
GoldRefreshTick = GetTickCount()
 
end
 
 
 
end
 
 
 
--draw info
 
--called every frame
 
function OnDraw()
 
if SetupDrawInfo then
 
local curString = 0
 
for i=1, #info, 1 do
 
if info[i][1] then
 
-- text
 
DrawText(info[i][3]..tostring(info[i][2]),
 
-- size x y
 
20 , (WINDOW_W - WINDOW_X) * SetupDrawX, (WINDOW_H - WINDOW_Y) * SetupDrawY + curString, 0xFF00FF00)
 
curString = curString + 20
 
end
 
end
 
end
 
end
 
 
 
--turn off - on
 
function OnWndMsg(msg, keycode)
 
if keycode == SetupTogleKey and msg == KEY_DOWN then
 
if SetupDebug == true then PrintChat("debug >> Toggle(msg, keycode == SetupTogleKey )") end
 
        if Soraka_SWITCH == true then
 
            Soraka_SWITCH = false
 
PrintChat("<font color='#FF0000'> SORAKA SLACK >> Run Soraka, RUN </font>")
 
        else
 
            Soraka_SWITCH = true
 
PrintChat("<font color='#00FF00'> SORAKA SLACK >> Heal Soraka, HEAL </font>")
 
        end
 
    end
 
end
 
 
 
-- TIMER and BRAIN
 
function OnTick() --Need 200ms interval
 
if SetupDebug then PrintChat("debug >> Timer(tick)") end
 
if player.dead == false and isRecall(player) == false then
 
if Soraka_SWITCH then
 
AutoItems()
 
AutoBarrier()
 
AutoClarity()
 
if SetupAutoUlt then AutoUlt() end
 
if SetupAutoStarcall then AutoStarcall() end
 
if SetupAutoHeal then AutoHeal() end
 
if SetupAutoMana then AutoMana() end
 
end
 
end
 
    if SetupAutoLvLSpell and player.level > abilityLevel then
 
abilityLevel=abilityLevel+1
 
if abilitySequence[abilityLevel] == 1 then LevelSpell(_Q)
 
elseif abilitySequence[abilityLevel] == 2 then LevelSpell(_W)
 
elseif abilitySequence[abilityLevel] == 3 then LevelSpell(_E)
 
elseif abilitySequence[abilityLevel] == 4 then LevelSpell(_R) end
 
end
 
if SetupDrawInfo then GetInfo() end
 
end
 
-- LOAD --
 
function OnLoad()
 
player = GetMyHero()
 
PrintChat("SORAKA SLACK >> SORAKA SLACKER v8.3 loaded!")    
 
-- numerate spawn
 
for i=1, objManager.maxObjects, 1 do
 
local candidate = objManager:getObject(i)
 
if candidate ~= nil and candidate.type == "obj_SpawnPoint" then
 
if candidate.x < 3000 then
 
if player.team == TEAM_BLUE then allySpawn = candidate else enemySpawn = candidate end
 
else
 
if player.team == TEAM_BLUE then enemySpawn = candidate else allySpawn = candidate end
 
end
 
end
 
end
 
end
 
end

 

 

 

Wstawiam wam te skrypty i liczę, że wykorzystacie je i edytujecie je do swoich potrzeb.

Pozdrawiam i nie udzielam porad jak cokolwiek zmienić, jesteście zdani na siebie.

Odnośnik do komentarza

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
  • Ostatnio przeglądający forum [TuT] Soraka Slack   0 użytkowników
    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...