Jump to content

headcrab

Members
  • Posts

    93
  • Joined

Everything posted by headcrab

  1. You can use my plugin. It can disenchant all green items in bags on loot. No problem slightly change source code and disenchant blue too:
  2. You can add this function to your fightclass or to plugin and mill all herbs in bags at once. For example, you can add it to Profession Helper plugin and call it from craftTask: private bool milling() { string command = @" local function findherb() local function f(b,s) return select(7,GetItemInfo(GetContainerItemLink(b,s) or 0))==""Herb"" and select(2,GetContainerItemInfo(b,s))>=5 end for i=0,4 do for j=1,GetContainerNumSlots(i) do if f(i,j) then return i,j end end end end local result = false while (true) do local b,s = findherb() if (not b or not s) then return result end result = true CastSpellByName(""Milling"") UseContainerItem(b,s) end"; bool result = Lua.LuaDoString<bool>(command); Usefuls.WaitIsCastingAndLooting(); return result; }
  3. I think you got NullReferenceException because your plugin settings corrupted. Try new version 2.3.0
  4. Try to switch setting "For friends (party)", maybe will help Edit: i see you did it. So, this setting not help, and you have to write some C# code
  5. Use version 2.1.0 (download it from changelog). 2.2.0 contains some unsafe code, i'll remove it. 2.1.0 will work fine with patched robot
  6. You have to comment string Battleground.AcceptBattlefieldPort with slashes ( //). Only possible for 7.1.5 bot, because new versions protected and not copmilable (but can be patched)
  7. Try to use version 2.2.0, maybe will work without patching
  8. If your target is WoWPlayer or WoWUnit you can get it class: WoWClass targetClass = ((WoWUnit)target).WoWClass; swith (targetClass) { case WoWClass.Warrior: //melee case WoWClass.Paladin: // melee case WoWClass.Hunter: // range //blablabla } but in some cases you need also target specialization (for example, for Druid). Its possible, but only on battlefield. Look Battleground helper plugin, how it detects enemy healers, no problem to detect melee/range too
  9. Need some more information: plugin settings, wow client version, errors in log. This plugin 100% working in MOP, but if you can provide some more information, i could check and fix it in other clients
  10. I had the same problem with xml fight classes and solved it by this way: In fight class editor there is spell option "Lock Frame", true by default. In raids/battlegrounds there are too much events handled by robot, and this option can freeze your screen. Simply set false value for spells with heavy/long-calculated conditions, and it will unfreeze your screen. For spells with instant-calculated conditions you can leave true value. Usually, C# classes dont use this option
  11. too much copy-paste code. I suggest you to use Lists/arrays and loops like this: public class Main : wManager.Plugin.IPlugin { private static List<int> ArtifactItems = new List<int>(){ 141926, 152435, bla bla bla }; private static List<int> ReputationItems = new List<int>(){ 147727, 146937, bla bla bla }; private static List<int> ContainerItems = new List<int>(){ 140225, 140226, bla bla bla }; private static List<int> ChestItems = new List<int>(){ 151467, 151465, bla bla bla }; ... private void OpenItems() { List<WoWItem> myItems = ObjectManager.GetObjectWoWItem() .Where(item => item.Owner == ObjectManager.Me.Guid && item.StackCount > 0); foreach (WoWItem item in myItems) { if (ArtifactItems.Contains(item.Entry) && WorldQuestBagItemsSettings.CurrentSetting.UABool || ReputationItems.Contains(item.Entry) && WorldQuestBagItemsSettings.CurrentSetting.URBool) { // use it ItemsManager.UseItem(item.Entry); Logging.WriteDebug("Using "+item.Name); Usefuls.WaitIsCasting(); } else if (ContainerItems.Contains(item.Entry) && WorldQuestBagItemsSettings.CurrentSetting.OCBool || ChestItems.Contains(item.Entry) && WorldQuestBagItemsSettings.CurrentSetting.ODBool) { // open it ItemsManager.UseItem(item.Entry); Logging.WriteDebug("Open "+item.Name); // and loot every slot Lua.LuaDoString("for i=1,GetNumLootItems() do LootSlot(i) end"); Usefuls.WaitIsLooting(); } } } } Also, you using OCBool in your code 2 times and ODBool - never. Need to be fixed
  12. Do you use XML fight class for your death knight?
  13. You can do some research with dnSpy. Download dnSpy.zip, unpack, run and open wManager.dll - and you will see how robot works. New versions are obfuscated, and is impossible to understand what's going on inside, but old are pretty clear (if you know c# or resembling language). Using old and new versions you can find similar places in code and even do patch, for example, change this 45f to 60f. Or understand, is it possible to customize robot with plugin
  14. indeed, i forgot protected lua available from robot, but you want call it from wow process. So, you still need unlocker for addon. But because they both (robot and unlocker) change the same memory address in wow process, you will get this error sooner or later
  15. Ofcourse, you can check it. Simply run protected function CastSpellByName with any available spell name :)
  16. You do not need any unlocker when robot run, because robot unlocks lua. Simply close EWT.
  17. 45f is hardcoded in FightBG private function. Do you have decompiler? Try to find old, non-obfuscated robot and open function used in FightBG.StartFight. You will see something like this: if (woWUnit.Position.DistanceTo(position) > 45f) { Logging.WriteDebug(BlackListSerializable.Icaleodoarea()); return Int128.Zero(); } In old versions you can change this value and recompile, new versions are obfuscated, only byte-patch can help
  18. plugin can switch target only if distance to new target is less than CustomClass.GetRange To be more precise, it switch and bot starts move to target, but if someone attack you while move, bot will switch to nearest attacker. So works robot's algorithm
  19. Yes, i looked into robot code, its not enough to find new target, but need to cancel current fight too. Added it into new plugin version (2.1.0), now switching is more precious (look code for FightEvents.OnFightStart and FightEvents.OnFightLoop). You can see switch events in log (">>>>Attack enemy healer<<<< ")
  20. Did you saw Battleground helper? It contains example how to switch to enemy healer in radius (FocusHealer method). Simply filter enemies and order by distance
  21. You can patch wManager.dll this way: 1) Make shure bot cant find bobber. Go to fishing water and run this c# code in developement tools: Spell _f = new Spell("Fishing"); for (int i=0; i<10; i++) { _f.Launch(false, false, true); Others.Wait(2000); Logging.Write("Bobber GUID = "+Fishing.SearchBobber()); Lua.LuaDoString("SpellStopCasting()"); Others.Wait(100); } look in the log. If there always this strings, it means bot cant find bobber: [F] 19:10:33 - [Spell] Cast Fishing (Fishing) 19:10:35 - Bobber GUID = 0 2) try to find minimum wait value to find bobber. Gradually increase 2000 -> 3000 until you see in log non-zero bobber GUID. This code will help you: Spell _f = new Spell("Fishing"); for (int i=2000; i<3000; i=i+100) { _f.Launch(false, false, true); Others.Wait(i); Logging.Write("Wait:" + i+ " Bobber GUID = "+Fishing.SearchBobber()); Lua.LuaDoString("SpellStopCasting()"); Others.Wait(100); } If found, you can patch program 3) download and install dnSpy (dnSpy.zip) 4) run dnSpy, open wManager.dll and find method wManager.Wow.Bot.Tasks.FishingTask.LoopFish (with many arguments) You will see obfuscated code, but there is string easy to find. It should looks like this (contains symbols ThreadStart): 5) click on the method in the end of string (name can be different). You will open this method. Find in this method string "Others.Wait". This is place to patch 6) Right click ans select "Edit Method (C#)". As argument type value you found, for example, 2500: 7) Compile, save, and enjoy Never update your robot, or do this steps again, if updated, and fising not works as before
  22. Even better, no need to interrupt, simply remove ground mount for N milliseconds :) private void mountDelay(int delay) { if (delay == 0) return; string mountName = wManager.wManagerSetting.CurrentSetting.GroundMountName; if (mountName == null) return; new Thread(() => { wManager.wManagerSetting.CurrentSetting.GroundMountName = null; try { Thread.Sleep(delay); } catch (Exception arg) { Logging.WriteError("Exception during nomount: "+arg, true); } finally { wManager.wManagerSetting.CurrentSetting.GroundMountName = mountName; } }).Start(); } Will publish in next plugin version
  23. Found proper event (LUA event PLAYER_UNGHOST), new plugin version uploaded. Now you can tune delay in settings
×
×
  • Create New...