Jump to content

Elexir

WRobot user
  • Posts

    19
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Elexir reacted to Droidz in (help) Création d'un Plugin   
    using robotManager.Helpful; using wManager.Wow.Helpers; using wManager.Plugin; using Timer = System.Threading.Timer; public class Main : IPlugin { private bool _isEnabled; public void Initialize() { Logging.Write("[JunkRemover] Plugin initialized and activated"); _isEnabled = true; EventsLua.AttachEventLua("BAG_UPDATE", context => BagUpdateHandler()); } public void Dispose() { _isEnabled = false; Logging.Write("[JunkRemover] Plugin disposed"); } private Timer _debounceTimer; private void BagUpdateHandler() { Logging.Write("[JunkRemover] BAG_UPDATE"); if (_debounceTimer != null) { _debounceTimer.Change(System.Threading.Timeout.Infinite, System.Threading.Timeout.Infinite); _debounceTimer.Dispose(); } _debounceTimer = new Timer((state) => { if (_isEnabled) { Logging.Write("[JunkRemover] Checking bags for junk"); var needToRunAgain = Lua.LuaDoString<bool>(@" for i = 0, NUM_BAG_SLOTS do for j = 1, C_Container.GetContainerNumSlots(i) do local itemId = C_Container.GetContainerItemID(i, j) if itemId then local itemName, _, itemQuality = GetItemInfo(C_Container.GetContainerItemID(i, j)) if itemName and itemQuality == 0 then print('Deleting ' .. itemName) C_Container.PickupContainerItem(i, j) DeleteCursorItem() return true end end end end return false "); if (needToRunAgain) { BagUpdateHandler(); } } }, null, 1000, System.Threading.Timeout.Infinite); } public void Settings() { } }  
    JunkRemover.cs
  2. Thanks
    Elexir reacted to Droidz in New Dragonflight Firestorm server, anyone tested yet?   
    Hello,
    I added the support of the version "10.2.7 build 55664", you need to download again the updater to be able to select this version.
×
×
  • Create New...