Jump to content

Ordush

Elite user
  • Posts

    1171
  • Joined

  • Last visited

Everything posted by Ordush

  1. Sounds really weird, i can guarantee you that the problem does not lie within the fightclass, I have people who has used it for level 1-70 and people using it at level 70, without any of the problems you are describing. If want me to, i can check it out on teamviewer, just PM me. :)
  2. The thing is, the "really obvious stutter" is only happening to you. Something must be set up wrong somewhere. Perhaps you have "Improve combat rotation speed" on under Advanced Settings? What level are you? What language is your client?
  3. Perfect! Thank you!
  4. Sorry for the general settings ofc. :) It's because I've made it so it updates some in-game lua variables every time it saves/loads. (It's so i don't have to make an addon with savedVariables to save my lua variables between sessions.) For my fightclass
  5. sounds to me like you have set up your wrobot or your game wrong somehow? Make sure that under Interface options -> Combat you have marked Auto Attack/Auto Shot. The move back is made so if you are too close to use ranged attacks it will move away from the mobs to make sure you are in the more than 5 yards from mobs (this is required to shoot). This only happens if your pet has aggro on the mob, so if your char goes in melee range (this is what happens if you don't mark Auto Attack/Auto Shot) it will keep going back into melee range.
  6. I see that it is marked as not a bug. Is this something that will change? Or will this just remain impossible in TBC?
  7. Hey all! The save and load functiosn are called 3 times. First load is when you open settings, save is called when you close settings, load is called again when you start the bot (press play) Is there any way that i can call the save or load during the rotaiton?
  8. There it is again, the condescending.. Why do you keep doing that? I did not copy paste your code, i allready did change the typo in HunterMarkDisabled i also changed the typo in LUA HunterMark... This did not change anything at all. Still the same in-game and in the log.
  9. If i do /run print(HuntersMarkDisabled) it shows false now, instead of nil. So it seems that it worked. But it still doesn't save the settings. Edit: If i stop and start the bot, it also turns HuntersMarkDisabled into false even if it was true before i started the bot. So it just defaults to false for some reason. Just as it did before.
  10. wow is not giving any errors. It's still just writing: PUSHED TO LUA VALUE HuntersMarkDisabled= and WRobot writes the same as before: 18:28:49 - Wrobot push to LUA HunterMark=False return result=False isCorret=True 18:28:51 - Wrobot fetch from LUA HunterMark=False
  11. It still gives the same result. even with ToLower (I copy pasted your code)
  12. I see. No hoenestly, i did not notice the Uppercase False. I will try doing lower case. :)
  13. My lua code is not missing anything, it works just fine without this code. I allready know what the problem is: It's this line: HuntersMarkDisabled = " + HuntersMark + "; It doens't work like that, it will just make HuntersMarkDisabled nil, instead of HuntersMark value. if (HuntersMark) { Lua.LuaDoString("HuntersMarkDisabled = true"); } else { Lua.LuaDoString("HuntersMarkDisabled = false"); } This however, does work.
  14. 16:48:53 - Wrobot push to LUA HunterMark=False return result=False isCorret=True 16:48:58 - Wrobot fetch from LUA HunterMark=False
  15. I really do appreciate your help mate. But do you HAVE to be so condescending? I am not a programmer no, everything i know i have taught myself over the last 6 months. I can promise you that i am not bad with lua at all! And yes i do know what "bug hunting" is, or as it is really called debugging... I already have debugged my lua code. Nothing is wrong with my lua code at all. Everything works perfect from the lua perspective. The only place where i am having issues is using the c#. If i was pro programmer, i would not go to these forums to ask for help. Anyway when i load the bot it gives me: PUSHED TO LUA VALUE HuntersMarkDisabled= When i open fight class settings i get: PUSHED TO LUA VALUE HuntersMarkDisabled= When i close fight class settings i get: FETCH FROM LUA VALUE HuntersMarkDisabled= So it seems as if it does not read the value from neither settings nor in-game. Although i know that earlier it has been reading the settings. Since it did change the value in settings, but it just didn't save them. I allrdy earlier figured that you can't do HuntersMarkDisabled = " + HuntersMark + "; Since it makes HuntersMarkDisabled nil. That is why i did: if (HuntersMark) { Lua.LuaDoString("HuntersMarkDisabled = true"); } else { Lua.LuaDoString("HuntersMarkDisabled = false"); }
  16. @camelot10 I have tried this: Just as you told me to, but if i do it like this. It does not work. HuntersMark just defaults to false here for some reason. It is as if it doesn't save. My example i set HuntersMarkDisabled = true in-game. then i close the bot, and do /reloadui so that my lua is cleared, then i load the bot and run it. now HuntersMarkDisabled = false Even SteadyShot which should not in any way be influenced by the game keeps going to "false". :O [Serializable] public class HunterBeastmasterSettings : Settings { const string FILE_PREFIX = "CustomClass-HunterBeastmaster"; [Setting] [DefaultValue(true)] [Category("Combat Spells - Hunter Abilities")] [DisplayName("Hunter's Mark Disabled")] [Description("Is Hunter's Mark Disabled?")] public bool HuntersMark { get; set; } [Setting] [DefaultValue(true)] [Category("Combat Spells - Hunter Abilities")] [DisplayName("Steady Shot")] [Description("Use Steady Shot")] public bool SteadyShot { get; set; } HunterBeastmasterSettings() { ConfigWinForm(new System.Drawing.Point(400, 400), "HunterBeastmaster " + Translate.Get("Settings")); } public static HunterBeastmasterSettings CurrentSetting { get; set; } public static bool Load() { try { if (File.Exists(AdviserFilePathAndName(FILE_PREFIX, ObjectManager.Me.Name + "." + Usefuls.RealmName))) { CurrentSetting = Load<HunterBeastmasterSettings>(AdviserFilePathAndName(FILE_PREFIX, ObjectManager.Me.Name + "." + Usefuls.RealmName)); CurrentSetting.PushToLua(); // SETTINGS LOADED, MUST BE TRANSLATED TO LUA return true; } CurrentSetting = new HunterBeastmasterSettings(); } catch (Exception e) { Logging.WriteError(FILE_PREFIX + " load error: " + e); } return false; } public bool Save() { try { CurrentSetting.FetchFromLua(); // LOAD SETTINGS FROM LUA return Save(AdviserFilePathAndName(FILE_PREFIX, ObjectManager.Me.Name + "." + Usefuls.RealmName)); } catch (Exception e) { Logging.WriteError(FILE_PREFIX + " save error: " + e); return false; } } void FetchFromLua() { HuntersMark = Lua.LuaDoString<bool>("return HuntersMarkDisabled"); } void PushToLua() { if (HuntersMark) { Lua.LuaDoString("HuntersMarkDisabled = true"); } else { Lua.LuaDoString("HuntersMarkDisabled = false"); } } }
  17. Yeah, i thought that was the problem, but i tried swapping them around as you just said, but then nothing happens at all, it neither loads nor saves anything, it just stays "false" no matter what. :/ And you are right, i don't fully understand it, since C# is not my strongest. Happy that you are willing to help, i will try swap them around and see if i was mistaken. :)
  18. Hey all This is a followup post from a previous one, i decided to make a new one to clear up all the clutter. I have some code below that is ALMOST working. The problem is: My variables set in the settings of my FC defaults to false when not loaded from in-game lua. Therefor when i reload the game, instead of setting my settings to what they were before, they just default to false. Anyone with more C# experience than me, who can see what is wrong? These variables are set in my lua: HuntersMarkDisabled = true/false When the profile is loaded: LoadedInLua = true <-- This is so it doesn't overwrite it's own settings before the profile is loaded. [Serializable] public class HunterBeastmasterSettings : Settings { const string FILE_PREFIX = "CustomClass-HunterBeastmaster"; [Setting] [DefaultValue(true)] [Category("Combat Spells - Hunter Abilities")] [DisplayName("Hunter's Mark Disabled")] [Description("Is Hunter's Mark Disabled?")] public bool HuntersMark { get; set; } [Setting] [DefaultValue(true)] [Category("Combat Spells - Hunter Abilities")] [DisplayName("Steady Shot")] [Description("Use Steady Shot")] public bool SteadyShot { get; set; } HunterBeastmasterSettings() { ConfigWinForm(new System.Drawing.Point(400, 400), "HunterBeastmaster " + Translate.Get("Settings")); } public static HunterBeastmasterSettings CurrentSetting { get; set; } public static bool Load() { try { if (File.Exists(AdviserFilePathAndName(FILE_PREFIX, ObjectManager.Me.Name + "." + Usefuls.RealmName))) { CurrentSetting = Load<HunterBeastmasterSettings>(AdviserFilePathAndName(FILE_PREFIX, ObjectManager.Me.Name + "." + Usefuls.RealmName)); CurrentSetting.FetchFromLua(); // LOAD SETTINGS FROM LUA return true; } CurrentSetting = new HunterBeastmasterSettings(); } catch (Exception e) { Logging.WriteError(FILE_PREFIX + " load error: " + e); } return false; } public bool Save() { try { CurrentSetting.PushToLua(); // SETTINGS LOADED, MUST BE TRANSLATED TO LUA return Save(AdviserFilePathAndName(FILE_PREFIX, ObjectManager.Me.Name + "." + Usefuls.RealmName)); } catch (Exception e) { Logging.WriteError(FILE_PREFIX + " save error: " + e); return false; } } void FetchFromLua() { var LoadedInLua = Lua.LuaDoString<bool>("return LoadedInLua"); if (LoadedInLua) { HuntersMark = Lua.LuaDoString<bool>("return HuntersMarkDisabled"); } } void PushToLua() { if (HuntersMark) { Lua.LuaDoString("HuntersMarkDisabled = true"); } else { Lua.LuaDoString("HuntersMarkDisabled = false"); } } }
  19. It's because the file is encrypted. It has 1 line which WRobot translates into the whole fight class. Edit: He only had trial version of WRobot, which did not work with the encrypted FC's apparently.
  20. This is a problem because if you play with other hunters, you won't be able to use Serpent Sting. Just imagine being a resto druid with another resto druid in party. ;)
  21. If you use "Target Buff Casted by Me" in the fight class editor, it doesn' have any effect. Example: I use serpent sting on target, and tell it to only use serpent sting if target doesn't have the buff made by me called serpent sting. It will keep spamming serpent sting. If you use the "Target Buff" and set it to Serpent Sting and false, it will not spam Serpent Sting. Reason why this is: In TBC the UnitBuff filter " PLAYER " is not a thing in the UnitBuff Table.
  22. That did not work, it just gives the error: Couldn't find CVar named 'HuntersMarkDisabled'. However i did fix it by doing this: [Serializable] public class HunterBeastmasterSettings : Settings { const string FILE_PREFIX = "CustomClass-HunterBeastmaster"; [Setting] [DefaultValue(true)] [Category("Combat Spells - Hunter Abilities")] [DisplayName("Hunter's Mark Disabled")] [Description("Is Hunter's Mark Disabled?")] public bool HuntersMark { get; set; } [Setting] [DefaultValue(true)] [Category("Combat Spells - Hunter Abilities")] [DisplayName("Steady Shot")] [Description("Use Steady Shot")] public bool SteadyShot { get; set; } HunterBeastmasterSettings() { ConfigWinForm(new System.Drawing.Point(400, 400), "HunterBeastmaster " + Translate.Get("Settings")); } public static HunterBeastmasterSettings CurrentSetting { get; set; } public static bool Load() { try { if (File.Exists(AdviserFilePathAndName(FILE_PREFIX, ObjectManager.Me.Name + "." + Usefuls.RealmName))) { CurrentSetting = Load<HunterBeastmasterSettings>(AdviserFilePathAndName(FILE_PREFIX, ObjectManager.Me.Name + "." + Usefuls.RealmName)); CurrentSetting.FetchFromLua(); // SETTINGS LOADED, MUST BE TRANSLATED TO LUA return true; } CurrentSetting = new HunterBeastmasterSettings(); } catch (Exception e) { Logging.WriteError(FILE_PREFIX + " load error: " + e); } return false; } public bool Save() { try { CurrentSetting.PushToLua(); // LOAD SETTINGS FROM LUA return Save(AdviserFilePathAndName(FILE_PREFIX, ObjectManager.Me.Name + "." + Usefuls.RealmName)); } catch (Exception e) { Logging.WriteError(FILE_PREFIX + " save error: " + e); return false; } } void FetchFromLua() { HuntersMark = Lua.LuaDoString<bool>("return HuntersMarkDisabled"); } void PushToLua() { if (HuntersMark) { Lua.LuaDoString("HuntersMarkDisabled = true"); } else { Lua.LuaDoString("HuntersMarkDisabled = false"); } } } With that code, i don't combine C# and Lua in same string. But it does what it is supposed to. It also does change in the settings and changes in-game if i change it in the settings. So all is good. However, when i reload the game, it seems as if the FetchFromLua Happens before the PushFromLua so it resets to false because of that. This does make sense since it's supposed to fetch from lua on load, but if i swap the two so it fetches on save and pushes on load, then nothing works.
  23. Thanks for the tips, i will give it a try. :)
  24. I will just make an example of how i'd love for this to work. :) SLASH_TOGGLEHUNTERSMARK1 = '/togglehuntersmark' SlashCmdList.TOGGLEHUNTERSMARK1=function() if HuntersMarkDisabled then HuntersMarkDisabled = false else HuntersMarkDisabled = true end end Then the condition is set to HuntersMarkDisabled false to use hunters mark. Works very well without any problems. Now the problem is i relog the game HuntersMarkDisabled is reset (due to the variable no longer being true/false). So camelot10 came up with the code above, so that my HuntersMarkDisabled would be stored with the Fight Class settings. Here the problem is that when it does Lua.LuaDoString("HuntersMarkDisabled = " + HuntersMark); it doesn't turn HuntersMarkDisabled into what HuntersMark is, but it just sets it to nil. Hope someone can help with this problem. :)
  25. It still turns HuntersMarkDisabled into nil no matter what it's set to. Instead of true/false it turns into nil. =/
×
×
  • Create New...