gornov.12345 1 Posted June 8 Share Posted June 8 Hi, folks. I have a problem with my fightclass, maybe someone can help me? Anyway, this description of my problem. I'm playing on custom wow server, which using russian language. So I have to do my fightclass use lua code (/runMacroText ""). It's works great, when I using it for myself, but doesn't work, when I need healing class for teammate. For exaple: I'm trying go to dungeon my character with heal, but chart just staying afk. He's trying healing enemy, but not teammate. He just choice teammate at targen on 1-2 second and switches to someone else. Then they're just die. So, how can I do to my healing teammate, don't enemy? Link to comment https://wrobot.eu/forums/topic/15477-i-need-help-with-my-fightclass-thought-lua-code/ Share on other sites More sharing options...
gornov.12345 1 Posted June 10 Author Share Posted June 10 Still need help... maybe someone know how can I fix it? @Droidz Link to comment https://wrobot.eu/forums/topic/15477-i-need-help-with-my-fightclass-thought-lua-code/#findComment-69401 Share on other sites More sharing options...
Droidz 2738 Posted June 11 Share Posted June 11 Hello, No tested, but you can try this plugin : CastSpellByName to Cast Macro.cs using robotManager.Helpful; public class Main : wManager.Plugin.IPlugin { public void Initialize() { Logging.Write("CastSpellByName to /cast plugin loaded."); robotManager.Events.Events.OnCustomEvent += OnEventsOnOnCustomEvent; } private void OnEventsOnOnCustomEvent(string name, object[] args, System.ComponentModel.CancelEventArgs cancelable) { if (name.StartsWith("SpellManager.CastSpellByName") && args.Length >= 1 && args[0] is string) { var spellName = (string)args[0]; if (!string.IsNullOrWhiteSpace(spellName)){ string luaUnit = null; if (args.Length >= 2 && args[1] is string) luaUnit = (string)args[1]; cancelable.Cancel = true; if (!string.IsNullOrWhiteSpace(luaUnit) && luaUnit != "player") { Logging.WriteDebug("Casting " + spellName + " on " + luaUnit + " with macro /cast"); wManager.Wow.Helpers.Lua.RunMacroText("/cast [@" + luaUnit + "] " + spellName); } else { Logging.WriteDebug("Casting " + spellName + " with macro /cast"); wManager.Wow.Helpers.Lua.RunMacroText("/cast " + spellName); } } } } public void Dispose() { robotManager.Events.Events.OnCustomEvent -= OnEventsOnOnCustomEvent; } public void Settings() { } } I haven't tested, but this plugin should enable fight classes that use the bot method "CastSpellByNameOn" (which is the case for most fight classes) to force the bot to use "/cast ..." instead. Therefore, use this plugin with your fight class configured normally (without using "/cast"). jamsho0t and gornov.12345 2 Link to comment https://wrobot.eu/forums/topic/15477-i-need-help-with-my-fightclass-thought-lua-code/#findComment-69403 Share on other sites More sharing options...
gornov.12345 1 Posted June 12 Author Share Posted June 12 I tested it, but I have too many errors, like this Link to comment https://wrobot.eu/forums/topic/15477-i-need-help-with-my-fightclass-thought-lua-code/#findComment-69409 Share on other sites More sharing options...
gornov.12345 1 Posted June 12 Author Share Posted June 12 I tried fix it, but errors become many. I used Visual Studio, trying fixed errors with syntax, but VS says "everything is okay", but then I put it at folder Wrobot, I got too many errors I don't know why... Can you give me an idea, why it can happen? @Droidz Link to comment https://wrobot.eu/forums/topic/15477-i-need-help-with-my-fightclass-thought-lua-code/#findComment-69410 Share on other sites More sharing options...
Droidz 2738 Posted June 13 Share Posted June 13 sorry I fixed the code of my previous post. Link to comment https://wrobot.eu/forums/topic/15477-i-need-help-with-my-fightclass-thought-lua-code/#findComment-69412 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