View difference between Paste ID: jXGYkX1A and SzHqKWBL
SHOW: | | - or go back to the newest paste.
1
require('Inspired')
2
require('IMenu')
3-
require('MinionManager')
3+
--require('MinionManager')
4
require('IWalk')
5
AddButton("Activator", "Use Activator", true)
6
function AfterObjectLoopEvent(myHero)
7
        DrawMenu()
8
	 i = {3157}
9
        local potionslot = GetItemSlot(myHero,3157)
10
        local potionslot2 = GetItemSlot(myHero,3153)
11
        local potionslot3 = GetItemSlot(myHero,3144)
12
        if((GetCurrentHP(myHero)/(GetMaxHP(myHero)/100))) < 26 and GetButtonValue("Activator")then
13
                if CanUseSpell(myHero,_W)== READY then
14
                        local mPos = GetMyHeroPos()
15
                        CastSkillShot(_W,mPos.x,mPos.y,mPos.z)
16-
				if GetItemSlot(myHero,3157) > 0 then
16+
17-
                        CastTargetSpell(myHero,3157)
17+
			slot = GetItemSlot(GetMyHero(),k)
18
    			if slot and CanUseSpell(GetMyHero(), slot) == READY then
19
      			CastTargetSpell(GetMyHero(), slot)
20
						end
21
                end
22
        end
23
        if KeyIsDown(0x20) then
24-
               -- if GetButtonValue("Activator") then
24+
25
        if ValidTarget(unit, 1000) then
26
               if GetButtonValue("Activator") then
27
			CastItems(unit)
28
                       -- if potionslot2 > 0 then
29
                        --        CastTargetSpell(myHero,3153)
30
                     --   end
31-
            --    end
31+
32
                     --           CastTargetSpell(myHero,3144)
33
                   --     end
34
               end
35
                if CanUseSpell(myHero, _R) == READY and IsInDistance(unit, 700) then
36
                        CastTargetSpell(unit, _R)
37
                elseif CanUseSpell(myHero, _Q) == READY and IsInDistance(unit, 600)  then
38
                        CastTargetSpell(unit,_Q)
39
                elseif  CanUseSpell(myHero, _E) == READY and IsInDistance(unit, 350) then
40-
	EnemyMinions = GetMinions(2, 700, myHero)
40+
41-
	if KeyIsDown(0x47) then
41+
42-
		if CanUseSpell(myHero, _R) == READY and IsInDistance(EnemyMinions, 700) and GetDistance()>400 then
42+
		while(castitems(unit))
43-
                        CastTargetSpell(EnemyMinions, _R)
43+
			CastItems(unit)
44
		end
45-
	end
45+
		
46
        end
47
	--EnemyMinions = GetMinions(2, 700, myHero)
48
	--if KeyIsDown(0x47) then
49
		--if CanUseSpell(myHero, _R) == READY and IsInDistance(EnemyMinions, 700) and GetDistance()>400 then
50
                        --CastTargetSpell(EnemyMinions, _R)
51
		--end
52
	--end
53
54
        IWalk()
55
		end
56
end
57
58
--function GetDistance(p1,p2)
59
   -- p1 = GetOrigin(p1) or p1
60
   -- p2 = GetOrigin(p2) or p2
61
    --return math.sqrt(GetDistanceSqr(p1,p2))
62
--end