GuardianDruid by captain - MMOCrawlerbots | WoW Bot Forum
Important: Please register to test the 20 minutes trial version or buy the bot!
Bot is ready for WoW 5.2 #16826
Wow Bot: CrawlerBot Last version: click here State: EU: working US: working

Author Topic: GuardianDruid by captain  (Read 1205 times)

November 06, 2012, 17:40:31 PM

captain

  • **
  • Posts: 50
  • Reputation: 3
    • View Profile
Everything works for me, hope for you too. With this Profile you cant die against normal mobs.
ID's should now work for all. If not, tell me.  Tell me if you find bugs.
gimme reputation, YOLO!

For those who have problems with ID's look at post #25

New Version 16/01/2013:

Maul works better now.
Added Wild Charge and some conditions.
Changed some Priorities, especially if many opponents attack.

Before Pull:

- It casts Innervate if mana is low
- It casts Healing Touch if health is under 30%
- It casts Rejuvenationi if its Health is is under 80%, if its not in bear form and if its rage is under 20 or if its not in bear form
  and its mana is higher 20%
- It  buffs MdW
- It pulls with Faerie Fire/ Faerie Swarm if its rdy, if not with Growl

In Fight:

- It casts Shadowmeld, if health is under 8% and if its known
- It casts Might of Ursoc if its health is under 20%
- It casts Survivalinstincts if its health is under 30%
- It casts Renewal if its health is under 40%
- It casts Barkskin if its health is under 50%
- It casts Rage if its rage is under 40% and its life is under 90%
- It casts Frenzied Regeneration if its rage is higher 60 and its health is under 90%
- It casts Savage Defense if its life is higher 90%, its rage is higher 90% and the attackers are 5 or more.

Dmg Spells:

- It casts Berserk if the attackers are 3 and if you dont have incarnation on
- It casts Incaration if the attackers are 5 or more
- It casts Thrash if Incarnation is on and the Target does not have the Thrash Debuff
- It casts Bear Hug if rdy
- It casts Mangle if its rdy and the attackers are less than 9
- It casts Thrash if the Target does not have the Debuff and does have the Lacerate Debuff
- It casts Maul if its health is higher 90%, his rage is higher 90%, the Target has the Lacerate Debuff and the attackers are
  less then 5
- It casts Swipe if the attackers are more then 9 (Then it does more dmg then Mangle)
- It casts Lacerate if the target hasnt the Debuff

I dont mentioned all conditions but most.

The Script:

function Settings()
   FightDist = 6;
   PullDist = 29;
end

function GetRage()
        LuaDoString("rage = UnitPower('player', 1);");
        rage = tonumber(WowGetLuaValue("rage"));
        return rage;
end

function GetMana()
        LuaDoString("mana = UnitPower('player', 0);");
        mana = tonumber(WowGetLuaValue("mana"));
        return mana;
end


function PullMob(MobAddr)

   if not HasBuff(Player,5487) and GetMana() <= 25 and IsSpellReady(29166) then
      _Log("Cast Innervate");
      CastSpellByID(29166 , Player , true);
      return;
   end

   if PlayerHpPercent() <= 30 and IsSpellReady(5185) then
      _Log("Hp lower then 30%: Cast Healing Touch");
      CastSpellByID(5185 , Player , true);
      return;
   end
   
    if PlayerHpPercent() < 80 and HasBuff(Player,5487) and not HasBuff(Player,774) and GetRage() < 20 and IsSpellReady(774) then
      _Log("Cast Rejuvenation");
      CastSpellByID(774, Player, true);
      return;
      
    elseif PlayerHpPercent() < 80 and not HasBuff(Player,5487) and not HasBuff(Player,774) and GetMana() > 20 and IsSpellReady(774) then
      _Log("Cast Rejuvenation");
      CastSpellByID(774, Player, true);
      return;
   end
   
   if not HasBuff(Player,1126) then
      _Log("Cast Mark of the Wild");
      CastSpellByID(1126 , Player , true);
      return;
   end
   
   if not HasBuff(Player,5487) then
      _Log("Cast Bear Form");
      CastSpellByID(5487 , Player , true);
      return;
   end
   
   if IsSpellKnown(102401) and GetDistToUnit(Target) >= 8 and GetDistToUnit(Target) <=25 and IsSpellReady(16979) then
        _Log("Target not in Range: cast Wild Charge" );
       CastSpellByID(16979 , Player , true);
       return;
   
   elseif IsSpellReady(770) and IsSpellKnown(770) then
      _Log("Cast Faerie Swarm");   
      CastSpellByID(770, MobAddr , true);
      return;
      
    elseif IsSpellReady(6795) and IsSpellKnown(6795) then
      _Log("Cast Growl");   
      CastSpellByID(6795 , MobAddr , false);
      return;
   end
   
end

function NextAction()
   if true then return end
end


function Fight()
   Target = GetAttacker(1);



------Survival

   if PlayerHpPercent() <= 8 and IsSpellKnown(58984) and IsSpellReady(58984) then
      _Log("Hp lower then 8%: cast Shadowmeld");
      CastSpellByID(58984 , Player , true);
                Sleep(2000);
      return;
   
   elseif PlayerHpPercent() <= 20 and IsSpellReady(106922) then
      _Log("Hp lower then 20% cast Might of Ursoc");
      CastSpellByID(106922 , Player , false);
      return;
   
   elseif not HasBuff(Player,5487) then
      _Log("Cast Bear Form");
      CastSpellByID(5487 , Player , true);
      return;
   
   elseif PlayerHpPercent() <= 30 and IsSpellReady(61336) then
      _Log("Hp lower then 30% cast Survivalinstincts");
      CastSpellByID(61336 , Player , false);
      return;   

   elseif PlayerHpPercent() <= 40 and IsSpellReady(108238) and IsSpellKnown(108238) then
      _Log("Hp lower then 40%: cast Renewal");
      CastSpellByID(108238 , Player , false);
      return;
   
   elseif PlayerHpPercent() <= 50 and IsSpellReady(22812) then
      _Log("Hp lower then 50% Cast Barkskin");
      CastSpellByID(22812 , Player , false);
      return;
   
   elseif HasBuff(Player,5487) and GetRage() <= 40 and PlayerHpPercent() <= 90 and IsSpellReady(5229) then
      _Log("Cast Rage");
      CastSpellByID(5229 , Player , true);
      return;
      
   elseif HasBuff(Player,5487) and GetRage() >= 60 and PlayerHpPercent() <= 90 then
      _Log("Cast Frenzied Regeneration");
      CastSpellByID(22842 , Player , false);
      return;

   elseif HasBuff(Player,5487) and PlayerHpPercent() >= 90 and GetAttackerCount() >=5 and GetRage() >= 90 then
       _Log("Cast Savage Defense");
       CastSpellByID(62606 , Player , false);
       return;   
   end
   
   FaceTarget(Target);
   StartAutoAttack();
   
------ Dmgspells:   
    if IsSpellKnown(102401) and GetDistToUnit(Target) >= 8 and GetDistToUnit(Target) <= 25 and IsSpellReady(16979) then
        _Log("Target not in Range: cast Wild Charge" );
       CastSpellByID(16979 , Player , true);
       return;
    end
    if  GetAttackerCount() >=5 and IsSpellReady(106731) and not HasBuff(Player,50334) then
      _Log("many attacksers: cast Incarnation");
      CastSpellByID(106731 , Player , true);
      return;
    end
    if  GetAttackerCount() >=3 and IsSpellReady(106952) and not HasBuff(Player,102558) then
      _Log("Three attacksers: cast Berserk");
      CastSpellByID(106952 , Player , false);
      return;
    end
   if IsSpellReady(77758) and UnitBuffTimeLeft(Target,77758) < 3500 and GetUnitHpPro(Target) >= 25.0 then
      _Log("Cast Thrash");
      CastSpellByID(77758 , Target , true);
      return;
   end
   if IsSpellReady(6807) and GetAttackerCount() <5 and PlayerHpPercent() >= 90 and GetRage() >= 90 then
       _Log("Cast Maul");
       CastSpellByID(6807 , Target , false);
       return;
   end
   if IsSpellReady(33878) and GetAttackerCount() <= 9 then
      _Log("Cast Mangle");
      CastSpellByID(33878 , Target , true);
      return;
   end
   if IsSpellReady(106785) and GetAttackerCount() >= 9 then
      _Log("Cast Swipe");
      CastSpellByID(106785 , Target , true);
      return;
   end   
   if IsSpellReady(102795) and GetUnitHpPro(Target) >= 20.0 then
      _Log("Cast Bear Hug");
      CastSpellByID(102795 , Target , true);
      return;
   end   
    if IsSpellReady(33745) and GetUnitHpPro(Target) >= 20.0 and GetAttackerCount() <= 9 and not HasBuff(Player,50334) and UnitBuffTimeLeft(Target,33745) < 4000 then
      _Log("Cast Lacerate");
      CastSpellByID(33745 , Target , true);
      return;    
    end
   if IsSpellReady(77758) then
      _Log("Cast Thrash");
      CastSpellByID(77758 , Target , true);
      return;
   end   
   if IsSpellReady(33745) and not HasBuff(Player,102558) and GetAttackerCount() <= 9 then
      _Log("Cast Lacerate");
      CastSpellByID(33745 , Target , true);
      return;
      
   end

end
« Last Edit: January 22, 2013, 00:58:30 AM by captain »

November 08, 2012, 16:00:31 PM
Reply #1

mrgamer

  • *
  • Posts: 7
  • Reputation: 0
    • View Profile
in my opinion this .lua it's very correct, but in reality, my char tries to cast Mangle, but he doesn't success...  :-[

It's like it targets the wrong target

November 08, 2012, 17:58:46 PM
Reply #2

captain

  • **
  • Posts: 50
  • Reputation: 3
    • View Profile
Hm, for me it works. Here's a newer version. The Pull was buggy sometimes. Now it pulls with Growl. Have you tried to remove the "and not HasBuff(Player,102558)" condition? Ive always Problems with the conditions..
« Last Edit: December 03, 2012, 16:51:05 PM by captain »

November 08, 2012, 19:45:36 PM
Reply #3

mrgamer

  • *
  • Posts: 7
  • Reputation: 0
    • View Profile
It's very strange, the code it's correct, since it works for Lacerate, but both Mangle and Thrash does the same thing

http://i.imgur.com/RdH2p.jpg
you can see here what happens: seems that the button is clicked, but the spell it's not really casted.
I've even checked if the spellid is correct, and it is... just using: /run print(GetSpellLink("Mangle"):match("spell:%d+"))

PS: It's not really important to me since i use this for gathering only, but being able to kill 2 mobs would be nice

edit, more info:

I'm using a classic enGB client, i imagine this can seem very strange, but still it only works for lacerate, i will try changing from castspellbyid to castspellbyname and see if it works
« Last Edit: November 08, 2012, 19:48:32 PM by mrgamer »

November 08, 2012, 19:50:37 PM
Reply #4

captain

  • **
  • Posts: 50
  • Reputation: 3
    • View Profile
strange. sometimes ive the same problem. the bot isnt casting mangle all the time if its rdy but in most cases it does.  what is the first attack it does if you start fight? does it start with lacerate?
EDIT: does he cast mangle if you remove all of its conditions?
« Last Edit: November 08, 2012, 19:56:59 PM by captain »

November 08, 2012, 20:01:58 PM
Reply #5

mrgamer

  • *
  • Posts: 7
  • Reputation: 0
    • View Profile
no captain, very thanks for this script.. i've extensively tried to edit it, etc.. even removing all other conditions mangle cannot be cast in any case...

it's very strange, but it think depends on the bot side, the LUA it's very clear, and correct!

EDIT: FUCKIN STRANGE! casting mangle with the id 33917 WORKS

In addition, if i use the script i posted above, it returned the ID you provided (33878)

more edit: using the addon idTip (you can get it on curse), i noticed that spellids change when you shapeshift, you used the ids when in bearform, that is the most correct and ideal thing to do, of course! But those don't work always for me :(

I've made swipe work using ID 106785, but couldn't make Thrash work, i've got 3 IDS in my game (106830 cat, 106832 caster, 77758 bear) none of them works.
« Last Edit: November 08, 2012, 20:24:19 PM by mrgamer »

November 08, 2012, 20:20:35 PM
Reply #6

captain

  • **
  • Posts: 50
  • Reputation: 3
    • View Profile
hm, this is rly strange. and now with the other id it works? then i should try to take the other ids of incarnation and berserk, because they rent working too.

November 08, 2012, 20:25:15 PM
Reply #7

mrgamer

  • *
  • Posts: 7
  • Reputation: 0
    • View Profile
check the new edit, thanks for the support btw, your script is golden ;)

would be nice to have more testers

November 08, 2012, 20:37:09 PM
Reply #8

captain

  • **
  • Posts: 50
  • Reputation: 3
    • View Profile
Ok, i see. ty^^ but it could be better if the manapercent condition would work correctly, dont know why it doenst work.
EDIT: now i tried the normal BerserkID and it works 8)
EDITagain: Incarnation works.
ill update the script tomorrow with new id's and upload it.
EDITagain: your swipe id works for me too.
andEDITagain: Thrash only works for me if i use 77758.
« Last Edit: November 09, 2012, 17:29:09 PM by captain »

November 10, 2012, 19:37:33 PM
Reply #9

dhope

  • *
  • Posts: 2
  • Reputation: 0
    • View Profile
after a while:

[19:36:14] - 2b9b69d0
[19:36:14] - Cast Growl
[19:36:20] - 2b9b69d0
[19:36:20] - Cast Growl
[19:36:25] - 2b9b69d0
[19:36:25] - Cast Growl
[19:36:30] - 2b9b69d0
[19:36:30] - Cast Growl

November 10, 2012, 20:22:52 PM
Reply #10

captain

  • **
  • Posts: 50
  • Reputation: 3
    • View Profile
Hm, for me it works. looks like he is only pulling. have you tried it with an other profile?

November 20, 2012, 18:46:39 PM
Reply #11

captain

  • **
  • Posts: 50
  • Reputation: 3
    • View Profile

November 27, 2012, 14:24:17 PM
Reply #12

Cap

  • *
  • Posts: 39
  • Reputation: 0
    • View Profile
Hello everyone how can reduce attack time between spels in bear form because its near 2 sec. Can someone correct this?

November 27, 2012, 16:55:57 PM
Reply #13

captain

  • **
  • Posts: 50
  • Reputation: 3
    • View Profile
You cant. This is Bot side i think. Thats because hes waiting after every spell for the global cd and hes waiting a bit longer. CastSpellByID(5185 , Player , true);
You can write false instead of true, then he wont wait but then he would try to cast a new spell while you still have gobal cd.

November 29, 2012, 06:06:00 AM
Reply #14

Timmid

  • *
  • Posts: 16
  • Reputation: 1
    • View Profile
Where is Bear Hug at?  You should implement that. ( I did already )

The bot wasn't casting certain spells so I removed conditions and it's working a lot better now. 

 

* Useful Links

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

* Useful Stuff