Important: Please register to test the 20 minutes trial version or buy the bot!
Bot is ready for wow patch 5.3 #16992... Happy botting!
Wow Bot: CrawlerBot Last version: click here State: EU: working US: working

  • another Fury Warrior CustomClass 5 1
Currently:  

Author Topic: another Fury Warrior CustomClass  (Read 962 times)

November 25, 2012, 05:03:42 AM

kampfschaf

  • ****
  • Posts: 349
  • Reputation: 29
  • me gusta.
    • View Profile
Hello, I am drunk. And welcome to jackass!

bandaging prepull, using master healing potions, heroic leaping /charging/heroic throw/taunt pull on mobs and stuff. will continue work after sleeping. maybe. have to redefine "more than 2 attackers" situation.

tested ~2 hours on lotus daily quest mobs in valley of eternal blossoms with single minded fury gear itemlevel 464, nothing spectacular.
Should be pretty compatible downwards.
give it a try and gimme feedback!
this is work in progress, so the customclass is quite "talky" and there's a lot of comments in the source code.

Code: Lua
  1. --fury warrior custom class by kampfschaf
  2. function Settings()
  3.         FightDist = 5;
  4.         PullDist = 24;
  5. end
  6.  
  7. function InCombat()
  8.         LuaDoString("combat=UnitAffectingCombat('player')");
  9.         if WowGetLuaValue("combat") == "1" then
  10.                 return true;
  11.         else
  12.                 return false;
  13.         end
  14. end
  15.  
  16. -- function InZerkerStance()
  17.         -- if IsSpellKnown(2458) then
  18.                 -- LuaDoString('zerkicon, zerkname, zerkactive = GetShapeshiftFormInfo(3);');
  19.                 -- zerkstate = WowGetLuaValue("zerkactive");
  20.                 -- if  zerkstate == "1" then
  21.                         -- return true;
  22.                 -- else
  23.                         -- return false;
  24.                 -- end
  25.         -- else
  26.                 -- return true -- fallback wenn
  27.         -- end
  28. -- end
  29.  
  30. -- function ActivateZerkerstance()
  31.         -- if IsSpellKnown(2458) and not InZerkerStance() then
  32.                 -- _Log("Berserker Stance");
  33.                 -- CastSpellByID(2458, Player, true);
  34.                 -- NextAction();
  35. -- end
  36.  
  37. function GetRage()
  38.         LuaDoString("power = UnitPower('player', 1);");
  39.         Rage= tonumber(WowGetLuaValue("power"));
  40.         --_Log(Rage);
  41.         return Rage;
  42. end
  43.  
  44. function CanCleave()
  45.         if IsSpellKnown(845) and IsSpellReady(845) and GetRage() >= 30 then
  46.         _Log("-- standardcleave");
  47.         return true
  48.         end
  49.         if IsSpellKnown(122510) and IsSpellKnown(845) and HasBuff(Player, 122510) then
  50.         _Log("--ultimatum cleave");
  51.         return
  52.         end
  53. end
  54.  
  55.  
  56. function NextAction()
  57.         if true then return end
  58. end
  59.  
  60. function PullMob(MobAddr)
  61.        
  62.         --variables used for pull routine
  63.         TargetDist = GetDistToUnit(MobAddr); --distance from toon to target
  64.         Target=MobAddr; --i'm too fuckin lazy
  65.        
  66.         -- heal with heavy windwool bandage at level 85+ when HP below 50% and no recently bandaged debuff present     
  67.        
  68.         if PlayerHpPercent() <= 50 and not HasBuff(Player, 11196) and not InCombat() then
  69.                 _Log("prepull bandage");
  70.                 LuaDoString('bandagename= GetItemInfo(72986); RunMacroText(string.format("/use %s",bandagename))');
  71.                 Sleep(8500);
  72.                 NextAction();          
  73.         end    
  74.        
  75.         --pull charge id100 (lv3, 8-25m) > leap id6544 (lv85, 8-40m) > heroic throw  id57755 (lv20, 30m) > taunt id355 (lv12, 30m)      
  76.        
  77.         --ActivateZerkerstance();
  78.         --check for battleshout
  79.         if IsSpellKnown(6673) and IsSpellReady(6673) and not HasBuff(Player, 6673) then
  80.                 _Log("prepull bshout");
  81.                 CastSpellByID(6673, Player, true);
  82.                 NextAction();
  83.         end
  84.        
  85.        
  86.         -- charge. use only with glyph of blazing trail. sucker
  87.         if IsSpellKnown(100) and IsSpellReady(100) and TargetDist >= 8 and TargetDist <= 25 then
  88.                 _Log("CHAAAARGE");
  89.                 CastSpellByID(100, Target, true);
  90.                 NextAction();
  91.         --leap, for style. inspirational thanks fly out to hamburger
  92.         elseif IsSpellKnown(6544) and IsSpellReady(6544) and TargetDist >= 8 and TargetDist <= 40 then
  93.                 _Log("pull heroic leap");
  94.                 LuaDoString('name= GetSpellInfo(6544); RunMacroText(string.format("/cast %s",name))')
  95.                 tPos = GetUnitPos(Target);
  96.                 DoTerrainClick(tPos[0],tPos[1],tPos[2]);
  97.                 NextAction();
  98.         --hthrow
  99.         elseif IsSpellKnown(57755) and IsSpellReady(57755) and TargetDist <= 30 then
  100.                 _Log("pull heroic throw");
  101.                 CastSpellByID(57755, Target, true);    
  102.                 NextAction();
  103.         --taunt
  104.          elseif IsSpellKnown(355) and IsSpellReady(355) and TargetDist <= 30 then
  105.                  _Log("pull Taunt");
  106.                  CastSpellByID(355, Target, true);
  107.                  NextAction();
  108.         end    
  109.         --autoswing start
  110.        
  111.         StartAutoAttack();     
  112. end
  113.  
  114.  
  115.  
  116. function Fight()
  117.         Target = GetAttacker(1);
  118.         StartAutoAttack();
  119.         --check for possible bot fucked-up-ness
  120.         if not InCombat() then         
  121.                 _Log("we are not actually in fight, calm down bro");
  122.                 Sleep(2000);
  123.         end
  124.        
  125.         --selfheal via victory rush, buff "victorious" id 32216
  126.         if IsSpellKnown(34428) and HasBuff(Player, 32216) then
  127.                 _Log("victory rush");
  128.                 CastSpellByID(34428, Target, true);
  129.                 NextAction();
  130.         end
  131.         --heal via master healing potion level 85+ itemid 76097
  132.         if PlayerHpPercent() <=50 then
  133.                 _Log("using master healing potion");
  134.                 LuaDoString('healpotname= GetItemInfo(76097); RunMacroText(string.format("/use %s",healpotname))');
  135.                 NextAction();
  136.         end
  137.        
  138.         --check for Battleshout, apply if we do not waste rage
  139.         if IsSpellKnown(6673) and IsSpellReady(6673) and GetRage() <= 70 then
  140.                 _Log("Battleshout");
  141.                 CastSpellByID(6673, Player, true);
  142.                 NextAction();
  143.         end
  144.         --can we execute him already? used between 20 and 5 percent mob hp
  145.         if IsSpellKnown(5308) and IsSpellReady(5308) and GetRage() >= 30 and GetUnitHpPro(Target) <= 20 then
  146.                 _Log("EXECUTE");
  147.                 CastSpellByID(5308, Target, true);
  148.                 NextAction();
  149.         end
  150.        
  151.         -- combat routine for single target fights
  152.         -- check if we are in zerker stance ... how the fuck do i do this?     
  153.         --ActivateZerkerstance();
  154.        
  155.         -- BShoutExecute > BT > smash > Raging Blow > wildstrike when bloodsurge buff > heroic strike when rage>80
  156.         --bloodthirst, 23881, generate 10 rage
  157.         if IsSpellKnown(23881) and IsSpellReady(23881) then
  158.                 _Log("Bloodthirst");
  159.                 CastSpellByID(23881, Target, true);
  160.                 NextAction();
  161.         end
  162.         --colossus smash, 86346, 0 rage
  163.         if IsSpellKnown(86346) and IsSpellReady(86346) then
  164.                 _Log("Colossus Smash");
  165.                 CastSpellByID(86346, Target, true);
  166.                 NextAction();
  167.         end
  168.        
  169.         --use berserker rage 18499 when  rage is below 80 and raging blow buff 131116 is not active (BR triggers buff 131116)
  170.        
  171.         if IsSpellKnown(18499) and GetRage() <=80 and not HasBuff(Player, 131116) then
  172.                 _Log("Berserker Rage");
  173.                 CastSpellByID(18499, Player, false);
  174.                 NextAction();
  175.         end
  176.        
  177.         --raging blow, 85288, cost 10 rage, only active when buff 131116 is active
  178.         if IsSpellKnown(85288) and IsSpellReady(85288) and HasBuff(Player, 131116) and GetRage() >= 10 then
  179.                 _Log("Raging Blow");
  180.                 CastSpellByID(85288, Target, true);
  181.                 NextAction();
  182.         end
  183.        
  184.         if GetAttackerCount <= 2 then
  185.                 --wild strike, 100130, 30 rage, 10 rage with bloodsurge proc. use only with bloodsurge proc(46916)
  186.                 if IsSpellKnown(100130) and IsSpellKnown(46915) and HasBuff(Player, 46916) and GetRage() >= 10 then
  187.                         _Log("got bloodsurge buff&10+ rage");
  188.                         if GetRage() >=20 then --use 2 times                   
  189.                                 if GetRage() >=30 then --use 3 times
  190.                                         _Log("wild strike#3");
  191.                                         CastSpellByID(100130, Target, true);--30+ rage
  192.                                 end
  193.                                 _Log("Wild Strike #2");
  194.                                 CastSpellByID(100130, Target, true); --20+ rage
  195.                         end
  196.                         --elsewise use one time
  197.                         _Log("wild strike#1");
  198.                         CastSpellByID(100130, Target, true);--10+rage          
  199.                         NextAction();
  200.                 end
  201.                 --heroic strike when rage exceeds 80, id 78, costs 30 rage
  202.                 if IsSpellKnown(78) and GetRage() >= 80 then
  203.                         _Log("excess Rage, using HStrike");
  204.                         CastSpellByID(78, Target, false);
  205.                         NextAction();
  206.                 end
  207.                 --use deadly calm to recude heroic strike cost to 10 rage
  208.                 if IsSpellKnown(85730) and IsSpellReady(85730) and GetRage() >= 60 then
  209.                         _Log("deadly calm");
  210.                         CastSpellByID(85730, Player, true);
  211.                         NextAction();
  212.                 end
  213.                 --check for HS with deadly calm
  214.                 if IsSpellKnown(78) and HasBuff(Player, 85730) and GetRage() >= 60 then
  215.                         _Log("deadly calm HS");
  216.                         CastSpellByID(78, Target, false);
  217.                         NextAction();
  218.                 end
  219.         end
  220.         --combat routine for multiple mobs     
  221.         if GetAttackerCount() >=3 then
  222.        
  223.                 if GetAttackerCount() >= 4 then
  224.                         --ausrasten
  225.                         if IsSpellKnown(107574) and IsSpellReady(107574) then
  226.                                 _Log("going AVATAR");
  227.                                 CastSpellByID(107574, Player, true);
  228.                                 NextAction();
  229.                         end
  230.                         if IsSpellKnown(114207) and IsSpellReady(114207) then
  231.                                 _Log("Skull Banner");
  232.                                 CastSpellByID(114207, Player, false);
  233.                                 NextAction();
  234.                         end
  235.                         if IsSpellKnown(1719) and IsSpellReady(1719) then
  236.                                 _Log("Recklessness");
  237.                                 CastSpellByID(1719, Player, false);
  238.                                 NextAction();
  239.                         end
  240.                 end
  241.        
  242.                 if IsSpellKnown(6343) and IsSpellReady(6343) and GetRage() >= 20 then
  243.                         _Log("Thunderclap");
  244.                         CastSpellByID(6343, Target, true);
  245.                         NextAction();
  246.                 end
  247.                
  248.                 if IsSpellKnown(1680) and IsSpellReady(1680) and GetRage() >= 30 then
  249.                         _Log("Whirlwind");
  250.                         CastSpellByID(1680, Target, true);
  251.                         NextAction();
  252.                 end
  253.                
  254.                 if IsSpellKnown(46924) and IsSpellReady(46924) then
  255.                         _Log("Bladestorm");
  256.                         CastSpellByID(46924, Target, true);
  257.                         Sleep(6000);
  258.                         NextAction();  
  259.                 end
  260.                
  261.                 if IsSpellKnown(845) and IsSpellReady(845) and IsSpellKnown(85730) and IsSpellReady(85730) and GetRage() >= 30 then
  262.                         _Log("Cleaving with deadly calm");
  263.                         CastSpellByID(85730, Player, true);
  264.                         CastSpellByID(845, Target, true);
  265.                         CastSpellByID(845, Target, true);
  266.                         NextAction();
  267.                 end    
  268.         end
  269. end
  270.  

