Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local EnemyMinions = minionManager(MINION_ENEMY, 2000, myHero, MINION_SORT_HEALTH_ASC)
- function OnProcessSpell(object,spell)
- local spellName,spellLevel,P1,P2 = spell.name,spell.level,spell.startPos,spell.endPos
- if object~=nil and not myHero.dead and object==myHero then
- EnemyMinions:update()
- for i,e in pairs(EnemyMinions.objects) do
- local allytarget = e
- local shieldflag = shieldCheck(object,spellName,allytarget,spellLevel,P1,P2)
- end
- end
- end
- function shieldCheck(object,spellName,target,spellLevel,P1,P2)
- local shottype,radius,maxdistance = 0,0,0
- local hitchampion = false
- if object.type ~= "obj_AI_Hero" then
- local spelltype, casttype = getSpellType(object, spellName)
- -- PrintChat(spelltype)
- if spelltype == "Q" or spelltype == "W" or spelltype == "E" or spelltype == "R" or spelltype == "P" or spelltype == "QM" or spelltype == "WM" or spelltype == "EM" then
- shottype = skillData[object.charName][spelltype]["type"]
- radius = skillData[object.charName][spelltype]["radius"]
- maxdistance = skillData[object.charName][spelltype]["maxdistance"]
- end
- local allyHitBox = target.boundingRadius
- if shottype == 0 then hitchampion = true
- elseif shottype == 1 then hitchampion = checkhitlinepass(object, P2, radius, maxdistance, target, allyHitBox)
- elseif shottype == 2 then hitchampion = checkhitlinepoint(object, P2, radius, maxdistance, target, allyHitBox)
- elseif shottype == 3 then hitchampion = checkhitaoe(object, P2, radius, maxdistance, target, allyHitBox)
- elseif shottype == 4 then hitchampion = checkhitcone(object, P2, radius, maxdistance, target, allyHitBox)
- elseif shottype == 5 then hitchampion = checkhitwall(object, P2, radius, maxdistance, target, allyHitBox)
- elseif shottype == 6 then hitchampion = checkhitlinepass(object, P2, radius, maxdistance, target, allyHitBox) or checkhitlinepass(object, Vector(object)*2-spell.endPos, radius, maxdistance, target, allyHitBox)
- elseif shottype == 7 then hitchampion = checkhitcone(P2, object, radius, maxdistance, target, allyHitBox)
- end
- if hitchampion==true then
- PrintChat(tostring(target.name))
- end
- end
- return spelltype
- end
- --Minion_T100L1S21N0132--
- local maxminion=0
- local minions={}
- local maxm=0
- local bl=true
- local firstdelete=0
- function OnCreateObj(object)
- if object ~= nil and object.valid and string.find(object.name,"Minion_T") then
- if tonumber(string.sub(tostring(object.name), 19, 21))>tonumber(maxm) then
- maxm=string.sub(tostring(object.name), 19, 21)
- maxminion=maxm+1
- end
- end
- end
- function OnDeleteObj(object)
- if object ~= nil and object.valid and string.find(object.name,"Minion_T") then
- -- if bl==true then
- -- firstdelete=string.sub(tostring(object.name), 19, 21)-1
- -- bl=false
- -- end
- if minions[object.team]==nil then
- minions[object.team]={}
- end
- if minions[object.team][string.sub(tostring(object.name), 12, 13)]==nil then
- minions[object.team][string.sub(tostring(object.name), 12, 13)]=0
- end
- minions[object.team][string.sub(tostring(object.name), 12, 13)]=minions[object.team][string.sub(tostring(object.name), 12, 13)]+1
- -- PrintChat(tostring(maxminion))
- end
- end
- local color,x,y,lane
- function OnDraw()
- if minions ~= nil then
- for i,k in pairs(minions) do
- for j,kl in pairs(minions[i]) do
- if i==TEAM_BLUE then
- color=0xff0000ff
- x=10
- elseif i==TEAM_RED then
- color=0xffff0000
- x=100
- end
- if j=="L0" then
- y=90
- lane="Bot"
- elseif j=="L1" then
- y=105
- lane="Mid"
- elseif j=="L2" then
- y=120
- lane="Top"
- end
- DrawText(lane.." Lane:"..(maxminion-kl),16,x,y,color)
- end
- end
- end
- DrawText("Maximum Minion:"..maxminion,16,10,75,0xff00ff00)
- end
- function OnLoad()
- -- maxming=0
- -- maxmingr={}
- -- for i = 1, objManager.iCount, 1 do
- -- local obj = objManager:getObject(i)
- -- if obj ~= nil and string.find(obj.name,"Minion") then
- -- PrintChat(obj.name)
- -- if tonumber(string.sub(tostring(obj.name), 19, 21))>tonumber(maxm) then
- -- maxm=string.sub(tostring(obj.name), 19, 21)
- -- maxminion=maxm
- -- end
- -- end
- -- end
- -- for i = 1, objManager.iCount, 1 do
- -- local obj = objManager:getObject(i)
- -- if obj ~= nil and string.find(obj.name,"Minion_T") then
- -- if tonumber(string.sub(tostring(obj.name), 15, 16))>maxming then
- -- maxming=tonumber(string.sub(tostring(obj.name), 15, 16))
- -- end
- -- if minions[obj.team]==nil then
- -- minions[obj.team]={}
- -- end
- -- if minions[obj.team][string.sub(tostring(obj.name), 12, 13)]==nil then
- -- minions[obj.team][string.sub(tostring(obj.name), 12, 13)]=0
- -- end
- -- if obj.team==TEAM_RED then
- -- if maxmingr[string.sub(tostring(obj.name), 12, 13)]==nil then
- -- maxmingr[string.sub(tostring(obj.name), 12, 13)]=0
- -- end
- -- if tonumber(string.sub(tostring(obj.name), 15, 16))>maxmingr[string.sub(tostring(obj.name), 12, 13)] then
- -- maxmingr[string.sub(tostring(obj.name), 12, 13)]=tonumber(string.sub(tostring(obj.name), 15, 16))
- -- end
- -- end
- -- minions[obj.team][string.sub(tostring(obj.name), 12, 13)]=-minions[obj.team][string.sub(tostring(obj.name), 12, 13)]-1
- -- end
- -- end
- -- for i,k in pairs(minions) do
- -- for j,kl in pairs(minions[i]) do
- -- PrintChat(i..j.."-"..kl)
- -- if i==TEAM_RED then
- -- for k,lane in pairs(minions) do
- -- if j==k then
- -- kl=kl-6*(maxming-lane)
- -- end
- -- end
- -- end
- -- end
- -- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement