Advertisement
Guest User

Untitled

a guest
Jul 17th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 12.36 KB | None | 0 0
  1. function Krieger_Kundi(Cape)
  2.     if checkForItem(Cape) and EquipCD(5)<.5 then UseEquipmentItem(5)
  3.     elseif checkForItem(Cape) and EquipCD(5)>1 then UseItemByName(Cape)
  4.     end
  5.  
  6.     local mcn, scn = UnitClass("player");
  7.     local _, Blutungen = SDtID(500081)
  8.     local boss = UnitSex("target") > 2;
  9.    
  10.     AutoTarget()
  11.  
  12.     if BTl("Passwächter")<10 then CastSpellByName("Passwächter")
  13.     elseif MgP(.35) and CcS("Zyklon")<.5 and SDt("Siegel der Stille") then CastSpellByName("Zyklon")
  14.     elseif MgP(.15) and CcS("Taktischer Angriff")<.5 and Blutungen>= 3 then CastSpellByName("Taktischer Angriff")
  15.     elseif MgP(.30) and HkT(.30) and CcS("Die letzte Schlacht")<.5 then CastSpellByName("Die letzte Schlacht")
  16.     elseif SgP(.30) and CcS("Salz in die Wunde")<.5 then CastSpellByName("Salz in die Wunde")
  17.     elseif MgP(.15) and CcS("Taktischer Angriff")<.5 and Blutungen>= 2 then CastSpellByName("Taktischer Angriff")
  18.     elseif MgP(.25) and CcS("Hieb")<.5 and not HiebBlutung and CcS("Taktischer Angriff")<.5 then CastSpellByName("Hieb")
  19.     elseif MgP(.10) and CcS("Offene Flanke")<.5 and SDt("Verwundbar") then CastSpellByName("Offene Flanke")
  20.     elseif MgP(.20) and CcS("Eröffnungsangriff")<.5 and not SDt("Verwundbar") then CastSpellByName("Eröffnungsangriff")
  21.     elseif MgP(.40) and CcS("Hieb")<.5 then CastSpellByName("Hieb")
  22.     elseif SgP(.25) and MkP(.20) and CcS("Schwertatem")<.5 then CastSpellByName("Schwertatem")
  23.     elseif SgP(.30) and MkP(.20) and not SBp("Blutpfeil") and CcS("Salz in die Wunde")<.5 then CastSpellByName("Salz in die Wunde")
  24.     elseif SgP(.30) and CcS("Schädelbrecher")<.5 then CastSpellByName("Schädelbrecher")
  25.     elseif MgP(.15) and CcS("Taktischer Angriff")<.5 and Blutungen>= 1 then CastSpellByName("Taktischer Angriff")  
  26.     elseif MgP(.25) and CcS("Hieb")<.5 then CastSpellByName("Hieb")
  27.     elseif SgP(.25) and CcS("Schwertatem")<.5 then CastSpellByName("Schwertatem")
  28.     elseif SgP(.20) and CcS("Vampirpfeil")<.5 then CastSpellByName("Vampirpfeil")
  29.     elseif SgP(.30) and CcS("Salz in die Wunde")<.5 then CastSpellByName("Salz in die Wunde")
  30.     elseif boss and MkP(.15) and checkForItem("Umhang der Kühnheit von Aoth") and checkForItemCooldown("Umhang der Kühnheit von Aoth")<.5 then UseItemByName("Umhang der Kühnheit von Aoth")
  31.     elseif CcS("Bogenschuss")<.5 then CastSpellByName("Bogenschuss")
  32.     elseif CcS("Wütend")<.5 then CastSpellByName("Wütend")
  33.     end
  34. end
  35.  
  36. function Krieger_Kundi (Cape)
  37.     if checkForItem(Cape) and EquipCD(5)<.5 then UseEquipmentItem(5)
  38.     elseif checkForItem(Cape) and EquipCD(5)>1 then UseItemByName(Cape)
  39.     end
  40.  
  41.     local mcn, scn = UnitClass("player");
  42.     local _, Blutungen = SDtID(500081)
  43.     local boss = UnitSex("target") > 2;
  44.    
  45.     AutoTarget()
  46.  
  47.     if BTl("Passwächter")<10 then CastSpellByName("Passwächter")
  48.     --elseif MgP(.35) and CcS("Zyklon")<.5 and SDt("Siegel der Stille") then CastSpellByName("Zyklon")
  49.     elseif MgP(.15) and CcS("Taktischer Angriff")<.5 and Blutungen>= 3 then CastSpellByName("Taktischer Angriff")
  50.     elseif MgP(.30) and HkT(.30) and CcS("Die letzte Schlacht")<.5 then CastSpellByName("Die letzte Schlacht")
  51.     elseif SgP(.30) and CcS("Salz in die Wunde")<.5 then CastSpellByName("Salz in die Wunde")
  52.     elseif MgP(.15) and CcS("Taktischer Angriff")<.5 and Blutungen>= 2 then CastSpellByName("Taktischer Angriff")
  53.     elseif MgP(.25) and CcS("Hieb")<.5 and not HiebBlutung and CcS("Taktischer Angriff")<.5 then CastSpellByName("Hieb")
  54.     elseif MgP(.10) and CcS("Offene Flanke")<.5 and SDt("Verwundbar") then CastSpellByName("Offene Flanke")
  55.     elseif MgP(.20) and CcS("Eröffnungsangriff")<.5 and not SDt("Verwundbar") then CastSpellByName("Eröffnungsangriff")
  56.     elseif MgP(.40) and CcS("Hieb")<.5 then CastSpellByName("Hieb")
  57.     elseif SgP(.25) and MkP(.20) and CcS("Schwertatem")<.5 then CastSpellByName("Schwertatem")
  58.     elseif SgP(.30) and MkP(.20) and not SBp("Blutpfeil") and CcS("Salz in die Wunde")<.5 then CastSpellByName("Salz in die Wunde")
  59.     elseif SgP(.30) and CcS("Schädelbrecher")<.5 then CastSpellByName("Schädelbrecher")
  60.     elseif MgP(.15) and CcS("Taktischer Angriff")<.5 and Blutungen>= 1 then CastSpellByName("Taktischer Angriff")  
  61.     elseif MgP(.25) and CcS("Hieb")<.5 then CastSpellByName("Hieb")
  62.     elseif SgP(.25) and CcS("Schwertatem")<.5 then CastSpellByName("Schwertatem")
  63.     elseif SgP(.20) and CcS("Vampirpfeil")<.5 then CastSpellByName("Vampirpfeil")
  64.     elseif SgP(.30) and CcS("Salz in die Wunde")<.5 then CastSpellByName("Salz in die Wunde")
  65.     elseif boss and MkP(.15) and checkForItem("Umhang der Kühnheit von Aoth") and checkForItemCooldown("Umhang der Kühnheit von Aoth")<.5 then UseItemByName("Umhang der Kühnheit von Aoth")
  66.     elseif CcS("Bogenschuss")<.5 then CastSpellByName("Bogenschuss")
  67.     elseif CcS("Wütend")<.5 then CastSpellByName("Wütend")
  68.     end
  69. end
  70.  
  71. function Krieger_Bewahrer(Cape)
  72.     if checkForItem(Cape) and EquipCD(5)<.5 then UseEquipmentItem(5)
  73.     elseif checkForItem(Cape) and EquipCD(5)>1 then UseItemByName(Cape)
  74.     end
  75.  
  76.     local mcn, scn = UnitClass("player");
  77.     local _, Blutungen = SDtID(500081)
  78.     local boss = UnitSex("target") > 2;
  79.    
  80.     AutoTarget()
  81.    
  82.     if BTl("Passwächter")<10 then CastSpellByName("Passwächter")
  83.     elseif BTl("Kampfeswille")<10 then CastSpellByName("Kampfeswille")
  84.     elseif BTl("Gestrüppschild")<10 then CastSpellByName("Gestrüppschild")
  85.     elseif MgP(.15) and CcS("Taktischer Angriff")<.5 and SDt("Siegel der Stille") then CastSpellByName("Taktischer Angriff")
  86.     --elseif MgP(.45) and CcS("Zyklon")<.5 and SDt("Siegel der Stille") then CastSpellByName("Zyklon")
  87.     elseif SgP(.06) and CcS("Geladener Hieb")<.5 then CastSpellByName("Geladener Hieb")
  88.     elseif SgP(.08) and CcS("Wilder Wirbelwind")<.5 then CastSpellByName("Wilder Wirbelwind")
  89.     elseif MgP(.15) and CcS("Taktischer Angriff")<.5 and Blutungen>= 3 then CastSpellByName("Taktischer Angriff")
  90.     elseif MgP(.15) and CcS("Taktischer Angriff")<.5 and Blutungen>= 2 then CastSpellByName("Taktischer Angriff")
  91.     elseif MgP(.25) and CcS("Hieb")<.5 and not HiebBlutung and CcS("Taktischer Angriff")<.5 then CastSpellByName("Hieb")
  92.     elseif MgP(.10) and CcS("Offene Flanke")<.5 and SDt("Verwundbar") then CastSpellByName("Offene Flanke")
  93.     elseif MgP(.20) and CcS("Eröffnungsangriff")<.5 and not SDt("Verwundbar") then CastSpellByName("Eröffnungsangriff")
  94.     elseif MgP(.40) and CcS("Hieb")<.5 then CastSpellByName("Hieb")
  95.     elseif MgP(.15) and CcS("Taktischer Angriff")<.5 and Blutungen>= 1 then CastSpellByName("Taktischer Angriff")  
  96.     elseif MgP(.25) and CcS("Hieb")<.5 then CastSpellByName("Hieb")
  97.     elseif boss and MkP(.15) and checkForItem("Umhang der Kühnheit von Aoth") and checkForItemCooldown("Umhang der Kühnheit von Aoth")<.5 then UseItemByName("Umhang der Kühnheit von Aoth")
  98.     elseif CcS("Wütend")<.5 then CastSpellByName("Wütend")
  99.     end
  100. end
  101.  
  102. function Bewahrer_Kundi(Cape)
  103.     if checkForItem(Cape) and EquipCD(5)<.5 then UseEquipmentItem(5)
  104.     elseif checkForItem(Cape) and EquipCD(5)>1 then UseItemByName(Cape)
  105.     end
  106.  
  107.     local mcn, scn = UnitClass("player");
  108.     local _, Blutungen = SDtID(500081)
  109.     local boss = UnitSex("target") > 2;
  110.    
  111.     AutoTarget()
  112.    
  113.     if BTl("Gestrüppschild")<10 then CastSpellByName("Gestrüppschild")
  114.     elseif BTl("Schutz der Natur")<10 then CastSpellByName("Schutz der Natur")
  115.     elseif MgP(.04) and CcS("Geladener Hieb")<.5 then CastSpellByName("Geladener Hieb")
  116.     elseif MgP(.09) and CcS("Kreuzhieb")<.5 then CastSpellByName("Kreuzhieb")
  117.     elseif SgP(.40) and CcS("Unzähmbar")<.5 then CastSpellByName("Unzähmbar")
  118.     elseif MgP(.12) and CcS("Rasendes Gestrüpp")<.5 then CastSpellByName("Rasendes Gestrüpp")
  119.     elseif SgP(.20) and CcS("Vampirpfeil")<.5 then CastSpellByName("Vampirpfeil")
  120.     elseif CcS("Bogenschuss")<.5 then CastSpellByName("Bogenschuss")
  121.     elseif HkP(.20) and CcS("Herz der Eiche")<.5 and MgP(0.4) then CastSpellByName("Herz der Eiche")
  122.     end
  123. end
  124.  
  125. function Bewahrer_Krieger(Cape)
  126.     if checkForItem(Cape) and EquipCD(5)<.5 then UseEquipmentItem(5)
  127.     elseif checkForItem(Cape) and EquipCD(5)>1 then UseItemByName(Cape)
  128.     end
  129.  
  130.     local mcn, scn = UnitClass("player");
  131.     local _, Blutungen = SDtID(500081)
  132.     local boss = UnitSex("target") > 2;
  133.    
  134.     AutoTarget()
  135.    
  136.  
  137.     if BTl("Schutz der Natur")<10 then CastSpellByName("Schutz der Natur")
  138.     elseif SgP(.30) and CcS("Bestienschlag")<.5 then CastSpellByName("Bestienschlag")
  139.     elseif MgP(.05) and CcS("Geladener Hieb")<.5 then CastSpellByName("Geladener Hieb")
  140.     elseif MgP(.10) and CcS("Kreuzhieb")<.5 then CastSpellByName("Kreuzhieb")
  141.     elseif MgP(.12) and CcS("Rasendes Gestrüpp")<.5 then CastSpellByName("Rasendes Gestrüpp")
  142.     elseif MgP(.40) and CcS("Hieb")<.5 then CastSpellByName("Hieb")
  143.     elseif MgP(.04) and CcS("Doppelschlag")<.5 then CastSpellByName("Doppelschlag")
  144.     elseif boss and SkP(.15) and checkForItem("Umhang der Kühnheit von Aoth") and checkForItemCooldown("Umhang der Kühnheit von Aoth")<.5 then UseItemByName("Umhang der Kühnheit von Aoth")
  145.     elseif CcS("Wütend")<.5 then CastSpellByName("Wütend")
  146.     end
  147. end
  148.  
  149. function AutoTarget()
  150.  if UnitIsDeadOrGhost("target") then TargetNearestEnemy()
  151.     elseif not UnitExists("target") then TargetNearestEnemy()
  152.     elseif (UnitName("target") == UnitName("player")) then TargetNearestEnemy()
  153.     elseif not UnitCanAttack("player","target") then TargetNearestEnemy()
  154.     end
  155. end
  156.  
  157. function checkForItemCooldown(iname)
  158.     local t = 0;
  159.     local fullcooldown = "";
  160.     local currentcooldown = "";
  161.     local i = 1;
  162.     while(i<181) do
  163.         local bagid, texture, name, itemCount, locked, invalid = GetBagItemInfo(i)
  164.         if name == iname then
  165.         fullcooldown, currentcooldown = GetBagItemCooldown(bagid);
  166.         t = currentcooldown;
  167.         end
  168.         i = i + 1;
  169.     end
  170.     return t;
  171. end
  172.  
  173. function checkForItem(iname)
  174.     local occupiedSlots, totalSlots = GetBagCount()
  175.     for i = 1, totalSlots do
  176.         local bagid, texture, name, itemCount, locked, invalid = GetBagItemInfo(i)
  177.         if name == iname then
  178.             return true
  179.         end
  180.     end
  181.     return false
  182. end
  183. function BTl(buffName)
  184.     local i = 1;
  185.     local t = 0;   
  186.     while(UnitBuff("player",i) ~= nil)do
  187.         if(UnitBuff("player",i) == buffName)then
  188.             t = UnitBuffLeftTime("player",i);
  189.         end
  190.         i = i + 1;
  191.     end
  192.     return t;
  193. end
  194. function SBp(buffName)
  195.     local i = 1;
  196.     local r = false;
  197.     while(UnitBuff("player",i) ~= nil)do
  198.         if(UnitBuff("player",i) == buffName)then
  199.             r = true;
  200.             return r;
  201.         end;
  202.         i = i + 1;
  203.     end;
  204.     return r;
  205. end;
  206.  
  207. --nicht vorhandenes mana
  208. function MkP(mana)
  209.     if (UnitMana("player")/UnitMaxMana("player") < (mana)) then
  210.         return true
  211.     end
  212. end
  213. function SkP(Skill)
  214.     if (UnitSkill("player")/UnitMaxSkill("player") < (Skill)) then
  215.         return true
  216.     end
  217. end
  218. --Vorhandenes Mana
  219. function MgP(mana)
  220.     if (UnitMana("player")/UnitMaxMana("player") > (mana)) then
  221.         return true
  222.     end
  223. end
  224.  
  225. function HkP(leben)
  226.     if (UnitHealth("player")/UnitMaxHealth("player") < (leben)) then
  227.         return true
  228.     end
  229. end
  230.  
  231. function HgP(leben)
  232.     if (UnitHealth("player")/UnitMaxHealth("player") > (leben)) then
  233.         return true
  234.     end
  235. end
  236.  
  237. function HkT(leben)
  238.     if (UnitHealth("target")/UnitMaxHealth("target") < (leben)) then
  239.         return true
  240.     end
  241. end
  242.  
  243. function SgP(Skill)
  244.     if (UnitSkill("player")/UnitMaxSkill("player") > (Skill)) then
  245.         return true
  246.     end
  247. end
  248. function SDt(debuffName)
  249.     local i = 1;
  250.     local y = 0;
  251.     local r = false;
  252.     while(UnitDebuff("target",i) ~= nil)do
  253.         if(UnitDebuff("target",i) == debuffName)then
  254.             r = true;
  255.             y = y + 1
  256.         end
  257.         i = i + 1;
  258.     end
  259.     return r, y;
  260. end
  261. function SDtID(Skill_ID)
  262.     local i = 1;
  263.     local y = 0;
  264.     local r = false;
  265.     while(UnitDebuff("target",i) ~= nil)do
  266.         local _,_,_,ID = UnitDebuff("target",i)
  267.         if(ID == Skill_ID)then
  268.             r = true;
  269.             y = y + 1;
  270.         end
  271.         i = i + 1;
  272.     end
  273.     return r, y;
  274. end
  275. function EquipCD(slot)
  276.     local fullcooldown, currentcooldown = GetEquipItemCooldown(slot);
  277.     return currentcooldown
  278. end
  279. function CcS(skillName)
  280.     local p = 1;
  281.     local t = 0;
  282.     local fullcooldown = "";
  283.     local currentcooldown = "";
  284.     while(p < 5) do
  285.         local i = 1;
  286.         while(GetSkillDetail(p,i) ~= nil)do
  287.             if(GetSkillDetail(p,i) == skillName)then
  288.                 fullcooldown, currentcooldown = GetSkillCooldown(p,i);
  289.                 t = currentcooldown;
  290.             end
  291.             i = i + 1;
  292.         end
  293.         p = p + 1;
  294.     end
  295.     return t;    
  296. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement