View difference between Paste ID: LfRb5QaL and pmeVH4Hd
SHOW: | | - or go back to the newest paste.
1
--[[
2
 
3-
        Auto Carry Plugin - Ashe Edition  --- DeniCevap
3+
        Auto Carry Plugin - Ashe 
4
 
5
        Activates Q when attacking enemy hero and disables when attacking minions.
6
        Activates Muramana when attacking enemy hero.
7-
        Press R to let the plugin auto aim the ultimate for you -- only works when the range is over 500 and under 2000. (Inspired from AesEzreal)
7+
8
--]]
9
 
10
11-
if myHero.charName ~= "Ashe" then return end
11+
12
local frostOn = false
13
AutoCarry.PluginMenu:addParam("AutoQ", "Activate Q Against Enemy", SCRIPT_PARAM_ONOFF, true)
14-
-- Skillshot table/constants "taken" from Ezreal plugin.
14+
15
AutoCarry.PluginMenu:addParam("ManaCheck", "Do not activate Q if under value", SCRIPT_PARAM_SLICE, 30, 0, 100, 0)     
16-
-- Constants
16+
17-
local RRange = 2000
17+
18-
local RSpeed = 1.6
18+
19-
local RDelay = 1000
19+
20-
local RWidth = 130
20+
21
if myHero.mana - GetMana() > (myHero.maxMana / 100) * AutoCarry.PluginMenu.MinMana then
22-
-- Prediction
22+
23-
local SkillR = {spellKey = _R, range = RRange, speed = RSpeed, delay = RDelay, width = RWidth}
23+
24
                if ValidTarget(enemy) and enemy.type == "obj_AI_Hero" and not frostOn and (myHero.mana - GetMana() > (myHero.maxMana / 100) * AutoCarry.PluginMenu.ManaCheck) then
25
                        CastSpell(_Q)
26
                elseif ValidTarget(enemy) and enemy.type ~= "obj_AI_Hero" and frostOn then
27
                        CastSpell(_Q)
28
                end
29-
AutoCarry.PluginMenu:addParam("ultimate", "Activate auto aim with R", SCRIPT_PARAM_ONOFF, true)
29+
30-
AutoCarry.PluginMenu:addParam("useUlt", "Snipe the target with your ultimate", SCRIPT_PARAM_ONKEYDOWN, false, 82) -- R
30+
31-
AutoCarry.PluginMenu:addParam("draw", "Draw text when target is killable by ultimate", SCRIPT_PARAM_ONOFF, true)
31+
32-
AutoCarry.PluginMenu:addParam("ManaCheck", "Do not activate Q if low on mana", SCRIPT_PARAM_ONOFF, true)
32+
                if ValidTarget(enemy) and enemy.type == "obj_AI_Hero" and ((AutoCarry.PluginMenu.ManaCheck and myHero.mana > 100) or not AutoCarry.PluginMenu.ManaCheck) and not MuramanaIsActive() then
33
                        MuramanaOn()
34
                elseif ValidTarget(enemy) and enemy.type ~= "obj_AI_Hero" and MuramanaIsActive() then
35-
function PluginOnTick()
35+
                        MuramanaOff()
36-
	Target = AutoCarry.GetTarget()
36+
37
        end
38-
	if AutoCarry.PluginMenu.ultimate and AutoCarry.PluginMenu.useUlt and Target ~= nil and Target.type == "obj_AI_Hero" and GetDistance(Target) < RRange and GetDistance(Target) > 500 then
38+
39-
		if myHero:CanUseSpell(_R) == READY and GetDistance(Target) <= RRange then
39+
40-
			if not AutoCarry.GetCollision(SkillR, myHero, Target) then
40+
41-
				AutoCarry.CastSkillshot(SkillR, Target)
41+
42-
			end
42+
43-
		end
43+
44-
	end
44+
45
        if GetDistance(obj) < 100 and obj.name:lower():find("icesparkle") then
46
                frostOn = true
47
        end
48
end
49
 
50
function PluginOnDeleteObj(obj)
51-
                if ValidTarget(enemy) and enemy.type == "obj_AI_Hero" and not frostOn and ((AutoCarry.PluginMenu.ManaCheck and myHero.mana > 100) or not AutoCarry.PluginMenu.ManaCheck) then
51+
52
                frostOn = false
53
        end
54
end