View difference between Paste ID: 6SBNg7bq and 2i7kEd2w
SHOW: | | - or go back to the newest paste.
1
--laiha riven beta 0.0.1
2
table = { noa = 0 }
3
require('Inspired')
4
require('twgank')
5
6
Config = scriptConfig("BoxBox", "BoxBox")
7
Config.addParam("Q", "Use Q", SCRIPT_PARAM_ONOFF, true)
8
Config.addParam("W", "Use W", SCRIPT_PARAM_ONOFF, true)
9
Config.addParam("E", "Use Smart E", SCRIPT_PARAM_ONOFF, true)
10
Config.addParam("R", "Use R only kill", SCRIPT_PARAM_ONOFF, true)
11
Config.addParam("Combo", "Combo", SCRIPT_PARAM_KEYDOWN, string.byte(" "))
12
 
13
        local lvl = GetLevel(myHero)
14
        local ad = GetBaseDamage(myHero)
15
        local bad = GetBonusDmg(myHero)
16
        local Qlvl = GetCastLevel(myHero,_Q)
17
        local Wlvl = GetCastLevel(myHero,_W)
18
        local Rlvl = GetCastLevel(myHero,_R)
19
20
       
21-
        [1] = {dmg = function () return 5+math.max(5*math.floor((lvl+2)/3)+10,10*math.floor((lvl+2/3)-15)*ad/100) end, }, -- only 1 buff not 3
21+
22
        {
23
        [-1] = {dmg = function () return 5+math.max(5*math.floor((lvl+2)/3)+10,10*math.floor((lvl+2/3)-15)*ad/100) end, }, -- only 1 buff not 3
24
        [_Q] = {dmg = function () return 20*Qlvl-10+(.05*Qlvl+.35)*ad end }, --only 1 strike end,
25
        [_W] = {dmg = function () return 30*Wlvl+20+bad end, },
26
        [_R] = {dmg = function () return math.min((40*Rlvl+40+.6*bad)*(1+(100-25)/100*8/3),120*Rlvl+120+1.8*bad) end, },
27
        }
28
       
29
OnLoop(function(myHero)
30
                myHero = GetMyHero()
31
                unit = GetCurrentTarget()
32
		table.noa=unit
33
                myHeroPos = GetOrigin(myHero)
34
                mousePos=GetMousePos()
35
                unitpos=GetOrigin(unit)
36
                if ((GetCurrentHP(myHero)/(GetMaxHP(myHero)/100))) < 26 then
37
                        CastSkillShot(_E,mousePos.x,mousePos.y,mousePos.z)
38
                end
39-
                                if GotBuff(myHero, "rivenpassiveaaboost") > 0 and ValidTarget(unit, 125) then
39+
40-
                                        MoveToXYZ(GetOrigin(unit).x, GetOrigin(unit).y, GetOrigin(unit).z)
40+
41-
                                        DelayAction(function() AttackObject(unit) end, 180)
41+
42
                               -- if GotBuff(myHero, "rivenpassiveaaboost") > 0 and ValidTarget(unit, 125) then
43
                                      --MoveToXYZ(GetOrigin(unit).x, GetOrigin(unit).y, GetOrigin(unit).z)
44
                                      --  DelayAction(function() AttackObject(unit) end, 180)
45
                               -- end
46
 
47-
                                                CastSkillShot(_Q,unitpos.x,unitpos.y,unitpos.z)
47+
48
                                if  ValidTarget(unit, 260) then
49
                                        if Config.Q then
50
                                                AttackUnit(unit)
51
                                        end
52
                                        if CanUseSpell(myHero,_W) == READY and GetDistance(unit)<125 then
53
                                                CastTargetSpell(myHero,_W)
54
                       
55
                                        elseif CanUseSpell(myHero,_W) == READY and CanUseSpell(myHero,_E) == READY and GetDistance(unit) < 300 then
56
                                                CastSkillShot(_E,unitpos.x,unitpos.y,unitpos.z)
57
                                                CastTargetSpell(myHero,_W)
58
                                        end
59-
                        hpx = GetCurrentHP(enemy)
59+
60-
                        hpmax= GetMaxHP(enemy)
60+
61-
                        if (hpmax/hpx)<25 and CanUseSpell(myHero, _Q) ==  ACTIVE then
61+
62-
                                rpred=GetPredictionForPlayer(GetOrigin(myHeri), unit, GetMoveSpeed(unit), 1600, 0.5, 1100, 200, false, true)
62+
                        local hp = GetCurrentHP(enemy)
63-
                        CastSkillShot(_R,rpred.PredPos.x,rped.PredPos.y,rpred.PredPos.z)
63+
                        local mhp = GetMaxHP(enemy)
64
                        if (mhp/hp)<25 and CanUseSpell(myHero, _Q) ==  ACTIVE then
65
                                rpred=GetPredictionForPlayer(GetOrigin(myHero), unit, GetMoveSpeed(unit), 1600, 0.5, 1100, 200, false, true)
66
				if CanUseSpell(myHero,_R) == UNKOWN then
67
                        		CastSkillShot(_R,rpred.PredPos.x,rpred.PredPos.y,rpred.PredPos.z)
68
				end	
69
                               
70
 
71
                        end
72
                end
73-
                        ComboDmg = spellData[_P].dmg() + spellData[_Q].dmg() + spellData[_W].dmg() + spellData[_R].dmg()
73+
74
 
75
function DamageCalc()
76
        for _,enemy in pairs(GetEnemyHeroes()) do
77
                if ValidTarget(enemy,1000) then
78
                        ComboDmg = spellData[-1].dmg() + spellData[_Q].dmg() + spellData[_W].dmg() + spellData[_R].dmg()
79
                        if ComboDmg>GerCurrentHP(unit) then
80-
end
80+
81
                        DrawText( " KILL THAT BITCH ",20,drawPos.x,drawPos.y,0xffffffff)
82
                        end
83
                end
84
        end
85
end
86
87
OnProcessSpell(function(unit, spell)
88
if unit and unit == myHero and spell and spell.name and spell.name:lower():find("attack") then
89
spell.target=table.noa
90
local targetPos = GetOrigin(spell.target)
91
DelayAction(function() CastSkillShot(_Q, targetPos.x, targetPos.y, targetPos.z) end, spell.windUpTime * 1000)
92
end
93
end)