I'm back and slowly getting back into my projects

November 27, 2012, 16:42:31 PM
Reply #1

clipper99

  • *
  • Posts: 2
  • Reputation: 0
    • View Profile
i get an error in chat log

[16:41:07] - Bloodthirst
[16:41:09] - Error: ...s\bot\CB_0011_clean\CustomClasses\Warrior Fury 2.lua:184: attempt to compare function with number
[16:41:10] - Fight!
[16:41:10] - Fight...


any ide whats the problem ?

November 27, 2012, 17:08:33 PM
Reply #2

eyotiste

  • *
  • Posts: 8
  • Reputation: 0
    • View Profile
I think you need to add () after GetAttackerCount line 184

January 26, 2013, 11:01:52 AM
Reply #3

Woodstah

  • *
  • Posts: 42
  • Reputation: 3
    • View Profile
Awesome profile. +1 rep

March 12, 2013, 08:23:03 AM
Reply #4

Brou8224

  • *
  • Posts: 14
  • Reputation: 4
    • View Profile
Getting this error in the bot during combat:

[02:21:07] - Fight!
[02:21:08] - Bloodthirst
[02:21:09] - Error: CustomClasses\Warrior\Furry.lua:184: attempt to compare function with number
[02:21:09] - [Reg]: Reading "Reg.ini".

Any idea what the problem could be? I use to code my paladin customs but a warrior is a different story and im quite rusty on code in general.

Hope you can take a look :)

 

* Useful Links

WoW Bot - CrawlerBot
* Download
* Guides
* Info & Clip

* Useful Stuff