Jump to content

jack love

WRobot user
  • Posts

    9
  • Joined

  • Last visited

Recent Profile Visitors

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

jack love's Achievements

  1. I am using the $@ method to include content in the string, but when I run Wrobot, it prompts "Unexpected characters $". Is it that Wrobot does not support compilation in this way? Or is there a problem with the code? Below is my code, thank ! public static void DeleteItems(string itemName, int leaveAmount = 0) { var itemQuantity = ItemsManager.GetItemCountByNameLUA(itemName) - leaveAmount; if (string.IsNullOrWhiteSpace(itemName) || itemQuantity <= 0) { return; } string luaToDelete = $@" local itemCount = {itemQuantity}; local deleted = 0; for b=0,4 do if GetBagName(b) then for s=1, GetContainerNumSlots(b) do local itemLink = GetContainerItemLink(b, s) if itemLink then local itemString = string.match(itemLink, ""item[%-?%d:]+""); local _, stackCount = GetContainerItemInfo(b, s); local leftItems = itemCount - deleted; if ((GetItemInfo(itemString) == ""{itemName}"") and leftItems > 0) then if stackCount <= 1 then PickupContainerItem(b, s); DeleteCursorItem(); deleted = deleted + 1; else if (leftItems > stackCount) then SplitContainerItem(b, s, stackCount); DeleteCursorItem(); deleted = deleted + stackCount; else SplitContainerItem(b, s, leftItems); DeleteCursorItem(); deleted = deleted + leftItems; end end end end end end end "; Lua.LuaDoString(luaToDelete); }
  2. In a private server, the creator has crafted a new dungeon map using the terrain of the Ruins of Ahn'Qiraj. This map bears a fresh ID, one that does not exist within the Classic WoW realms. Within this novel dungeon, invoking the 'wr' command elicits the message "Pathfinder server seems down." May I inquire if it is permissible to deactivate the Pathfinder feature within this dungeon, utilizing the quest mode's 'Follow path' function for navigation instead? Seeking Alternative Navigation Methods in Unfamiliar Dungeons When Pathfinder is Inaccessible and 'wr' Commands Keep Pausing.
  3. mabye use like this(not tested): foreach (wManager.Wow.ObjectManager.WoWItem item in bagItems) { if (Lua.LuaDoString<bool>("return IsEquippableItem(" + item.Entry + ")")) { if ((item.GetItemInfo.ItemRarity==0 && ButlerSettings.CurrentSetting.EquipGray) || (item.GetItemInfo.ItemRarity==1 && ButlerSettings.CurrentSetting.EquipWhite) || (item.GetItemInfo.ItemRarity==2 && ButlerSettings.CurrentSetting.EquipGreen) || (item.GetItemInfo.ItemRarity==3 && ButlerSettings.CurrentSetting.EquipBlue) || (item.GetItemInfo.ItemRarity==4 && ButlerSettings.CurrentSetting.EquipEpic) || (item.GetItemInfo.ItemRarity==5 && ButlerSettings.CurrentSetting.EquipLegendary)) { checkThisItem(item); Thread.Sleep(shortDelay); } } }
  4. It's working now, thank you again.
  5. I really appreciate your help, and I will give the code snippet you provided a try.
  6. Hello everyone, I am developing an automation script related to "World of Warcraft" in C# and have encountered some difficulties. When a character dies and enters spirit form, I need to write code to automatically control the character to click the "Release Spirit" button and talk to a specific NPC after releasing the spirit. At present, I am not clear on how to implement this function with C# code. Specifically, I need to achieve the following steps: Detect whether the character is dead and in spirit form. Automatically click the "Release Spirit" button. Move close to the NPC. Engage in dialogue with the NPC. I have tried some basic API calls and event listening, but I have not been successful. I don't know if anyone has experience in this area or can provide some guidance and code examples? If someone can help me, I would be very grateful. Any suggestions, guidance, or code examples would be greatly helpful to me. Thank you! This is my code:(ToPositionAndIncractWithNpc unsuccessful) robotManager.Events.FiniteStateMachineEvents.OnRunState += (engine, state, cancelable) => { if (state is wManager.Wow.Bot.States.Resurrect && ObjectManager.Me.IsDead) { if (ObjectManager.Me.Position.DistanceTo2D(new Vector3(-14284.96f, 288.4472f, 32.33204f)) < 2) { var path = new Vector3(-14283.13f, 293.2209f, 31.98451f); MovementManager.Go(PathFinder.FindPath(path),false); MovementManager.StopMove(); var position = new Vector3(-14283.13f, 293.2209f, 31.98451f); int npcEntryId = 1000128; wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWithNpc(position, npcEntryId); System.Threading.Thread.Sleep(500); Usefuls.SelectGossipOption(3); System.Threading.Thread.Sleep(3000); } cancelable.Cancel = true; } };
×
×
  • Create New...