Skip to content
View in the app

A better way to browse. Learn more.

WRobot

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Can't Figure Out Why WR Doesn't Want My Plugin...

Featured Replies

Hey y'all!

I'm actually SUPER bummed, because I've basically been working on this all day (learning c# as I go + I'm a bit slow...don't make fun of me).

I finally had it all fixed down to only throwing one error...and now the bot won't even load the plugin.

Can anyone see what's wrong? (All the log says is "Error to load plugin PATH\lootoggle.cs")

using robotManager.Helpful;
using System.Threading;
using robotManager.Products;
using wManager.Wow.Enums;
using wManager.Wow.Helpers;
using wManager.Wow.ObjectManager;
using System;
using System.Collections.Generic;
using System.IO;
using System.ComponentModel;
using robotManager;


public class Lootoggle : wManager.Plugin.IPlugin
{
    private bool _isLaunched;
    private bool _isLooting;
    private int KillTime;
    private int LootTime;
    private int timeToKill;
    private int timeToLoot;
  
    public void Initialize()
    {
        _isLaunched = true;
        _isLooting = true;
        LootoggleSettings.Load();
        timeToKill = LootoggleSettings.CurrentSetting.KillMinutes * 60 * 1000;
        timeToLoot = LootoggleSettings.CurrentSetting.LootMinutes * 60 * 1000;

        Logging.Write("[Lootoggle] Started.");
        pluginLoop();
    }

    public void Dispose()
    {
        _isLaunched = false;
        Logging.Write("[Lootoggle] Disposed.");
    }

    public void Settings()
    {
        LootoggleSettings.Load();
        LootoggleSettings.CurrentSetting.ToForm();
        LootoggleSettings.CurrentSetting.Save();
    }


    public void pluginLoop()
    {
        while (Products.IsStarted && _isLaunched)
        {
            if (_isLooting)
            {
                wManager.wManagerSetting.CurrentSetting.LootMobs = _isLooting;
                Log("Bot will loot for " + LootTime + ".");
                Thread.Sleep(timeToLoot);
                Logging.Write("Disabling looting and continuing...");
                _isLooting = !_isLooting;
            }

            if (!_isLooting)
            {
                wManager.wManagerSetting.CurrentSetting.LootMobs = _isLooting;
                Logging.Write("Bot will now stop looting and only kill for " + KillTime + ".");
                Thread.Sleep(timeToKill);
                _isLooting = !_isLooting;
            }
        }
    }
    [Serializable]
    public class LootoggleSettings : Settings
    {
        [DefaultValue(3)]
        [Category("General Settings")]
        [DisplayName("Kill Time")]
        [Description("How long (in minutes) should bot should kill shit?")]
        
        public int KillMinutes { get; set; }
    
        [DefaultValue(1)]
        [Category("General Settings")]
        [DisplayName("Loot Time")]
        [Description("How long (in minutes) should bot should loot before toggling looting back off.")]
        
        public int LootMinutes { get; set; }
        
        private LootoggleSettings()
        {
            KillMinutes = 3;
            LootMinutes = 1;
            ConfigWinForm(new System.Drawing.Point(300, 400), "Lootoggle " + Translate.Get("Settings"));
        }

        public static LootoggleSettings CurrentSetting { get; set; }
        
	/*				Save/Load Functions				*/
      public bool Save()
        {
            try
            {
                return Save(AdviserFilePathAndName("Lootoggle", ObjectManager.Me.Name + "." + Usefuls.RealmName));
            }
            catch (Exception e)
            {
                Logging.WriteError("LootoggleSettings > Save(): " + e);
                return false;
            }
        }
        
        public static bool Load()
        {
            try
            {
                if (File.Exists(AdviserFilePathAndName("Lootoggle", ObjectManager.Me.Name + "." + Usefuls.RealmName)))
                {
                    CurrentSetting = Load<LootoggleSettings>(AdviserFilePathAndName("Lootoggle", ObjectManager.Me.Name + "." + Usefuls.RealmName));
                    return true;
                }
                CurrentSetting = new LootoggleSettings();
            }
            catch (Exception e)
            {
                Logging.WriteError("LootoggleSettings > Load(): " + e);
            }
            return false;
        }
    }
}

 

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.