ScripterQQ 89 Posted January 10, 2018 Share Posted January 10, 2018 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 https://wrobot.eu/forums/topic/8236-rogue-stop-attacking-if-target-gougeblind/ Share on other sites More sharing options...
Matenia 628 Posted January 10, 2018 Share Posted January 10, 2018 (edited) 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 January 10, 2018 by Matenia ScripterQQ 1 Link to comment https://wrobot.eu/forums/topic/8236-rogue-stop-attacking-if-target-gougeblind/#findComment-37564 Share on other sites More sharing options...
ScripterQQ 89 Posted January 10, 2018 Author Share Posted January 10, 2018 Thanks Matenia I'm going to test this Link to comment https://wrobot.eu/forums/topic/8236-rogue-stop-attacking-if-target-gougeblind/#findComment-37565 Share on other sites More sharing options...
ScripterQQ 89 Posted January 10, 2018 Author Share Posted January 10, 2018 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 https://wrobot.eu/forums/topic/8236-rogue-stop-attacking-if-target-gougeblind/#findComment-37566 Share on other sites More sharing options...
Matenia 628 Posted January 10, 2018 Share Posted January 10, 2018 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 https://wrobot.eu/forums/topic/8236-rogue-stop-attacking-if-target-gougeblind/#findComment-37568 Share on other sites More sharing options...
ScripterQQ 89 Posted January 10, 2018 Author Share Posted January 10, 2018 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 Link to comment https://wrobot.eu/forums/topic/8236-rogue-stop-attacking-if-target-gougeblind/#findComment-37571 Share on other sites More sharing options...
Matenia 628 Posted January 10, 2018 Share Posted January 10, 2018 Edited the original code Link to comment https://wrobot.eu/forums/topic/8236-rogue-stop-attacking-if-target-gougeblind/#findComment-37573 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now