Advertisement
jrubimf

Untitled

Dec 18th, 2019
377
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 14.48 KB | None | 0 0
  1. local function PvP()
  2.     local PVP, TotemKill, PreCombat, Survival, Cooldowns, Combat, InCombat, OutofCombat
  3.  
  4.     PVP = function()
  5.         --{"!Every Man for Himself", "UI(medal) & state(stun)", "player"},
  6.         --{"!Gladiator's Medallion", "UI(medal) & target.player & target.canAttack & {player.state(stun) & player.spell(Every Man for Himself)cooldown > 0 & player.race = Human || player.state(stun) & !player.race = Human || player.state(fear) || player.state(disorient) || player.state(charm)}", "player"},
  7.         --{"Spellsteal", "distance < 40 & UI(st_buff) & bts & {player.mana >= 25 || player.buff(Innervate)}", eTargets},
  8.     end
  9.  
  10.     TotemKill = function()
  11.         if Target:IsTotem() then
  12.             --{"!Pyroblast", "distance < 40 & spell(Pyroblast).casttime==0 & infront(player)", "totems"},
  13.             if S.Pyroblast:CanCast(Target, true) and Player:Buff(S.HotStreakBuff) then
  14.                 return S.Pyroblast:Cast(Target, true)
  15.             end
  16.  
  17.             --{"*Fire Blast", "distance 40 & infront(player)", "totems"},
  18.             if S.FireBlast:CanCast(Target) then
  19.                 return S.FireBlast:Cast(Target)
  20.             end
  21.  
  22.             --{"!Phoenix's Flames", "distance < 40 & player.spell(Phoenix's Flames).charges >= 1 & infront(player)", "totems"},
  23.             if S.PhoenixFlames:CanCast(Target, true) then
  24.                 return S.PhoenixFlames:Cast(Target, true)
  25.             end
  26.             --{"!Scorch", "distance < 40 & infront(player)", "totems"},
  27.             if S.Scorch:CanCast(Target, true) then
  28.                 return S.Scorch:Cast(Target, true)
  29.             end
  30.         end
  31.  
  32.     end
  33.  
  34.     PreCombat = function()
  35.         --{"Blazing Barrier", "buff(Blazing Barrier).duration <= 5 & player.moving", "player"},
  36.         if Player:IsMoving() and Player:BuffRemains(S.BlazingBarrier) <= 5 and S.BlazingBarrier:CanCast(Player) then
  37.             return S.BlazingBarrier:Cast(Player)
  38.         end
  39.         --{"Arcane Intellect", "!buff.any & player & player.moving", "player"},
  40.         if Player:IsMoving() and Player:Buff(S.ArcaneIntellect, true) and S.ArcaneIntellect:CanCast(Player) then
  41.             return S.ArcaneIntellect:Cast(Player)
  42.         end
  43.  
  44.         --{"Flamestrike", "toggle(AoE) & distance < 40 & spell(Flamestrike).casttime==0 & all.enemies(10).area >= UI(flstrike_aoe_spin) & UI(flstrike_aoe_spin)", "target.ground"},
  45.         if S.Flamestrike:CanCast(Target) and Automata.AoEON() and Player:Buff(S.HotStreakBuff) and Target:EnemiesAround(10) >= Automata.GetClassDB(63, "FlamestrikePvP").Value then
  46.             return S.Flamestrike:Cast(Target), 'PreCombat Flame'
  47.         end
  48.         --{"!Flamestrike", "toggle(AoE) & distance < 40 & spell(Flamestrike).casttime==0 & all.enemies(10).area >= UI(flstrike_aoe_spin) & UI(flstrike_aoe_spin) & player.buff(Hot Streak!).duration <= 1", "target.ground"},
  49.         if S.Flamestrike:CanCast(Target, true) and Automata.AoEON() and Player:Buff(S.HotStreakBuff) and Player:BuffRemains(S.HotStreakBuff) <= 1 and Target:EnemiesAround(10) >= Automata.GetClassDB(63, "FlamestrikePvP").Value then
  50.             return S.Flamestrike:Cast(Target, true), 'Pre Combat Insta'
  51.         end
  52.     end
  53.  
  54.     Survival = function()
  55.         --TODO
  56.         --{"!Ice Block", "area(40).enemies >= 1 & incdmg.phys(5) >= health.max*0.02 & {player.health <= UI(ice_health_spin) & UI(ice_health_check) || player.debuff(Cauterize) & UI(cool_down) || player.state(stun) & player.spell(Every Man for Himself).cooldown > 0 & player.spell(Gladiator's Medallion).cooldown > 0 & !player.lastcast(Gladiator's Medallion) & UI(ice_stun)}", "player"},if S.IceBlock:CanCast(Player) and Player:EnemiesAround(40) >= 1 and
  57.         --{"!Temporal Shield", "player.health <= UI(temp_shield_spin) & UI(temp_shield_check) & area(40).enemies >= 1 & player.incdmg(3) >= player.health.max*0.04", "player"},
  58.  
  59.         --{"!Dragon's Breath", "toggle(cr) & canAttack & !enemy_totem & distance <= 8 & infront(player) & !debuff & !debuff(Frost Nova) & !pvp.area & timeout(dr, 1)", "enemies"},
  60.         if S.DragonsBreath:CanCast(Target, true) and not Target:CantMove() then
  61.             return S.DragonsBreath:Cast(Target, true)
  62.         end
  63.         --{"!Dragon's Breath", "toggle(cr) & canAttack & !enemy_totem & distance <= 8 & infront(player) & !debuff & !debuff(Frost Nova) & player & pvp.area & timeout(dr, 1)", "enemies"},
  64.  
  65.  
  66.         --{"!Frost Nova", "toggle(cr) & canAttack & !enemy_totem & distance <= 8 & !debuff & !debuff(Dragon's Breath) & !pvp.area & timeout(fn, 1)", "enemies"},
  67.         if S.FrostNova:CanCast(Target, true) and not Target:CantMove() then
  68.             return S.FrostNova:Cast(Target, true)
  69.         end
  70.  
  71.         --{"!Frost Nova", "toggle(cr) & canAttack & !enemy_totem & distance <= 8 & !debuff & !debuff(Dragon's Breath) & player & pvp.area & timeout(fn, 1)", "enemies"},
  72.  
  73.  
  74.         --{"Blazing Barrier", "!buff(Ice Block) & buff.duration < 3 & {player.incdmg(7) >= player.health.max*0.1 & !player.buff(Rune of Power) & !player.buff(Combustion) || target.player & target.canAttack}", "player"},
  75.         --{"#5512", "item(5512).count >= 1 & health <= UI(hs_spin) & UI(hs_check) & area(40).enemies >= 1", "player"}, --Health Stone
  76.  
  77.     end
  78.  
  79.     Cooldowns = function()
  80.         --{"Time Warp", "target.range < 40 & toggle(tw)", "player"},
  81.         --{"Rune of Power", "target.range < 40 & !player.moving & !buff(Combustion) & UI(rop)", "player"},
  82.         if not Player:IsMoving() and S.RuneofPower:CanCast(Player) and Player:DistanceTo(Target) <= 40 then
  83.             return S.RuneofPower:Cast(Player)
  84.         end
  85.  
  86.         --{"Blood Fury", 'target.range < 40'},
  87.         if S.BloodFury:CanCast(Target) then
  88.             return S.BloodFury:Cast(Target)
  89.         end
  90.  
  91.         --{"*Combustion", "target.range < 40 & UI(fire_man) & {target.health <= 90 || !talent(1,1)} & {talent(3,3) & {!UI(rop) || player.buff(Rune of Power) || player.spell(Rune of Power).charges < 1} || !talent(3,3)}", "player"},
  92.         --{"Memory of Lucid Dreams", "target.range < 40 & UI(fire_man)", "player"},
  93.         --{"Meteor", "target.range < 40 & target.canAttack & !target.moving & !target.player & {!player.spell(Rune of Power).cooldown <= 8 & talent(3,3) || !talent(3,3)}  & UI(mete)", "target.ground"},
  94.         if S.Meteor:CanCast(Target) and not Target:IsMoving() and ((S.RuneofPower:IsAvailable() and S.RuneofPower:CooldownRemains() <= 8) or not S.RuneofPower:IsAvailable()) then
  95.             return S.Meteor:Cast(Target)
  96.         end
  97.  
  98.         --{"#trinket1", "target.range < 40 & UI(trk1)"},
  99.         --{"#trinket2", "target.range < 40 & UI(trk2)"},
  100.     end
  101.  
  102.     Combat = function()
  103.         --{"!Pyroblast", "distance < 40 & canAttack & infront(player) & spell(Pyroblast).casttime==0 & !debuff(Polymorph) & !debuff(Dragon's Breath)", "target"},
  104.         if S.Pyroblast:CanCast(Target, true) and Player:Buff(S.HotStreakBuff) and not Target:CantMove() and not Target:Debuff(S.DragonsBreath) then
  105.             return S.Pyroblast:Cast(Target, true)
  106.         end
  107.  
  108.         --{"Meteor", "toggle(AoE) & distance < 40 & !player & !moving & rangebetween(target) <= 15 & area(10).enemies >= UI(mete_aoe_spin) & UI(mete_aoe_check)", "mostenemies.ground"},
  109.         --Check if got this right.
  110.         if S.Meteor:CanCast(Target) and Automata.AoEON() and Target:EnemiesAround(10) >= 2 then
  111.             return S.Meteor:Cast(Target)
  112.         end
  113.  
  114.         --{"Meteor", "distance < 40 & canAttack & player & {target.state(root) || target.state(stun) || target.state(disorient) || target.state(incapacitate)}", "target.ground"},
  115.         if S.Meteor:CanCast(Target) and Automata.AoEON() and Target:CantMove() and Target:CantMoveDuration() >= 2.5 then
  116.             return S.Meteor:Cast(Target)
  117.         end
  118.  
  119.         --{"Flamestrike", "toggle(AoE) & distance < 40 & spell(Flamestrike).casttime==0 & infront(player) & area(10).enemies >= UI(flstrike_aoe_spin) & UI(flstrike_aoe_spin)", "enemies"},
  120.         if S.Flamestrike:CanCast(Target) and Automata.AoEON() and Player:Buff(S.HotStreakBuff) and Target:EnemiesAround(10) >= Automata.GetClassDB(63, "FlamestrikePvP").Value then
  121.             return S.Flamestrike:Cast(Target), 'Combat Flame'
  122.         end
  123.  
  124.         --{"!Phoenix Flames", "distance < 40 & canAttack & infront(player) & !spell(Pyroblast).casttime==0 & !debuff(Polymorph) & !debuff(Dragon's Breath) & !player.casting(Polymorph) & !player.casting(Greater Pyroblast) &
  125.         --{player.buff(Heating Up) || player.spell(Phoenix Flames).charges >= 2 & {talent(1,1) & target.health <= 90 || !talent(1,1) || target.player} || player.spell(Fire Blast).charges >= 1 & {talent(1,1) & target.health <= 90 || !talent(1,1) || target.player}}", "target"},
  126.         if not Player:IsCasting(S.Polymorph) and not Player:IsCasting(S.GreaterPyroblast) and S.PhoenixFlames:CanCast(Target, true) and Player:Buff(S.HotStreakBuff) and (Player:Buff(S.HeatingUpBuff) or S.PhoenixFlames:Charges() >= 2 and (bool(S.Firestarter:ActiveStatus()) or Target:IsTargeting(Player)) or S.FireBlast:Charges() >= 1 and (bool(S.Firestarter:ActiveStatus()) or Target:IsTargeting(Player)))then
  127.             return S.PhoenixFlames:Cast(Target)
  128.         end
  129.  
  130.         --{"*Fire Blast", "distance < 40 & canAttack & infront(player) & !spell(Pyroblast).casttime==0 & !debuff(Polymorph) & !debuff(Dragon's Breath) & !player.casting(Polymorph) &
  131.         --!player.casting(Greater Pyroblast) & {player.buff(Heating Up) & {talent(1,1) & target.health <= 90 || !talent(1,1) || target.player}|| player.spell(Phoenix Flames).charges >= 1 } ", "target"},
  132.         if not Player:IsCasting(S.Polymorph) and not Player:IsCasting(S.GreaterPyroblast) and S.FireBlast:CanCast(Target) and Player:Buff(S.HotStreakBuff) and (Player:Buff(S.HeatingUpBuff) and (bool(S.Firestarter:ActiveStatus() or Target:IsTargeting(Player) or S.PhoenixFlames:Charges() <= 1))) then
  133.             return S.FireBlast:Cast(Target)
  134.         end
  135.  
  136.         --{"Living Bomb", "distance < 40 & canAttack & !toggle(AoE)", "target"},
  137.         if S.LivingBomb:CanCast(Target) and not Automata.AoEON() then
  138.             return S.LivingBomb:Cast(Target)
  139.         end
  140.  
  141.         --{"Living Bomb", "distance < 40 & canAttack & toggle(AoE)", "lowestenemy"},
  142.         if Automata.AoEON() and S.LivingBomb:CastCycleIf(function(target) return target:TimeToDie() end, function(target) return target:IsPlayer() end, 'Enemies' ) then
  143.             return true
  144.         end
  145.  
  146.         --{"Fireball", "{talent(1,3) & !target.health <= 20} & distance < 40 & canAttack & infront(player) & !player.moving & {player.buff(Combustion).duration < spell(Scorch).casttime}", "target"},
  147.         if S.Fireball:CanCast(Target) and (S.SearingTouch:IsAvailable() and Target:HealthPercentage() > 20 and Player:BuffRemains(S.CombustionBuff) < S.Scorch:CastTime()) then
  148.             return S.Fireball:Cast(Target)
  149.         end
  150.  
  151.         --{"Scorch", "distance < 40 & canAttack & infront(player)", "target"},
  152.         if S.Scorch:CanCast(Target) then
  153.             return S.Scorch:Cast(Target)
  154.         end
  155.  
  156.     end
  157.  
  158.     InCombat = function()
  159.         --{"%pause", "buff(Ice Block)", "player"},
  160.         if Player:Buff(S.IceBlock) then
  161.             return true
  162.         end
  163.  
  164.         --{"!/stopcasting", "player.buff(Invisibility)", "player"},
  165.         --{pvp, "!player.buff(Invisibility)"},
  166.         if not Player:Buff(S.Invisibility) then
  167.             local ShouldReturn = PVP(); if ShouldReturn then return ShouldReturn; end
  168.         end
  169.         --{Keybinds},
  170.         --{Interrupts, "toggle(interrupts) & !target.casting(Vengeful Wail) & !target.casting(Runic Empowerment) & !player.buff(Invisibility) & !target.immune_spell & !target.immune_all"},
  171.         --{Survival, "player.health <= 100 & !player.buff(Invisibility)"},
  172.         if true then
  173.             local ShouldReturn = PVP(); if ShouldReturn then return ShouldReturn; end
  174.         end
  175.         --{"Greater Pyroblast", "distance < 40 & canAttack & infront(player) & debuff(Polymorph) & timeout(pyromorph, 6)", "target"},
  176.         --{"%pause", "target.immune_all || target.immune_spell || target.debuff(Polymorph)", "player"},
  177.         --{Cooldowns, "toggle(cooldowns) & target.canAttack & !player.casting(Rune of Power) & !player.buff(Invisibility) & !target.debuff(Polymorph)"},
  178.         if Target:Exists() and Player:CanAttack(Target) and not Player:IsCasting(S.RuneofPower) then
  179.             local ShouldReturn = Cooldowns(); if ShouldReturn then return ShouldReturn; end
  180.         end
  181.  
  182.         --{TotemKill},
  183.         if true then
  184.             local ShouldReturn = TotemKill(); if ShouldReturn then return ShouldReturn; end
  185.         end
  186.  
  187.         --{Combat, "!player.buff(Invisibility) & !target.debuff(Polymorph) & !player.casting(Rune of Power)"},
  188.         if not Player:IsCasting(S.RuneofPower) then
  189.             local ShouldReturn = Combat(); if ShouldReturn then return ShouldReturn; end
  190.         end
  191.         return true
  192.     end
  193.  
  194.     OutofCombat = function()
  195.         --{"%pause", "buff(Ice Block)", "player"},
  196.         if Player:Buff(S.IceBlock) then
  197.             return true
  198.         end
  199.  
  200.         --{"!/stopcasting", "player.buff(Invisibility)", "player"},
  201.         --{Keybinds},
  202.         --{pvp, "!player.buff(Invisibility)"},
  203.         if true then
  204.             local ShouldReturn = PVP(); if ShouldReturn then return ShouldReturn; end
  205.         end
  206.         --{TotemKill},
  207.         if true then
  208.             local ShouldReturn = TotemKill(); if ShouldReturn then return ShouldReturn; end
  209.         end
  210.  
  211.         --{"Greater Pyroblast", "distance < 40 & canAttack & infront(player) & spell.casttime > 0 & debuff(Polymorph) & timeout(pyromorph, 6)", "target"},
  212.         if S.GreaterPyroblast:CanCast(Target) and Target:LossControl() and Target:LossControlDuration() >= S.GreaterPyroblast:CastTime() - 0.5 then
  213.             return S.GreaterPyroblast(Target)
  214.         end
  215.  
  216.         --{"%pause", "target.immune_all || target.immune_spell || target.debuff(Polymorph)", "player"},
  217.         --{Combat, "UI(burst_key) & target.player & target.canAttack & !player.casting(Rune of Power) & !target.immune_all & !target.immune_spell & !player.buff(Invisibility) & !target.debuff(Polymorph)"},
  218.         --if Automata:CDsON() then
  219.           --  if true then
  220.             --    local ShouldReturn = Combat(); if ShouldReturn then return ShouldReturn; end
  221.             --end
  222.         --end
  223.  
  224.         --{PreCombat, "!player.buff(Invisibility)"},
  225.         if not Player:Buff(S.Invisibility) then
  226.             local ShouldReturn = PreCombat(); if ShouldReturn then return ShouldReturn; end
  227.         end
  228.         return true
  229.     end
  230.  
  231.     if not Player:AffectingCombatAPI() then
  232.         return OutofCombat()
  233.     end
  234.     return InCombat()
  235. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement