Jump to content

[ROGUE] Stop Attacking if target Gouge/Blind


ScripterQQ

Recommended Posts

Hello, I'm doing some extra to my fight class for Rogue, I set various interrupts such as Gouge, Kidney, Blind, my question is, how can I tell the bot to stop completely attacking if target has Blind or Gouge? In this way I can recover some energy, there is kinda no point to waste 45 energy to gouge a cast and start immediately autoattack breaking it.

I tried with a lua code on top priority that basically says StopAttack(), the problem is that is working yes, but doesn't "return" and loop forever as I want (I wrote a "return" at the end of the lua code), instead it keeps reading other abilities below so the only method I could think of is adding Gouge:false to every spell, but this sounds a lot of (useless) work. Maybe some c# plugin or code placed somewhere can do this? For both gouge and blind. Thanks greetings

Link to comment
Share on other sites

static Main 
{
  wManager.Events.FightEvents.OnFightLoop += GougeHandler;
}

static void GougeHandler(WoWUnit unit, CancelEventArgs cancelable)
  {
    if(unit.HaveBuff("Gouge"))
    {
      Lua.LuaDoString("StopAttack();");
      Thread.Sleep(500);
    }
  }

I believe you can add C# code like that (probably public static void - not sure how wRobot works in that regard) to your fightclass.
 

Edited by Matenia
Link to comment
Share on other sites

Nope doesnt seem to work. I'm totally clueless about C# but I put the code in the spell field and set it"not spell, is c code", this should be correct. I set it on top priority.

Basically it engages the combat and does only autoattack, all other spells under the code are ignored, but again maybe I'm doing something wrong since I'm not expert with C#.

I even tried to replace "private" with "public static" and nothing, still same problems. I will check again with more patience

Link to comment
Share on other sites

It can't be part of the rotation. You have to add this as C# code to the fightlass where you can add extra functions and stuff - there are code examples around the forums for that.
Also CombatUtil.StopAutoAttack() is not valid code, thisis where you have to use Lua to stop attack. Lua.LuaDoString("StopAttack()");

 

Link to comment
Share on other sites

I put it into the spell rotation because If I put that into "Additional C# Code" (upper-left corner) it gives me error (something about operator "'+=" and "," , so I don't know where else to put that code honestly..I'm doing definitely something wrong I would like to test this so bad but at the same time I hate being teached step by step like a retard.

Let me figure out by myself how to make this work  :sleep:

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...