Jump to content

headcrab

Members
  • Posts

    93
  • Joined

Everything posted by headcrab

  1. for me this works: robotManager.Events.FiniteStateMachineEvents.OnRunState += StateWatcher; ... private void StateWatcher(Engine engine, State state, CancelEventArgs cancelable) { if (state == null) return; if (state is ResurrectBG && AutoBGSettings.CurrentSetting.ressBGpause) { string mountName = wManager.wManagerSetting.CurrentSetting.GroundMountName; if (mountName == null) return; wManager.Wow.Class.Spell mount = new wManager.Wow.Class.Spell(mountName); new System.Threading.Thread(() => { System.Threading.Thread.Sleep(1000); Timer mountTimer = new Timer(1000); while (!mountTimer.IsReady && ObjectManager.Me.IsAlive) { if (ObjectManager.Me.CastingSpellId == mount.Id) { Lua.LuaDoString("SpellStopCasting()"); Logging.Write("stop mount"); } System.Threading.Thread.Sleep(50); } }).Start(); } } Solution is more complex, because ResurrectBG fires many times when player dead. Need to play with timers, but in general it works. I'll test it and will publish new version of plugin
  2. Yes, for me too. They work in the same thread and sometimes cast mount starts before ResurrectBG ends. Need to search another event or maybe start thread with mounting control on event start. I will search
  3. My previous solution dont work 100% and i found better (simply dont let to use ground mount for 1st second): if (state is ResurrectBG) { String mountName = wManager.wManagerSetting.CurrentSetting.GroundMountName; if (mountName == null) return; wManager.Wow.Class.Spell mount = new wManager.Wow.Class.Spell(mountName); for (int i=0; i<10; i++) { System.Threading.Thread.Sleep(100); if (ObjectManager.Me.CastingSpellId == mount.Id) Lua.LuaDoString("SpellStopCasting()"); } } I added it to my Battleground helper plugin, so you can simply install it and select option ResurrectBG pause
  4. for me this code helps static Main(){ robotManager.Events.FiniteStateMachineEvents.OnAfterRunState += (engine,state) => { if (state == null) return; if (state is ResurrectBG) { Usefuls.WaitIsCasting(); Usefuls.WaitIsCasting(); Usefuls.WaitIsCasting(); } }; } just need some pause to cast 2-3 buffs
  5. ObjectManager.GetWoWUnitHostile is useful function in many cases. To select lowest HP enemy, to multi dot, etc. But useless in pvp, because returns List<WoWUnit> objects with WoWPlayer exclusion (there is woWObject.Type==WoWObjectType.Unit condition inside this function). So, proper GetWoWUnitHostile is: public static List<WoWUnit> GetWoWPlayerHostile() { List<WoWUnit> result = new List<WoWUnit>(); try { foreach (WoWObject woWObject in ObjectManager.ObjectList) { if (!woWObject.IsValid || woWObject.IsInvisible) continue; WoWUnit o; switch (woWObject.Type) { //case WoWObjectType.Unit: // o = new WoWUnit(woWObject.GetBaseAddress); // break; case WoWObjectType.Player: o = new WoWPlayer(woWObject.GetBaseAddress); break; default: continue; } if (woWObject.IsInvisible) continue; if (o.Reaction <= Reaction.Unfriendly && !o.IsDead) { result.Add(o); } } } catch (Exception arg) { Logging.WriteError("GetWoWPlayerHostile error " + arg, true); } return result; } public static List<WoWUnit> GetWoWUnitHostile() { List<WoWUnit> enemies = GetWoWPlayerHostile(); if (enemies.Count == 0) enemies = ObjectManager.GetWoWUnitHostile(); return enemies; } This function selects enemy players first, and if nothing found, selects hostile units. I left some commented code in GetWoWPlayerHostile so you can see my 1st variant - 1 list with players and units together. But i think final variant is better for PVP and even for all cases
  6. Always false means robot can't recognize player's cast. Maybe bot bug, maybe they use modified client - anyway it will be hard botting on this server. You can use Droidz workaround if it relays only gathering, but it not good if bot can't recognize every cast.
  7. try to increase in 4rd string 200 -> 300...400... Does it helps or every time it writes Me.IsCast=False? If helps, but requires big value (>500), just forget this server.
  8. Looks like WaitIsCasting broken. Does this code gathers herb (with normal latency, less than 500)? What you see in log window? WoWObject _t = ObjectManager.GetWoWGameObjectByName("Peacebloom").OrderBy(o => o.GetDistance).FirstOrDefault(); Interact.InteractGameObject(_t.GetBaseAddress, true, false); // this code works like Usefuls.WaitIsCasting(); robotManager.Helpful.Timer timer = new robotManager.Helpful.Timer((double)(Usefuls.Latency + 200)); while (!timer.IsReady && !ObjectManager.Me.IsCast) { Thread.Sleep(5); } Logging.Write("Me.IsCast="+ObjectManager.Me.IsCast); while (ObjectManager.Me.IsCast) { Thread.Sleep(30); } Usefuls.WaitIsLooting(); Move.JumpOrAscend(); If not gathers, try to increase in 4rd string 200 -> 300...400 but not much more.
  9. Yes, it should. There is condition Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause, so need to run any product. Can you execute the same code, but with wrotation running? Does it gather herb in this case?
  10. Try to add 1 more string to the end of my code, just to check WaitIs.. functions working properly (with normal latency): Move.JumpOrAscend(); Does bot gather herb in this case?
  11. Does it works with normal latency? This C# code is approximate algorythm from old version of wrobot (i used 7.1.5 archieve available on this server). Now it obfuscated and almost impossible to say what it doing. Maybe there is some errors there, maybe some plugin or profile code interrupts herb gathering. Try to find older version of wrobot
  12. Ok. Because all want know, i'll write it here. check AcceptBattlefieldPort is disabled on your server. Open developement tools and run C# code Battleground.JointBattleGroundQueue(32); // this is random BG Thread.Sleep(1000); Battleground.AcceptBattlefieldPortAll(); This starts BG queue, and should accept BG when it ready. If it works, you need no any modifications. If not accepts, LUA function AcceptBattlefieldPort is disabled on your server or works unstable. So, go to step 2 download and install dnSpy in dnSpy open wManager.dll and find method AcceptBattlefieldPortAll right click and run menu item "Edit Method (C#)". You will see obfuscated code, but no problem. Find string with Battleground.AcceptBattlefieldPort and comment it compile and save. Voila, now your battlegrounder will accept BG with Battlegrounder helper plugin, because it uses alternative method. Dont update your robot, or do this steps after every update
  13. So, AcceptBattlefieldPort is disabled on your server. You have to patch wManager.dll: open wManager.Wow.Helpers.Battleground.AcceptBattlefieldPortAll() method find and comment string with Battleground.AcceptBattlefieldPort compile After this bot will 100% accept BG with my plugin
  14. Can you target it with left button (i have not herbaist right now, so cant check how it works)? If cant, try this code WoWObject _t = ObjectManager.GetWoWGameObjectByName("put here name of herb").OrderBy(o => o.GetDistance).FirstOrDefault(); Interact.InteractGameObject(_t.GetBaseAddress, true, false); Usefuls.WaitIsCasting(); Usefuls.WaitIsLooting(); but dont forget to put right herb name
  15. My code does not loots, just test for SearchBobber. If 2000 not works, it means fisherbot will not work for you, because there is 2000 delay hardcoded in bot. Write it to bugtracker, maybe @Droidz will fix it. Or patch FishingTask class
  16. Can you find herb node, select it and in developement tools execute C# code: Interact.InteractGameObject(ObjectManager.Target.GetBaseAddress, true, false); Usefuls.WaitIsCasting(); Usefuls.WaitIsLooting(); does it gather herb? But set NORMAL latency, 200-300
  17. Not latency, but 3000 in my code Spell _f = new Spell("Fishing"); for (int i=0; i<10; i++) { _f.Launch(false, false, true); Others.Wait(3000); Logging.Write("Bobber GUID = "+Fishing.SearchBobber()); Lua.LuaDoString("SpellStopCasting"); Others.Wait(100); } Can you find minimum, maybe 2500 ? Fishing task not depends on latency, you will have to patch wManager.dll, or wait until @Droidz do it. Thats why i say "bad"
  18. Now all code is obfuscated and its impossible to understarnd what it doing. Maybe there is logical error in bot. But in previous versions there was this sequence in farming task: Interact.InteractGameObject(gameObject.GetBaseAddress, true, false); Usefuls.WaitIsCasting(); Usefuls.WaitIsLooting(); And WaitIsCasting algorithm (with my comments): robotManager.Helpful.Timer timer = new robotManager.Helpful.Timer((double)(Usefuls.Latency + 200)); while (!timer.IsReady && !ObjectManager.Me.IsCast) { // waits until start casting but no more than Usefuls.Latency + 200 if (!Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause) { break; } Thread.Sleep(5); } while (ObjectManager.Me.IsCast && Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause) { // waits while casting Thread.Sleep(30); } Could you run this C# code in developement tools wManager.DevelopmentTools.OutPutCSharp= Usefuls.LatencyReal;
  19. Its bad. Try to increase wait time 2000->3000, but not much more. Does it helps?
  20. Simly copy paste my code, or do not rename Fishing in string Logging.Write("Bobber GUID = "+Fishing.SearchBobber());
  21. Sorry, wrong variable name. Need to rename, for examlpe, Fishing -> _f Spell _f = new Spell("Fishing"); for (int i=0; i<20; i++) { _f.Launch(false, false, true); Others.Wait(2000); Logging.Write("Bobber GUID = "+Fishing.SearchBobber()); Lua.LuaDoString("SpellStopCasting"); Others.Wait(100); }
  22. latency is just server reaction time, you do not need so high settings. 500 ms is enough to get response from server. It recognises you start interact with herb node, and player start casting "Herb Gathering" spell. After this bot waits while player casting (infinite) and then looting (latency+2000). When gather manually, do you need wait 2500 ms before "Herb Gathering" starts? I think no. So, suspecting something else. I think it HumanMasterPlugin - it starts moving too early. Disable it and check herb gathering
  23. To find the cause go to fishable water, open developer tools and run this C# code: Spell Fising = new Spell("Fishing"); for (int i=0; i<20; i++) { Fishing.Launch(false, false, true); Others.Wait(2000); Logging.Write("Bobber GUID = "+Fishing.SearchBobber()); Lua.LuaDoString("SpellStopCasting"); Others.Wait(100); } Write what you see in log. Is there GUID value every time?
  24. Resolved with battleground helper, but in some cases wManager.dll requires patch (if AcceptBattlefieldPort is disabled on server)
×
×
  • Create New...