Jump to content

gornov.12345

WRobot user
  • Posts

    24
  • Joined

  • Last visited

Recent Profile Visitors

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

gornov.12345's Achievements

  1. Version 1.0.0

    42 downloads

    Hello everyone, I’m posting a simple plugin for Wrobot for automatic purchase of food/water. This plugin essentially performs functions that already exist in Wrobot, this is a list of buy and don't sell list. Simply, instead of setting up this list every time, you can use this plugin. You can always choose any good analogue already posted on the forum, for example: HMP or Wholesome. These are great plugins and they work great if your client is in English, but if you're like me. If you are using a client in another language, this plugin can help you. Everything you need to do.This is to edit the code yourself and add the id item that you want the bot to buy. P.S. Don't forget to add vendors to the Wrobot database. Also, thank a lot for help @Droidz
  2. Hello, I'm trying do a simple plugin, which will auto buying food/water, because in my server (RU) don't work plugins, that already there are. So, can someone check my code and say, where did I mistakes? Because VS got me too many errors. I have to say, so I'm not C# programmer, I'm most of specalization on JS, and because of that, I can do many errors, I'm trying used for solve their ChatGPT, but it don't helping so much, so I need people's help. My code: using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using wManager.Wow.Helpers; using wManager.Wow.ObjectManager; using wManager.Plugin; using robotManager.Helpful; using robotManager.Products; using wManager.Wow.Enums; public class FoodWaterPlugin : IPlugin { private readonly List<ItemInfo> foodItems = new List<ItemInfo> { new ItemInfo(4540, 1, 5), new ItemInfo(4541, 5, 15), new ItemInfo(4542, 10, 20), new ItemInfo(4544, 15, 25), new ItemInfo(4601, 20, 30), new ItemInfo(8950, 25, 35), new ItemInfo(8076, 30, 40), new ItemInfo(4599, 35, 45), new ItemInfo(2287, 40, 50), new ItemInfo(8952, 45, 55), new ItemInfo(2679, 50, 60), new ItemInfo(2680, 55, 65), new ItemInfo(2681, 60, 70), new ItemInfo(2682, 65, 75), new ItemInfo(2684, 70, 75), new ItemInfo(2687, 75, 80), new ItemInfo(2683, 80, 80), new ItemInfo(2681, 55, 60), new ItemInfo(2685, 60, 65), new ItemInfo(3727, 65, 70), new ItemInfo(3726, 70, 75), new ItemInfo(3728, 75, 80), new ItemInfo(4594, 80, 80) }; private readonly List<ItemInfo> waterItems = new List<ItemInfo> { new ItemInfo(159, 1, 5), new ItemInfo(1179, 5, 15), new ItemInfo(1205, 15, 25), new ItemInfo(1708, 25, 35), new ItemInfo(1645, 35, 45), new ItemInfo(8766, 45, 55), new ItemInfo(28399, 55, 65), new ItemInfo(33044, 65, 75), new ItemInfo(27860, 75, 80), new ItemInfo(33445, 80, 80), new ItemInfo(3356, 10, 20), new ItemInfo(2287, 20, 30), new ItemInfo(27422, 30, 40), new ItemInfo(33176, 40, 50), new ItemInfo(33177, 50, 60), new ItemInfo(33178, 60, 70), new ItemInfo(33179, 70, 80), new ItemInfo(33180, 80, 80), new ItemInfo(40731, 80, 80), new ItemInfo(19999, 40, 50), new ItemInfo(5469, 15, 25), new ItemInfo(13923, 30, 40), new ItemInfo(13443, 60, 70) }; public void Initialize() { Logging.Write("[FoodWaterPlugin] Initialized."); EventsLua.AttachEventLua("UNIT_SPELLCAST_SUCCEEDED", (s, e) => OnSpellCastSucceeded(s, e)); CheckAndBuyFoodWater(); } public void Dispose() { Logging.Write("[FoodWaterPlugin] Disposed."); EventsLua.DetachEventLua("UNIT_SPELLCAST_SUCCEEDED", (s, e) => OnSpellCastSucceeded(s, e)); } public void Settings() { } private void OnSpellCastSucceeded(string luaEvent, List<string> args) { if (args[0] == "player") { CheckAndBuyFoodWater(); } } private void CheckAndBuyFoodWater() { if (ObjectManager.Me.IsDead || ObjectManager.Me.InCombatFlagOnly) return; int foodCount = GetItemCount(GetBestFood()); int waterCount = GetItemCount(GetBestWater()); if (foodCount < 5 || waterCount < 5) { GoToVendorAndBuy(); } } private uint GetBestFood() { int playerLevel = ObjectManager.Me.Level; return foodItems.Where(item => item.MinLevel <= playerLevel && item.MaxLevel >= playerLevel) .OrderByDescending(item => item.MinLevel) .Select(item => item.Entry) .FirstOrDefault(); } private uint GetBestWater() { int playerLevel = ObjectManager.Me.Level; return waterItems.Where(item => item.MinLevel <= playerLevel && item.MaxLevel >= playerLevel) .OrderByDescending(item => item.MinLevel) .Select(item => item.Entry) .FirstOrDefault(); } private int GetItemCount(uint itemId) { return ItemsManager.GetItemCountByIdLUA((int)itemId); } private void GoToVendorAndBuy() { // Ищем ближайшего вендора WoWUnit vendor = ObjectManager.GetNearestWoWUnit(ObjectManager.GetWoWUnitVendor()).FirstOrDefault(); if (vendor != null) { // Идем к вендору и покупаем MovementManager.Go(PathFinder.FindPath(vendor.Position)); vendor.Target(); Interact.InteractGameObject(vendor.GetBaseAddress); Lua.LuaDoString($"BuyItem({GetBestFood()}, 20)"); Lua.LuaDoString($"BuyItem({GetBestWater()}, 20)"); AddToDoNotSell(GetBestFood().ToString()); AddToDoNotSell(GetBestWater().ToString()); } } private void AddToDoNotSell(string itemId) { if (!ItemsManager.GetDoNotSellList().Contains(itemId)) { ItemsManager.GetDoNotSellList().Add(itemId); } } private void RemoveFromDoNotSell(string itemId) { if (ItemsManager.GetDoNotSellList().Contains(itemId)) { ItemsManager.GetDoNotSellList().Remove(itemId); } } private class ItemInfo { public uint Entry { get; } public int MinLevel { get; } public int MaxLevel { get; } public ItemInfo(uint entry, int minLevel, int maxLevel) { Entry = entry; MinLevel = minLevel; MaxLevel = maxLevel; } } } I'm trying do a little database with item, which bot have to buy, when they're gone, also add to plugin check my lvl and check lvl item, swap then when he's had bigger lvl, also add food/drinks to don't sell list and delete then they become low lvl. I hope for your help, if you help me with this, I upload this plugin for everyone, who have same problems and they can't use HMP or Wholesome vendor... @Droidz
  3. Alright, I got it. I need God in Wrobot, @Droidz can you help me please with it? What condition I must put in to stop bot buing low lwl food and don't buy high lvl food?
  4. Still need help, maybe someone know, how can I do that?)
  5. wManager.wManagerSetting.CurrentSetting.CloseIfWhisperBiggerOrEgalAt = 99; wManager.wManagerSetting.CurrentSetting.FlightMasterDiscoverRange = 1; wManager.wManagerSetting.CurrentSetting.Selling = false; wManager.wManagerSetting.CurrentSetting.UseFlyingMount = false; wManager.wManagerSetting.CurrentSetting.HarvestHerbs = false; wManager.wManagerSetting.CurrentSetting.LootChests = false; wManager.wManagerSetting.CurrentSetting.SkinMobs = false; wManager.wManagerSetting.CurrentSetting.FlightMasterTaxiUse = false; wManager.wManagerSetting.CurrentSetting.CloseIfFullBag = false; wManager.wManagerSetting.CurrentSetting.Repair = false; wManager.wManagerSetting.CurrentSetting.HarvestMinerals = false; wManager.wManagerSetting.CurrentSetting.HarvestTimber = false; wManager.wManagerSetting.CurrentSetting.LootMobs = false; wManager.wManagerSetting.CurrentSetting.AttackBeforeBeingAttacked = false; wManager.wManagerSetting.CurrentSetting.CloseIfPlayerTeleported = false; I'm not sure, but it will be looks like this
  6. Yeah, you're right, but HumanmasterPlugin don't buy food auto (in my version wow), so I should use standart Wrobot's setting (advance settings). So I'm finding out how I can solve my problem...
  7. Actually, the title of the topic is my question, does anyone know how to prevent a bot from buying low lvl items? For example, if I want to set a list of items (via additional settings) that the bot should buy. but at the same time, so that he does not buy low lvl food and water (and high lvl too) when it is not needed. For example, the list contains “Ice Milk” water, the bot can buy it while he is lvl 5-15, but as soon as he reaches 15+, he must stop buying this water, and switch to “Melon Juice”, and so on. There is an option. through "can condition" in additional settings, but I don’t know what condition should be set there. I would be grateful for your help.
  8. Собственно, название темы это мой вопрос, кто-нибудь знает, как запретить боту покупать лоу лвл предметы? Например, если я хочу выставить список предметов (через доп.настройки), которые бот должен покупать. но при этом, чтобы он не покупал лоу лвл еду и воду (и хай лвл тоже), когда это не нужно. Например, в списке стоит вода "Ледяное молоко", бот может покупать её, пока он 5-15 лвл, но как только он берет 15+, он должен перестать покупать эту воду, а перейти на "Дынный сок", и так дальше. Есть в вариант. через can condition в доп.настройках, но я не знаю, какое условие нужно туда ставить. Буду благодарен за помощь.
  9. Hi @Droidz I have some problems with Relogger, I use each .exe of wow to share proxies to each window. BUT Relogger does not have a separation of launches for 1 character - 1 .exe, only 1 .exe = all characters, How can I fix this and will it fix it at all? If there is no such function, could you add it?
  10. I tried fix it, but errors become many. I used Visual Studio, trying fixed errors with syntax, but VS says "everything is okay", but then I put it at folder Wrobot, I got too many errors I don't know why... Can you give me an idea, why it can happen? @Droidz
  11. I tested it, but I have too many errors, like this
  12. Still need help... maybe someone know how can I fix it? @Droidz
  13. Hi, folks. I have a problem with my fightclass, maybe someone can help me? Anyway, this description of my problem. I'm playing on custom wow server, which using russian language. So I have to do my fightclass use lua code (/runMacroText ""). It's works great, when I using it for myself, but doesn't work, when I need healing class for teammate. For exaple: I'm trying go to dungeon my character with heal, but chart just staying afk. He's trying healing enemy, but not teammate. He just choice teammate at targen on 1-2 second and switches to someone else. Then they're just die. So, how can I do to my healing teammate, don't enemy?
  14. I have same problem. @Droidz need help, please
×
×
  • Create New...