Jump to content

Ordush

Elite user
  • Posts

    1167
  • Joined

  • Last visited

Everything posted by Ordush

  1. 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.
  2. I see that it is marked as not a bug. Is this something that will change? Or will this just remain impossible in TBC?
  3. 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?
  4. 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.
  5. 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.
  6. 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
  7. It still gives the same result. even with ToLower (I copy pasted your code)
  8. I see. No hoenestly, i did not notice the Uppercase False. I will try doing lower case. :)
  9. 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.
  10. 16:48:53 - Wrobot push to LUA HunterMark=False return result=False isCorret=True 16:48:58 - Wrobot fetch from LUA HunterMark=False
  11. 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"); }
  12. @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"); } } }
  13. 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. :)
  14. 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"); } } }
  15. 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.
  16. 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. ;)
  17. 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.
  18. 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.
  19. Thanks for the tips, i will give it a try. :)
  20. 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. :)
  21. It still turns HuntersMarkDisabled into nil no matter what it's set to. Instead of true/false it turns into nil. =/
  22. Once again Thanks a ton Camelot!
  23. We sorted this out using teamviewer, he was low level, so he had to disable abilities (through the in-game interface) that his hunter didn't know. I will soon come out with an update that does this automaticly and a lot more cool stuff will be in that update. :)
  24. It works for everyone else who is using it. Is your client English? Do you play TBC? What level are you? Do you have the newest version of WRobot? any other info you can give me? :)
  25. Hey all, i've been tinkering with importing settings into in-game lua variables. With the help of camelot10 I'm almost there getting everything to work. void FetchFromLua() { HuntersMark = Lua.LuaDoString&lt;bool&gt;("return HuntersMarkDisabled"); } This works great, as it changes my setting based on the in-game variable HuntersMarkDisabled. The problem is, when i want to send that data back to the game after a new session. I use. void PushToLua() { Lua.LuaDoString("HuntersMarkDisabled = " + HuntersMark); } Which should set the variable HuntersMarkDisabled to whatever HuntersMark was in C# before. Now, what happens is: This turns HuntersMarkDisabled into nil instead of true/false My guess is that, what it is doing is: It's looking for the lua Variable HuntersMark instead of C#. Any help would be appreciated! :) Edit: Here is all my code: [Serializable] public class HunterBeastmasterSettings : Settings { private bool _huntersmark = true; [Setting] [DefaultValue(true)] [Category("Combat Spells - Hunter Abilities")] [DisplayName("Hunter's Mark Disabled")] [Description("Is Hunter's Mark Disabled?")] public bool HuntersMark { get { return _huntersmark; } set { _huntersmark = value; } } private bool _steadyshot = true; [Setting] [DefaultValue(true)] [Category("Combat Spells - Hunter Abilities")] [DisplayName("Steady Shot")] [Description("Use Steady Shot")] public bool SteadyShot { get { return _steadyshot; } set { _steadyshot = value; } } private HunterBeastmasterSettings() { ConfigWinForm(new System.Drawing.Point(400, 400), "HunterBeastmaster " + Translate.Get("Settings")); } public static HunterBeastmasterSettings CurrentSetting { get; set; } public bool Save() { try { return Save(AdviserFilePathAndName("CustomClass-HunterBeastmaster", ObjectManager.Me.Name + "." + Usefuls.RealmName)); } catch (Exception e) { Logging.WriteError("HunterBeastmasterSettings &gt; Save(): " + e); return false; } } public static bool Load() { try { if (File.Exists(AdviserFilePathAndName("CustomClass-HunterBeastmaster", ObjectManager.Me.Name + "." + Usefuls.RealmName))) { CurrentSetting = Load&lt;HunterBeastmasterSettings&gt;(AdviserFilePathAndName("CustomClass-HunterBeastmaster", ObjectManager.Me.Name + "." + Usefuls.RealmName)); CurrentSetting.PushToLua(); CurrentSetting.FetchFromLua(); return true; } CurrentSetting = new HunterBeastmasterSettings(); } catch (Exception e) { Logging.WriteError("HunterBeastmasterSettings &gt; Load(): " + e); } return false; } void FetchFromLua() { HuntersMark = Lua.LuaDoString&lt;bool&gt;("return HuntersMarkDisabled"); } void PushToLua() { Lua.LuaDoString("HuntersMarkDisabled = " + HuntersMark); } }
×
×
  • Create New...