Jump to content

xiaokeer

Members
  • Posts

    9
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

xiaokeer's Achievements

  1. This is my code, when I traverse through the object, I do "ObjectManager.Me.Target = target. Guid; "Select the target, but the bot will attack the target, and enter the battle, I just want to select the target and not attack, how do I need to change the code. string[] objectNames = new string[] { "血色信徒"}; while (true) { WoWUnit target = ObjectManager.GetObjectWoWUnit() .Where(o => objectNames.Contains(o.Name) && o.IsAlive) .OrderBy(o => o.GetDistance) .FirstOrDefault(); if (target != null) { ObjectManager.Me.Target = target.Guid; SpellManager.CastSpellByNameLUA("偷窃"); Thread.Sleep(100); } Thread.Sleep(1000); }
  2. This is my code, when I traverse through the object, I do "ObjectManager.Me.Target = target. Guid; "Select the target, but the bot will attack the target, and enter the battle, I just want to select the target and not attack, how do I need to change the code. string[] objectNames = new string[] { "血色信徒"}; while (true) { WoWUnit target = ObjectManager.GetObjectWoWUnit() .Where(o => objectNames.Contains(o.Name) && o.IsAlive) .OrderBy(o => o.GetDistance) .FirstOrDefault(); if (target != null) { ObjectManager.Me.Target = target.Guid; SpellManager.CastSpellByNameLUA("偷窃"); Thread.Sleep(100); } Thread.Sleep(1000); }
  3. I don't want to click on these buttons in the General Settings, please tell me the relevant code, I want to set it directly in Quester. Thank you! Flight master discover range: 1 If Whisper bigger or equal to:99 selling items :off Use Flying Mount :off Harvest Herbs :off Loot Chests :off Skin/Gather/Mine Mobs :off Use Flight Master :off Close bot on full bags :off Repair items :off Send mail :off Harvest Minerals :off Harvest Timber :off Loot Mobs :off Attack before being attacked :off Close bot if teleported :off
  4. 感谢,之前是我自己把代码搞错了,代码能正常使用的,非常感谢
  5. Thanks for the reminder, I tested it again, it was me who got the code wrong, thanks
  6. I tested it and it didn't work with a fuzzy match, and when I tested the full name with PNC "Auctioneer Billdu", I was able to match this PNC, but when I used the fuzzy name "Auctioneer", it didn't match properly, here's my code string[] objectNames = new string[] { "Auctioneer Billdu" }; float maxDistance = 2250.0f; while (true) { foreach (string objectName in objectNames) { var gameObjects = ObjectManager.GetObjectWoWGameObject() .Where(o => objectNames.Contains(o.Name) && o.GetDistance <= maxDistance) .OrderBy(o => o.GetDistance) .FirstOrDefault(); if (gameObjects != null) { string luaPrintCommand = string.Format("print('Targeted object: {0}')", gameObjects.Name); Lua.LuaDoString(luaPrintCommand); Thread.Sleep(50); } } } If you change it to the following code, it will not match the NPC: string[] objectNames = new string[] { "Auctioneer" }; float maxDistance = 2250.0f; while (true) { foreach (string objectName in objectNames) { var gameObjects = ObjectManager.GetObjectWoWGameObject() .Where(o => objectNames.Contains(o.Name) && o.GetDistance <= maxDistance) .OrderBy(o => o.GetDistance) .FirstOrDefault(); if (gameObjects != null) { string luaPrintCommand = string.Format("print('Targeted object: {0}')", gameObjects.Name); Lua.LuaDoString(luaPrintCommand); Thread.Sleep(50); } } }
  7. I'm now trying to write a bit of fuzzy matching code, but it hasn't worked,Following the normal traversal of the target name, the code I used was: string[] objectNames = new string[] { "Alliance Bonfire" }; foreach (string objectName in objectNames) { var gameObject = ObjectManager.GetWoWGameObjectByName(objectName) .Where(o => o.GetDistance <= maxDistance) .OrderBy(o => o.GetDistance) .FirstOrDefault(); if (gameObject != null ) {...... } } What I want to achieve is a fuzzy match, which doesn't require a full traversal of the "Alliance Bonfire", just a matching "Bonfire".
  8. 非常感谢,我测试了它,代码工作正常,这解决了我的很多大问题,再次感谢你
  9. I would like to know about the code for determining the durability of equipment, such as determining that the durability of equipment on a character is less than 50% in real time, and executing the follow-up code
×
×
  • Create New...