Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'Utils'
- require 'winapi'
- require 'SKeys'
- require 'vals_lib'
- local uiconfig = require 'uiconfig'
- local Q,W,E,R = 'Q','W','E','R'
- local version = '1.0'
- local Wtimer = GetTickCount()
- local Etimer = GetTickCount()
- local Rtimer = GetTickCount()
- local Itimer = GetTickCount()
- local Btimer = GetTickCount()
- cfg, menu = uiconfig.add_menu('IPJ Malzahar Config', 200)
- menu.keydown('Combo', 'Combo', Keys.Y)
- menu.keytoggle('Killsteal', 'Killsteal', Keys.A)
- menu.keytoggle('Harass', 'Harrass', Keys.X)
- menu.permashow('Combo')
- menu.permashow('Killsteal')
- menu.permashow('Harass')
- function Main()
- if IsLolActive() and myHero.name == 'Malzahar' then
- SetScriptTimer(10)
- GetCD()
- CheckItemCD()
- SetVariables()
- if cfg.Killsteal then
- Killsteal()
- end
- local target = GetWeakEnemy('MAGIC',700)
- if cfg.Combo then
- SpellTarget(E,QRDY,myHero,target,650)
- SpellPred(W,WRDY,myHero,target,650,1.5,99)
- SpellPred(Q,QRDY,myHero,target,650,2,99)
- end
- if cfg.Harass then
- SpellTarget(E,QRDY,myHero,target,650)
- end
- if myHero.dead==0 and target~=nil then CustomCircle(75,15,2,target) end
- if myHero.dead==0 then CustomCircle(645,3,3,myHero) end
- if myHero.dead==0 then CustomCircle(650,1,2,myHero) end
- if myHero.dead==0 then CustomCircle(655,3,4,myHero) end
- end
- end
- function Killsteal()
- for i = 1, objManager:GetMaxHeroes() do
- local enemy = objManager:GetHero(i)
- if enemy~=nil and enemy.team~=myHero.team and enemy.visible==1 and enemy.invulnerable==0 and enemy.dead==0 then
- local xQ = (25+(myHero.SpellLevelQ*55)+(myHero.ap*.8))*QRDY
- local xW = (enemy.maxHealth/100)*(myHero.SpellLevelW+3+GG)
- local xE = (20+(myHero.SpellLevelE*55)+(myHero.ap*.8))/4
- local xR = (100+(myHero.SpellLevelR*150)+(myHero.ap*1.3))*RRDY
- if GetMap() == 0 or GetMap() == 2 then
- xDFG = 0
- xBFT = (enemy.maxHealth*.2)/4
- else xDFG = (enemy.maxHealth*.15)*DFG
- xBFT = 0
- end
- local xI = 50+(myHero.selflevel*20)/5
- if WRDY==1 or GetTickCount()+1000<Wtimer then
- True_W = xW*3
- elseif GetTickCount()+1000>Wtimer and WRDY==0 then
- True_W = xW*2
- elseif GetTickCount()+2000>Wtimer and WRDY==0 then
- True_W = xW
- elseif GetTickCount()+3000>Wtimer and WRDY==0 then
- True_W = 0
- end
- if ERDY==1 or GetTickCount()+1000<Etimer then
- True_E = xE*4
- elseif GetTickCount()+1000>Etimer and ERDY==0 then
- True_E = xE*3
- elseif GetTickCount()+2000>Etimer and ERDY==0 then
- True_E = xE*2
- elseif GetTickCount()+3000>Etimer and ERDY==0 then
- True_E = xE
- elseif GetTickCount()+4000>Etimer and ERDY==0 then
- True_E = 0
- end
- if IGN==1 or GetTickCount()+1000<Itimer then
- True_I = xI*5
- elseif GetTickCount()+1000>Itimer and IGN==0 then
- True_I = xI*4
- elseif GetTickCount()+2000>Itimer and IGN==0 then
- True_I = xI*3
- elseif GetTickCount()+3000>Itimer and IGN==0 then
- True_I = xI*2
- elseif GetTickCount()+4000>Itimer and IGN==0 then
- True_I = xI
- elseif GetTickCount()+5000>Itimer and IGN==0 then
- True_I = 0
- end
- if BFT==1 or GetTickCount()+1000<Btimer then
- True_BFT = xBFT*4
- elseif GetTickCount()+1000>Btimer and BFT==0 then
- True_BFT = xBFT*3
- elseif GetTickCount()+2000>Btimer and BFT==0 then
- True_BFT = xBFT*2
- elseif GetTickCount()+3000>Btimer and BFT==0 then
- True_BFT = xBFT
- elseif GetTickCount()+4000>Btimer and BFT==0 then
- True_BFT = 0
- end
- local effh = (enemy.health)*(1+((((enemy.magicArmor-(20*TrueMG))*myHero.magicPenPercent)-myHero.magicPen)/100))
- DrawText('Damage = '..(xQ+True_W+True_E+xR+xDFG+True_BFT+True_I)+(((xQ+True_W+True_E+xR)*.2)*math.max(Debuff1(enemy),Debuff2())),70,170,Color.White)
- DrawText('Health = '..effh,70,180,Color.White)
- if effh<((xQ+True_W+True_E+xR+xDFG+True_BFT+True_I)+(((xQ+True_W+True_E+xR)*.2)*math.max(Debuff1(enemy),Debuff2())))*.975 and RRDY==1 and effh>xR*.75 then
- DrawTextObject('KILL HIM',enemy,Color.Yellow)
- if GetDistance(enemy)<600 then
- if ERDY==1 then CastSpellTarget('E',target) end
- Bspell(enemy)
- if WRDY==1 then CastSpellXYZ('W',enemy.x,enemy.y,enemy.z) end
- if IGN==1 then CastSummonerIgnite(enemy) end
- if QRDY==1 then CastSpellXYZ('Q',enemy.x,enemy.y,enemy.z) end
- if RRDY==1 then CastSpellTarget('R',target) end
- end
- end
- end
- end
- end
- function Debuff1(target)
- if (IsBuffedR(target,'TT_BlackfireTorch',150) or IsBuffedR(target,'obj_DeathfireGrasp_debuff',150)) or IsBuffedR(target,'ItemBlackfireTorch_mis',700) or IsBuffedR(target,'deathFireGrasp_mis',700) then
- return 1
- else
- return 0
- end
- end
- function Debuff2()
- if (BFT+DFG)==1 then
- return 1
- else
- return 0
- end
- end
- function Bspell(target)
- if target~=nil then
- UseItemOnTarget(3188, target)
- UseItemOnTarget(3128, target)
- end
- end
- function OnCreateObj()
- if obj~=nil and target~=nil and GetDistance(target,obj)<125 then
- if obj.charName == 'AlzaharNullZoneFlash.troy' then Wtimer = GetTickCount() end -- 2,5 sec
- if obj.charName == 'AlzaharMaleficVisions_tar.troy' then Etimer = GetTickCount() end -- 4 sec
- if obj.charName == 'AlZaharNetherGrasp_tar.troy' then Rtimer = GetTickCount() end -- 2,5 sec
- if obj.charName == 'Global_SS_Ignite.troy' then Itimer = GetTickCount() end -- 5 sec
- if obj.charName == 'TT_BlackfireTorch.troy' and BFT==0 then Btimer = GetTickCount() -- 4 sec
- end
- end
- end
- function SetVariables()
- target = GetWeakEnemy('MAGIC',10000)
- if GetInventorySlot(3001)~=nil then TrueMG = 1 else TrueMG = 0 end
- if myHero.ap<100 then GG = 0
- elseif myHero.ap>=100 and myHero.ap<199 then GG = 1
- elseif myHero.ap>=200 and myHero.ap<299 then GG = 2
- elseif myHero.ap>=300 and myHero.ap<399 then GG = 3
- elseif myHero.ap>=400 and myHero.ap<499 then GG = 4
- elseif myHero.ap>=500 and myHero.ap<599 then GG = 5
- elseif myHero.ap>=600 and myHero.ap<699 then GG = 6
- elseif myHero.ap>=700 and myHero.ap<799 then GG = 7
- elseif myHero.ap>=800 and myHero.ap<899 then GG = 8
- elseif myHero.ap>=900 and myHero.ap<999 then GG = 9
- elseif myHero.ap>=1000 then GG = 10 end
- end
- function IsBuffedR(target,name,range)
- for i = 1, objManager:GetMaxObjects(), 1 do
- obj = objManager:GetObject(i)
- if obj~=nil and target~=nil and string.find(obj.charName,name) and ((range~= nil and GetDistance(obj, target) < range) or GetDistance(obj, target) < 150) then
- return true
- end
- end
- end
- SetTimerCallback('Main')
Advertisement
Add Comment
Please, Sign In to add comment